@campxdev/shared 1.11.7-0.alpha.46 → 1.11.7-0.alpha.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.11.7-0.alpha.46",
3
+ "version": "1.11.7-0.alpha.48",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -1,5 +1,4 @@
1
- import MenuIcon from '@mui/icons-material/Menu'
2
- import { Drawer, IconButton, styled } from '@mui/material'
1
+ import { Drawer, Stack, styled } from '@mui/material'
3
2
  import { useState } from 'react'
4
3
  import {
5
4
  StyledLeftNavContainer,
@@ -28,60 +27,14 @@ export default function LayoutWrapper({
28
27
  setOpen(!open)
29
28
  }
30
29
  return (
31
- <ErrorBoundary>
32
- {window.innerWidth > 1024 && !permissions.isHomePageEnabled && (
33
- <StyledLeftNavContainer>
34
- <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
35
- </StyledLeftNavContainer>
36
- )}
37
-
38
- <StyledMainContentContainer
39
- style={{
40
- width: permissions.isHomePageEnabled
41
- ? 'inherit'
42
- : 'calc(100% - 220px)',
43
- position: permissions.isHomePageEnabled ? 'unset' : 'fixed',
44
- marginTop: permissions.isHomePageEnabled ? '10px' : '0px',
45
- borderRadius: permissions.isHomePageEnabled ? '10px' : '0px',
46
- border: permissions.isHomePageEnabled ? '1px solid #1212' : 'none',
47
- height: permissions.isHomePageEnabled
48
- ? 'calc(100vh - 74px)'
49
- : 'calc(100vh - 64px)',
50
- }}
51
- >
52
- {window.innerWidth < 1024 && (
53
- <>
54
- <IconButton
55
- color="inherit"
56
- aria-label="open drawer"
57
- onClick={handleDrawer}
58
- edge="start"
59
- sx={{ mr: 0.5 }}
60
- >
61
- <MenuIcon />
62
- </IconButton>
63
- {/* <Button
64
- onClick={() => {
65
- console.log('hi')
66
- }}
67
- // edge="start"
68
- // sx={{ mr: 0.5 }}
69
- >
70
- <MenuIcon />
71
- </Button> */}
72
- <StyledDrawer
73
- variant={'temporary'}
74
- anchor="left"
75
- open={open}
76
- onClose={handleDrawer}
77
- >
78
- <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
79
- </StyledDrawer>
80
- </>
81
- )}
30
+ <Stack direction="row">
31
+ <StyledLeftNavContainer>
32
+ <SideNav menuItems={menu as any[]} header={sideMenuHeader} />
33
+ </StyledLeftNavContainer>
34
+ <StyledMainContentContainer>
82
35
  <ErrorBoundary>{children}</ErrorBoundary>
83
36
  </StyledMainContentContainer>
84
- </ErrorBoundary>
37
+ </Stack>
85
38
  )
86
39
  }
87
40
 
@@ -27,17 +27,12 @@ export const StyledLeftNavContainer = muiStyled('aside')(({ theme }) => ({
27
27
  width: sideNavWidth,
28
28
  background: theme.palette.secondary.main,
29
29
  color: 'white',
30
- position: 'fixed',
31
- top: headerHeight,
32
- left: 0,
33
- height: `calc(100vh - ${headerHeight})`,
34
- overflowY: 'auto',
35
-
30
+ height: 'calc(100vh - 84px)',
31
+ overflowY: 'scroll',
36
32
  '&::-webkit-scrollbar': {
37
33
  width: '0.5em',
38
34
  height: '0.5em',
39
35
  },
40
-
41
36
  '&::-webkit-scrollbar-thumb': {
42
37
  backgroundColor: 'rgba(255, 255, 255, 0.3)',
43
38
  borderRadius: '3px',
@@ -46,22 +41,11 @@ export const StyledLeftNavContainer = muiStyled('aside')(({ theme }) => ({
46
41
  background: 'rgba(255, 255, 255, 0.4)',
47
42
  },
48
43
  },
49
-
50
- zIndex: 100,
51
44
  }))
52
45
 
53
46
  export const StyledMainContentContainer = muiStyled('main')(() => ({
54
- width:
55
- window.innerWidth > 1024
56
- ? `calc(100% - ${sideNavWidth})`
57
- : '100% !important',
58
- height: `calc(100vh - ${headerHeight})`,
59
- position: 'fixed',
60
- top: headerHeight,
61
- left: window.innerWidth > 1024 ? sideNavWidth : 0,
62
- right: window.innerWidth > 1024 ? 'unset' : 0,
63
- bottom: window.innerWidth > 1024 ? 'unset' : 0,
64
- overflowY: 'auto',
47
+ height: 'calc(100vh - 84px)',
48
+ overflowY: 'scroll',
65
49
 
66
50
  '&::-webkit-scrollbar': {
67
51
  width: '0.4em',