Skip to content

Commit ae3dfb5

Browse files
ct-tusharphoenixcodedTushar
authored
Stage v1.2.0 (#16)
* free - v1.2.0 - react 19 * react-19 changes in admin --------- Co-authored-by: ct-amit <[email protected]> Co-authored-by: Tushar <[email protected]>
1 parent 5ac7bf2 commit ae3dfb5

File tree

25 files changed

+861
-1064
lines changed

25 files changed

+861
-1064
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Looking for even more features? Check out SaasAble's [premium version](https://m
107107

108108
## Technology Stack
109109

110-
- React 18
110+
- React 19
111111
- Next js
112112
- TypeScript
113113
- Material UI v7

admin/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Version
2-
NEXT_PUBLIC_VERSION=v1.1.0
2+
NEXT_PUBLIC_VERSION=v1.2.0
33

44
## Public URL
55
NEXT_PUBLIC_PATH=

admin/package-lock.json

Lines changed: 455 additions & 583 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/package.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saas-able-react-mui-admin-next-seed-js",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"private": true,
55
"author": {
66
"email": "[email protected]",
@@ -19,17 +19,17 @@
1919
"@emotion/cache": "11.14.0",
2020
"@emotion/react": "11.14.0",
2121
"@emotion/styled": "11.14.0",
22-
"@mui/material": "7.0.1",
23-
"@mui/material-nextjs": "7.0.0",
22+
"@mui/material": "7.0.2",
23+
"@mui/material-nextjs": "7.0.2",
2424
"@mui/x-charts": "7.28.0",
25-
"@mui/x-date-pickers": "7.28.2",
25+
"@mui/x-date-pickers": "7.28.3",
2626
"@tabler/icons-react": "3.31.0",
2727
"lodash-es": "4.17.21",
28-
"next": "15.2.4",
28+
"next": "15.3.0",
2929
"notistack": "3.0.2",
30-
"react": "18.3.1",
30+
"react": "19.1.0",
3131
"react-device-detect": "2.2.3",
32-
"react-dom": "18.3.1",
32+
"react-dom": "19.1.0",
3333
"react-hook-form": "7.55.0",
3434
"simplebar-react": "3.3.0",
3535
"stylis": "4.3.6",
@@ -38,15 +38,12 @@
3838
},
3939
"devDependencies": {
4040
"@eslint/eslintrc": "3.3.1",
41-
"@eslint/js": "9.23.0",
42-
"eslint": "9.23.0",
43-
"eslint-config-next": "15.2.4",
44-
"eslint-config-prettier": "10.1.1",
45-
"eslint-plugin-prettier": "5.2.5",
46-
"knip": "5.46.4",
41+
"@eslint/js": "9.24.0",
42+
"eslint": "9.24.0",
43+
"eslint-config-next": "15.3.0",
44+
"eslint-config-prettier": "10.1.2",
45+
"eslint-plugin-prettier": "5.2.6",
46+
"knip": "5.50.4",
4747
"prettier": "3.5.3"
48-
},
49-
"resolutions": {
50-
"punycode": "2.3.1"
5148
}
5249
}

admin/src/components/MainCard.jsx

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
'use client';
22
import PropTypes from 'prop-types';
33

4-
import { forwardRef } from 'react';
5-
64
// @mui
7-
import { useTheme } from '@mui/material/styles';
85
import Card from '@mui/material/Card';
96

