@rabex-kit/rabex-ui 0.1.41 → 0.1.47

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.
@@ -1262,15 +1262,14 @@ 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 prop !== 'hasBg';
1266
1266
  }
1267
1267
  })(function () {
1268
1268
  return {};
1269
1269
  });
1270
1270
  IconButton.defaultProps = {
1271
1271
  variant: 'circular',
1272
- hasBg: false,
1273
- disableOpacity: false
1272
+ hasBg: false
1274
1273
  };
1275
1274
 
1276
1275
  function _handleHelperColor(props, key) {
@@ -3882,105 +3881,6 @@ var RabexIconButton = {
3882
3881
  }
3883
3882
  };
3884
3883
  }
3885
- }, {
3886
- props: {
3887
- disableOpacity: true
3888
- },
3889
- style: function style() {
3890
- return {
3891
- color: 'inherit'
3892
- };
3893
- }
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
3884
  }]
3985
3885
  }
3986
3886
  };
@@ -4703,89 +4603,126 @@ var components$6 = {
4703
4603
  root: function root(_ref) {
4704
4604
  var _ref$theme = _ref.theme,
4705
4605
  palette = _ref$theme.palette,
4706
- spacing = _ref$theme.spacing,
4707
- _ref$ownerState = _ref.ownerState,
4708
- size = _ref$ownerState.size;
4606
+ spacing = _ref$theme.spacing;
4709
4607
  var isLight = palette.mode === 'light';
4710
4608
  return {
4711
- '& > div.MuiInputBase-root > fieldset': {
4712
- border: 0
4609
+ '& .MuiOutlinedInput-notchedOutline': {
4610
+ border: 'none'
4713
4611
  },
4714
- '& > div.MuiInputBase-root': _extends({
4612
+ '& .MuiInputBase-root': {
4715
4613
  borderRadius: '8px',
4716
4614
  gap: spacing(1),
4717
4615
  transition: 'all 0.2s',
4718
4616
  padding: spacing(2.5, 3),
4719
- border: isLight ? "1px solid " + palette.grayBackground.A40 : "1px solid " + palette.secondary.A100,
4720
- backgroundColor: isLight ? palette.base.A0 : palette.secondary.A100,
4617
+ border: isLight ? "1px solid " + palette.base[300] : "1px solid " + palette.secondary.A100,
4618
+ backgroundColor: isLight ? 'transparent' : palette.secondary.A100,
4721
4619
  '&:hover': {
4722
- border: isLight ? "1px solid " + palette.grayBackground.A40 : "1px solid " + palette.base.A60,
4723
- backgroundColor: isLight ? palette.base.A0 : palette.base.A60
4620
+ border: isLight ? "1px solid " + palette.base[600] : "1px solid " + palette.base.A60,
4621
+ backgroundColor: isLight ? 'transparent' : palette.base.A60
4724
4622
  },
4725
4623
  '&.Mui-focused': {
4726
- border: isLight ? "1px solid " + palette.primary.A100 : "1px solid " + palette.primary.A80,
4727
- backgroundColor: isLight ? palette.base.A0 : palette.base.A60
4624
+ border: isLight ? "1.5px solid " + palette.primary[500] : "1px solid " + palette.primary.A80
4728
4625
  },
4729
4626
  '&.Mui-error': {
4730
- border: isLight ? "1px solid " + palette.error.A100 : "1px solid " + palette.error.A60,
4731
- backgroundColor: isLight ? palette.error.A20 : alpha(palette.error.A100 || '', 0.1)
4627
+ border: isLight ? "1.5px solid " + palette.error[400] : "1px solid " + palette.error.A60,
4628
+ backgroundColor: isLight ? palette.base.A0 : alpha(palette.error.A100 || '', 0.1)
4732
4629
  },
4733
4630
  '&.Mui-disabled': {
4734
- borderColor: isLight ? palette.grayBackground.A40 : palette.secondary.A100,
4735
- backgroundColor: isLight ? palette.grayBackground.A10 : palette.secondary.A100
4631
+ borderColor: isLight ? palette.base[300] : palette.secondary.A100,
4632
+ backgroundColor: isLight ? 'transparent' : palette.secondary.A100
4633
+ }
4634
+ },
4635
+ '& .MuiInputBase-input': {
4636
+ color: isLight ? palette.textColor.A80 : palette.textColor.A0,
4637
+ padding: spacing(0),
4638
+ '&.Mui-disabled': {
4639
+ WebkitTextFillColor: isLight ? palette.textColor.A40 : palette.textColor.A50
4736
4640
  },
4737
- '&:-webkit-autofill': {}
4738
- }, size === 'sm' && {
4641
+ '&::placeholder': {
4642
+ opacity: 1,
4643
+ color: isLight ? palette.textColor.A40 : palette.textColor.A30
4644
+ }
4645
+ }
4646
+ };
4647
+ }
4648
+ },
4649
+ variants: [{
4650
+ props: {
4651
+ size: 'sm'
4652
+ },
4653
+ style: function style(_ref2) {
4654
+ var theme = _ref2.theme;
4655
+ return {
4656
+ '& .MuiInputBase-root': {
4657
+ height: '32px',
4739
4658
  fontSize: '14px',
4740
4659
  lineHeight: '24px',
4741
- padding: spacing(1, 3)
4742
- }, size === 'md' && {
4660
+ padding: theme.spacing(1, 3)
4661
+ }
4662
+ };
4663
+ }
4664
+ }, {
4665
+ props: {
4666
+ size: 'md'
4667
+ },
4668
+ style: function style(_ref3) {
4669
+ var theme = _ref3.theme;
4670
+ return {
4671
+ '& .MuiInputBase-root': {
4672
+ height: '40px',
4743
4673
  fontSize: '14px',
4744
4674
  lineHeight: '24px',
4745
- padding: spacing(2, 3)
4746
- }, size === 'lg' && {
4675
+ padding: theme.spacing(2, 3)
4676
+ }
4677
+ };
4678
+ }
4679
+ }, {
4680
+ props: {
4681
+ size: 'lg'
4682
+ },
4683
+ style: function style(_ref4) {
4684
+ var theme = _ref4.theme;
4685
+ return {
4686
+ '& .MuiInputBase-root': {
4687
+ height: '48px',
4747
4688
  fontSize: '14px',
4748
4689
  lineHeight: '24px',
4749
- padding: spacing(3)
4750
- }, size === 'xl' && {
4690
+ padding: theme.spacing(3)
4691
+ }
4692
+ };
4693
+ }
4694
+ }, {
4695
+ props: {
4696
+ size: 'xl'
4697
+ },
4698
+ style: function style(_ref5) {
4699
+ var theme = _ref5.theme;
4700
+ return {
4701
+ '& .MuiInputBase-root': {
4702
+ height: '48px',
4751
4703
  fontSize: '16px',
4752
4704
  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
4705
+ padding: theme.spacing(3)
4764
4706
  }
4765
4707
  };
4766
4708
  }
4767
- },
4768
- variants: [{
4709
+ }, {
4769
4710
  props: {
4770
4711
  fill: true
4771
4712
  },
4772
- style: function style(_ref2) {
4773
- var theme = _ref2.theme;
4713
+ style: function style(_ref6) {
4714
+ var theme = _ref6.theme;
4774
4715
  var isLight = theme.palette.mode === 'light';
4775
4716
  return {
4776
- '& > div.MuiInputBase-root': {
4777
- // border: `1px solid ${theme.palette.base[600]}`,
4717
+ '& .MuiInputBase-root': {
4778
4718
  border: 'transparent',
4779
4719
  background: theme.palette.base[200],
4780
4720
  '&.Mui-disabled': {
4781
4721
  background: isLight ? theme.palette.base[100] : theme.palette.secondary.A100
4782
4722
  },
4783
4723
  '&:hover': {
4784
- border: isLight ? // ? `1px solid ${palette.textColor.A20}`
4785
- "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
4786
- backgroundColor: isLight ?
4787
- // ? palette.grayBackground.A20
4788
- theme.palette.base[200] : theme.palette.base.A60
4724
+ border: isLight ? "1px solid " + theme.palette.base[600] : "1px solid " + theme.palette.base.A60,
4725
+ backgroundColor: isLight ? theme.palette.base[200] : theme.palette.base.A60
4789
4726
  },
4790
4727
  '&.Mui-focused': {
4791
4728
  border: isLight ? "1.5px solid " + theme.palette.primary[500] : "1px solid " + theme.palette.primary.A80,
@@ -4802,15 +4739,41 @@ var components$6 = {
4802
4739
  props: {
4803
4740
  success: true
4804
4741
  },
4805
- style: function style(_ref3) {
4806
- var palette = _ref3.theme.palette;
4742
+ style: function style(_ref7) {
4743
+ var palette = _ref7.theme.palette;
4807
4744
  return {
4808
- '& > div.MuiInputBase-root': {
4745
+ '& .MuiInputBase-root': {
4809
4746
  border: palette.mode === 'light' ? "1px solid " + palette.success.A100 : "1px solid " + palette.success.A40,
4810
4747
  backgroundColor: palette.mode === 'light' ? palette.base.A0 : alpha(palette.success.A100, 0.1)
4811
4748
  }
4812
4749
  };
4813
4750
  }
4751
+ }, {
4752
+ props: {
4753
+ size: 'small'
4754
+ },
4755
+ style: function style(_ref8) {
4756
+ var theme = _ref8.theme;
4757
+ return {
4758
+ '& .MuiInputBase-root': {
4759
+ fontSize: '14px',
4760
+ padding: theme.spacing(1, 3)
4761
+ }
4762
+ };
4763
+ }
4764
+ }, {
4765
+ props: {
4766
+ size: 'medium'
4767
+ },
4768
+ style: function style(_ref9) {
4769
+ var theme = _ref9.theme;
4770
+ return {
4771
+ '& .MuiInputBase-root': {
4772
+ fontSize: '16px',
4773
+ padding: theme.spacing(3)
4774
+ }
4775
+ };
4776
+ }
4814
4777
  }]
4815
4778
  };
4816
4779
  var RabexTextField = {
@@ -5252,7 +5215,7 @@ var FormikSelect = function FormikSelect(_ref) {
5252
5215
  }, text));
5253
5216
  };
5254
5217
 
5255
- var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption"];
5218
+ var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fullWidth"];
5256
5219
  function _handleHelperColor$1(props, key) {
5257
5220
  var _props$key;
5258
5221
  if (props.error) return 'error.A100';
@@ -5262,11 +5225,18 @@ function _handleHelperColor$1(props, key) {
5262
5225
  /**
5263
5226
  * The TextField let users enter and edit text.
5264
5227
  *
5265
- * you can see TextField Documentation api that I mentioned below [here](https://mui.com/material-ui/api/text-field/)
5228
+ * This is a custom wrapper component made of Material-UI TextField.
5266
5229
  *
5267
- * ```typescript
5230
+ * TextField includes all the functionality of Input but adds integrated labels,
5231
+ * built-in validation states, and multiline support.
5232
+ *
5233
+ * You can read Material-UI TextField Documentation [here](https://mui.com/material-ui/api/text-field/)
5234
+ *
5235
+ *
5236
+ typescript
5268
5237
  * import { TextField } from '@rabex-kit/rabex-ui';
5269
- * ```
5238
+ *
5239
+
5270
5240
  *
5271
5241
  *
5272
5242
  * @param props
@@ -5293,6 +5263,7 @@ var TextField = function TextField(props) {
5293
5263
  onChange = _ref.onChange,
5294
5264
  valueFormat = _ref.valueFormat,
5295
5265
  valueFormatOption = _ref.valueFormatOption,
5266
+ fullWidth = _ref.fullWidth,
5296
5267
  other = _objectWithoutPropertiesLoose(_ref, _excluded$i);
5297
5268
  if (!valueFormat && !!valueFormatOption) {
5298
5269
  console.warn("'valueFormatOption' Only Work With known 'valueFormat's...");
@@ -5316,14 +5287,16 @@ var TextField = function TextField(props) {
5316
5287
  return React.createElement(Stack, {
5317
5288
  flexDirection: "column",
5318
5289
  gap: props.size === 'sm' ? 1 : 2,
5319
- flexGrow: 1
5320
- }, title && React.createElement(Typography, Object.assign({}, titleProps), title), React.createElement(MuiTextFieldStyled, Object.assign({}, other, {
5290
+ width: fullWidth ? '100%' : 'unset'
5291
+ }, title && React.createElement(Typography, Object.assign({
5292
+ color: other.disabled ? 'textColor.A40' : 'textColor.A80'
5293
+ }, titleProps), title), React.createElement(MuiTextFieldStyled, Object.assign({}, other, {
5321
5294
  value: valueFormat ? _valueFormatHandler(value) : value,
5322
5295
  onChange: valueFormat ? _onChangeFormatHandler : onChange
5323
5296
  })), helperText && React.createElement(Stack, {
5324
5297
  flexDirection: "row",
5325
5298
  justifyContent: "space-between"
5326
- }, React.createElement(Typography, Object.assign({}, helperTextProps, {
5299
+ }, React.createElement(Typography, Object.assign({}, helperTextProps, props.size === 'sm' && {
5327
5300
  variant: 'body3'
5328
5301
  }, {
5329
5302
  color: _handleHelperColor$1(props, 'helperTextProps')
@@ -5333,7 +5306,7 @@ var TextField = function TextField(props) {
5333
5306
  alignItems: 'center',
5334
5307
  gap: 1
5335
5308
  }
5336
- }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, {
5309
+ }), helperTextIcon && helperTextIcon, helperText), helperTextEndAdornment && React.createElement(Typography, Object.assign({}, helperTextEndAdornmentProps, props.size === 'sm' && {
5337
5310
  variant: 'body3'
5338
5311
  }, {
5339
5312
  color: _handleHelperColor$1(props, 'helperTextEndAdornmentProps')
@@ -5343,10 +5316,10 @@ TextField.defaultProps = {
5343
5316
  success: false,
5344
5317
  fill: false,
5345
5318
  size: 'md',
5319
+ variant: 'outlined',
5346
5320
  titleProps: {
5347
5321
  variant: 'body2',
5348
- weight: 'bold',
5349
- color: 'textColor.A80'
5322
+ weight: 'regular'
5350
5323
  },
5351
5324
  helperTextProps: {
5352
5325
  variant: 'body3',