@applica-software-guru/react-admin 1.4.203 → 1.4.205
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/components/ActionsMenu.d.ts.map +1 -1
- package/dist/components/Layout/Navigation/NavGroup.d.ts +1 -14
- package/dist/components/Layout/Navigation/NavGroup.d.ts.map +1 -1
- package/dist/components/ra-forms/SimpleForm.d.ts.map +1 -1
- package/dist/contexts/MenuConfigContext.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +50 -50
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +3306 -3315
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +48 -48
- package/dist/react-admin.umd.js.map +1 -1
- package/dist/themes/overrides/Dialog.d.ts +6 -1
- package/dist/themes/overrides/Dialog.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-admin.code-workspace +13 -0
- package/src/components/ActionsMenu.tsx +0 -1
- package/src/components/Layout/Navigation/NavGroup.tsx +1 -13
- package/src/components/ra-forms/CardForm.tsx +1 -1
- package/src/components/ra-forms/SimpleForm.tsx +6 -8
- package/src/components/ra-forms/TabbedForm.tsx +2 -2
- package/src/contexts/MenuConfigContext.tsx +2 -3
- package/src/playground/menu.jsx +1 -1
- package/src/themes/overrides/Dialog.jsx +6 -1
- package/src/themes/overrides/index.jsx +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
export default function Dialog(): {
|
|
1
|
+
export default function Dialog(theme: any): {
|
|
2
2
|
MuiDialog: {
|
|
3
3
|
styleOverrides: {
|
|
4
4
|
root: {
|
|
5
5
|
'& .MuiBackdrop-root': {
|
|
6
6
|
backgroundColor: string;
|
|
7
7
|
};
|
|
8
|
+
'& .MuiCardContent-root': {
|
|
9
|
+
[x: number]: {
|
|
10
|
+
paddingBottom: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
8
13
|
};
|
|
9
14
|
};
|
|
10
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/Dialog.jsx"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/themes/overrides/Dialog.jsx"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;EAiBC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Box, ClickAwayListener, List, ListItemButton, ListItemIcon, ListItemText, Paper, Popper, Typography, Theme } from '@mui/material';
|
|
2
2
|
import { DownOutlined, RightOutlined } from '@ant-design/icons';
|
|
3
|
-
import { Fragment, useEffect, useState } from 'react';
|
|
3
|
+
import React, { Fragment, useEffect, useState } from 'react';
|
|
4
4
|
import { styled, useTheme } from '@mui/material/styles';
|
|
5
5
|
import { useMenuConfig } from '../../../hooks';
|
|
6
6
|
|
|
7
7
|
import NavCollapse from './NavCollapse';
|
|
8
8
|
import NavItem from './NavItem';
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
9
|
import { Transitions } from '../../@extended';
|
|
11
10
|
import { useTranslate } from 'react-admin';
|
|
12
11
|
import { useLayoutMediaState } from '../Provider';
|
|
@@ -336,15 +335,4 @@ const NavGroup = ({
|
|
|
336
335
|
);
|
|
337
336
|
};
|
|
338
337
|
|
|
339
|
-
NavGroup.propTypes = {
|
|
340
|
-
item: PropTypes.object,
|
|
341
|
-
lastItem: PropTypes.number,
|
|
342
|
-
remItems: PropTypes.array,
|
|
343
|
-
lastItemId: PropTypes.string,
|
|
344
|
-
setSelectedItems: PropTypes.func,
|
|
345
|
-
selectedItems: PropTypes.string,
|
|
346
|
-
setSelectedLevel: PropTypes.func,
|
|
347
|
-
selectedLevel: PropTypes.number
|
|
348
|
-
};
|
|
349
|
-
|
|
350
338
|
export { NavGroup };
|
|
@@ -11,13 +11,10 @@ import ActionsMenu from '../ActionsMenu';
|
|
|
11
11
|
import MainCard from '../MainCard';
|
|
12
12
|
import Toolbar from './Toolbar';
|
|
13
13
|
|
|
14
|
-
const StyledSimpleForm = styled(RaSimpleForm, { slot: 'Root' })(({ theme
|
|
15
|
-
|
|
16
|
-
paddingBottom:
|
|
17
|
-
}
|
|
18
|
-
// [theme.breakpoints.down('sm')]: {
|
|
19
|
-
paddingBottom: '0 !important',
|
|
20
|
-
// }
|
|
14
|
+
const StyledSimpleForm = styled(RaSimpleForm, { slot: 'Root' })(({ theme }: { theme: any }) => ({
|
|
15
|
+
[theme.breakpoints.down('sm')]: {
|
|
16
|
+
paddingBottom: '20px',
|
|
17
|
+
}
|
|
21
18
|
}));
|
|
22
19
|
|
|
23
20
|
export type SimpleFormProps = RaSimpleFormProps & {
|
|
@@ -61,7 +58,8 @@ export function SimpleForm({
|
|
|
61
58
|
'& .MuiToolbar-root': {
|
|
62
59
|
paddingLeft: 2.5,
|
|
63
60
|
paddingRight: 2.5,
|
|
64
|
-
paddingBottom: 2.5
|
|
61
|
+
paddingBottom: 2.5,
|
|
62
|
+
paddingTop: 0
|
|
65
63
|
}
|
|
66
64
|
}}
|
|
67
65
|
border={!modal}
|
|
@@ -25,9 +25,9 @@ export type TabbedFormProps = RaTabbedFormProps & {
|
|
|
25
25
|
noPadding?: boolean;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
const StyledTabbedForm = styled(RaTabbedForm, { slot: 'Root' })(({ theme
|
|
28
|
+
const StyledTabbedForm = styled(RaTabbedForm, { slot: 'Root' })(({ theme }: { theme: any }) => ({
|
|
29
29
|
'& .MuiGrid-root.MuiGrid-container': {
|
|
30
|
-
paddingBottom:
|
|
30
|
+
paddingBottom: 0
|
|
31
31
|
} as any,
|
|
32
32
|
[theme.breakpoints.down('sm')]: {
|
|
33
33
|
paddingBottom: 0,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MenuProps } from '../types';
|
|
2
|
-
import { createContext, useEffect } from 'react';
|
|
3
|
-
import { useLocalStorage } from '../hooks';
|
|
2
|
+
import { createContext, useEffect, useState } from 'react';
|
|
4
3
|
|
|
5
4
|
export type MenuConfigContextProps = {
|
|
6
5
|
openItem: string[];
|
|
@@ -40,7 +39,7 @@ export type MenuConfigProviderProps = {
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
const MenuConfigProvider = ({ menu, children }: MenuConfigProviderProps) => {
|
|
43
|
-
const [menuConfig, setMenuConfig] =
|
|
42
|
+
const [menuConfig, setMenuConfig] = useState({ ...initialState, menu }) as any;
|
|
44
43
|
const setMenu = (menu: MenuProps) => setMenuConfig((menuConfig: MenuConfigContextProps) => ({ ...menuConfig, menu }));
|
|
45
44
|
const activeItem = (openItem: string) => setMenuConfig((menuConfig: MenuConfigContextProps) => ({ ...menuConfig, openItem }));
|
|
46
45
|
const activeID = (selectedID: string) => setMenuConfig((menuConfig: MenuConfigContextProps) => ({ ...menuConfig, selectedID }));
|
package/src/playground/menu.jsx
CHANGED
|
@@ -3,13 +3,18 @@ import { alpha } from '@mui/material/styles';
|
|
|
3
3
|
|
|
4
4
|
// ==============================|| OVERRIDES - DIALOG ||============================== //
|
|
5
5
|
|
|
6
|
-
export default function Dialog() {
|
|
6
|
+
export default function Dialog(theme) {
|
|
7
7
|
return {
|
|
8
8
|
MuiDialog: {
|
|
9
9
|
styleOverrides: {
|
|
10
10
|
root: {
|
|
11
11
|
'& .MuiBackdrop-root': {
|
|
12
12
|
backgroundColor: alpha('#000', 0.7)
|
|
13
|
+
},
|
|
14
|
+
'& .MuiCardContent-root': {
|
|
15
|
+
[theme.breakpoints.down('sm')]: {
|
|
16
|
+
paddingBottom: '20px'
|
|
17
|
+
}
|
|
13
18
|
}
|
|
14
19
|
}
|
|
15
20
|
}
|