@rabex-kit/rabex-ui 0.1.18 → 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.
@@ -5,7 +5,6 @@ import MuiAccordionSummary from '@mui/material/AccordionSummary/AccordionSummary
5
5
  import MuiAlert from '@mui/material/Alert/Alert.js';
6
6
  import Stack$1 from '@mui/material/Stack/Stack.js';
7
7
  import MuiTypography from '@mui/material/Typography/Typography.js';
8
- import useTheme from '@mui/material/styles/useTheme.js';
9
8
  import useMediaQuery from '@mui/material/useMediaQuery/useMediaQuery.js';
10
9
  export { default as useMediaQuery } from '@mui/material/useMediaQuery/useMediaQuery.js';
11
10
  export { default as useScrollTrigger } from '@mui/material/useScrollTrigger/useScrollTrigger.js';
@@ -36,6 +35,7 @@ import MuiFormLabel from '@mui/material/FormLabel/FormLabel.js';
36
35
  import MuiGrid from '@mui/material/Unstable_Grid2';
37
36
  import MuiIconButton from '@mui/material/IconButton/IconButton.js';
38
37
  import MuiInput from '@mui/material/Input/Input.js';
38
+ import useTheme from '@mui/material/styles/useTheme.js';
39
39
  import MuiInputAdornment from '@mui/material/InputAdornment/InputAdornment.js';
40
40
  import MuiInputLabel from '@mui/material/InputLabel/InputLabel.js';
41
41
  import MuiLinearProgress from '@mui/material/LinearProgress/LinearProgress.js';
@@ -260,7 +260,7 @@ var AlertAction = function AlertAction(_ref) {
260
260
  })));
261
261
  };
262
262
 
263
- var _excluded$1 = ["weight", "sx", "color"];
263
+ var _excluded$1 = ["weight", "sx"];
264
264
  var fontWeight = {
265
265
  bold: '700',
266
266
  semiBold: '600',
@@ -285,15 +285,12 @@ var fontWeight = {
285
285
  var Typography = function Typography(_ref) {
286
286
  var weight = _ref.weight,
287
287
  sx = _ref.sx,
288
- color = _ref.color,
289
288
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
290
- var _useTheme = useTheme(),
291
- palette = _useTheme.palette;
289
+ // const { palette } = useTheme();
292
290
  return React.createElement(MuiTypography, Object.assign({
293
291
  sx: _extends({}, sx, {
294
292
  fontWeight: weight ? fontWeight[weight] : 'regular'
295
- }),
296
- color: color || palette.textColor[900]
293
+ })
297
294
  }, props));
298
295
  };
299
296
  Typography.defaultProps = {
@@ -1571,7 +1568,7 @@ var ListSubHeader = function ListSubHeader(props) {
1571
1568
  * You can read Material-UI LoadingButton Documentation [here](https://mui.com/material-ui/api/loading-button/).
1572
1569
  *
1573
1570
  * ```typescript
1574
- * import { LoadingButton } from '@rabex-kit/core';
1571
+ * import { LoadingButton } from '@rabex-kit/rabex-ui';
1575
1572
  * ```
1576
1573
  *
1577
1574
  *
@@ -3809,16 +3806,15 @@ var components$3 = {
3809
3806
  transition: 'all 0.2s',
3810
3807
  padding: spacing(2.5, 3),
3811
3808
  border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
3812
- backgroundColor: isLight
3809
+ backgroundColor: isLight ?
3813
3810
  // ? palette.grayBackground.A20
3814
- ? 'transparent' : palette.secondary.A100,
3811
+ 'transparent' : palette.secondary.A100,
3815
3812
  '&:hover': {
3816
- border: isLight
3817
- // ? `1px solid ${palette.textColor.A20}`
3818
- ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3819
- backgroundColor: isLight
3813
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
3814
+ "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3815
+ backgroundColor: isLight ?
3820
3816
  // ? palette.grayBackground.A20
3821
- ? 'transparent' : palette.base.A60
3817
+ 'transparent' : palette.base.A60
3822
3818
  },
3823
3819
  '&.Mui-focused': {
3824
3820
  border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
@@ -3828,12 +3824,12 @@ var components$3 = {
3828
3824
  backgroundColor: isLight ? palette.base.A0 : alpha(palette.error.A100 || '', 0.1)
3829
3825
  },
3830
3826
  '&.Mui-disabled': {
3831
- borderColor: isLight
3827
+ borderColor: isLight ?
3832
3828
  // ? palette.grayBackground.A40
3833
- ? palette.base[300] : palette.secondary.A100,
3834
- backgroundColor: isLight
3829
+ palette.base[300] : palette.secondary.A100,
3830
+ backgroundColor: isLight ?
3835
3831
  // ? palette.grayBackground.A10
3836
- ? 'transparent' : palette.secondary.A100
3832
+ 'transparent' : palette.secondary.A100
3837
3833
  }
3838
3834
  };
3839
3835
  },
@@ -3851,7 +3847,8 @@ var components$3 = {
3851
3847
  '&::.placeholder': {
3852
3848
  opacity: 1,
3853
3849
  color: isLight ? palette.textColor.A40 : palette.textColor.A30
3854
- }
3850
+ },
3851
+ '&:-webkit-autofill': {}
3855
3852
  };
3856
3853
  }
3857
3854
  },
