@rabex-kit/rabex-ui 0.2.16 → 0.2.18
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/IconButton/index.d.ts +2 -18
- package/dist/TextField/index.d.ts +2 -1
- package/dist/Theme/IconButton/index.d.ts +4 -4
- package/dist/rabex-ui.cjs.development.js +51 -11
- 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 +51 -11
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/rabex-ui.esm.js
CHANGED
@@ -1279,17 +1279,21 @@ var Grid = function Grid(_ref) {
|
|
1279
1279
|
* @param props
|
1280
1280
|
* @returns
|
1281
1281
|
*/
|
1282
|
-
|
1282
|
+
// Create the styled component
|
1283
|
+
var StyledIconButton = /*#__PURE__*/styled(MuiIconButton, {
|
1283
1284
|
name: 'MuiIconButton',
|
1284
1285
|
shouldForwardProp: function shouldForwardProp(prop) {
|
1285
|
-
return !['
|
1286
|
+
return !['bgColor', 'hasBg', 'disableOpacity', 'variant', 'size'].includes(prop.toString());
|
1286
1287
|
}
|
1287
1288
|
})(function (_ref) {
|
1288
1289
|
var theme = _ref.theme,
|
1289
1290
|
_ref$size = _ref.size,
|
1290
1291
|
size = _ref$size === void 0 ? 'md' : _ref$size,
|
1291
1292
|
_ref$variant = _ref.variant,
|
1292
|
-
variant = _ref$variant === void 0 ? 'circular' : _ref$variant
|
1293
|
+
variant = _ref$variant === void 0 ? 'circular' : _ref$variant,
|
1294
|
+
hasBg = _ref.hasBg,
|
1295
|
+
disableOpacity = _ref.disableOpacity,
|
1296
|
+
bgColor = _ref.bgColor;
|
1293
1297
|
// Size configurations
|
1294
1298
|
var sizeConfig = {
|
1295
1299
|
xs: {
|
@@ -1311,9 +1315,26 @@ var IconButton = /*#__PURE__*/styled(MuiIconButton, {
|
|
1311
1315
|
button: 48,
|
1312
1316
|
icon: 24,
|
1313
1317
|
padding: 12
|
1318
|
+
},
|
1319
|
+
// Add MUI default sizes for compatibility
|
1320
|
+
small: {
|
1321
|
+
button: 40,
|
1322
|
+
icon: 20,
|
1323
|
+
padding: 8
|
1324
|
+
},
|
1325
|
+
medium: {
|
1326
|
+
button: 48,
|
1327
|
+
icon: 24,
|
1328
|
+
padding: 12
|
1329
|
+
},
|
1330
|
+
large: {
|
1331
|
+
button: 56,
|
1332
|
+
icon: 28,
|
1333
|
+
padding: 16
|
1314
1334
|
}
|
1315
1335
|
};
|
1316
|
-
|
1336
|
+
// Use the size config, default to md if not found
|
1337
|
+
var config = sizeConfig[size] || sizeConfig.md;
|
1317
1338
|
return _extends({
|
1318
1339
|
width: config.button,
|
1319
1340
|
height: config.button,
|
@@ -1328,8 +1349,27 @@ var IconButton = /*#__PURE__*/styled(MuiIconButton, {
|
|
1328
1349
|
borderRadius: theme.spacing(1)
|
1329
1350
|
}, variant === 'square' && {
|
1330
1351
|
borderRadius: 0
|
1352
|
+
}, disableOpacity && {
|
1353
|
+
color: 'inherit',
|
1354
|
+
'&:hover': {
|
1355
|
+
backgroundColor: 'transparent'
|
1356
|
+
}
|
1357
|
+
}, hasBg && {
|
1358
|
+
backgroundColor: bgColor || theme.palette.secondary.A100,
|
1359
|
+
'&:hover': {
|
1360
|
+
backgroundColor: bgColor ? bgColor + "CC" // Add opacity to custom color
|
1361
|
+
: theme.palette.secondary.A60
|
1362
|
+
}
|
1331
1363
|
});
|
1332
1364
|
});
|
1365
|
+
// Create a simple React wrapper component that doesn't use componentsProps
|
1366
|
+
var IconButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
1367
|
+
return React.createElement(StyledIconButton, Object.assign({
|
1368
|
+
ref: ref
|
1369
|
+
}, props));
|
1370
|
+
});
|
1371
|
+
// Set display name for debugging
|
1372
|
+
IconButton.displayName = 'IconButton';
|
1333
1373
|
// Set default props
|
1334
1374
|
IconButton.defaultProps = {
|
1335
1375
|
variant: 'circular',
|
@@ -3933,7 +3973,7 @@ var RabexIconButton = {
|
|
3933
3973
|
return _extends({}, ownerState.disableOpacity && {
|
3934
3974
|
color: 'inherit',
|
3935
3975
|
'&:hover': {
|
3936
|
-
backgroundColor: '
|
3976
|
+
backgroundColor: 'unset'
|
3937
3977
|
}
|
3938
3978
|
});
|
3939
3979
|
}
|
@@ -3943,12 +3983,12 @@ var RabexIconButton = {
|
|
3943
3983
|
hasBg: true
|
3944
3984
|
},
|
3945
3985
|
style: function style(_ref2) {
|
3946
|
-
var
|
3947
|
-
|
3986
|
+
var bgColor = _ref2.bgColor,
|
3987
|
+
theme = _ref2.theme;
|
3948
3988
|
return {
|
3949
|
-
backgroundColor:
|
3989
|
+
backgroundColor: bgColor || theme.palette.secondary.A100,
|
3950
3990
|
'&:hover': {
|
3951
|
-
backgroundColor:
|
3991
|
+
backgroundColor: bgColor ? bgColor + "CC" // Add opacity to custom color
|
3952
3992
|
: theme.palette.secondary.A60
|
3953
3993
|
}
|
3954
3994
|
};
|
@@ -5363,7 +5403,7 @@ var FormikSelect = function FormikSelect(_ref) {
|
|
5363
5403
|
}, text));
|
5364
5404
|
};
|
5365
5405
|
|
5366
|
-
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fullWidth"];
|
5406
|
+
var _excluded$i = ["title", "helperTextEndAdornment", "helperTextEndAdornmentProps", "titleProps", "helperText", "helperTextIcon", "helperTextProps", "value", "onChange", "valueFormat", "valueFormatOption", "fullWidth", "size"];
|
5367
5407
|
function _handleHelperColor$1(props, key) {
|
5368
5408
|
var _props$key;
|
5369
5409
|
if (props.error) return 'error.A100';
|
@@ -5381,7 +5421,7 @@ function _handleHelperColor$1(props, key) {
|
|
5381
5421
|
* You can read Material-UI TextField Documentation [here](https://mui.com/material-ui/api/text-field/)
|
5382
5422
|
*
|
5383
5423
|
*
|
5384
|
-
typescript
|
5424
|
+
typescript
|
5385
5425
|
* import { TextField } from '@rabex-kit/rabex-ui';
|
5386
5426
|
*
|
5387
5427
|
|