@applica-software-guru/react-admin 1.0.55 → 1.0.57

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.jsx"],"names":[],"mappings":"AAaA;;;4CAiDC;;;;;;;sBAtDqB,aAAa;sBACb,aAAa;sBAJb,YAAY"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/index.jsx"],"names":[],"mappings":"AAcA;;;4CAgEC;;;;;;;sBArEqB,aAAa;sBACb,aAAa;sBAJb,YAAY"}
@@ -19,6 +19,11 @@ export default function IconButton(theme: any): {
19
19
  height: any;
20
20
  fontSize: string;
21
21
  };
22
+ sizeExtraSmall: {
23
+ width: any;
24
+ height: any;
25
+ fontSize: string;
26
+ };
22
27
  };
23
28
  };
24
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/IconButton.jsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;EAyBC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/IconButton.jsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applica-software-guru/react-admin",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,4 @@
1
+ import _ from 'lodash';
1
2
  import { CssBaseline, StyledEngineProvider } from '@mui/material';
2
3
  import { ThemeProvider, createTheme } from '@mui/material/styles';
3
4
 
@@ -21,36 +22,51 @@ const ThemeCustomization = ({ themeOverrides, children }) => {
21
22
  const themeCustomShadows = useMemo(() => CustomShadows(theme), [theme]);
22
23
 
23
24
  const themeOptions = useMemo(
24
- () => ({
25
- breakpoints: {
26
- values: {
27
- xs: 0,
28
- sm: 768,
29
- md: 1024,
30
- lg: 1266,
31
- xl: 1440
32
- }
33
- },
34
- direction: themeDirection,
35
- mixins: {
36
- toolbar: {
37
- minHeight: 60,
38
- paddingTop: 8,
39
- paddingBottom: 8
40
- }
41
- },
42
- palette: theme.palette,
43
- customShadows: themeCustomShadows,
44
- typography: themeTypography,
45
- shadows: theme.shadows.map(() => 'none'),
46
- ...(typeof themeOverrides === 'function' ? themeOverrides(theme) : themeOverrides)
47
- }),
25
+ () =>
26
+ _.merge(
27
+ {
28
+ breakpoints: {
29
+ values: {
30
+ xs: 0,
31
+ sm: 768,
32
+ md: 1024,
33
+ lg: 1266,
34
+ xl: 1440
35
+ }
36
+ },
37
+ direction: themeDirection,
38
+ mixins: {
39
+ toolbar: {
40
+ minHeight: 60,
41
+ paddingTop: 8,
42
+ paddingBottom: 8
43
+ }
44
+ },
45
+ palette: theme.palette,
46
+ customShadows: themeCustomShadows,
47
+ typography: themeTypography,
48
+ shadows: theme.shadows.map(() => 'none'),
49
+ components: {
50
+ MuiIconButton: {
51
+ styleOverrides: {
52
+ sizeExtraSmall: {
53
+ width: theme.spacing(2.6875),
54
+ height: theme.spacing(2.6875),
55
+ fontSize: '0.625rem'
56
+ }
57
+ }
58
+ }
59
+ }
60
+ },
61
+ typeof themeOverrides === 'function' ? themeOverrides(theme) : themeOverrides
62
+ ),
48
63
  [themeDirection, theme, themeTypography, themeCustomShadows, themeOverrides]
49
64
  );
50
65
 
51
- const themes = createTheme(themeOptions);
66
+ const themes = createTheme(themeOptions),
67
+ currentComponents = _.cloneDeep(themes.components ?? {});
52
68
 
53
- themes.components = componentsOverride(themes);
69
+ themes.components = _.merge(componentsOverride(themes), currentComponents);
54
70
 
55
71
  return (
56
72
  <StyledEngineProvider injectFirst>
@@ -21,6 +21,11 @@ export default function IconButton(theme) {
21
21
  width: theme.spacing(3.75),
22
22
  height: theme.spacing(3.75),
23
23
  fontSize: '0.75rem'
24
+ },
25
+ sizeExtraSmall: {
26
+ width: theme.spacing(2.6875),
27
+ height: theme.spacing(2.6875),
28
+ fontSize: '0.625rem'
24
29
  }
25
30
  }
26
31
  }