@@ -3863,6 +3860,7 @@ var components$3 = {
3863
3860
  var theme = _ref3.theme;
3864
3861
  return {
3865
3862
  fontSize: '14px',
3863
+ lineHeight: '24px',
3866
3864
  padding: theme.spacing(1, 3)
3867
3865
  };
3868
3866
  }
@@ -3874,6 +3872,7 @@ var components$3 = {
3874
3872
  var theme = _ref4.theme;
3875
3873
  return {
3876
3874
  fontSize: '14px',
3875
+ lineHeight: '24px',
3877
3876
  padding: theme.spacing(2, 3)
3878
3877
  };
3879
3878
  }
@@ -3885,6 +3884,7 @@ var components$3 = {
3885
3884
  var theme = _ref5.theme;
3886
3885
  return {
3887
3886
  fontSize: '14px',
3887
+ lineHeight: '24px',
3888
3888
  padding: theme.spacing(3)
3889
3889
  };
3890
3890
  }
@@ -3896,6 +3896,7 @@ var components$3 = {
3896
3896
  var theme = _ref6.theme;
3897
3897
  return {
3898
3898
  fontSize: '16px',
3899
+ lineHeight: '24px',
3899
3900
  padding: theme.spacing(3)
3900
3901
  };
3901
3902
  }
@@ -3905,33 +3906,30 @@ var components$3 = {
3905
3906
  },
3906
3907
  style: function style(_ref7) {
3907
3908
  var theme = _ref7.theme;
3908
- if (theme.palette.mode === 'light') {
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
3919
- // ? `1px solid ${palette.textColor.A20}`
3920
- ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3921
- backgroundColor: isLight
3922
- // ? palette.grayBackground.A20
3923
- ? theme.palette.base[200] : theme.palette.base.A60
3924
- },
3925
- '&.Mui-focused': {
3926
- border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3927
- backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3928
- },
3929
- '&.Mui-error': {
3930
- border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3931
- backgroundColor: isLight ? theme.palette.base[200] : alpha(theme.palette.error.A100 || '', 0.1)
3932
- }
3933
- };
3934
- } 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
+ };
3935
3933
  }