10-
function MainCard({ children, sx = {}, ...others }, ref) {
11-
const theme = useTheme();
7+
export default function MainCard({ children, sx = {}, ref, ...others }) {
8+
const defaultSx = (theme) => ({
9+
p: { xs: 1.75, sm: 2.25, md: 3 },
10+
border: `1px solid ${theme.palette.divider}`,
11+
borderRadius: 4,
12+
boxShadow: theme.customShadows.section
13+
});
14+
15+
const combinedSx = (theme) => ({
16+
...defaultSx(theme),
17+
...(typeof sx === 'function' ? sx(theme) : sx)
18+
});
1219

1320
return (
14-
<Card
15-
ref={ref}
16-
elevation={0}
17-
sx={{
18-
p: { xs: 1.75, sm: 2.25, md: 3 },
19-
border: `1px solid ${theme.palette.divider}`,
20-
borderRadius: 4,
21-
boxShadow: theme.customShadows.section,
22-
...sx
23-
}}
24-
{...others}
25-
>
21+
<Card ref={ref} elevation={0} sx={combinedSx} {...others}>
2622
{children}
2723
</Card>
2824
);
2925
}
3026

31-
export default forwardRef(MainCard);
32-
3327
MainCard.propTypes = { children: PropTypes.any, sx: PropTypes.object, others: PropTypes.any };

admin/src/components/header/empty-state/EmptySearch.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use client';
22

3-
import { forwardRef } from 'react';
4-
53
// @mui
64
import Stack from '@mui/material/Stack';
75
import Typography from '@mui/material/Typography';
@@ -12,7 +10,7 @@ import { DumpingDoodle } from '@/images/illustration';
1210

1311
/*************************** HEADER - EMPTY SEARCH ***************************/
1412

15-
function EmptySearch(props, ref) {
13+
export default function EmptySearch(props, ref) {
1614
return (
1715
<Stack ref={ref} {...props} sx={{ width: 1, alignItems: 'center', justifyContent: 'center', textAlign: 'center', gap: 1.5, p: 1.5 }}>
1816
<Box sx={{ width: 230, height: 170 }}>
@@ -29,5 +27,3 @@ function EmptySearch(props, ref) {
2927
</Stack>
3028
);
3129
}
32-
33-
export default forwardRef(EmptySearch);

admin/src/components/logo/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function LogoSection({ isIcon, sx, to }) {
2020
const theme = useTheme();
2121

2222
return (
23-
<NextLink href={!to ? APP_DEFAULT_PATH : to} passHref legacyBehavior>
23+
<NextLink href={!to ? APP_DEFAULT_PATH : to} passHref>
2424
<ButtonBase disableRipple sx={{ ...sx, '&:focus-visible': generateFocusStyle(theme.palette.primary.main) }} aria-label="logo">
2525
{isIcon ? <LogoIcon /> : <LogoMain />}
2626
</ButtonBase>

admin/src/contexts/ConfigContext.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ConfigContext = createContext(initialState);
1717
function ConfigProvider({ children }) {
1818
const [config] = useLocalStorage('sass-able-react-mui-admin-next-ts', initialState);
1919

20-
return <ConfigContext.Provider value={{ ...config }}>{children}</ConfigContext.Provider>;
20+
return <ConfigContext value={{ ...config }}>{children}</ConfigContext>;
2121
}
2222

2323
export { ConfigProvider, ConfigContext };

admin/src/hooks/useConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useContext } from 'react';
1+
import { use } from 'react';
22

33
// @project
44
import { ConfigContext } from '@/contexts/ConfigContext';
@@ -17,5 +17,5 @@ import { ConfigContext } from '@/contexts/ConfigContext';
1717
*/
1818

1919
export default function useConfig() {
20-
return useContext(ConfigContext);
20+
return use(ConfigContext);
2121
}
Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
import PropTypes from 'prop-types';
2-
import { useState } from 'react';
32

43
// @next
54
import Link from 'next/link';
65

76
// @mui
8-
import { useTheme } from '@mui/material/styles';
9-
import useMediaQuery from '@mui/material/useMediaQuery';
107
import Avatar from '@mui/material/Avatar';
118
import Button from '@mui/material/Button';
12-
import ClickAwayListener from '@mui/material/ClickAwayListener';
13-
import Grow from '@mui/material/Grow';
14-
import IconButton from '@mui/material/IconButton';
15-
import ListItemAvatar from '@mui/material/ListItemAvatar';
16-
import ListItemIcon from '@mui/material/ListItemIcon';
17-
import Popper from '@mui/material/Popper';
189
import Stack from '@mui/material/Stack';
1910
import Typography from '@mui/material/Typography';
20-
import Box from '@mui/material/Box';
2111

2212
// @project
23-
import { DRAWER_WIDTH } from '@/config';
2413
import LogoSection from '@/components/logo';
2514
import MainCard from '@/components/MainCard';
26-
import SimpleBar from '@/components/third-party/SimpleBar';
2715
import { AvatarSize } from '@/enum';
2816

2917
// @assets
@@ -37,26 +25,6 @@ const data = {
3725
icon: <IconBolt size={16} />
3826
};
3927

40-
/*************************** POPPER - ARROW ***************************/
41-
42-
const popperArrowStyles = (theme) => ({
43-
content: '""',
44-
display: 'block',
45-
position: 'absolute',
46-
bottom: 20,
47-
left: -6,
48-
width: 10,
49-
height: 10,
50-
bgcolor: 'grey.50',
51-
transform: 'translateY(-50%) rotate(45deg)',
52-
zIndex: 120,
53-
borderLeft: '1px solid',
54-
borderLeftColor: 'divider',
55-
borderBottom: '1px solid',
56-
borderBottomColor: 'divider',
57-
boxShadow: theme.customShadows.tooltip
58-
});
59-
6028
/*************************** NAVIGATION CARD - CONTENT ***************************/
6129

6230
function CardContent({ title, description, icon }) {
@@ -90,91 +58,12 @@ function CardContent({ title, description, icon }) {
9058

9159
/*************************** DRAWER CONTENT - NAVIGATION CARD ***************************/
9260

93-
export default function NavCard({ isMiniDrawer }) {
94-
const theme = useTheme();
95-
const upMD = useMediaQuery(theme.breakpoints.up('md'));
96-
97-
const [anchorEl, setAnchorEl] = useState(null);
98-
const [miniMenuOpened, setMiniMenuOpened] = useState(false);
99-
100-
const handleClick = (event) => {
101-
setAnchorEl(event.currentTarget);
102-
setMiniMenuOpened((prev) => !prev);
103-
};
104-
105-
const handleClose = () => {
106-
setMiniMenuOpened(false);
107-
};
108-
61+
export default function NavCard() {
10962
return (
110-
<>
111-
{!isMiniDrawer ? (
112-
<MainCard sx={{ p: 1.5, bgcolor: 'grey.50', boxShadow: 'none', mb: 3 }}>
113-
<CardContent title={data.title} description={data.description} icon={data.icon} />
114-
</MainCard>
115-
) : (
116-
<IconButton sx={{ marginX: 'auto', mb: 3 }} onMouseEnter={handleClick} onMouseLeave={handleClose} aria-label="upgrade plan">
117-
<ListItemAvatar
118-
sx={{
119-
minWidth: 32,
120-
width: 42,
121-
height: 42,
122-
borderRadius: 2,
123-
cursor: 'pointer',
124-
display: 'flex',
125-
alignItems: 'center',
126-
justifyContent: 'center',
127-
bgcolor: 'primary.main',
128-
'&:hover': { bgcolor: 'primary.dark' }
129-
}}
130-
>
131-
<ListItemIcon sx={{ minWidth: 0 }}>
132-
<IconBolt size={20} color="background" />
133-
</ListItemIcon>
134-
</ListItemAvatar>
135-
{upMD && (
136-
<Popper
137-
open={miniMenuOpened}
138-
anchorEl={anchorEl}
139-
placement="right-end"
140-
sx={{
141-
zIndex: 1202,
142-
minWidth: 220,
143-
maxWidth: `${DRAWER_WIDTH - 24}px`,
144-
'& > .MuiPaper-root': { position: 'relative', mb: -0.75, '&:before': { ...popperArrowStyles(theme) } }
145-
}}
146-
>
147-
{({ TransitionProps }) => (
148-
<Grow in={miniMenuOpened} {...TransitionProps} timeout={{ appear: 0, enter: 150, exit: 150 }}>
149-
<MainCard
150-
sx={{
151-
p: 1.5,
152-
bgcolor: 'grey.50',
153-
boxShadow: theme.customShadows.tooltip,
154-
backgroundImage: 'none',
155-
transformOrigin: '0 0 0',
156-
left: 16,
157-
overflow: 'visible'
158-
}}
159-
>
160-
<ClickAwayListener onClickAway={handleClose} onMouseEnter={handleClick} onMouseLeave={handleClose}>
161-
<Box>
162-
<SimpleBar style={{ maxHeight: '50vh', overflowX: 'hidden', overflowY: 'auto' }}>
163-
<CardContent title={data.title} description={data.description} icon={data.icon} />
164-
</SimpleBar>
165-
</Box>
166-
</ClickAwayListener>
167-
</MainCard>
168-
</Grow>
169-
)}
170-
</Popper>
171-
)}
172-
</IconButton>
173-
)}
174-
</>
63+
<MainCard sx={{ p: 1.5, bgcolor: 'grey.50', boxShadow: 'none', mb: 3 }}>
64+
<CardContent title={data.title} description={data.description} icon={data.icon} />
65+
</MainCard>
17566
);
17667
}
17768

17869
CardContent.propTypes = { title: PropTypes.string, description: PropTypes.string, icon: PropTypes.any };
179-
180-
NavCard.propTypes = { isMiniDrawer: PropTypes.bool };

0 commit comments

Comments
 (0)