@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.
@@ -472,17 +472,6 @@ var _isDecimalValid = function isDecimalValid(val, dec) {
472
472
  var stringVal = val.toString();
473
473
  return stringVal.indexOf('.') >= 0 ? !(stringVal.split('.')[1].length > dec) : true;
474
474
  };
475
- /**
476
- * Prevent Scientific Notation
477
- */
478
- var _preventScientific = function preventScientific(num, digits, separator) {
479
- var numString = typeof num === 'number' ? num.toString() : num;
480
- // Check for scientific notation
481
- if (numString.toLowerCase().includes('e')) {
482
- return bigDecimal.getPrettyValue(numString, digits, separator);
483
- }
484
- return numString;
485
- };
486
475
  var numberUtils = {
487
476
  delimiter: function delimiter(num, separator, separateBy) {
488
477
  return _delimiter(num, separator, separateBy);
@@ -502,9 +491,6 @@ var numberUtils = {
502
491
  toEn: function toEn(val) {
503
492
  return _toEn(val);
504
493
  },
505
- preventScientific: function preventScientific(num) {
506
- return _preventScientific(num);
507
- },
508
494
  suffix: suffix,
509
495
  bigDecimal: bigDecimal,
510
496
  modulus: bigDecimal.modulus,
@@ -2263,7 +2249,7 @@ var TabPanel = function TabPanel(_ref) {
2263
2249
  var Tabs = /*#__PURE__*/styled(MuiTabs, {
2264
2250
  name: 'MuiTabs',
2265
2251
  shouldForwardProp: function shouldForwardProp(prop) {
2266
- return !['hasBorder', 'isSeprate', 'size'].includes(prop);
2252
+ return !['hasBorder', 'isSeprate', 'size', 'mode'].includes(prop);
2267
2253
  }
2268
2254
  })(function () {
2269
2255
  return {};
@@ -2275,7 +2261,8 @@ Tabs.defaultProps = {
2275
2261
  hasBorder: false,
2276
2262
  isSeprate: false,
2277
2263
  variant: 'fullWidth',
2278
- size: 'sm'
2264
+ size: 'sm',
2265
+ mode: 'underline'
2279
2266
  };
2280
2267
 
2281
2268
  var RabexTypography = {
@@ -3124,6 +3111,24 @@ var RabexTabs = {
3124
3111
  borderRadius: 8,
3125
3112
  minHeight: 'unset',
3126
3113
  color: theme.palette.base.A10
3114
+ }, ownerState.mode === 'underline' && {
3115
+ '& .MuiTab-root.Mui-selected': {
3116
+ borderRadius: 4,
3117
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3118
+ },
3119
+ '& .MuiTabs-flexContainer': {
3120
+ padding: theme.spacing(1)
3121
+ },
3122
+ backgroundColor: 'unset'
3123
+ }, ownerState.mode === 'pill' && {
3124
+ '& .MuiTab-root.Mui-selected': {
3125
+ borderRadius: 4,
3126
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3127
+ },
3128
+ '& .MuiTabs-flexContainer': {
3129
+ padding: theme.spacing(1)
3130
+ },
3131
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3127
3132
  }, ownerState.size === 'sm' && {
3128
3133
  height: theme.spacing(8),
3129
3134
  borderRadius: theme.spacing(2),
@@ -3136,7 +3141,7 @@ var RabexTabs = {
3136
3141
  height: theme.spacing(14),
3137
3142
  borderRadius: theme.spacing(3),
3138
3143
  padding: theme.spacing(3, 4)
3139
- }, !ownerState.isSeprate && {
3144
+ }, ownerState.mode === 'underline' && {
3140
3145
  '& .MuiTab-root.Mui-selected': {
3141
3146
  borderRadius: 4,
3142
3147
  color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
@@ -3144,33 +3149,16 @@ var RabexTabs = {
3144
3149
  '& .MuiTabs-flexContainer': {
3145
3150
  padding: theme.spacing(1)
3146
3151
  },
3147
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3148
- }, ownerState.isSeprate && {
3149
- backgroundColor: 'unset',
3152
+ backgroundColor: 'unset'
3153
+ }, ownerState.mode === 'pill' && {
3154
+ '& .MuiTab-root.Mui-selected': {
3155
+ borderRadius: 4,
3156
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3157
+ },
3150
3158
  '& .MuiTabs-flexContainer': {
3151
- gridGap: theme.spacing(1.5),
3152
3159
  padding: theme.spacing(1)
3153
3160
  },
3154
- '& .MuiTab-root': {
3155
- borderRadius: '7px',
3156
- padding: theme.spacing(2, 3)
3157
- },
3158
- '& .MuiTab-root.Mui-selected': {
3159
- borderRadius: 5,
3160
- color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0,
3161
- boxShadow: theme.shadows[2]
3162
- },
3163
- '& .MuiTab-root::after': {
3164
- display: 'none'
3165
- }
3166
- }, ownerState.hasBorder && ownerState.isSeprate && {
3167
- '& .MuiTab-root': {
3168
- borderRadius: 5,
3169
- padding: theme.spacing(2, 3),
3170
- border: "2px dotted " + theme.palette.base.A40
3171
- }
3172
- }, ownerState.hasBorder && !ownerState.isSeprate && {
3173
- border: "2px dotted " + theme.palette.base.A40
3161
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3174
3162
  }, ownerState.variant === 'fullWidth' && {
3175
3163
  width: '100%'
3176
3164
  }, ownerState.orientation === 'vertical' && {
@@ -3181,7 +3169,7 @@ var RabexTabs = {
3181
3169
  });
3182
3170
  },
3183
3171
  indicator: {
3184
- display: 'none'
3172
+ display: 'show'
3185
3173
  }
3186
3174
  },
3187
3175
  variants: []
@@ -5757,12 +5745,10 @@ SegmentedControl.defaultProps = {
5757
5745
  hasBorder: false
5758
5746
  };
5759
5747
 
5760
- // Custom SegmentedControlTab with styled applied based on size
5748
+ // Custom SegmentedControlTab with applied styles
5761
5749
  var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5762
5750
  return React.createElement(MuiTab, Object.assign({}, props, {
5763
- label:
5764
- // Render custom Typography for the label
5765
- React.createElement(Typography, {
5751
+ label: React.createElement(Typography, {
5766
5752
  variant: "body2",
5767
5753
  weight: "semiBold"
5768
5754
  }, props.label)
@@ -5771,16 +5757,27 @@ var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5771
5757
  var theme = _ref.theme;
5772
5758
  return {
5773
5759
  minWidth: 80,
5774
- color: theme.palette.mode === 'light' ? theme.palette.textColor[900] : theme.palette.textColor.A40,
5760
+ fontWeight: 600,
5761
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A40,
5762
+ padding: theme.spacing(0, 2),
5775
5763
  position: 'relative',
5776
5764
  minHeight: 24,
5777
- borderRadius: 'unset',
5765
+ borderRadius: theme.spacing(1),
5778
5766
  '&::after': {
5767
+ content: "''",
5768
+ position: 'absolute',
5769
+ width: 1,
5770
+ height: 12,
5771
+ background: theme.palette.grayBackground.A40,
5772
+ top: 'calc(50% - 6px)',
5773
+ left: 0
5774
+ },
5775
+ '&.Mui-selected::after, &:first-of-type::after, &.Mui-selected + .MuiTab-root::after': {
5779
5776
  content: 'unset',
5780
5777
  display: 'none'
5781
5778
  },
5782
- '&.MuiTab-root.Mui-selected': {
5783
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.base[50] : theme.palette.secondary.A80,
5779
+ '&.Mui-selected': {
5780
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.base.A0 : theme.palette.secondary.A80,
5784
5781
  color: theme.palette.textColor[900]
5785
5782
  },
5786
5783
  '&.Mui-disabled': {