@rabex-kit/rabex-ui 0.1.9 → 0.1.11

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.
@@ -477,17 +477,6 @@ var _isDecimalValid = function isDecimalValid(val, dec) {
477
477
  var stringVal = val.toString();
478
478
  return stringVal.indexOf('.') >= 0 ? !(stringVal.split('.')[1].length > dec) : true;
479
479
  };
480
- /**
481
- * Prevent Scientific Notation
482
- */
483
- var _preventScientific = function preventScientific(num, digits, separator) {
484
- var numString = typeof num === 'number' ? num.toString() : num;
485
- // Check for scientific notation
486
- if (numString.toLowerCase().includes('e')) {
487
- return bigDecimal.getPrettyValue(numString, digits, separator);
488
- }
489
- return numString;
490
- };
491
480
  var numberUtils = {
492
481
  delimiter: function delimiter(num, separator, separateBy) {
493
482
  return _delimiter(num, separator, separateBy);
@@ -507,9 +496,6 @@ var numberUtils = {
507
496
  toEn: function toEn(val) {
508
497
  return _toEn(val);
509
498
  },
510
- preventScientific: function preventScientific(num) {
511
- return _preventScientific(num);
512
- },
513
499
  suffix: suffix,
514
500
  bigDecimal: bigDecimal,
515
501
  modulus: bigDecimal.modulus,
@@ -2268,7 +2254,7 @@ var TabPanel = function TabPanel(_ref) {
2268
2254
  var Tabs = /*#__PURE__*/styled(MuiTabs, {
2269
2255
  name: 'MuiTabs',
2270
2256
  shouldForwardProp: function shouldForwardProp(prop) {
2271
- return !['hasBorder', 'isSeprate', 'size'].includes(prop);
2257
+ return !['hasBorder', 'isSeprate', 'size', 'mode'].includes(prop);
2272
2258
  }
2273
2259
  })(function () {
2274
2260
  return {};
@@ -2280,7 +2266,8 @@ Tabs.defaultProps = {
2280
2266
  hasBorder: false,
2281
2267
  isSeprate: false,
2282
2268
  variant: 'fullWidth',
2283
- size: 'sm'
2269
+ size: 'sm',
2270
+ mode: 'underline'
2284
2271
  };
2285
2272
 
2286
2273
  var RabexTypography = {
@@ -3129,6 +3116,24 @@ var RabexTabs = {
3129
3116
  borderRadius: 8,
3130
3117
  minHeight: 'unset',
3131
3118
  color: theme.palette.base.A10
3119
+ }, ownerState.mode === 'underline' && {
3120
+ '& .MuiTab-root.Mui-selected': {
3121
+ borderRadius: 4,
3122
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3123
+ },
3124
+ '& .MuiTabs-flexContainer': {
3125
+ padding: theme.spacing(1)
3126
+ },
3127
+ backgroundColor: 'unset'
3128
+ }, ownerState.mode === 'pill' && {
3129
+ '& .MuiTab-root.Mui-selected': {
3130
+ borderRadius: 4,
3131
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3132
+ },
3133
+ '& .MuiTabs-flexContainer': {
3134
+ padding: theme.spacing(1)
3135
+ },
3136
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3132
3137
  }, ownerState.size === 'sm' && {
3133
3138
  height: theme.spacing(8),
3134
3139
  borderRadius: theme.spacing(2),
@@ -3141,7 +3146,7 @@ var RabexTabs = {
3141
3146
  height: theme.spacing(14),
3142
3147
  borderRadius: theme.spacing(3),
3143
3148
  padding: theme.spacing(3, 4)
3144
- }, !ownerState.isSeprate && {
3149
+ }, ownerState.mode === 'underline' && {
3145
3150
  '& .MuiTab-root.Mui-selected': {
3146
3151
  borderRadius: 4,
3147
3152
  color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
@@ -3149,33 +3154,16 @@ var RabexTabs = {
3149
3154
  '& .MuiTabs-flexContainer': {
3150
3155
  padding: theme.spacing(1)
3151
3156
  },
3152
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3153
- }, ownerState.isSeprate && {
3154
- backgroundColor: 'unset',
3157
+ backgroundColor: 'unset'
3158
+ }, ownerState.mode === 'pill' && {
3159
+ '& .MuiTab-root.Mui-selected': {
3160
+ borderRadius: 4,
3161
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3162
+ },
3155
3163
  '& .MuiTabs-flexContainer': {
3156
- gridGap: theme.spacing(1.5),
3157
3164
  padding: theme.spacing(1)
3158
3165
  },
3159
- '& .MuiTab-root': {
3160
- borderRadius: '7px',
3161
- padding: theme.spacing(2, 3)
3162
- },
3163
- '& .MuiTab-root.Mui-selected': {
3164
- borderRadius: 5,
3165
- color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0,
3166
- boxShadow: theme.shadows[2]
3167
- },
3168
- '& .MuiTab-root::after': {
3169
- display: 'none'
3170
- }
3171
- }, ownerState.hasBorder && ownerState.isSeprate && {
3172
- '& .MuiTab-root': {
3173
- borderRadius: 5,
3174
- padding: theme.spacing(2, 3),
3175
- border: "2px dotted " + theme.palette.base.A40
3176
- }
3177
- }, ownerState.hasBorder && !ownerState.isSeprate && {
3178
- border: "2px dotted " + theme.palette.base.A40
3166
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3179
3167
  }, ownerState.variant === 'fullWidth' && {
3180
3168
  width: '100%'
3181
3169
  }, ownerState.orientation === 'vertical' && {
@@ -3186,7 +3174,7 @@ var RabexTabs = {
3186
3174
  });
3187
3175
  },
3188
3176
  indicator: {
3189
- display: 'none'
3177
+ display: 'show'
3190
3178
  }
3191
3179
  },
3192
3180
  variants: []
@@ -5762,12 +5750,10 @@ SegmentedControl.defaultProps = {
5762
5750
  hasBorder: false
5763
5751
  };
5764
5752
 
5765
- // Custom SegmentedControlTab with styled applied based on size
5753
+ // Custom SegmentedControlTab with applied styles
5766
5754
  var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5767
5755
  return React__default.createElement(MuiTab, Object.assign({}, props, {
5768
- label:
5769
- // Render custom Typography for the label
5770
- React__default.createElement(Typography, {
5756
+ label: React__default.createElement(Typography, {
5771
5757
  variant: "body2",
5772
5758
  weight: "semiBold"
5773
5759
  }, props.label)
@@ -5776,16 +5762,27 @@ var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5776
5762
  var theme = _ref.theme;
5777
5763
  return {
5778
5764
  minWidth: 80,
5779
- color: theme.palette.mode === 'light' ? theme.palette.textColor[900] : theme.palette.textColor.A40,
5765
+ fontWeight: 600,
5766
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A40,
5767
+ padding: theme.spacing(0, 2),
5780
5768
  position: 'relative',
5781
5769
  minHeight: 24,
5782
- borderRadius: 'unset',
5770
+ borderRadius: theme.spacing(1),
5783
5771
  '&::after': {
5772
+ content: "''",
5773
+ position: 'absolute',
5774
+ width: 1,
5775
+ height: 12,
5776
+ background: theme.palette.grayBackground.A40,
5777
+ top: 'calc(50% - 6px)',
5778
+ left: 0
5779
+ },
5780
+ '&.Mui-selected::after, &:first-of-type::after, &.Mui-selected + .MuiTab-root::after': {
5784
5781
  content: 'unset',
5785
5782
  display: 'none'
5786
5783
  },
5787
- '&.MuiTab-root.Mui-selected': {
5788
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.base[50] : theme.palette.secondary.A80,
5784
+ '&.Mui-selected': {
5785
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.base.A0 : theme.palette.secondary.A80,
5789
5786
  color: theme.palette.textColor[900]
5790
5787
  },
5791
5788
  '&.Mui-disabled': {