@rabex-kit/rabex-ui 0.1.19 → 0.1.20

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.
@@ -3806,16 +3806,15 @@ var components$3 = {
3806
3806
  transition: 'all 0.2s',
3807
3807
  padding: spacing(2.5, 3),
3808
3808
  border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
3809
- backgroundColor: isLight
3809
+ backgroundColor: isLight ?
3810
3810
  // ? palette.grayBackground.A20
3811
- ? 'transparent' : palette.secondary.A100,
3811
+ 'transparent' : palette.secondary.A100,
3812
3812
  '&:hover': {
3813
- border: isLight
3814
- // ? `1px solid ${palette.textColor.A20}`
3815
- ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3816
- backgroundColor: isLight
3813
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
3814
+ "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3815
+ backgroundColor: isLight ?
3817
3816
  // ? palette.grayBackground.A20
3818
- ? 'transparent' : palette.base.A60
3817
+ 'transparent' : palette.base.A60
3819
3818
  },
3820
3819
  '&.Mui-focused': {
3821
3820
  border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
@@ -3825,12 +3824,12 @@ var components$3 = {
3825
3824
  backgroundColor: isLight ? palette.base.A0 : alpha(palette.error.A100 || '', 0.1)
3826
3825
  },
3827
3826
  '&.Mui-disabled': {
3828
- borderColor: isLight
3827
+ borderColor: isLight ?
3829
3828
  // ? palette.grayBackground.A40
3830
- ? palette.base[300] : palette.secondary.A100,
3831
- backgroundColor: isLight
3829
+ palette.base[300] : palette.secondary.A100,
3830
+ backgroundColor: isLight ?
3832
3831
  // ? palette.grayBackground.A10
3833
- ? 'transparent' : palette.secondary.A100
3832
+ 'transparent' : palette.secondary.A100
3834
3833
  }
3835
3834
  };
3836
3835
  },
@@ -3848,7 +3847,8 @@ var components$3 = {
3848
3847
  '&::.placeholder': {
3849
3848
  opacity: 1,
3850
3849
  color: isLight ? palette.textColor.A40 : palette.textColor.A30
3851
- }
3850
+ },
3851
+ '&:-webkit-autofill': {}
3852
3852
  };
3853
3853
  }
3854
3854
  },
@@ -3860,6 +3860,7 @@ var components$3 = {
3860
3860
  var theme = _ref3.theme;
3861
3861
  return {
3862
3862
  fontSize: '14px',
3863
+ lineHeight: '24px',
3863
3864
  padding: theme.spacing(1, 3)
3864
3865
  };
3865
3866
  }
@@ -3871,6 +3872,7 @@ var components$3 = {
3871
3872
  var theme = _ref4.theme;
3872
3873
  return {
3873
3874
  fontSize: '14px',
3875
+ lineHeight: '24px',
3874
3876
  padding: theme.spacing(2, 3)
3875
3877
  };
3876
3878
  }
@@ -3882,6 +3884,7 @@ var components$3 = {
3882
3884
  var theme = _ref5.theme;
3883
3885
  return {
3884
3886
  fontSize: '14px',
3887
+ lineHeight: '24px',
3885
3888
  padding: theme.spacing(3)
3886
3889
  };
3887
3890
  }
@@ -3893,6 +3896,7 @@ var components$3 = {
3893
3896
  var theme = _ref6.theme;
3894
3897
  return {
3895
3898
  fontSize: '16px',
3899
+ lineHeight: '24px',
3896
3900
  padding: theme.spacing(3)
3897
3901
  };
3898
3902
  }
@@ -3902,33 +3906,30 @@ var components$3 = {
3902
3906
  },
3903
3907
  style: function style(_ref7) {
3904
3908
  var theme = _ref7.theme;
3905
- if (theme.palette.mode === 'light') {
3906
- var isLight = theme.palette.mode === 'light';
3907
- return {
3908
- // border: `1px solid ${theme.palette.base[600]}`,
3909
- border: 'transparent',
3910
- background: theme.palette.base[200],
3911
- '&.Mui-disabled': {
3912
- background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
3913
- },
3914
- '&:hover': {
3915
- border: isLight
3916
- // ? `1px solid ${palette.textColor.A20}`
3917
- ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3918
- backgroundColor: isLight
3919
- // ? palette.grayBackground.A20
3920
- ? theme.palette.base[200] : theme.palette.base.A60
3921
- },
3922
- '&.Mui-focused': {
3923
- border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3924
- backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3925
- },
3926
- '&.Mui-error': {
3927
- border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3928
- backgroundColor: isLight ? theme.palette.base[200] : alpha(theme.palette.error.A100 || '', 0.1)
3929
- }
3930
- };
3931
- } else return {};
3909
+ var isLight = theme.palette.mode === 'light';
3910
+ return {
3911
+ // border: `1px solid ${theme.palette.base[600]}`,
3912
+ border: 'transparent',
3913
+ background: theme.palette.base[200],
3914
+ '&.Mui-disabled': {
3915
+ background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
3916
+ },
3917
+ '&:hover': {
3918
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
3919
+ "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3920
+ backgroundColor: isLight ?
3921
+ // ? palette.grayBackground.A20
3922
+ theme.palette.base[200] : theme.palette.base.A60
3923
+ },
3924
+ '&.Mui-focused': {
3925
+ border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3926
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3927
+ },
3928
+ '&.Mui-error': {
3929
+ border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3930
+ backgroundColor: isLight ? theme.palette.base[200] : alpha(theme.palette.error.A100 || '', 0.1)
3931
+ }
3932
+ };
3932
3933
  }
