@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.
- package/dist/Autocomplete/index.d.ts +1 -2
- package/dist/TextField/index.d.ts +2 -1
- package/dist/Theme/Autocomplete/index.d.ts +2 -0
- package/dist/Theme/TextField/index.d.ts +10 -0
- package/dist/UploadButton/index.d.ts +1 -1
- package/dist/rabex-ui.cjs.development.js +142 -50
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +142 -50
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
@@ -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/
|
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?: '
|
6
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'small' | 'medium';
|
7
|
+
fill?: boolean;
|
7
8
|
helperText?: string | ReactNode;
|
8
9
|
titleProps?: TypographyProps;
|
9
10
|
helperTextIcon?: ReactNode;
|
@@ -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/
|
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
|
-
|
3816
|
+
'transparent' : palette.secondary.A100,
|
3817
3817
|
'&:hover': {
|
3818
|
-
border: isLight
|
3819
|
-
|
3820
|
-
|
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
|
-
|
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
|
-
|
3836
|
-
backgroundColor: isLight
|
3834
|
+
palette.base[300] : palette.secondary.A100,
|
3835
|
+
backgroundColor: isLight ?
|
3837
3836
|
// ? palette.grayBackground.A10
|
3838
|
-
|
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
|
-
|
3911
|
-
|
3912
|
-
|
3913
|
-
|
3914
|
-
|
3915
|
-
|
3916
|
-
|
3917
|
-
|
3918
|
-
|
3919
|
-
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
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,46 @@ 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
|
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
|
+
}, fill === true && {
|
4566
|
+
border: 'transparent',
|
4567
|
+
background: isLight ? palette.base[200] : undefined,
|
4568
|
+
'&.Mui-disabled': {
|
4569
|
+
background: isLight ? palette.base[100] : palette.secondary.A100
|
4570
|
+
},
|
4571
|
+
'&:hover': {
|
4572
|
+
border: isLight ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
|
4573
|
+
backgroundColor: isLight ? palette.base[200] : palette.base.A60
|
4574
|
+
},
|
4575
|
+
'&.Mui-focused': {
|
4576
|
+
border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80,
|
4577
|
+
backgroundColor: isLight ? palette.base[200] : palette.base.A60
|
4578
|
+
},
|
4579
|
+
'&.Mui-error': {
|
4580
|
+
border: isLight ? "1.5px solid " + palette.error[400] : "1px solid " + palette.error.A60,
|
4581
|
+
backgroundColor: isLight ? palette.base[200] : colorManipulator_js.alpha(palette.error.A100 || '', 0.1)
|
4541
4582
|
}
|
4542
|
-
},
|
4583
|
+
}, success === true && {
|
4584
|
+
border: isLight ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
|
4585
|
+
backgroundColor: isLight ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
|
4586
|
+
}),
|
4543
4587
|
'& > div.MuiInputBase-root > input.MuiInputBase-input': {
|
4544
4588
|
color: isLight ? palette.textColor.A80 : palette.textColor.A0,
|
4545
4589
|
padding: spacing(0),
|
@@ -4552,7 +4596,54 @@ var components$6 = {
|
|
4552
4596
|
}
|
4553
4597
|
};
|
4554
4598
|
}
|
4555
|
-
}
|
4599
|
+
},
|
4600
|
+
variants: [{
|
4601
|
+
props: {
|
4602
|
+
fill: true
|
4603
|
+
},
|
4604
|
+
style: function style(_ref2) {
|
4605
|
+
var theme = _ref2.theme;
|
4606
|
+
var isLight = theme.palette.mode === 'light';
|
4607
|
+
return {
|
4608
|
+
'& .MuiInputBase-root': {
|
4609
|
+
// border: `1px solid ${theme.palette.base[600]}`,
|
4610
|
+
border: 'transparent',
|
4611
|
+
background: theme.palette.base[200],
|
4612
|
+
'&.Mui-disabled': {
|
4613
|
+
background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
|
4614
|
+
},
|
4615
|
+
'&:hover': {
|
4616
|
+
border: isLight ? // ? `1px solid ${palette.textColor.A20}`
|
4617
|
+
"1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
|
4618
|
+
backgroundColor: isLight ?
|
4619
|
+
// ? palette.grayBackground.A20
|
4620
|
+
theme.palette.base[200] : theme.palette.base.A60
|
4621
|
+
},
|
4622
|
+
'&.Mui-focused': {
|
4623
|
+
border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
|
4624
|
+
backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
|
4625
|
+
},
|
4626
|
+
'&.Mui-error': {
|
4627
|
+
border: isLight ? "1.5px solid " + theme.palette.error[400] : "1px solid " + theme.palette.error.A60,
|
4628
|
+
backgroundColor: isLight ? theme.palette.base[200] : colorManipulator_js.alpha(theme.palette.error.A100 || '', 0.1)
|
4629
|
+
}
|
4630
|
+
}
|
4631
|
+
};
|
4632
|
+
}
|
4633
|
+
}, {
|
4634
|
+
props: {
|
4635
|
+
success: true
|
4636
|
+
},
|
4637
|
+
style: function style(_ref3) {
|
4638
|
+
var palette = _ref3.theme.palette;
|
4639
|
+
return {
|
4640
|
+
'& .MuiInputBase-root': {
|
4641
|
+
border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
|
4642
|
+
backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
|
4643
|
+
}
|
4644
|
+
};
|
4645
|
+
}
|
4646
|
+
}]
|
4556
4647
|
};
|
4557
4648
|
var RabexTextField = {
|
4558
4649
|
components: components$6
|
@@ -4775,7 +4866,7 @@ Tooltip.defaultProps = {
|
|
4775
4866
|
* you can see Autocomplete Documentation api that I mentioned below [here](https://mui.com/material-ui/react-autocomplete/)
|
4776
4867
|
*
|
4777
4868
|
* ```typescript
|
4778
|
-
* import { Autocomplete } from '@rabex-kit/
|
4869
|
+
* import { Autocomplete } from '@rabex-kit/rabex-ui';
|
4779
4870
|
* ```
|
4780
4871
|
*
|
4781
4872
|
*
|
@@ -4993,7 +5084,7 @@ var FormikSelect = function FormikSelect(_ref) {
|
|
4993
5084
|
}, text));
|
4994
5085
|
};
|
4995
5086
|
|
4996
|
-
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption"];
|
5087
|
+
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fill", "success"];
|
4997
5088
|
function _handleHelperColor$1(props, key) {
|
4998
5089
|
var _props$key;
|
4999
5090
|
if (props.error) return 'error.A100';
|
@@ -5006,7 +5097,7 @@ function _handleHelperColor$1(props, key) {
|
|
5006
5097
|
* you can see TextField Documentation api that I mentioned below [here](https://mui.com/material-ui/api/text-field/)
|
5007
5098
|
*
|
5008
5099
|
* ```typescript
|
5009
|
-
* import { TextField } from '@rabex-kit/
|
5100
|
+
* import { TextField } from '@rabex-kit/rabex-ui';
|
5010
5101
|
* ```
|
5011
5102
|
*
|
5012
5103
|
*
|
@@ -5016,7 +5107,7 @@ function _handleHelperColor$1(props, key) {
|
|
5016
5107
|
var MuiTextFieldStyled = /*#__PURE__*/styled(MuiTextField, {
|
5017
5108
|
name: 'MuiTextField',
|
5018
5109
|
shouldForwardProp: function shouldForwardProp(prop) {
|
5019
|
-
return !['titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption'].includes(prop);
|
5110
|
+
return !['titleProps', 'helperText', 'helperTextIcon', 'helperTextProps', 'helperTextEndAdornment', 'helperTextEndAdornmentProps', 'success', 'valueFormat', 'valueFormatOption', 'fill'].includes(prop);
|
5020
5111
|
}
|
5021
5112
|
})(function () {
|
5022
5113
|
return {};
|
@@ -5056,7 +5147,7 @@ var TextField = function TextField(props) {
|
|
5056
5147
|
};
|
5057
5148
|
return React__default.createElement(Stack, {
|
5058
5149
|
flexDirection: "column",
|
5059
|
-
gap: 2,
|
5150
|
+
gap: props.size === 'sm' ? 1 : 2,
|
5060
5151
|
flexGrow: 1
|
5061
5152
|
}, title && React__default.createElement(Typography, Object.assign({}, titleProps), title), React__default.createElement(MuiTextFieldStyled, Object.assign({}, other, {
|
5062
5153
|
value: valueFormat ? _valueFormatHandler(value) : value,
|
@@ -5082,7 +5173,8 @@ var TextField = function TextField(props) {
|
|
5082
5173
|
};
|
5083
5174
|
TextField.defaultProps = {
|
5084
5175
|
success: false,
|
5085
|
-
|
5176
|
+
fill: false,
|
5177
|
+
size: 'md',
|
5086
5178
|
titleProps: {
|
5087
5179
|
variant: 'body2',
|
5088
5180
|
weight: 'bold',
|
@@ -5620,7 +5712,7 @@ var _excluded$l = ["inputProps", "children"];
|
|
5620
5712
|
* You can read Material-UI Button Documentation [here](https://mui.com/material-ui/api/Button/).
|
5621
5713
|
*
|
5622
5714
|
* ```typescript
|
5623
|
-
* import { UploadButton } from '@rabex-kit/
|
5715
|
+
* import { UploadButton } from '@rabex-kit/rabex-ui';
|
5624
5716
|
* ```
|
5625
5717
|
*
|
5626
5718
|
*
|