@rabex-kit/rabex-ui 0.0.7 → 0.0.8

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.
@@ -7,7 +7,7 @@ export declare type AccordionProps = MuiAccordionProps;
7
7
  * you can see Accordion Documentation api that I mentioned below [here](https://mui.com/material-ui/api/accordion/)
8
8
  *
9
9
  * ```typescript
10
- * import { Accordion } from '@rabex-kit/core';
10
+ * import { Accordion } from '@rabex-kit/rabex-ui';
11
11
  * ```
12
12
  *
13
13
  *
@@ -3,7 +3,7 @@ import { InputProps as MuiInputProps } from '@mui/material';
3
3
  import { TypographyProps } from '../Typography';
4
4
  interface CustomInputProps extends MuiInputProps {
5
5
  success?: boolean;
6
- size?: 'large' | 'medium' | 'small';
6
+ size?: 'sm' | 'md' | 'lg' | 'xl';
7
7
  helperText?: string | ReactNode;
8
8
  titleProps?: TypographyProps;
9
9
  helperTextIcon?: ReactNode;
@@ -1,10 +1,13 @@
1
1
  declare const _default: {
2
2
  components: {
3
3
  styleOverrides: {
4
- root: {
4
+ root: ({ theme, ownerState }: {
5
+ theme: any;
6
+ ownerState: any;
7
+ }) => {
8
+ backgroundColor: any;
5
9
  borderRadius: number;
6
- paddingX: number;
7
- paddingY: number;
10
+ padding: any;
8
11
  '&::before': {
9
12
  display: string;
10
13
  };
@@ -16,6 +19,19 @@ declare const _default: {
16
19
  borderBottomRightRadius: number;
17
20
  borderBottomLeftRadius: number;
18
21
  };
22
+ '& .MuiSvgIcon-root': {
23
+ height: number;
24
+ width: number;
25
+ '& path': {
26
+ fill: string;
27
+ };
28
+ };
29
+ '& .MuiAccordionSummary-root': {
30
+ minHeight: number;
31
+ };
32
+ '& .MuiAccordionSummary-content': {
33
+ margin: number;
34
+ };
19
35
  };
20
36
  };
21
37
  };
@@ -1,9 +1,10 @@
1
1
  import { Theme } from '@mui/material';
2
2
  declare module '@mui/material/InputBase' {
3
3
  interface InputBasePropsSizeOverrides {
4
- small: true;
5
- medium: true;
6
- large: true;
4
+ sm: true;
5
+ md: true;
6
+ lg: true;
7
+ xl: true;
7
8
  }
8
9
  }
9
10
  declare const _default: {
@@ -130,7 +130,7 @@ var MuiZoom = _interopDefault(require('@mui/material/Zoom/Zoom.js'));
130
130
  * you can see Accordion Documentation api that I mentioned below [here](https://mui.com/material-ui/api/accordion/)
131
131
  *
132
132
  * ```typescript
133
- * import { Accordion } from '@rabex-kit/core';
133
+ * import { Accordion } from '@rabex-kit/rabex-ui';
134
134
  * ```
135
135
  *
136
136
  *
@@ -141,7 +141,7 @@ var Accordion = function Accordion(props) {
141
141
  return React__default.createElement(MuiAccordion, Object.assign({}, props));
142
142
  };
143
143
  Accordion.defaultProps = {
144
- elevation: 1
144
+ elevation: 0
145
145
  };
146
146
 
147
147
  /**
@@ -1332,7 +1332,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1332
1332
  };
1333
1333
  return React__default.createElement(Stack, {
1334
1334
  flexDirection: "column",
1335
- gap: 2
1335
+ gap: props.size === 'sm' ? 1 : 2
1336
1336
  }, title && React__default.createElement(Typography, Object.assign({
1337
1337
  color: mode === 'light' ? 'textColor.A80' : 'textColor.A30'
1338
1338
  }, titleProps), title), React__default.createElement(MuiInputStyled, Object.assign({
@@ -1343,7 +1343,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1343
1343
  })), helperText && React__default.createElement(Stack, {
1344
1344
  flexDirection: "row",
1345
1345
  justifyContent: "space-between"
1346
- }, React__default.createElement(Typography, Object.assign({}, helperTextProps, props.size === 'small' && {
1346
+ }, React__default.createElement(Typography, Object.assign({}, helperTextProps, props.size === 'sm' && {
1347
1347
  variant: 'body3'
1348
1348
  }, {
1349
1349
  color: _handleHelperColor(props, 'helperTextProps')
@@ -1353,7 +1353,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1353
1353
  alignItems: 'center',
1354
1354
  gap: 1
1355
1355
  }
1356
- }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, props.size === 'small' && {
1356
+ }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, props.size === 'sm' && {
1357
1357
  variant: 'body3'
1358
1358
  }, {
1359
1359
  color: _handleHelperColor(props, 'helperTextEndAdornmentProps')
@@ -1362,7 +1362,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
1362
1362
  Input.defaultProps = {
1363
1363
  success: false,
1364
1364
  hasBg: false,
1365
- size: 'medium',
1365
+ size: 'md',
1366
1366
  disableUnderline: true,
1367
1367
  titleProps: {
1368
1368
  variant: 'body2',
@@ -3717,23 +3717,32 @@ var components$3 = {
3717
3717
  gap: spacing(1),
3718
3718
  transition: 'all 0.2s',
3719
3719
  padding: spacing(2.5, 3),
3720
- border: isLight ? "1px solid " + palette.textColor.A20 : "1px solid " + palette.secondary.A100,
3721
- backgroundColor: isLight ? palette.grayBackground.A20 : palette.secondary.A100,
3720
+ border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
3721
+ backgroundColor: isLight
3722
+ // ? palette.grayBackground.A20
3723
+ ? 'transparent' : palette.secondary.A100,
3722
3724
  '&:hover': {
3723
- border: isLight ? "1px solid " + palette.textColor.A20 : "1px solid " + palette.base.A60,
3724
- backgroundColor: isLight ? palette.grayBackground.A20 : palette.base.A60
3725
+ border: isLight
3726
+ // ? `1px solid ${palette.textColor.A20}`
3727
+ ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3728
+ backgroundColor: isLight
3729
+ // ? palette.grayBackground.A20
3730
+ ? 'transparent' : palette.base.A60
3725
3731
  },
3726
3732
  '&.Mui-focused': {
3727
- border: isLight ? "1px solid " + palette.primary.main : "1px solid " + palette.primary.A80,
3728
- backgroundColor: isLight ? palette.base.A0 : palette.base.A60
3733
+ border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
3729
3734
  },
3730
3735
  '&.Mui-error': {
3731
- border: isLight ? "1px solid " + palette.error.A100 : "1px solid " + palette.error.A60,
3736
+ border: isLight ? "1.5px solid " + palette.error[400] : "1px solid " + palette.error.A60,
3732
3737
  backgroundColor: isLight ? palette.base.A0 : colorManipulator_js.alpha(palette.error.A100 || '', 0.1)
3733
3738
  },
3734
3739
  '&.Mui-disabled': {
3735
- borderColor: isLight ? palette.grayBackground.A40 : palette.secondary.A100,
3736
- backgroundColor: isLight ? palette.grayBackground.A10 : palette.secondary.A100
3740
+ borderColor: isLight
3741
+ // ? palette.grayBackground.A40
3742
+ ? palette.base[300] : palette.secondary.A100,
3743
+ backgroundColor: isLight
3744
+ // ? palette.grayBackground.A10
3745
+ ? 'transparent' : palette.secondary.A100
3737
3746
  }
3738
3747
  };
3739
3748
  },
@@ -3757,36 +3766,79 @@ var components$3 = {
3757
3766
  },
3758
3767
  variants: [{
3759
3768
  props: {
3760
- size: 'small'
3769
+ size: 'sm'
3761
3770
  },
3762
3771
  style: function style(_ref3) {
3763
3772
  var theme = _ref3.theme;
3764
3773
  return {
3765
3774
  fontSize: '14px',
3766
- padding: theme.spacing(1, 3)
3775
+ padding: theme.spacing(1, 2)
3767
3776
  };
3768
3777
  }
3769
3778
  }, {
3770
3779
  props: {
3771
- size: 'large'
3780
+ size: 'md'
3772
3781
  },
3773
3782
  style: function style(_ref4) {
3774
3783
  var theme = _ref4.theme;
3775
3784
  return {
3776
- fontSize: '16px',
3777
- padding: theme.spacing(3)
3785
+ fontSize: '14px',
3786
+ padding: theme.spacing(2)
3778
3787
  };
3779
3788
  }
3780
3789
  }, {
3781
3790
  props: {
3782
- hasBg: true
3791
+ size: 'lg'
3783
3792
  },
3784
3793
  style: function style(_ref5) {
3785
3794
  var theme = _ref5.theme;
3795
+ return {
3796
+ fontSize: '14px',
3797
+ padding: theme.spacing(3, 2)
3798
+ };
3799
+ }
3800
+ }, {
3801
+ props: {
3802
+ size: 'xl'
3803
+ },
3804
+ style: function style(_ref6) {
3805
+ var theme = _ref6.theme;
3806
+ return {
3807
+ fontSize: '16px',
3808
+ padding: theme.spacing(3, 2)
3809
+ };
3810
+ }
3811
+ }, {
3812
+ props: {
3813
+ hasBg: true
3814
+ },
3815
+ style: function style(_ref7) {
3816
+ var theme = _ref7.theme;
3786
3817
  if (theme.palette.mode === 'light') {
3818
+ var isLight = theme.palette.mode === 'light';
3787
3819
  return {
3788
- border: '1px solid transparent',
3789
- background: theme.palette.secondary.A80
3820
+ // border: `1px solid ${theme.palette.base[600]}`,
3821
+ border: 'transparent',
3822
+ background: theme.palette.base[200],
3823
+ '&.Mui-disabled': {
3824
+ background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
3825
+ },
3826
+ '&:hover': {
3827
+ border: isLight
3828
+ // ? `1px solid ${palette.textColor.A20}`
3829
+ ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3830
+ backgroundColor: isLight
3831
+ // ? palette.grayBackground.A20
3832
+ ? theme.palette.base[200] : theme.palette.base.A60
3833
+ },
3834
+ '&.Mui-focused': {
3835
+ border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3836
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3837
+ },
3838
+ '&.Mui-error': {
3839
+ border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3840
+ backgroundColor: isLight ? theme.palette.base[200] : colorManipulator_js.alpha(theme.palette.error.A100 || '', 0.1)
3841
+ }
3790
3842
  };
3791
3843
  } else return {};
3792
3844
  }
@@ -3794,8 +3846,8 @@ var components$3 = {
3794
3846
  props: {
3795
3847
  success: true
3796
3848
  },
3797
- style: function style(_ref6) {
3798
- var palette = _ref6.theme.palette;
3849
+ style: function style(_ref8) {
3850
+ var palette = _ref8.theme.palette;
3799
3851
  return {
3800
3852
  border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
3801
3853
  backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
@@ -4043,21 +4095,37 @@ var RabexShadows = ['none', '0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 3px rg
4043
4095
  var RabexAccordion = {
4044
4096
  components: {
4045
4097
  styleOverrides: {
4046
- root: {
4047
- borderRadius: 12,
4048
- paddingX: 16,
4049
- paddingY: 12,
4050
- '&::before': {
4051
- display: 'none'
4052
- },
4053
- '&:first-of-type': {
4054
- borderTopRightRadius: 12,
4055
- borderTopLeftRadius: 12
4056
- },
4057
- '&:last-of-type': {
4058
- borderBottomRightRadius: 12,
4059
- borderBottomLeftRadius: 12
4060
- }
4098
+ root: function root(_ref) {
4099
+ var theme = _ref.theme;
4100
+ return {
4101
+ backgroundColor: theme.palette.base[100],
4102
+ borderRadius: 12,
4103
+ padding: theme.spacing(3.5, 4),
4104
+ '&::before': {
4105
+ display: 'none'
4106
+ },
4107
+ '&:first-of-type': {
4108
+ borderTopRightRadius: 12,
4109
+ borderTopLeftRadius: 12
4110
+ },
4111
+ '&:last-of-type': {
4112
+ borderBottomRightRadius: 12,
4113
+ borderBottomLeftRadius: 12
4114
+ },
4115
+ '& .MuiSvgIcon-root': {
4116
+ height: 20,
4117
+ width: 20,
4118
+ '& path': {
4119
+ fill: 'none'
4120
+ }
4121
+ },
4122
+ '& .MuiAccordionSummary-root': {
4123
+ minHeight: 16
4124
+ },
4125
+ '& .MuiAccordionSummary-content': {
4126
+ margin: 0
4127
+ }
4128
+ };
4061
4129
  }
4062
4130
  }
4063
4131
  }