@rabex-kit/rabex-ui 0.1.41 → 0.1.52
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 -0
- package/dist/IconButton/index.d.ts +7 -6
- package/dist/IconButton/index_new.d.ts +38 -0
- package/dist/TextField/index.d.ts +9 -1
- package/dist/Theme/IconButton/index.d.ts +3 -58
- package/dist/Theme/IconButton/index_new.d.ts +74 -0
- package/dist/Theme/TextField/index.d.ts +0 -10
- package/dist/rabex-ui.cjs.development.js +134 -154
- 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 +134 -154
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
@@ -1267,7 +1267,7 @@ var Grid = function Grid(_ref) {
|
|
1267
1267
|
var IconButton = /*#__PURE__*/styled(MuiIconButton, {
|
1268
1268
|
name: 'MuiIconButton',
|
1269
1269
|
shouldForwardProp: function shouldForwardProp(prop) {
|
1270
|
-
return !['hasBg', 'disableOpacity'].includes(prop.toString());
|
1270
|
+
return !['hasBg', 'disableOpacity', 'bgColor'].includes(prop.toString());
|
1271
1271
|
}
|
1272
1272
|
})(function () {
|
1273
1273
|
return {};
|
@@ -3861,16 +3861,13 @@ var RabexIconButton = {
|
|
3861
3861
|
components: {
|
3862
3862
|
styleOverrides: {
|
3863
3863
|
root: function root(_ref) {
|
3864
|
-
var ownerState = _ref.ownerState
|
3865
|
-
theme = _ref.theme;
|
3864
|
+
var ownerState = _ref.ownerState;
|
3866
3865
|
return _extends({}, ownerState.variant === 'circular' && {
|
3867
3866
|
borderRadius: '50%'
|
3868
3867
|
}, ownerState.variant === 'rounded' && {
|
3869
3868
|
borderRadius: 8
|
3870
3869
|
}, ownerState.variant === 'square' && {
|
3871
3870
|
borderRadius: 0
|
3872
|
-
}, ownerState.hasBg && {
|
3873
|
-
backgroundColor: (ownerState === null || ownerState === void 0 ? void 0 : ownerState.bgColor) || theme.palette.secondary.main
|
3874
3871
|
});
|
3875
3872
|
}
|
3876
3873
|
},
|
@@ -3896,96 +3893,6 @@ var RabexIconButton = {
|
|
3896
3893
|
color: 'inherit'
|
3897
3894
|
};
|
3898
3895
|
}
|
3899
|
-
}, {
|
3900
|
-
props: {
|
3901
|
-
size: 'xs'
|
3902
|
-
},
|
3903
|
-
style: function style(_ref3) {
|
3904
|
-
var theme = _ref3.theme;
|
3905
|
-
return {
|
3906
|
-
'& svg': {
|
3907
|
-
fontSize: '16px',
|
3908
|
-
width: '16px',
|
3909
|
-
height: '16px'
|
3910
|
-
},
|
3911
|
-
height: '24px',
|
3912
|
-
width: '24px',
|
3913
|
-
padding: theme.spacing(1),
|
3914
|
-
borderRadius: theme.spacing(1)
|
3915
|
-
};
|
3916
|
-
}
|
3917
|
-
}, {
|
3918
|
-
props: {
|
3919
|
-
size: 'sm'
|
3920
|
-
},
|
3921
|
-
style: function style(_ref4) {
|
3922
|
-
var theme = _ref4.theme;
|
3923
|
-
return {
|
3924
|
-
'& svg': {
|
3925
|
-
fontSize: '16px',
|
3926
|
-
width: '16px',
|
3927
|
-
height: '16px'
|
3928
|
-
},
|
3929
|
-
height: '32',
|
3930
|
-
width: '32',
|
3931
|
-
padding: theme.spacing(2),
|
3932
|
-
borderRadius: theme.spacing(2)
|
3933
|
-
};
|
3934
|
-
}
|
3935
|
-
}, {
|
3936
|
-
props: {
|
3937
|
-
size: 'md'
|
3938
|
-
},
|
3939
|
-
style: function style(_ref5) {
|
3940
|
-
var theme = _ref5.theme;
|
3941
|
-
return {
|
3942
|
-
'& svg': {
|
3943
|
-
fontSize: '24px',
|
3944
|
-
width: '24px',
|
3945
|
-
height: '24px'
|
3946
|
-
},
|
3947
|
-
height: '40px',
|
3948
|
-
width: '40px',
|
3949
|
-
padding: theme.spacing(2),
|
3950
|
-
borderRadius: theme.spacing(2)
|
3951
|
-
};
|
3952
|
-
}
|
3953
|
-
}, {
|
3954
|
-
props: {
|
3955
|
-
size: 'lg'
|
3956
|
-
},
|
3957
|
-
style: function style(_ref6) {
|
3958
|
-
var theme = _ref6.theme;
|
3959
|
-
return {
|
3960
|
-
'& svg': {
|
3961
|
-
fontSize: '24px',
|
3962
|
-
width: '24px',
|
3963
|
-
height: '24px'
|
3964
|
-
},
|
3965
|
-
height: '48px',
|
3966
|
-
width: '48px',
|
3967
|
-
padding: theme.spacing(3),
|
3968
|
-
borderRadius: theme.spacing(2)
|
3969
|
-
};
|
3970
|
-
}
|
3971
|
-
}, {
|
3972
|
-
props: {
|
3973
|
-
size: 'xl'
|
3974
|
-
},
|
3975
|
-
style: function style(_ref7) {
|
3976
|
-
var theme = _ref7.theme;
|
3977
|
-
return {
|
3978
|
-
'& svg': {
|
3979
|
-
fontSize: '24px',
|
3980
|
-
width: '24px',
|
3981
|
-
height: '24px'
|
3982
|
-
},
|
3983
|
-
height: '56px',
|
3984
|
-
width: '56px',
|
3985
|
-
borderRadius: theme.spacing(2),
|
3986
|
-
padding: theme.spacing(4)
|
3987
|
-
};
|
3988
|
-
}
|
3989
3896
|
}]
|
3990
3897
|
}
|
3991
3898
|
};
|
@@ -4708,89 +4615,126 @@ var components$6 = {
|
|
4708
4615
|
root: function root(_ref) {
|
4709
4616
|
var _ref$theme = _ref.theme,
|
4710
4617
|
palette = _ref$theme.palette,
|
4711
|
-
spacing = _ref$theme.spacing
|
4712
|
-
_ref$ownerState = _ref.ownerState,
|
4713
|
-
size = _ref$ownerState.size;
|
4618
|
+
spacing = _ref$theme.spacing;
|
4714
4619
|
var isLight = palette.mode === 'light';
|
4715
4620
|
return {
|
4716
|
-
'&
|
4717
|
-
border:
|
4621
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
4622
|
+
border: 'none'
|
4718
4623
|
},
|
4719
|
-
'&
|
4624
|
+
'& .MuiInputBase-root': {
|
4720
4625
|
borderRadius: '8px',
|
4721
4626
|
gap: spacing(1),
|
4722
4627
|
transition: 'all 0.2s',
|
4723
4628
|
padding: spacing(2.5, 3),
|
4724
|
-
border: isLight ? "1px solid " + palette.
|
4725
|
-
backgroundColor: isLight ?
|
4629
|
+
border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
|
4630
|
+
backgroundColor: isLight ? 'transparent' : palette.secondary.A100,
|
4726
4631
|
'&:hover': {
|
4727
|
-
border: isLight ? "1px solid " + palette.
|
4728
|
-
backgroundColor: isLight ?
|
4632
|
+
border: isLight ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
|
4633
|
+
backgroundColor: isLight ? 'transparent' : palette.base.A60
|
4729
4634
|
},
|
4730
4635
|
'&.Mui-focused': {
|
4731
|
-
border: isLight ? "
|
4732
|
-
backgroundColor: isLight ? palette.base.A0 : palette.base.A60
|
4636
|
+
border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
|
4733
4637
|
},
|
4734
4638
|
'&.Mui-error': {
|
4735
|
-
border: isLight ? "
|
4736
|
-
backgroundColor: isLight ? palette.
|
4639
|
+
border: isLight ? "1.5px solid " + palette.error[400] : "1px solid " + palette.error.A60,
|
4640
|
+
backgroundColor: isLight ? palette.base.A0 : colorManipulator_js.alpha(palette.error.A100 || '', 0.1)
|
4737
4641
|
},
|
4738
4642
|
'&.Mui-disabled': {
|
4739
|
-
borderColor: isLight ? palette.
|
4740
|
-
backgroundColor: isLight ?
|
4643
|
+
borderColor: isLight ? palette.base[300] : palette.secondary.A100,
|
4644
|
+
backgroundColor: isLight ? 'transparent' : palette.secondary.A100
|
4645
|
+
}
|
4646
|
+
},
|
4647
|
+
'& .MuiInputBase-input': {
|
4648
|
+
color: isLight ? palette.textColor.A80 : palette.textColor.A0,
|
4649
|
+
padding: spacing(0),
|
4650
|
+
'&.Mui-disabled': {
|
4651
|
+
WebkitTextFillColor: isLight ? palette.textColor.A40 : palette.textColor.A50
|
4741
4652
|
},
|
4742
|
-
'
|
4743
|
-
|
4653
|
+
'&::placeholder': {
|
4654
|
+
opacity: 1,
|
4655
|
+
color: isLight ? palette.textColor.A40 : palette.textColor.A30
|
4656
|
+
}
|
4657
|
+
}
|
4658
|
+
};
|
4659
|
+
}
|
4660
|
+
},
|
4661
|
+
variants: [{
|
4662
|
+
props: {
|
4663
|
+
size: 'sm'
|
4664
|
+
},
|
4665
|
+
style: function style(_ref2) {
|
4666
|
+
var theme = _ref2.theme;
|
4667
|
+
return {
|
4668
|
+
'& .MuiInputBase-root': {
|
4669
|
+
height: '32px',
|
4744
4670
|
fontSize: '14px',
|
4745
4671
|
lineHeight: '24px',
|
4746
|
-
padding: spacing(1, 3)
|
4747
|
-
}
|
4672
|
+
padding: theme.spacing(1, 3)
|
4673
|
+
}
|
4674
|
+
};
|
4675
|
+
}
|
4676
|
+
}, {
|
4677
|
+
props: {
|
4678
|
+
size: 'md'
|
4679
|
+
},
|
4680
|
+
style: function style(_ref3) {
|
4681
|
+
var theme = _ref3.theme;
|
4682
|
+
return {
|
4683
|
+
'& .MuiInputBase-root': {
|
4684
|
+
height: '40px',
|
4748
4685
|
fontSize: '14px',
|
4749
4686
|
lineHeight: '24px',
|
4750
|
-
padding: spacing(2, 3)
|
4751
|
-
}
|
4687
|
+
padding: theme.spacing(2, 3)
|
4688
|
+
}
|
4689
|
+
};
|
4690
|
+
}
|
4691
|
+
}, {
|
4692
|
+
props: {
|
4693
|
+
size: 'lg'
|
4694
|
+
},
|
4695
|
+
style: function style(_ref4) {
|
4696
|
+
var theme = _ref4.theme;
|
4697
|
+
return {
|
4698
|
+
'& .MuiInputBase-root': {
|
4699
|
+
height: '48px',
|
4752
4700
|
fontSize: '14px',
|
4753
4701
|
lineHeight: '24px',
|
4754
|
-
padding: spacing(3)
|
4755
|
-
}
|
4702
|
+
padding: theme.spacing(3)
|
4703
|
+
}
|
4704
|
+
};
|
4705
|
+
}
|
4706
|
+
}, {
|
4707
|
+
props: {
|
4708
|
+
size: 'xl'
|
4709
|
+
},
|
4710
|
+
style: function style(_ref5) {
|
4711
|
+
var theme = _ref5.theme;
|
4712
|
+
return {
|
4713
|
+
'& .MuiInputBase-root': {
|
4714
|
+
height: '48px',
|
4756
4715
|
fontSize: '16px',
|
4757
4716
|
lineHeight: '24px',
|
4758
|
-
padding: spacing(3)
|
4759
|
-
}),
|
4760
|
-
'& > div.MuiInputBase-root > input.MuiInputBase-input': {
|
4761
|
-
color: isLight ? palette.textColor.A80 : palette.textColor.A0,
|
4762
|
-
padding: spacing(0),
|
4763
|
-
'&.Mui-disabled': {
|
4764
|
-
textFillColor: isLight ? palette.textColor.A40 : palette.textColor.A50
|
4765
|
-
}
|
4766
|
-
},
|
4767
|
-
'& > div.MuiInputBase-root > input.MuiInputBase-input.Mui-disabled': {
|
4768
|
-
textFillColor: isLight ? palette.textColor.A40 : palette.textColor.A50
|
4717
|
+
padding: theme.spacing(3)
|
4769
4718
|
}
|
4770
4719
|
};
|
4771
4720
|
}
|
4772
|
-
},
|
4773
|
-
variants: [{
|
4721
|
+
}, {
|
4774
4722
|
props: {
|
4775
4723
|
fill: true
|
4776
4724
|
},
|
4777
|
-
style: function style(
|
4778
|
-
var theme =
|
4725
|
+
style: function style(_ref6) {
|
4726
|
+
var theme = _ref6.theme;
|
4779
4727
|
var isLight = theme.palette.mode === 'light';
|
4780
4728
|
return {
|
4781
|
-
'&
|
4782
|
-
// border: `1px solid ${theme.palette.base[600]}`,
|
4729
|
+
'& .MuiInputBase-root': {
|
4783
4730
|
border: 'transparent',
|
4784
4731
|
background: theme.palette.base[200],
|
4785
4732
|
'&.Mui-disabled': {
|
4786
4733
|
background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
|
4787
4734
|
},
|
4788
4735
|
'&:hover': {
|
4789
|
-
border: isLight ?
|
4790
|
-
|
4791
|
-
backgroundColor: isLight ?
|
4792
|
-
// ? palette.grayBackground.A20
|
4793
|
-
theme.palette.base[200] : theme.palette.base.A60
|
4736
|
+
border: isLight ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
|
4737
|
+
backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
|
4794
4738
|
},
|
4795
4739
|
'&.Mui-focused': {
|
4796
4740
|
border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
|
@@ -4807,15 +4751,41 @@ var components$6 = {
|
|
4807
4751
|
props: {
|
4808
4752
|
success: true
|
4809
4753
|
},
|
4810
|
-
style: function style(
|
4811
|
-
var palette =
|
4754
|
+
style: function style(_ref7) {
|
4755
|
+
var palette = _ref7.theme.palette;
|
4812
4756
|
return {
|
4813
|
-
'&
|
4757
|
+
'& .MuiInputBase-root': {
|
4814
4758
|
border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
|
4815
4759
|
backgroundColor: palette.mode === 'light' ? palette.base.A0 : colorManipulator_js.alpha(palette.success.A100, 0.1)
|
4816
4760
|
}
|
4817
4761
|
};
|
4818
4762
|
}
|
4763
|
+
}, {
|
4764
|
+
props: {
|
4765
|
+
size: 'small'
|
4766
|
+
},
|
4767
|
+
style: function style(_ref8) {
|
4768
|
+
var theme = _ref8.theme;
|
4769
|
+
return {
|
4770
|
+
'& .MuiInputBase-root': {
|
4771
|
+
fontSize: '14px',
|
4772
|
+
padding: theme.spacing(1, 3)
|
4773
|
+
}
|
4774
|
+
};
|
4775
|
+
}
|
4776
|
+
}, {
|
4777
|
+
props: {
|
4778
|
+
size: 'medium'
|
4779
|
+
},
|
4780
|
+
style: function style(_ref9) {
|
4781
|
+
var theme = _ref9.theme;
|
4782
|
+
return {
|
4783
|
+
'& .MuiInputBase-root': {
|
4784
|
+
fontSize: '16px',
|
4785
|
+
padding: theme.spacing(3)
|
4786
|
+
}
|
4787
|
+
};
|
4788
|
+
}
|
4819
4789
|
}]
|
4820
4790
|
};
|
4821
4791
|
var RabexTextField = {
|
@@ -5257,7 +5227,7 @@ var FormikSelect = function FormikSelect(_ref) {
|
|
5257
5227
|
}, text));
|
5258
5228
|
};
|
5259
5229
|
|
5260
|
-
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption"];
|
5230
|
+
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fullWidth"];
|
5261
5231
|
function _handleHelperColor$1(props, key) {
|
5262
5232
|
var _props$key;
|
5263
5233
|
if (props.error) return 'error.A100';
|
@@ -5267,11 +5237,18 @@ function _handleHelperColor$1(props, key) {
|
|
5267
5237
|
/**
|
5268
5238
|
* The TextField let users enter and edit text.
|
5269
5239
|
*
|
5270
|
-
*
|
5240
|
+
* This is a custom wrapper component made of Material-UI TextField.
|
5271
5241
|
*
|
5272
|
-
*
|
5242
|
+
* TextField includes all the functionality of Input but adds integrated labels,
|
5243
|
+
* built-in validation states, and multiline support.
|
5244
|
+
*
|
5245
|
+
* You can read Material-UI TextField Documentation [here](https://mui.com/material-ui/api/text-field/)
|
5246
|
+
*
|
5247
|
+
*
|
5248
|
+
typescript
|
5273
5249
|
* import { TextField } from '@rabex-kit/rabex-ui';
|
5274
|
-
*
|
5250
|
+
*
|
5251
|
+
|
5275
5252
|
*
|
5276
5253
|
*
|
5277
5254
|
* @param props
|
@@ -5298,6 +5275,7 @@ var TextField = function TextField(props) {
|
|
5298
5275
|
onChange = _ref.onChange,
|
5299
5276
|
valueFormat = _ref.valueFormat,
|
5300
5277
|
valueFormatOption = _ref.valueFormatOption,
|
5278
|
+
fullWidth = _ref.fullWidth,
|
5301
5279
|
other = _objectWithoutPropertiesLoose(_ref, _excluded$i);
|
5302
5280
|
if (!valueFormat && !!valueFormatOption) {
|
5303
5281
|
console.warn("'valueFormatOption' Only Work With known 'valueFormat's...");
|
@@ -5321,14 +5299,16 @@ var TextField = function TextField(props) {
|
|
5321
5299
|
return React__default.createElement(Stack, {
|
5322
5300
|
flexDirection: "column",
|
5323
5301
|
gap: props.size === 'sm' ? 1 : 2,
|
5324
|
-
|
5325
|
-
}, title && React__default.createElement(Typography, Object.assign({
|
5302
|
+
width: fullWidth ? '100%' : 'unset'
|
5303
|
+
}, title && React__default.createElement(Typography, Object.assign({
|
5304
|
+
color: other.disabled ? 'textColor.A40' : 'textColor.A80'
|
5305
|
+
}, titleProps), title), React__default.createElement(MuiTextFieldStyled, Object.assign({}, other, {
|
5326
5306
|
value: valueFormat ? _valueFormatHandler(value) : value,
|
5327
5307
|
onChange: valueFormat ? _onChangeFormatHandler : onChange
|
5328
5308
|
})), helperText && React__default.createElement(Stack, {
|
5329
5309
|
flexDirection: "row",
|
5330
5310
|
justifyContent: "space-between"
|
5331
|
-
}, React__default.createElement(Typography, Object.assign({}, helperTextProps, {
|
5311
|
+
}, React__default.createElement(Typography, Object.assign({}, helperTextProps, props.size === 'sm' && {
|
5332
5312
|
variant: 'body3'
|
5333
5313
|
}, {
|
5334
5314
|
color: _handleHelperColor$1(props, 'helperTextProps')
|
@@ -5338,7 +5318,7 @@ var TextField = function TextField(props) {
|
|
5338
5318
|
alignItems: 'center',
|
5339
5319
|
gap: 1
|
5340
5320
|
}
|
5341
|
-
}), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, {
|
5321
|
+
}), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React__default.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, props.size === 'sm' && {
|
5342
5322
|
variant: 'body3'
|
5343
5323
|
}, {
|
5344
5324
|
color: _handleHelperColor$1(props, 'helperTextEndAdornmentProps')
|
@@ -5348,10 +5328,10 @@ TextField.defaultProps = {
|
|
5348
5328
|
success: false,
|
5349
5329
|
fill: false,
|
5350
5330
|
size: 'md',
|
5331
|
+
variant: 'outlined',
|
5351
5332
|
titleProps: {
|
5352
5333
|
variant: 'body2',
|
5353
|
-
weight: '
|
5354
|
-
color: 'textColor.A80'
|
5334
|
+
weight: 'regular'
|
5355
5335
|
},
|
5356
5336
|
helperTextProps: {
|
5357
5337
|
variant: 'body3',
|