3936
3934
  }, {
3937
3935
  props: {
@@ -4508,13 +4506,18 @@ var components$6 = {
4508
4506
  root: function root(_ref) {
4509
4507
  var _ref$theme = _ref.theme,
4510
4508
  palette = _ref$theme.palette,
4511
- 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);
4512
4515
  var isLight = palette.mode === 'light';
4513
4516
  return {
4514
4517
  '& > div.MuiInputBase-root > fieldset': {
4515
4518
  border: 0
4516
4519
  },
4517
- '& > div.MuiInputBase-root': {
4520
+ '& > div.MuiInputBase-root': _extends({
4518
4521
  borderRadius: '8px',
4519
4522
  gap: spacing(1),
4520
4523
  transition: 'all 0.2s',
@@ -4536,8 +4539,46 @@ var components$6 = {
4536
4539
  '&.Mui-disabled': {
4537
4540
  borderColor: isLight ? palette.grayBackground.A40 : palette.secondary.A100,
4538
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)
4539
4577
  }
4540
- },
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
+ }),
4541
4582
  '& > div.MuiInputBase-root > input.MuiInputBase-input': {
4542
4583
  color: isLight ? palette.textColor.A80 : palette.textColor.A0,
4543
4584
  padding: spacing(0),
@@ -4550,7 +4591,54 @@ var components$6 = {
4550
4591
  }
4551
4592
  };
4552
4593
  }
4553
- }
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
+ }]
4554
4642
  };
4555
4643
  var RabexTextField = {
4556
4644
  components: components$6
@@ -4773,7 +4861,7 @@ Tooltip.defaultProps = {
4773
4861
  * you can see Autocomplete Documentation api that I mentioned below [here](https://mui.com/material-ui/react-autocomplete/)
4774
4862
  *
4775
4863
  * ```typescript
4776
- * import { Autocomplete } from '@rabex-kit/core';
4864
+ * import { Autocomplete } from '@rabex-kit/rabex-ui';
4777
4865
  * ```
4778
4866
  *
4779
4867
  *
@@ -4991,7 +5079,7 @@ var FormikSelect = function FormikSelect(_ref) {
4991
5079
  }, text));
4992
5080
  };
4993
5081
 
4994
- 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"];
4995
5083
  function _handleHelperColor$1(props, key) {
4996
5084
  var _props$key;
4997
5085
  if (props.error) return 'error.A100';
@@ -5004,7 +5092,7 @@ function _handleHelperColor$1(props, key) {
5004
5092
  * you can see TextField Documentation api that I mentioned below [here](https://mui.com/material-ui/api/text-field/)
5005
5093
  *
5006
5094
  * ```typescript
5007
- * import { TextField } from '@rabex-kit/core';
5095
+ * import { TextField } from '@rabex-kit/rabex-ui';
5008
5096
  * ```
5009
5097
  *
5010
5098
  *
@@ -5014,7 +5102,7 @@ function _handleHelperColor$1(props, key) {
5014
5102
  var MuiTextFieldStyled = /*#__PURE__*/styled(MuiTextField, {
5015
5103
  name: 'MuiTextField',
5016
5104
  shouldForwardProp: function shouldForwardProp(prop) {
5017
- 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);
5018
5106
  }
5019
5107
  })(function () {
5020
5108
  return {};
@@ -5054,7 +5142,7 @@ var TextField = function TextField(props) {
5054
5142
  };
5055
5143
  return React.createElement(Stack, {
5056
5144
  flexDirection: "column",
5057
- gap: 2,
5145
+ gap: props.size === 'sm' ? 1 : 2,
5058
5146
  flexGrow: 1
5059
5147
  }, title && React.createElement(Typography, Object.assign({}, titleProps), title), React.createElement(MuiTextFieldStyled, Object.assign({}, other, {
5060
5148
  value: valueFormat ? _valueFormatHandler(value) : value,
@@ -5080,7 +5168,8 @@ var TextField = function TextField(props) {
5080
5168
  };
5081
5169
  TextField.defaultProps = {
5082
5170
  success: false,
5083
- size: 'medium',
5171
+ fill: false,
5172
+ size: 'md',
5084
5173
  titleProps: {
5085
5174
  variant: 'body2',
5086
5175
  weight: 'bold',
@@ -5618,7 +5707,7 @@ var _excluded$l = ["inputProps", "children"];
5618
5707
  * You can read Material-UI Button Documentation [here](https://mui.com/material-ui/api/Button/).
5619
5708
  *
5620
5709
  * ```typescript
5621
- * import { UploadButton } from '@rabex-kit/core';
5710
+ * import { UploadButton } from '@rabex-kit/rabex-ui';
5622
5711
  * ```
5623
5712
  *
5624
5713
  *