@rabex-kit/rabex-ui 0.1.10 → 0.1.13

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.
@@ -2254,7 +2254,7 @@ var TabPanel = function TabPanel(_ref) {
2254
2254
  var Tabs = /*#__PURE__*/styled(MuiTabs, {
2255
2255
  name: 'MuiTabs',
2256
2256
  shouldForwardProp: function shouldForwardProp(prop) {
2257
- return !['hasBorder', 'isSeprate', 'size'].includes(prop);
2257
+ return !['hasBorder', 'isSeprate', 'size', 'mode'].includes(prop);
2258
2258
  }
2259
2259
  })(function () {
2260
2260
  return {};
@@ -2266,7 +2266,8 @@ Tabs.defaultProps = {
2266
2266
  hasBorder: false,
2267
2267
  isSeprate: false,
2268
2268
  variant: 'fullWidth',
2269
- size: 'sm'
2269
+ size: 'sm',
2270
+ mode: 'underline'
2270
2271
  };
2271
2272
 
2272
2273
  var RabexTypography = {
@@ -3114,7 +3115,32 @@ var RabexTabs = {
3114
3115
  return _extends({
3115
3116
  borderRadius: 8,
3116
3117
  minHeight: 'unset',
3117
- color: theme.palette.base.A10
3118
+ color: theme.palette.base.A10,
3119
+ '& .MuiTab-root.Mui-selected': {
3120
+ borderRadius: 4,
3121
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3122
+ },
3123
+ '& .MuiTabs-flexContainer': {
3124
+ padding: theme.spacing(1)
3125
+ }
3126
+ }, ownerState.mode === 'underline' && {
3127
+ '& .MuiTab-root.Mui-selected': {
3128
+ borderRadius: 4,
3129
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3130
+ },
3131
+ '& .MuiTabs-flexContainer': {
3132
+ padding: theme.spacing(1)
3133
+ },
3134
+ backgroundColor: 'unset'
3135
+ }, ownerState.mode === 'pill' && {
3136
+ '& .MuiTab-root.Mui-selected': {
3137
+ borderRadius: 4,
3138
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3139
+ },
3140
+ '& .MuiTabs-flexContainer': {
3141
+ padding: theme.spacing(1)
3142
+ },
3143
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3118
3144
  }, ownerState.size === 'sm' && {
3119
3145
  height: theme.spacing(8),
3120
3146
  borderRadius: theme.spacing(2),
@@ -3127,7 +3153,7 @@ var RabexTabs = {
3127
3153
  height: theme.spacing(14),
3128
3154
  borderRadius: theme.spacing(3),
3129
3155
  padding: theme.spacing(3, 4)
3130
- }, !ownerState.isSeprate && {
3156
+ }, ownerState.mode === 'underline' && {
3131
3157
  '& .MuiTab-root.Mui-selected': {
3132
3158
  borderRadius: 4,
3133
3159
  color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
@@ -3135,33 +3161,16 @@ var RabexTabs = {
3135
3161
  '& .MuiTabs-flexContainer': {
3136
3162
  padding: theme.spacing(1)
3137
3163
  },
3138
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3139
- }, ownerState.isSeprate && {
3140
- backgroundColor: 'unset',
3164
+ backgroundColor: 'unset'
3165
+ }, ownerState.mode === 'pill' && {
3166
+ '& .MuiTab-root.Mui-selected': {
3167
+ borderRadius: 4,
3168
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
3169
+ },
3141
3170
  '& .MuiTabs-flexContainer': {
3142
- gridGap: theme.spacing(1.5),
3143
3171
  padding: theme.spacing(1)
3144
3172
  },
3145
- '& .MuiTab-root': {
3146
- borderRadius: '7px',
3147
- padding: theme.spacing(2, 3)
3148
- },
3149
- '& .MuiTab-root.Mui-selected': {
3150
- borderRadius: 5,
3151
- color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0,
3152
- boxShadow: theme.shadows[2]
3153
- },
3154
- '& .MuiTab-root::after': {
3155
- display: 'none'
3156
- }
3157
- }, ownerState.hasBorder && ownerState.isSeprate && {
3158
- '& .MuiTab-root': {
3159
- borderRadius: 5,
3160
- padding: theme.spacing(2, 3),
3161
- border: "2px dotted " + theme.palette.base.A40
3162
- }
3163
- }, ownerState.hasBorder && !ownerState.isSeprate && {
3164
- border: "2px dotted " + theme.palette.base.A40
3173
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
3165
3174
  }, ownerState.variant === 'fullWidth' && {
3166
3175
  width: '100%'
3167
3176
  }, ownerState.orientation === 'vertical' && {
@@ -3172,7 +3181,7 @@ var RabexTabs = {
3172
3181
  });
3173
3182
  },
3174
3183
  indicator: {
3175
- display: 'none'
3184
+ display: 'show'
3176
3185
  }
3177
3186
  },
3178
3187
  variants: []
@@ -5668,7 +5677,7 @@ var _excluded$m = ["theme"];
5668
5677
  var SegmentedControl = /*#__PURE__*/styled(MuiTabs, {
5669
5678
  name: 'SegmentedControl',
5670
5679
  shouldForwardProp: function shouldForwardProp(prop) {
5671
- return !['size', 'isSeparate', 'hasBorder'].includes(prop);
5680
+ return !['size'].includes(prop);
5672
5681
  }
5673
5682
  })(function (_ref) {
5674
5683
  var theme = _ref.theme,
@@ -5716,22 +5725,6 @@ var SegmentedControl = /*#__PURE__*/styled(MuiTabs, {
5716
5725
  color: 'inherit',
5717
5726
  borderRadius: theme.spacing(2)
5718
5727
  }
5719
- }, ownerState.isSeparate && {
5720
- '& .MuiTabs-flexContainer': {
5721
- gap: theme.spacing(1),
5722
- padding: theme.spacing(1)
5723
- },
5724
- '& .MuiTab-root': {
5725
- borderRadius: theme.spacing(1),
5726
- padding: theme.spacing(2, 3)
5727
- }
5728
- }, ownerState.hasBorder && {
5729
- border: "2px dotted " + theme.palette.divider,
5730
- '& .MuiTab-root': {
5731
- borderRadius: theme.spacing(1),
5732
- border: "2px dotted " + theme.palette.divider,
5733
- lineHeight: theme.spacing(2)
5734
- }
5735
5728
  }, ownerState.variant === 'fullWidth' && {
5736
5729
  width: '100%'
5737
5730
  }, {
@@ -5743,17 +5736,13 @@ var SegmentedControl = /*#__PURE__*/styled(MuiTabs, {
5743
5736
  });
5744
5737
  SegmentedControl.defaultProps = {
5745
5738
  variant: 'fullWidth',
5746
- size: 'sm',
5747
- isSeparate: false,
5748
- hasBorder: false
5739
+ size: 'sm'
5749
5740
  };
5750
5741
 
5751
- // Custom SegmentedControlTab with styled applied based on size
5742
+ // Custom SegmentedControlTab with applied styles
5752
5743
  var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5753
5744
  return React__default.createElement(MuiTab, Object.assign({}, props, {
5754
- label:
5755
- // Render custom Typography for the label
5756
- React__default.createElement(Typography, {
5745
+ label: React__default.createElement(Typography, {
5757
5746
  variant: "body2",
5758
5747
  weight: "semiBold"
5759
5748
  }, props.label)
@@ -5762,16 +5751,27 @@ var SegmentedControlTab = /*#__PURE__*/styled(function (props) {
5762
5751
  var theme = _ref.theme;
5763
5752
  return {
5764
5753
  minWidth: 80,
5765
- color: theme.palette.mode === 'light' ? theme.palette.textColor[900] : theme.palette.textColor.A40,
5754
+ fontWeight: 600,
5755
+ color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A40,
5756
+ padding: theme.spacing(0, 2),
5766
5757
  position: 'relative',
5767
5758
  minHeight: 24,
5768
- borderRadius: 'unset',
5759
+ borderRadius: theme.spacing(1),
5769
5760
  '&::after': {
5761
+ content: "''",
5762
+ position: 'absolute',
5763
+ width: 1,
5764
+ height: 12,
5765
+ background: theme.palette.grayBackground.A40,
5766
+ top: 'calc(50% - 6px)',
5767
+ left: 0
5768
+ },
5769
+ '&.Mui-selected::after, &:first-of-type::after, &.Mui-selected + .MuiTab-root::after': {
5770
5770
  content: 'unset',
5771
5771
  display: 'none'
5772
5772
  },
5773
- '&.MuiTab-root.Mui-selected': {
5774
- backgroundColor: theme.palette.mode === 'light' ? theme.palette.base[50] : theme.palette.secondary.A80,
5773
+ '&.Mui-selected': {
5774
+ backgroundColor: theme.palette.mode === 'light' ? theme.palette.base.A0 : theme.palette.secondary.A80,
5775
5775
  color: theme.palette.textColor[900]
5776
5776
  },
5777
5777
  '&.Mui-disabled': {