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