3933
3934
  }, {
3934
3935
  props: {
@@ -4505,13 +4506,18 @@ var components$6 = {
4505
4506
  root: function root(_ref) {
4506
4507
  var _ref$theme = _ref.theme,
4507
4508
  palette = _ref$theme.palette,
4508
- spacing = _ref$theme.spacing;
4509
+ spacing = _ref$theme.spacing,
4510
+ _ref$ownerState = _ref.ownerState,
4511
+ size = _ref$ownerState.size,
4512
+ fill = _ref$ownerState.fill,
4513
+ success = _ref$ownerState.success;
4514
+ console.log(size, fill, success);
4509
4515
  var isLight = palette.mode === 'light';
4510
4516
  return {
4511
4517
  '& > div.MuiInputBase-root > fieldset': {
4512
4518
  border: 0
4513
4519
  },
4514
- '& > div.MuiInputBase-root': {
4520
+ '& > div.MuiInputBase-root': _extends({
4515
4521
  borderRadius: '8px',
4516
4522
  gap: spacing(1),
4517
4523
  transition: 'all 0.2s',
@@ -4533,8 +4539,46 @@ var components$6 = {
4533
4539
  '&.Mui-disabled': {
4534
4540
  borderColor: isLight ? palette.grayBackground.A40 : palette.secondary.A100,
4535
4541
  backgroundColor: isLight ? palette.grayBackground.A10 : palette.secondary.A100
4542
+ },
4543
+ '&:-webkit-autofill': {}
4544
+ }, size === 'sm' && {
4545
+ fontSize: '14px',
4546
+ lineHeight: '24px',
4547
+ padding: spacing(1, 3)
4548
+ }, size === 'md' && {
4549
+ fontSize: '14px',
4550
+ lineHeight: '24px',
4551
+ padding: spacing(2, 3)
4552
+ }, size === 'lg' && {
4553
+ fontSize: '14px',
4554
+ lineHeight: '24px',
4555
+ padding: spacing(3)
4556
+ }, size === 'xl' && {
4557
+ fontSize: '16px',
4558
+ lineHeight: '24px',
4559
+ padding: spacing(3)
4560
+ }, fill === true && {
4561
+ border: 'transparent',
4562
+ background: isLight ? palette.base[200] : undefined,
4563
+ '&.Mui-disabled': {
4564
+ background: isLight ? palette.base[100] : palette.secondary.A100
4565
+ },
4566
+ '&:hover': {
4567
+ border: isLight ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
4568
+ backgroundColor: isLight ? palette.base[200] : palette.base.A60
4569
+ },
4570
+ '&.Mui-focused': {
4571
+ border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80,
4572
+ backgroundColor: isLight ? palette.base[200] : palette.base.A60
4573
+ },
4574
+ '&.Mui-error': {
4575
+ border: isLight ? "1.5px solid " + palette.error[400] : "1px solid " + palette.error.A60,
4576
+ backgroundColor: isLight ? palette.base[200] : alpha(palette.error.A100 || '', 0.1)
4536
4577
  }
4537
- },
4578
+ }, success === true && {
4579
+ border: isLight ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
4580
+ backgroundColor: isLight ? palette.base.A0 : alpha(palette.success.A100, 0.1)
4581
+ }),
4538
4582
  '& > div.MuiInputBase-root > input.MuiInputBase-input': {
4539
4583
  color: isLight ? palette.textColor.A80 : palette.textColor.A0,
4540
4584
  padding: spacing(0),
@@ -4547,7 +4591,54 @@ var components$6 = {
4547
4591
  }
4548
4592
  };
4549
4593
  }
4550
- }
4594
+ },
4595
+ variants: [{
4596
+ props: {
4597
+ fill: true
4598
+ },
4599
+ style: function style(_ref2) {
4600
+ var theme = _ref2.theme;
4601
+ var isLight = theme.palette.mode === 'light';
4602
+ return {
4603
+ '& .MuiInputBase-root': {
4604
+ // border: `1px solid ${theme.palette.base[600]}`,
4605
+ border: 'transparent',
4606
+ background: theme.palette.base[200],
4607
+ '&.Mui-disabled': {
4608
+ background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
4609
+ },
4610
+ '&:hover': {
4611
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
4612
+ "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
4613
+ backgroundColor: isLight ?
4614
+ // ? palette.grayBackground.A20
4615
+ theme.palette.base[200] : theme.palette.base.A60
4616
+ },
4617
+ '&.Mui-focused': {
4618
+ border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
4619
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
4620
+ },
4621
+ '&.Mui-error': {
4622
+ border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
4623
+ backgroundColor: isLight ? theme.palette.base[200] : alpha(theme.palette.error.A100 || '', 0.1)
4624
+ }
4625
+ }
4626
+ };
4627
+ }
4628
+ }, {
4629
+ props: {
4630
+ success: true
4631
+ },
4632
+ style: function style(_ref3) {
4633
+ var palette = _ref3.theme.palette;
4634
+ return {
4635
+ '& .MuiInputBase-root': {
4636
+ border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
4637
+ backgroundColor: palette.mode === 'light' ? palette.base.A0 : alpha(palette.success.A100, 0.1)
4638
+ }
4639
+ };
4640
+ }
4641
+ }]
4551
4642
  };
4552
4643
  var RabexTextField = {
4553
4644
  components: components$6
@@ -4770,7 +4861,7 @@ Tooltip.defaultProps = {
4770
4861
  * you can see Autocomplete Documentation api that I mentioned below [here](https://mui.com/material-ui/react-autocomplete/)
4771
4862
  *
4772
4863
  * ```typescript
4773
- * import { Autocomplete } from '@rabex-kit/core';
4864
+ * import { Autocomplete } from '@rabex-kit/rabex-ui';
4774
4865
  * ```
4775
4866
  *
4776
4867
  *
@@ -4988,7 +5079,7 @@ var FormikSelect = function FormikSelect(_ref) {
4988
5079
  }, text));
4989
5080
  };
4990
5081
 
4991
- var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption"];
5082
+ var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fill", "success"];
4992
5083
  function _handleHelperColor$1(props, key) {
4993
5084
  var _props$key;
4994
5085
  if (props.error) return 'error.A100';
@@ -5001,7 +5092,7 @@ function _handleHelperColor$1(props, key) {
5001
5092
  * you can see TextField Documentation api that I mentioned below [here](https://mui.com/material-ui/api/text-field/)
5002
5093
  *
5003
5094
  * ```typescript
5004
- * import { TextField } from '@rabex-kit/core';
5095
+ * import { TextField } from '@rabex-kit/rabex-ui';
5005
5096
  * ```
5006
5097
  *
5007
5098
  *
@@ -5011,7 +5102,7 @@ function _handleHelperColor$1(props, key) {
5011
5102
  var MuiTextFieldStyled = /*#__PURE__*/styled(MuiTextField, {
5012
5103
  name: 'MuiTextField',
5013
5104
  shouldForwardProp: function shouldForwardProp(prop) {
5014
- return !['titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption'].includes(prop);
5105
+ return !['titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption', 'fill'].includes(prop);
5015
5106
  }
5016
5107
  })(function () {
5017
5108
  return {};
@@ -5051,7 +5142,7 @@ var TextField = function TextField(props) {
5051
5142
  };
5052
5143
  return React.createElement(Stack, {
5053
5144
  flexDirection: "column",
5054
- gap: 2,
5145
+ gap: props.size === 'sm' ? 1 : 2,
5055
5146
  flexGrow: 1
5056
5147
  }, title && React.createElement(Typography, Object.assign({}, titleProps), title), React.createElement(MuiTextFieldStyled, Object.assign({}, other, {
5057
5148
  value: valueFormat ? _valueFormatHandler(value) : value,
@@ -5077,7 +5168,8 @@ var TextField = function TextField(props) {
5077
5168
  };
5078
5169
  TextField.defaultProps = {
5079
5170
  success: false,
5080
- size: 'medium',
5171
+ fill: false,
5172
+ size: 'md',
5081
5173
  titleProps: {
5082
5174
  variant: 'body2',
5083
5175
  weight: 'bold',
@@ -5615,7 +5707,7 @@ var _excluded$l = ["inputProps", "children"];
5615
5707
  * You can read Material-UI Button Documentation [here](https://mui.com/material-ui/api/Button/).
5616
5708
  *
5617
5709
  * ```typescript
5618
- * import { UploadButton } from '@rabex-kit/core';
5710
+ * import { UploadButton } from '@rabex-kit/rabex-ui';
5619
5711
  * ```
5620
5712
  *
5621
5713
  *