@rabex-kit/rabex-ui 0.1.33 → 0.1.35
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.
- package/dist/Theme/Tabs/index.d.ts +1 -2673
- package/dist/rabex-ui.cjs.development.js +99 -48
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +99 -48
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
@@ -3131,20 +3131,32 @@ var RabexTabs = {
|
|
3131
3131
|
root: function root(_ref) {
|
3132
3132
|
var ownerState = _ref.ownerState,
|
3133
3133
|
theme = _ref.theme;
|
3134
|
-
|
3134
|
+
// The ownerState now contains all the props you need
|
3135
|
+
var _ref2 = ownerState || {},
|
3136
|
+
hasBorder = _ref2.hasBorder,
|
3137
|
+
isSeparate = _ref2.isSeparate,
|
3138
|
+
size = _ref2.size,
|
3139
|
+
mode = _ref2.mode,
|
3140
|
+
variant = _ref2.variant,
|
3141
|
+
orientation = _ref2.orientation;
|
3142
|
+
// Default styles applied to all tabs
|
3143
|
+
var baseStyles = {
|
3135
3144
|
borderRadius: 8,
|
3136
3145
|
minHeight: 'unset',
|
3137
|
-
color: theme.palette.base.A10
|
3138
|
-
|
3146
|
+
color: theme.palette.base.A10,
|
3147
|
+
/// remove the separation border
|
3148
|
+
'& .MuiTab-root::after': {
|
3149
|
+
display: 'none'
|
3150
|
+
}
|
3151
|
+
};
|
3152
|
+
// Mode-specific styles
|
3153
|
+
var modeStyles = mode === 'underline' ? {
|
3139
3154
|
'& .MuiTab-root.Mui-selected': {
|
3140
3155
|
borderRadius: 4,
|
3141
3156
|
color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
|
3142
3157
|
},
|
3143
|
-
'& .MuiTabs-flexContainer': {
|
3144
|
-
// padding: theme.spacing(1)
|
3145
|
-
},
|
3146
3158
|
backgroundColor: 'unset'
|
3147
|
-
}
|
3159
|
+
} : {
|
3148
3160
|
'& .MuiTab-root.Mui-selected': {
|
3149
3161
|
borderRadius: 4,
|
3150
3162
|
color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
|
@@ -3153,58 +3165,97 @@ var RabexTabs = {
|
|
3153
3165
|
padding: theme.spacing(1)
|
3154
3166
|
},
|
3155
3167
|
backgroundColor: theme.palette.mode === 'light' ? theme.palette.secondary.A100 : theme.palette.secondary.A100
|
3156
|
-
}
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
borderRadius: theme.spacing(2)
|
3170
|
-
}, ownerState.size === 'lg' && {
|
3171
|
-
'& .MuiTabs-fixed': {
|
3172
|
-
padding: theme.spacing(3, 4),
|
3173
|
-
marginBottom: theme.spacing(3)
|
3174
|
-
},
|
3175
|
-
height: theme.spacing(12),
|
3176
|
-
borderRadius: theme.spacing(3)
|
3177
|
-
}, ownerState.mode === 'underline' && {
|
3178
|
-
'& .MuiTab-root.Mui-selected': {
|
3179
|
-
borderRadius: 4,
|
3180
|
-
color: theme.palette.mode === 'light' ? theme.palette.textColor.A60 : theme.palette.textColor.A0
|
3168
|
+
};
|
3169
|
+
// Size-specific styles
|
3170
|
+
var sizeMap = mode === 'underline' ? {
|
3171
|
+
sm: {
|
3172
|
+
'& .MuiTabs-fixed': {
|
3173
|
+
'& .MuiTab-root': {
|
3174
|
+
padding: theme.spacing(1, 2)
|
3175
|
+
},
|
3176
|
+
// padding: theme.spacing(1, 2),
|
3177
|
+
marginBottom: theme.spacing(2)
|
3178
|
+
},
|
3179
|
+
height: theme.spacing(8),
|
3180
|
+
borderRadius: theme.spacing(2)
|
3181
3181
|
},
|
3182
|
-
|
3183
|
-
|
3182
|
+
md: {
|
3183
|
+
'& .MuiTabs-fixed': {
|
3184
|
+
'& .MuiTab-root': {
|
3185
|
+
padding: theme.spacing(2, 4)
|
3186
|
+
},
|
3187
|
+
// padding: theme.spacing(2, 4),
|
3188
|
+
marginBottom: theme.spacing(2)
|
3189
|
+
},
|
3190
|
+
height: theme.spacing(10),
|
3191
|
+
borderRadius: theme.spacing(2)
|
3184
3192
|
},
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3193
|
+
lg: {
|
3194
|
+
'& .MuiTabs-fixed': {
|
3195
|
+
'& .MuiTab-root': {
|
3196
|
+
padding: theme.spacing(3, 4)
|
3197
|
+
},
|
3198
|
+
// padding: theme.spacing(3, 4),
|
3199
|
+
marginBottom: theme.spacing(3)
|
3200
|
+
},
|
3201
|
+
height: theme.spacing(12),
|
3202
|
+
borderRadius: theme.spacing(3)
|
3203
|
+
}
|
3204
|
+
} : {
|
3205
|
+
sm: {
|
3206
|
+
'& .MuiTabs-fixed': {
|
3207
|
+
padding: theme.spacing(1, 2),
|
3208
|
+
marginBottom: theme.spacing(2)
|
3209
|
+
},
|
3210
|
+
height: theme.spacing(8),
|
3211
|
+
borderRadius: theme.spacing(2)
|
3190
3212
|
},
|
3191
|
-
|
3192
|
-
|
3213
|
+
md: {
|
3214
|
+
'& .MuiTabs-fixed': {
|
3215
|
+
padding: theme.spacing(2, 4),
|
3216
|
+
marginBottom: theme.spacing(2)
|
3217
|
+
},
|
3218
|
+
height: theme.spacing(10),
|
3219
|
+
borderRadius: theme.spacing(2)
|
3193
3220
|
},
|
3194
|
-
|
3195
|
-
|
3221
|
+
lg: {
|
3222
|
+
'& .MuiTabs-fixed': {
|
3223
|
+
padding: theme.spacing(3, 4),
|
3224
|
+
marginBottom: theme.spacing(3)
|
3225
|
+
},
|
3226
|
+
height: theme.spacing(12),
|
3227
|
+
borderRadius: theme.spacing(3)
|
3228
|
+
}
|
3229
|
+
};
|
3230
|
+
var sizeStyles = sizeMap[size || 'sm'] || sizeMap.sm;
|
3231
|
+
// Variant-specific styles
|
3232
|
+
var variantStyles = variant === 'fullWidth' ? {
|
3196
3233
|
width: '100%'
|
3197
|
-
}
|
3234
|
+
} : {};
|
3235
|
+
// Orientation-specific styles
|
3236
|
+
var orientationStyles = orientation === 'vertical' ? {
|
3198
3237
|
'& .MuiTab-root::after': {
|
3199
3238
|
content: 'unset',
|
3200
3239
|
display: 'none'
|
3201
3240
|
}
|
3202
|
-
}
|
3241
|
+
} : {};
|
3242
|
+
// Border styles
|
3243
|
+
var borderStyles = hasBorder ? isSeparate ? {
|
3244
|
+
'& .MuiTab-root': {
|
3245
|
+
borderRadius: 5,
|
3246
|
+
padding: theme.spacing(2, 3),
|
3247
|
+
border: "2px dotted " + theme.palette.base.A40
|
3248
|
+
}
|
3249
|
+
} : {
|
3250
|
+
border: "2px dotted " + theme.palette.base.A40
|
3251
|
+
} : {};
|
3252
|
+
// Return combined styles
|
3253
|
+
return _extends({}, baseStyles, modeStyles, sizeStyles, variantStyles, orientationStyles, borderStyles);
|
3203
3254
|
},
|
3204
|
-
indicator: function indicator(
|
3205
|
-
var ownerState =
|
3255
|
+
indicator: function indicator(_ref3) {
|
3256
|
+
var ownerState = _ref3.ownerState;
|
3206
3257
|
return {
|
3207
|
-
display: ownerState.mode === 'underline' ? 'show' : 'none'
|
3258
|
+
display: (ownerState === null || ownerState === void 0 ? void 0 : ownerState.mode) === 'underline' ? 'show' : 'none'
|
3208
3259
|
};
|
3209
3260
|
}
|
3210
3261
|
},
|