@rabex-kit/rabex-ui 0.1.19 → 0.1.21

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AutocompleteProps as MuiAutocompleteProps } from '@mui/material';
3
2
  export declare type AutocompleteProps<T> = MuiAutocompleteProps<T, boolean | undefined, boolean | undefined, boolean | undefined>;
4
3
  /**
@@ -7,7 +6,7 @@ export declare type AutocompleteProps<T> = MuiAutocompleteProps<T, boolean | und
7
6
  * you can see Autocomplete Documentation api that I mentioned below [here](https://mui.com/material-ui/react-autocomplete/)
8
7
  *
9
8
  * ```typescript
10
- * import { Autocomplete } from '@rabex-kit/core';
9
+ * import { Autocomplete } from '@rabex-kit/rabex-ui';
11
10
  * ```
12
11
  *
13
12
  *
@@ -3,7 +3,8 @@ import { TextFieldProps as MuiTextFieldProps } from '@mui/material';
3
3
  import { TypographyProps } from '../Typography';
4
4
  export declare type TextFieldProps = MuiTextFieldProps & {
5
5
  success?: boolean;
6
- size?: 'medium' | 'small';
6
+ size?: 'sm' | 'md' | 'lg' | 'xl' | 'small' | 'medium';
7
+ fill?: boolean;
7
8
  helperText?: string | ReactNode;
8
9
  titleProps?: TypographyProps;
9
10
  helperTextIcon?: ReactNode;
@@ -0,0 +1,2 @@
1
+ declare const _default: {};
2
+ export default _default;
@@ -1,4 +1,14 @@
1
1
  import { Theme } from '@mui/material';
2
+ declare module '@mui/material/TextField' {
3
+ interface TextFieldPropsSizeOverrides {
4
+ small: true;
5
+ medium: true;
6
+ sm: true;
7
+ md: true;
8
+ lg: true;
9
+ xl: true;
10
+ }
11
+ }
2
12
  declare const _default: {
3
13
  components: {
4
14
  defaultProps?: Partial<import("@mui/material").FilledTextFieldProps> | Partial<import("@mui/material").StandardTextFieldProps> | Partial<import("@mui/material").OutlinedTextFieldProps> | undefined;
@@ -10,7 +10,7 @@ export declare type UploadButtonProps = Omit<RabexButtonProps, 'inputProps'> & {
10
10
  * You can read Material-UI Button Documentation [here](https://mui.com/material-ui/api/Button/).
11
11
  *
12
12
  * ```typescript
13
- * import { UploadButton } from '@rabex-kit/core';
13
+ * import { UploadButton } from '@rabex-kit/rabex-ui';
14
14
  * ```
15
15
  *
16
16
  *
@@ -3811,16 +3811,15 @@ var components$3 = {
3811
3811
  transition: 'all 0.2s',
3812
3812
  padding: spacing(2.5, 3),
3813
3813
  border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
3814
- backgroundColor: isLight
3814
+ backgroundColor: isLight ?
3815
3815
  // ? palette.grayBackground.A20
3816
- ? 'transparent' : palette.secondary.A100,
3816
+ 'transparent' : palette.secondary.A100,
3817
3817
  '&:hover': {
3818
- border: isLight
3819
- // ? `1px solid ${palette.textColor.A20}`
3820
- ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3821
- backgroundColor: isLight
3818
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
3819
+ "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
3820
+ backgroundColor: isLight ?
3822
3821
  // ? palette.grayBackground.A20
3823
- ? 'transparent' : palette.base.A60
3822
+ 'transparent' : palette.base.A60
3824
3823
  },
3825
3824
  '&.Mui-focused': {
3826
3825
  border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
@@ -3830,12 +3829,12 @@ var components$3 = {
3830
3829
  backgroundColor: isLight ? palette.base.A0 : colorManipulator_js.alpha(palette.error.A100 || '', 0.1)
3831
3830
  },
3832
3831
  '&.Mui-disabled': {
3833
- borderColor: isLight
3832
+ borderColor: isLight ?
3834
3833
  // ? palette.grayBackground.A40
3835
- ? palette.base[300] : palette.secondary.A100,
3836
- backgroundColor: isLight
3834
+ palette.base[300] : palette.secondary.A100,
3835
+ backgroundColor: isLight ?
3837
3836
  // ? palette.grayBackground.A10
3838
- ? 'transparent' : palette.secondary.A100
3837
+ 'transparent' : palette.secondary.A100
3839
3838
  }
3840
3839
  };
3841
3840
  },
@@ -3853,7 +3852,8 @@ var components$3 = {
3853
3852
  '&::.placeholder': {
3854
3853
  opacity: 1,
3855
3854
  color: isLight ? palette.textColor.A40 : palette.textColor.A30
3856
- }
3855
+ },
3856
+ '&:-webkit-autofill': {}
3857
3857
  };
3858
3858
  }
3859
3859
  },
@@ -3865,6 +3865,7 @@ var components$3 = {
3865
3865
  var theme = _ref3.theme;
3866
3866
  return {
3867
3867
  fontSize: '14px',
3868
+ lineHeight: '24px',
3868
3869
  padding: theme.spacing(1, 3)
3869
3870
  };
3870
3871
  }
@@ -3876,6 +3877,7 @@ var components$3 = {
3876
3877
  var theme = _ref4.theme;
3877
3878
  return {
3878
3879
  fontSize: '14px',
3880
+ lineHeight: '24px',
3879
3881
  padding: theme.spacing(2, 3)
3880
3882
  };
3881
3883
  }
@@ -3887,6 +3889,7 @@ var components$3 = {
3887
3889
  var theme = _ref5.theme;
3888
3890
  return {
3889
3891
  fontSize: '14px',
3892
+ lineHeight: '24px',
3890
3893
  padding: theme.spacing(3)
3891
3894
  };
3892
3895
  }
@@ -3898,6 +3901,7 @@ var components$3 = {
3898
3901
  var theme = _ref6.theme;
3899
3902
  return {
3900
3903
  fontSize: '16px',
3904
+ lineHeight: '24px',
3901
3905
  padding: theme.spacing(3)
3902
3906
  };
3903
3907
  }
@@ -3907,33 +3911,30 @@ var components$3 = {
3907
3911
  },
3908
3912
  style: function style(_ref7) {
3909
3913
  var theme = _ref7.theme;
3910
- if (theme.palette.mode === 'light') {
3911
- var isLight = theme.palette.mode === 'light';
3912
- return {
3913
- // border: `1px solid ${theme.palette.base[600]}`,
3914
- border: 'transparent',
3915
- background: theme.palette.base[200],
3916
- '&.Mui-disabled': {
3917
- background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
3918
- },
3919
- '&:hover': {
3920
- border: isLight
3921
- // ? `1px solid ${palette.textColor.A20}`
3922
- ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3923
- backgroundColor: isLight
3924
- // ? palette.grayBackground.A20
3925
- ? theme.palette.base[200] : theme.palette.base.A60
3926
- },
3927
- '&.Mui-focused': {
3928
- border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3929
- backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3930
- },
3931
- '&.Mui-error': {
3932
- border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3933
- backgroundColor: isLight ? theme.palette.base[200] : colorManipulator_js.alpha(theme.palette.error.A100 || '', 0.1)
3934
- }
3935
- };
3936
- } else return {};
3914
+ var isLight = theme.palette.mode === 'light';
3915
+ return {
3916
+ // border: `1px solid ${theme.palette.base[600]}`,
3917
+ border: 'transparent',
3918
+ background: theme.palette.base[200],
3919
+ '&.Mui-disabled': {
3920
+ background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
3921
+ },
3922
+ '&:hover': {
3923
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
3924
+ "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
3925
+ backgroundColor: isLight ?
3926
+ // ? palette.grayBackground.A20
3927
+ theme.palette.base[200] : theme.palette.base.A60
3928
+ },
3929
+ '&.Mui-focused': {
3930
+ border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
3931
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
3932
+ },
3933
+ '&.Mui-error': {
3934
+ border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
3935
+ backgroundColor: isLight ? theme.palette.base[200] : colorManipulator_js.alpha(theme.palette.error.A100 || '', 0.1)
3936
+ }
3937
+ };
3937
3938
  }
3938
3939
  }, {
3939
3940
  props: {
@@ -4510,13 +4511,18 @@ var components$6 = {
4510
4511
  root: function root(_ref) {
4511
4512
  var _ref$theme = _ref.theme,
4512
4513
  palette = _ref$theme.palette,
4513
- spacing = _ref$theme.spacing;
4514
+ spacing = _ref$theme.spacing,
4515
+ _ref$ownerState = _ref.ownerState,
4516
+ size = _ref$ownerState.size,
4517
+ fill = _ref$ownerState.fill,
4518
+ success = _ref$ownerState.success;
4519
+ console.log(size, fill, success);
4514
4520
  var isLight = palette.mode === 'light';
4515
4521
  return {
4516
4522
  '& > div.MuiInputBase-root > fieldset': {
4517
4523
  border: 0
4518
4524
  },
4519
- '& > div.MuiInputBase-root': {
4525
+ '& > div.MuiInputBase-root': _extends({
4520
4526
  borderRadius: '8px',
4521
4527
  gap: spacing(1),
4522
4528
  transition: 'all 0.2s',
@@ -4538,8 +4544,25 @@ var components$6 = {
4538
4544
  '&.Mui-disabled': {
4539
4545
  borderColor: isLight ? palette.grayBackground.A40 : palette.secondary.A100,
4540
4546
  backgroundColor: isLight ? palette.grayBackground.A10 : palette.secondary.A100
4541
- }
4542
- },
4547
+ },
4548
+ '&:-webkit-autofill': {}
4549
+ }, size === 'sm' && {
4550
+ fontSize: '14px',
4551
+ lineHeight: '24px',
4552
+ padding: spacing(1, 3)
4553
+ }, size === 'md' && {
4554
+ fontSize: '14px',
4555
+ lineHeight: '24px',
4556
+ padding: spacing(2, 3)
4557
+ }, size === 'lg' && {
4558
+ fontSize: '14px',
4559
+ lineHeight: '24px',
4560
+ padding: spacing(3)
4561
+ }, size === 'xl' && {
4562
+ fontSize: '16px',
4563
+ lineHeight: '24px',
4564
+ padding: spacing(3)
4565
+ }),
4543
4566
  '& > div.MuiInputBase-root > input.MuiInputBase-input': {
4544
4567
  color: isLight ? palette.textColor.A80 : palette.textColor.A0,
4545
4568
  padding: spacing(0),
@@ -4552,7 +4575,55 @@ var components$6 = {
4552
4575
  }
4553
4576
  };
4554
4577
  }
4555
- }
4578
+ },
4579
+ variants: [{
4580
+ props: {
4581
+ fill: true
4582
+ },
4583
+ style: function style(_ref2) {
4584
+ var theme = _ref2.theme;
4585
+ console.log('fill included');
4586
+ var isLight = theme.palette.mode === 'light';
4587
+ return {
4588
+ '& > div.MuiInputBase-root': {
4589
+ // border: `1px solid ${theme.palette.base[600]}`,
4590
+ border: 'transparent',
4591
+ background: theme.palette.base[200],
4592
+ '&.Mui-disabled': {
4593
+ background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
4594
+ },
4595
+ '&:hover': {
4596
+ border: isLight ? // ? `1px solid ${palette.textColor.A20}`
4597
+ "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
4598
+ backgroundColor: isLight ?
4599
+ // ? palette.grayBackground.A20
4600
+ theme.palette.base[200] : theme.palette.base.A60
4601
+ },
4602
+ '&.Mui-focused': {
4603
+ border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
4604
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
4605
+ },
4606
+ '&.Mui-error': {
4607
+ border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
4608
+ backgroundColor: isLight ? theme.palette.base[200] : colorManipulator_js.alpha(theme.palette.error.A100 || '', 0.1)
4609
+ }
4610
+ }
4611
+ };
4612
+ }
4613
+ }, {
4614
+ props: {
4615
+ success: true
4616
+ },
4617
+ style: function style(_ref3) {
4618
+ var palette = _ref3.theme.palette;
4619
+ return {
4620
+ '& > div.MuiInputBase-root': {
4621
+ border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
4622
+ backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
4623
+ }
4624
+ };
4625
+ }
4626
+ }]
4556
4627
  };
4557
4628
  var RabexTextField = {
4558
4629
  components: components$6
@@ -4775,7 +4846,7 @@ Tooltip.defaultProps = {
4775
4846
  * you can see Autocomplete Documentation api that I mentioned below [here](https://mui.com/material-ui/react-autocomplete/)
4776
4847
  *
4777
4848
  * ```typescript
4778
- * import { Autocomplete } from '@rabex-kit/core';
4849
+ * import { Autocomplete } from '@rabex-kit/rabex-ui';
4779
4850
  * ```
4780
4851
  *
4781
4852
  *
@@ -5006,7 +5077,7 @@ function _handleHelperColor$1(props, key) {
5006
5077
  * you can see TextField Documentation api that I mentioned below [here](https://mui.com/material-ui/api/text-field/)
5007
5078
  *
5008
5079
  * ```typescript
5009
- * import { TextField } from '@rabex-kit/core';
5080
+ * import { TextField } from '@rabex-kit/rabex-ui';
5010
5081
  * ```
5011
5082
  *
5012
5083
  *
@@ -5016,7 +5087,7 @@ function _handleHelperColor$1(props, key) {
5016
5087
  var MuiTextFieldStyled = /*#__PURE__*/styled(MuiTextField, {
5017
5088
  name: 'MuiTextField',
5018
5089
  shouldForwardProp: function shouldForwardProp(prop) {
5019
- return !['titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption'].includes(prop);
5090
+ return !['fill', 'success', 'titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'valueFormat', 'valueFormatOption'].includes(prop);
5020
5091
  }
5021
5092
  })(function () {
5022
5093
  return {};
@@ -5056,7 +5127,7 @@ var TextField = function TextField(props) {
5056
5127
  };
5057
5128
  return React__default.createElement(Stack, {
5058
5129
  flexDirection: "column",
5059
- gap: 2,
5130
+ gap: props.size === 'sm' ? 1 : 2,
5060
5131
  flexGrow: 1
5061
5132
  }, title && React__default.createElement(Typography, Object.assign({}, titleProps), title), React__default.createElement(MuiTextFieldStyled, Object.assign({}, other, {
5062
5133
  value: valueFormat ? _valueFormatHandler(value) : value,
@@ -5064,7 +5135,7 @@ var TextField = function TextField(props) {
5064
5135
  })), helperText && React__default.createElement(Stack, {
5065
5136
  flexDirection: "row",
5066
5137
  justifyContent: "space-between"
5067
- }, React__default.createElement(Typography, Object.assign({}, helperTextProps, props.size === 'small' && {
5138
+ }, React__default.createElement(Typography, Object.assign({}, helperTextProps, {
5068
5139
  variant: 'body3'
5069
5140
  }, {
5070
5141
  color: _handleHelperColor$1(props, 'helperTextProps')
@@ -5074,7 +5145,7 @@ var TextField = function TextField(props) {
5074
5145
  alignItems: 'center',
5075
5146
  gap: 1
5076
5147
  }
5077
- }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, props.size === 'small' && {
5148
+ }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, {
5078
5149
  variant: 'body3'
5079
5150
  }, {
5080
5151
  color: _handleHelperColor$1(props, 'helperTextEndAdornmentProps')
@@ -5082,18 +5153,19 @@ var TextField = function TextField(props) {
5082
5153
  };
5083
5154
  TextField.defaultProps = {
5084
5155
  success: false,
5085
- size: 'medium',
5156
+ fill: false,
5157
+ size: 'md',
5086
5158
  titleProps: {
5087
5159
  variant: 'body2',
5088
5160
  weight: 'bold',
5089
5161
  color: 'textColor.A80'
5090
5162
  },
5091
5163
  helperTextProps: {
5092
- variant: 'body2',
5164
+ variant: 'body3',
5093
5165
  color: 'textColor.A60'
5094
5166
  },
5095
5167
  helperTextEndAdornmentProps: {
5096
- variant: 'body2',
5168
+ variant: 'body3',
5097
5169
  color: 'textColor.A60'
5098
5170
  }
5099
5171
  };
@@ -5620,7 +5692,7 @@ var _excluded$l = ["inputProps", "children"];
5620
5692
  * You can read Material-UI Button Documentation [here](https://mui.com/material-ui/api/Button/).
5621
5693
  *
5622
5694
  * ```typescript
5623
- * import { UploadButton } from '@rabex-kit/core';
5695
+ * import { UploadButton } from '@rabex-kit/rabex-ui';
5624
5696
  * ```
5625
5697
  *
5626
5698
  *