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