@campxdev/shared 0.5.21 → 0.5.22
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/.eslintignore +4 -0
- package/.eslintrc.js +34 -0
- package/.prettierrc +10 -0
- package/exports.ts +7 -6
- package/package.json +64 -50
- package/publish.sh +2 -0
- package/src/assets/images/index.ts +8 -8
- package/src/components/Breadcrumbs.tsx +3 -3
- package/src/components/ChangePassword.tsx +147 -147
- package/src/components/DropDownButton.tsx +167 -163
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +22 -22
- package/src/components/ErrorBoundary/ErrorFallback.tsx +215 -215
- package/src/components/ErrorBoundary/GlobalNetworkLoadingIndicator.tsx +6 -6
- package/src/components/ErrorBoundary/index.tsx +1 -1
- package/src/components/FullScreenLoader.tsx +15 -15
- package/src/components/HookForm/AutoCompleteSearch.tsx +0 -30
- package/src/components/HookForm/RadioGroup.tsx +1 -1
- package/src/components/IconButtons/Icons.tsx +1 -2
- package/src/components/Input/AutoCompleteSearch.tsx +0 -30
- package/src/components/Input/SingleSelect.tsx +0 -15
- package/src/components/Layout/Header/AppHeader.tsx +89 -89
- package/src/components/Layout/Header/AppsMenu.tsx +79 -79
- package/src/components/Layout/Header/CogWheelMenu.tsx +27 -27
- package/src/components/Layout/Header/UserBox.tsx +25 -25
- package/src/components/Layout/Header/applications.ts +79 -79
- package/src/components/Layout/Header/assets/index.ts +10 -10
- package/src/components/Layout/Header/styles.tsx +72 -72
- package/src/components/LayoutWrapper.tsx +6 -6
- package/src/components/LinearProgress.tsx +14 -14
- package/src/components/ListItemButton.tsx +79 -79
- package/src/components/LoginForm.tsx +86 -86
- package/src/components/MenuButton.tsx +88 -88
- package/src/components/ModalButtons/DialogButton.tsx +66 -66
- package/src/components/PageContent.tsx +10 -10
- package/src/components/PageNotFound.tsx +12 -12
- package/src/components/PopupConfirm/ConfirmContextProvider.tsx +28 -28
- package/src/components/PopupConfirm/PopupConfirm.tsx +27 -27
- package/src/components/PopupConfirm/useConfirm.ts +41 -41
- package/src/components/SideMenuHeader.tsx +15 -15
- package/src/components/SideNav.tsx +119 -119
- package/src/components/Spinner.tsx +14 -14
- package/src/components/TableComponent/ReactTable.tsx +256 -256
- package/src/components/TableComponent/RenderTableBody.tsx +56 -56
- package/src/components/TableComponent/index.tsx +171 -171
- package/src/components/TableComponent/react-table-config.d.ts +2 -3
- package/src/components/index.ts +54 -54
- package/src/config/axios.ts +50 -50
- package/src/config/axiosXTenant.ts +57 -0
- package/src/constants/isDevelopment.ts +2 -2
- package/src/contexts/LoginFormProvider.tsx +28 -28
- package/src/contexts/Providers.tsx +40 -40
- package/src/contexts/QueryClientProvider.tsx +15 -15
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useAppInit.ts +23 -23
- package/src/hooks/useAuth.ts +78 -77
- package/src/layouts/Components/DashBoardMenu.tsx +77 -77
- package/src/layouts/Components/icons/index.tsx +32 -32
- package/src/layouts/Components/styles.tsx +23 -23
- package/src/permissions/PageWithPermission.tsx +9 -9
- package/src/permissions/PermissionDeniedPage.tsx +13 -13
- package/src/permissions/PermissionsStore.ts +303 -303
- package/src/shared-state/index.ts +3 -3
- package/src/theme/MuiThemeProvider.tsx +9 -9
- package/src/theme/theme.d.ts +72 -72
- package/src/utils/index.ts +7 -7
- package/src/utils/logout.ts +19 -19
- package/src/utils/withLocalization.tsx +8 -8
- package/src/utils/withRouteWrapper.tsx +20 -20
- package/src/utils/withSuspense.tsx +3 -3
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import {isDevelopment} from '../../../constants'
|
|
1
|
+
import { isDevelopment } from '../../../constants'
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
campxSquareSmall,
|
|
4
|
+
examsSmall,
|
|
5
|
+
hostelSmall,
|
|
6
|
+
paySmall,
|
|
7
|
+
peopleSmall,
|
|
8
8
|
} from './assets'
|
|
9
9
|
|
|
10
10
|
const origins = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
ums: {
|
|
12
|
+
dev: 'https://ums.campx.dev',
|
|
13
|
+
prod: 'https://ums.campx.in',
|
|
14
|
+
},
|
|
15
|
+
payments: {
|
|
16
|
+
dev: 'https://payments.campx.dev',
|
|
17
|
+
prod: 'https://payments.campx.in',
|
|
18
|
+
},
|
|
19
|
+
exams: {
|
|
20
|
+
dev: 'https://exams.campx.dev',
|
|
21
|
+
prod: 'https://exams.campx.in',
|
|
22
|
+
},
|
|
23
|
+
people: {
|
|
24
|
+
dev: 'https://people.campx.dev',
|
|
25
|
+
prod: 'https://people.campx.in',
|
|
26
|
+
},
|
|
27
|
+
hostel: {
|
|
28
|
+
dev: 'https://hostel.campx.dev',
|
|
29
|
+
prod: 'https://hostel.campx.in',
|
|
30
|
+
},
|
|
31
|
+
commute: {
|
|
32
|
+
dev: 'https://commute.campx.dev',
|
|
33
|
+
prod: 'https://commute.campx.in',
|
|
34
|
+
},
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export const applications = [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
38
|
+
{
|
|
39
|
+
title: 'CollegeX',
|
|
40
|
+
path: isDevelopment ? origins.ums.dev : origins.ums.prod,
|
|
41
|
+
icon: campxSquareSmall,
|
|
42
|
+
key: 'ums',
|
|
43
|
+
description: 'Manage Complete Campus Activities',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: 'ExamX',
|
|
47
|
+
key: 'exams',
|
|
48
|
+
path: isDevelopment ? origins.exams.dev : origins.exams.prod,
|
|
49
|
+
icon: examsSmall,
|
|
50
|
+
description: 'Manage all Examinations in the Campus',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'PayX',
|
|
54
|
+
key: 'payments',
|
|
55
|
+
path: isDevelopment ? origins.payments.dev : origins.payments.prod,
|
|
56
|
+
icon: paySmall,
|
|
57
|
+
description: 'Manage Online Payments in the Campus',
|
|
58
|
+
},
|
|
59
|
+
...(isDevelopment
|
|
60
|
+
? [
|
|
61
|
+
{
|
|
62
|
+
title: 'PeopleX',
|
|
63
|
+
path: isDevelopment ? origins.people.dev : origins.people.prod,
|
|
64
|
+
icon: peopleSmall,
|
|
65
|
+
description: 'Manage People in the Campus',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: 'HostelX',
|
|
69
|
+
path: isDevelopment ? origins.hostel.dev : origins.hostel.prod,
|
|
70
|
+
icon: hostelSmall,
|
|
71
|
+
description: 'Manage Hostels in the Campus',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'CommuteX',
|
|
75
|
+
path: isDevelopment ? origins.commute.dev : origins.commute.prod,
|
|
76
|
+
icon: hostelSmall,
|
|
77
|
+
description: 'Manage Commute in the Campus',
|
|
78
|
+
},
|
|
79
|
+
]
|
|
80
|
+
: []),
|
|
81
|
+
// {
|
|
82
|
+
// title: 'EnrollX',
|
|
83
|
+
// path: '/hostel',
|
|
84
|
+
// icon: enrollHeaderLogo,
|
|
85
|
+
// // description: 'Manage Admissions in the Campus',
|
|
86
|
+
// },
|
|
87
87
|
]
|
|
@@ -10,14 +10,14 @@ import peopleSmall from './people_small.svg'
|
|
|
10
10
|
import hostelSmall from './hostel_small.svg'
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
collegex,
|
|
14
|
+
enrollx,
|
|
15
|
+
examx,
|
|
16
|
+
payx,
|
|
17
|
+
peoplex,
|
|
18
|
+
campxSquareSmall,
|
|
19
|
+
examsSmall,
|
|
20
|
+
paySmall,
|
|
21
|
+
peopleSmall,
|
|
22
|
+
hostelSmall,
|
|
23
23
|
}
|
|
@@ -1,98 +1,98 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
alpha,
|
|
3
|
+
AppBar,
|
|
4
|
+
Box,
|
|
5
|
+
IconButton,
|
|
6
|
+
ListItemText,
|
|
7
|
+
styled,
|
|
8
|
+
Typography,
|
|
9
|
+
Link,
|
|
10
10
|
} from '@mui/material'
|
|
11
11
|
|
|
12
12
|
export const StyledImageWrapper = styled('div')`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
width: auto;
|
|
14
|
+
height: 24px;
|
|
15
|
+
& img {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
object-fit: contain;
|
|
19
|
+
}
|
|
20
20
|
`
|
|
21
21
|
|
|
22
|
-
export const StyledItemText = styled(ListItemText)(({theme}) => ({
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
export const StyledItemText = styled(ListItemText)(({ theme }) => ({
|
|
23
|
+
color: theme.palette.text.primary,
|
|
24
|
+
transition: '0.2s ease',
|
|
25
25
|
}))
|
|
26
26
|
|
|
27
|
-
export const StyledAppBar = styled(AppBar)(({theme}) => ({
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
export const StyledAppBar = styled(AppBar)(({ theme }) => ({
|
|
28
|
+
backgroundColor: 'white',
|
|
29
|
+
boxShadow: '0px 8px 28px rgb(136,136,136, 0.3)',
|
|
30
30
|
}))
|
|
31
31
|
|
|
32
|
-
export const StyledHeader = styled(Box)(({theme}) => ({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
32
|
+
export const StyledHeader = styled(Box)(({ theme }) => ({
|
|
33
|
+
boxShadow: '0px 2px 10px #0000001a',
|
|
34
|
+
backgroundColor: 'white',
|
|
35
|
+
display: 'flex',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
justifyContent: 'space-between',
|
|
38
|
+
'& .actions': {
|
|
39
|
+
marginRight: '10px',
|
|
40
|
+
display: 'flex',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
gap: '14px',
|
|
43
|
+
},
|
|
44
44
|
}))
|
|
45
45
|
|
|
46
|
-
export const StyledUser = styled(Box)(({theme}) => ({
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
46
|
+
export const StyledUser = styled(Box)(({ theme }) => ({
|
|
47
|
+
cursor: 'pointer',
|
|
48
|
+
borderRadius: '5px',
|
|
49
|
+
transition: 'background 0.2s ease',
|
|
50
|
+
padding: '5px 16px',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
gap: '8px',
|
|
54
|
+
'&:hover': {
|
|
55
|
+
background: theme.palette.secondary.light,
|
|
56
|
+
},
|
|
57
57
|
}))
|
|
58
58
|
|
|
59
59
|
export const StyledIconButton = styled(IconButton)({
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
padding: '20px',
|
|
61
|
+
backgroundColor: 'black',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
borderRadius: '0px',
|
|
66
66
|
})
|
|
67
67
|
|
|
68
68
|
export const StyledLink = styled(Link)({
|
|
69
|
-
|
|
69
|
+
textDecoration: 'none',
|
|
70
70
|
})
|
|
71
71
|
|
|
72
|
-
export const StyledDescription = styled(Typography)(({theme}) => ({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
export const StyledDescription = styled(Typography)(({ theme }) => ({
|
|
73
|
+
fontSize: '12px',
|
|
74
|
+
fontWeight: 600,
|
|
75
|
+
color: alpha(theme?.palette?.secondary?.lighter, 0.5),
|
|
76
76
|
}))
|
|
77
77
|
|
|
78
78
|
export const StyledMenuItem = styled(Box)({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
height: '64px',
|
|
80
|
+
width: '380px',
|
|
81
|
+
padding: '40px 20px',
|
|
82
|
+
transition: 'background ease 0.3s',
|
|
83
|
+
'&:hover': {
|
|
84
|
+
background: 'rgba(0, 0, 0, 0.03)',
|
|
85
|
+
},
|
|
86
|
+
display: 'flex',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
gap: '20px',
|
|
89
89
|
})
|
|
90
90
|
|
|
91
|
-
export const StyledMenuItemContainer = styled(Box)(({theme}) => ({
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
export const StyledMenuItemContainer = styled(Box)(({ theme }) => ({
|
|
92
|
+
cursor: 'pointer',
|
|
93
|
+
borderBottom: `1px solid ${theme?.palette?.secondary?.lighter}`,
|
|
94
|
+
'&:last-of-type': {
|
|
95
|
+
border: 'none',
|
|
96
|
+
},
|
|
97
|
+
padding: '8px 0px',
|
|
98
98
|
}))
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StyledLeftNavContainer,
|
|
3
3
|
StyledMainContentContainer,
|
|
4
|
-
} from
|
|
5
|
-
import SideNav from
|
|
4
|
+
} from '../layouts/Components/styles'
|
|
5
|
+
import SideNav from './SideNav'
|
|
6
6
|
interface Props {
|
|
7
|
-
children?: React.ReactNode
|
|
8
|
-
menu: any[]
|
|
9
|
-
sideMenuHeader?: React.ReactNode
|
|
7
|
+
children?: React.ReactNode
|
|
8
|
+
menu: any[]
|
|
9
|
+
sideMenuHeader?: React.ReactNode
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export default function LayoutWrapper({
|
|
@@ -21,5 +21,5 @@ export default function LayoutWrapper({
|
|
|
21
21
|
</StyledLeftNavContainer>
|
|
22
22
|
<StyledMainContentContainer>{children}</StyledMainContentContainer>
|
|
23
23
|
</>
|
|
24
|
-
)
|
|
24
|
+
)
|
|
25
25
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
BoxProps,
|
|
3
|
+
styled,
|
|
4
|
+
Box,
|
|
5
|
+
LinearProgress as MuiLinearProgress,
|
|
6
6
|
} from '@mui/material'
|
|
7
7
|
|
|
8
8
|
export const LinearProgress = styled((props: BoxProps) => (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
))(({theme}) => ({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
<Box {...props}>
|
|
10
|
+
<MuiLinearProgress color={'inherit'} sx={{ height: '4px' }} />
|
|
11
|
+
</Box>
|
|
12
|
+
))(({ theme }) => ({
|
|
13
|
+
width: '100%',
|
|
14
|
+
position: 'fixed',
|
|
15
|
+
top: 0,
|
|
16
|
+
left: 0,
|
|
17
|
+
zIndex: 400,
|
|
18
|
+
color: theme.palette.primary.main,
|
|
19
19
|
}))
|
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
import {ChevronRight} from '@mui/icons-material'
|
|
1
|
+
import { ChevronRight } from '@mui/icons-material'
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Box,
|
|
4
|
+
ListItemButton as MuiListItemButton,
|
|
5
|
+
ListItemButtonProps,
|
|
6
|
+
ListItemIcon,
|
|
7
|
+
ListItemText,
|
|
8
|
+
styled,
|
|
9
9
|
} from '@mui/material'
|
|
10
|
-
import {ReactNode} from 'react'
|
|
10
|
+
import { ReactNode } from 'react'
|
|
11
11
|
|
|
12
12
|
interface Props extends ListItemButtonProps {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
hasChildren?: boolean
|
|
14
|
+
isActive?: boolean
|
|
15
|
+
label: String
|
|
16
|
+
icon?: any
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const ListItemButton = ({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
isActive,
|
|
21
|
+
hasChildren,
|
|
22
|
+
onClick,
|
|
23
|
+
label,
|
|
24
|
+
icon: Icon,
|
|
25
25
|
}: Props) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
return (
|
|
27
|
+
<StyledListItemButton isActive={isActive} onClick={onClick}>
|
|
28
|
+
{Icon ? (
|
|
29
|
+
<ListItemIcon>{<Icon />}</ListItemIcon>
|
|
30
|
+
) : (
|
|
31
|
+
<Box minWidth={16}></Box>
|
|
32
|
+
)}
|
|
33
|
+
<ListItemText primary={label} />
|
|
34
|
+
</StyledListItemButton>
|
|
35
|
+
)
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export const StyledChevronIcon = styled(ChevronRight)<{open: boolean}>(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
export const StyledChevronIcon = styled(ChevronRight)<{ open: boolean }>(
|
|
39
|
+
({ theme, open }) => ({
|
|
40
|
+
transform: open ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
41
|
+
transition: 'transform 0.2s ease-in-out',
|
|
42
|
+
}),
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
export const StyledListItemButton = styled(MuiListItemButton)<{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}>(({theme, isActive, dropDown = false}) => ({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
46
|
+
isActive: boolean
|
|
47
|
+
children: ReactNode
|
|
48
|
+
dropDown?: boolean
|
|
49
|
+
}>(({ theme, isActive, dropDown = false }) => ({
|
|
50
|
+
gap: '10px',
|
|
51
|
+
fontWeight: 'bold',
|
|
52
|
+
backgroundColor: isActive && '#1d1d1d',
|
|
53
|
+
'&:hover': {
|
|
54
|
+
backgroundColor: isActive && '#1d1d1d',
|
|
55
|
+
},
|
|
56
|
+
'&:after': {
|
|
57
|
+
content: '""',
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
height: '100%',
|
|
60
|
+
left: 0,
|
|
61
|
+
top: 0,
|
|
62
|
+
width: isActive ? '5px' : 0,
|
|
63
|
+
opacity: isActive ? (dropDown ? 0 : 1) : 0,
|
|
64
|
+
transition: theme.transitions.create(['opacity', 'width']),
|
|
65
|
+
background: theme.palette.common.yellow,
|
|
66
|
+
borderTopRightRadius: '3px',
|
|
67
|
+
borderBottomRightRadius: '3px',
|
|
68
|
+
},
|
|
69
|
+
'&.MuiButton-endIcon, &.MuiButton-startIcon': {
|
|
70
|
+
transition: theme.transitions.create(['color']),
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
72
|
+
'&.MuiSvgIcon-root': {
|
|
73
|
+
fontSize: 'inherit',
|
|
74
|
+
transition: 'none',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
'& .MuiSvgIcon-root': {
|
|
78
|
+
fontSize: theme.typography.pxToRem(20),
|
|
79
|
+
marginRight: theme.spacing(1),
|
|
80
|
+
// color: isActive
|
|
81
|
+
// ? theme.sidebar.menuItemColorActive
|
|
82
|
+
// : theme.sidebar.menuItemIconColor,
|
|
83
|
+
},
|
|
84
|
+
'& .MuiTypography-root': {
|
|
85
|
+
color: theme.palette.common.white,
|
|
86
|
+
},
|
|
87
|
+
'& svg': {
|
|
88
|
+
color: theme.palette.common.white,
|
|
89
|
+
},
|
|
90
|
+
'& .MuiListItemIcon-root': {
|
|
91
|
+
minWidth: 0,
|
|
92
|
+
maxWidth: '1rem',
|
|
93
|
+
},
|
|
94
94
|
}))
|