@rabex-kit/rabex-ui 0.1.0 → 0.1.2

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.
@@ -11,6 +11,7 @@ interface CustomInputProps extends MuiInputProps {
11
11
  helperTextEndAdornment?: string | ReactNode;
12
12
  helperTextEndAdornmentProps?: TypographyProps;
13
13
  hasBg?: boolean;
14
+ fill?: boolean;
14
15
  valueFormat?: 'numbers' | 'separatedNumbers';
15
16
  valueFormatOption?: {
16
17
  separator?: string;
@@ -11,6 +11,9 @@ declare module '@mui/material/Button' {
11
11
  warning: true;
12
12
  }
13
13
  interface ButtonPropsSizeOverrides {
14
+ xsmall: true;
15
+ small: true;
16
+ medium: true;
14
17
  xs: true;
15
18
  sm: true;
16
19
  md: true;
@@ -1,6 +1,8 @@
1
1
  import { Theme } from '@mui/material';
2
2
  declare module '@mui/material/InputBase' {
3
3
  interface InputBasePropsSizeOverrides {
4
+ small: true;
5
+ large: true;
4
6
  sm: true;
5
7
  md: true;
6
8
  lg: true;
@@ -1289,7 +1289,7 @@ function _handleHelperColor(props, key) {
1289
1289
  var MuiInputStyled = /*#__PURE__*/styled(MuiInput, {
1290
1290
  name: 'MuiInput',
1291
1291
  shouldForwardProp: function shouldForwardProp(prop) {
1292
- return !['hasBg', 'titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption'].includes(prop);
1292
+ return !['hasBg', 'fill', 'titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption'].includes(prop);
1293
1293
  }
1294
1294
  })(function () {
1295
1295
  return {};
@@ -1362,6 +1362,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1362
1362
  Input.defaultProps = {
1363
1363
  success: false,
1364
1364
  hasBg: false,
1365
+ fill: false,
1365
1366
  size: 'md',
1366
1367
  disableUnderline: true,
1367
1368
  titleProps: {
@@ -2473,15 +2474,16 @@ var spaceBasedSize = function spaceBasedSize(theme) {
2473
2474
  var components = {
2474
2475
  styleOverrides: {
2475
2476
  root: function root(_ref) {
2477
+ var _spaceBasedSize$size, _spaceBasedSize$size2, _spaceBasedSize$size3, _spaceBasedSize$size4, _spaceBasedSize$size5;
2476
2478
  var theme = _ref.theme,
2477
2479
  ownerState = _ref.ownerState;
2478
2480
  var hasStartIcon = !!(ownerState !== null && ownerState !== void 0 && ownerState.startIcon);
2479
2481
  var hasEndIcon = !!(ownerState !== null && ownerState !== void 0 && ownerState.endIcon);
2480
2482
  var size = (ownerState === null || ownerState === void 0 ? void 0 : ownerState.size) || 'md';
2481
2483
  var overridenRootStyles = {
2482
- gap: spaceBasedSize(theme)[size].gap,
2483
- paddingLeft: hasStartIcon ? spaceBasedSize(theme)[size].iconSidePadding : spaceBasedSize(theme)[size].textSidePadding,
2484
- paddingRight: hasEndIcon ? spaceBasedSize(theme)[size].iconSidePadding : spaceBasedSize(theme)[size].textSidePadding
2484
+ gap: (_spaceBasedSize$size = spaceBasedSize(theme)[size]) === null || _spaceBasedSize$size === void 0 ? void 0 : _spaceBasedSize$size.gap,
2485
+ paddingLeft: hasStartIcon ? (_spaceBasedSize$size2 = spaceBasedSize(theme)[size]) === null || _spaceBasedSize$size2 === void 0 ? void 0 : _spaceBasedSize$size2.iconSidePadding : (_spaceBasedSize$size3 = spaceBasedSize(theme)[size]) === null || _spaceBasedSize$size3 === void 0 ? void 0 : _spaceBasedSize$size3.textSidePadding,
2486
+ paddingRight: hasEndIcon ? (_spaceBasedSize$size4 = spaceBasedSize(theme)[size]) === null || _spaceBasedSize$size4 === void 0 ? void 0 : _spaceBasedSize$size4.iconSidePadding : (_spaceBasedSize$size5 = spaceBasedSize(theme)[size]) === null || _spaceBasedSize$size5 === void 0 ? void 0 : _spaceBasedSize$size5.textSidePadding
2485
2487
  };
2486
2488
  return overridenRootStyles;
2487
2489
  },
@@ -2715,6 +2717,97 @@ var components = {
2715
2717
  borderRadius: theme.spacing(2)
2716
2718
  };
2717
2719
  }
2720
+ },
2721
+ /// old classes
2722
+ {
2723
+ props: {
2724
+ size: 'medium'
2725
+ },
2726
+ style: function style(_ref16) {
2727
+ var theme = _ref16.theme;
2728
+ return {
2729
+ padding: theme.spacing(2.5, 4),
2730
+ fontSize: '14px',
2731
+ lineHeight: '28px',
2732
+ fontWeight: 600
2733
+ };
2734
+ }
2735
+ }, {
2736
+ props: {
2737
+ size: 'small'
2738
+ },
2739
+ style: function style(_ref17) {
2740
+ var theme = _ref17.theme;
2741
+ return {
2742
+ padding: theme.spacing(1.5, 4),
2743
+ fontSize: '14px',
2744
+ lineHeight: '28px',
2745
+ fontWeight: 600
2746
+ };
2747
+ }
2748
+ }, {
2749
+ props: {
2750
+ size: 'xsmall'
2751
+ },
2752
+ style: function style(_ref18) {
2753
+ var theme = _ref18.theme;
2754
+ return {
2755
+ padding: theme.spacing(1, 4),
2756
+ fontSize: '14px',
2757
+ lineHeight: '24px',
2758
+ fontWeight: 100
2759
+ };
2760
+ }
2761
+ }, {
2762
+ props: {
2763
+ size: 'medium',
2764
+ isIcon: true
2765
+ },
2766
+ style: function style(_ref19) {
2767
+ var theme = _ref19.theme;
2768
+ return {
2769
+ minWidth: 'unset',
2770
+ padding: theme.spacing(3.5, 3.5)
2771
+ };
2772
+ }
2773
+ }, {
2774
+ props: {
2775
+ size: 'small',
2776
+ isIcon: true
2777
+ },
2778
+ style: function style(_ref20) {
2779
+ var theme = _ref20.theme;
2780
+ return {
2781
+ minWidth: 'unset',
2782
+ padding: theme.spacing(2.5, 2.5)
2783
+ };
2784
+ }
2785
+ }, {
2786
+ props: {
2787
+ size: 'xsmall',
2788
+ isIcon: true
2789
+ },
2790
+ style: function style(_ref21) {
2791
+ var theme = _ref21.theme;
2792
+ return {
2793
+ minWidth: 'unset',
2794
+ padding: theme.spacing(2)
2795
+ };
2796
+ }
2797
+ }, {
2798
+ props: {
2799
+ radius: 'medium'
2800
+ },
2801
+ style: {
2802
+ borderRadius: 8
2803
+ }
2804
+ }, {
2805
+ props: {
2806
+ radius: 'small'
2807
+ },
2808
+ style: {
2809
+ borderRadius: 6
2810
+ }
2718
2811
  }]
2719
2812
  };
2720
2813
  var RabexButton = {
@@ -3810,7 +3903,7 @@ var components$3 = {
3810
3903
  }
3811
3904
  }, {
3812
3905
  props: {
3813
- hasBg: true
3906
+ fill: true
3814
3907
  },
3815
3908
  style: function style(_ref7) {
3816
3909
  var theme = _ref7.theme;
@@ -3853,6 +3946,100 @@ var components$3 = {
3853
3946
  backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
3854
3947
  };
3855
3948
  }
3949
+ }, {
3950
+ props: {
3951
+ size: 'small'
3952
+ },
3953
+ style: function style(_ref9) {
3954
+ var theme = _ref9.theme;
3955
+ return {
3956
+ fontSize: '14px',
3957
+ padding: theme.spacing(1, 3)
3958
+ };
3959
+ }
3960
+ }, {
3961
+ props: {
3962
+ size: 'large'
3963
+ },
3964
+ style: function style(_ref10) {
3965
+ var theme = _ref10.theme;
3966
+ return {
3967
+ fontSize: '16px',
3968
+ padding: theme.spacing(3)
3969
+ };
3970
+ }
3971
+ }, {
3972
+ props: {
3973
+ hasBg: true
3974
+ },
3975
+ style: function style(_ref11) {
3976
+ var theme = _ref11.theme;
3977
+ if (theme.palette.mode === 'light') {
3978
+ return {
3979
+ border: '1px solid transparent',
3980
+ background: theme.palette.secondary.A80
3981
+ };
3982
+ } else return {};
3983
+ }
3984
+ }, {
3985
+ props: {
3986
+ success: true
3987
+ },
3988
+ style: function style(_ref12) {
3989
+ var palette = _ref12.theme.palette;
3990
+ return {
3991
+ border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
3992
+ backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
3993
+ };
3994
+ }
3995
+ },
3996
+ /// old styles
3997
+ {
3998
+ props: {
3999
+ size: 'small'
4000
+ },
4001
+ style: function style(_ref13) {
4002
+ var theme = _ref13.theme;
4003
+ return {
4004
+ fontSize: '14px',
4005
+ padding: theme.spacing(1, 3)
4006
+ };
4007
+ }
4008
+ }, {
4009
+ props: {
4010
+ size: 'large'
4011
+ },
4012
+ style: function style(_ref14) {
4013
+ var theme = _ref14.theme;
4014
+ return {
4015
+ fontSize: '16px',
4016
+ padding: theme.spacing(3)
4017
+ };
4018
+ }
4019
+ }, {
4020
+ props: {
4021
+ hasBg: true
4022
+ },
4023
+ style: function style(_ref15) {
4024
+ var theme = _ref15.theme;
4025
+ if (theme.palette.mode === 'light') {
4026
+ return {
4027
+ border: '1px solid transparent',
4028
+ background: theme.palette.secondary.A80
4029
+ };
4030
+ } else return {};
4031
+ }
4032
+ }, {
4033
+ props: {
4034
+ success: true
4035
+ },
4036
+ style: function style(_ref16) {
4037
+ var palette = _ref16.theme.palette;
4038
+ return {
4039
+ border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
4040
+ backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
4041
+ };
4042
+ }
3856
4043
  }]
3857
4044
  };
3858
4045
  var RabexInput = {