@zydon/common 2.8.60 → 2.8.62

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,16 +1,16 @@
1
1
  import { a } from '../../chunk-F65ZXAGV.js';
2
2
  import { styled, useTheme } from '@mui/material/styles';
3
- import z from '@mui/material/Stack';
3
+ import I from '@mui/material/Stack';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
- import L from '@mui/material/Box';
6
- import V from '@mui/material/Container';
7
- import O from '@mui/material/Toolbar';
8
- import E from '@mui/material/AppBar';
9
- import Y from '@mui/material/SvgIcon';
10
- import K from '@mui/material/IconButton';
11
- import rt from '@mui/material/GlobalStyles';
5
+ import z from '@mui/material/Box';
6
+ import R from '@mui/material/Container';
7
+ import G from '@mui/material/Toolbar';
8
+ import D from '@mui/material/AppBar';
9
+ import J from '@mui/material/SvgIcon';
10
+ import q from '@mui/material/IconButton';
11
+ import j from '@mui/material/GlobalStyles';
12
12
 
13
- var R=({children:t,isNavHorizontal:o,sx:r,...e})=>jsx(z,{component:"main",flex:"1 1 auto",bgcolor:"grey.100",sx:{...o&&{"--layout-dashboard-content-pt":"40px"},...r},...e,children:t}),b=R;var s={root:"layout__root",main:"layout__main",header:"layout__header",content:"layout__main__content",hasSidebar:"layout__has__sidebar"};var k=styled("span")(({theme:t})=>({width:1,height:10,flexShrink:0,display:"none",position:"relative",alignItems:"center",flexDirection:"column",marginLeft:t.spacing(2.5),marginRight:t.spacing(2.5),backgroundColor:"currentColor","&::before, &::after":{top:-5,width:3,height:3,content:'""',flexShrink:0,borderRadius:"50%",position:"absolute",backgroundColor:"currentColor"},"&::after":{bottom:-5,top:"auto"}})),S=styled(E)(({theme:t})=>({zIndex:"var(--layout-header-zIndex)",backgroundColor:t.palette.background.paper,"&::before":{content:'""',position:"absolute",bottom:0,left:0,width:"100%",height:"1px",backgroundColor:t.palette.divider,zIndex:1}}));var q=({sx:t,slots:o,slotProps:r,layoutQuery:e="md",...i})=>{let a=useTheme(),n={default:{minHeight:"auto",height:"var(--layout-header-mobile-height)",backgroundColor:a.palette.background.paper,transition:a.transitions.create(["height","background-color"],{easing:a.transitions.easing.easeInOut,duration:a.transitions.duration.shorter}),[a.breakpoints.up("sm")]:{minHeight:"auto"},[a.breakpoints.up(e)]:{height:"var(--layout-header-desktop-height)"}}};return jsxs(S,{position:"sticky",sx:t,...i,children:[o?.topArea,jsx(O,{disableGutters:!0,...r?.toolbar,sx:{...n.default,...r?.toolbar?.sx,maxHeight:64},children:jsxs(V,{...r?.container,sx:{height:1,display:"flex",alignItems:"center",...r?.container?.sx},children:[o?.leftArea,jsx(L,{sx:{display:"flex",flex:"1 1 auto",justifyContent:"center"},children:o?.centerArea}),o?.rightArea]})}),o?.bottomArea]})},B=q;var J=({sx:t,slots:o,slotProps:r,layoutQuery:e,...i})=>jsx(B,{sx:t,layoutQuery:e,slots:{...o,leftAreaStart:o?.leftAreaStart,leftArea:jsxs(Fragment,{children:[o?.leftAreaStart,jsx(k,{"data-slot":"divider"}),o?.leftAreaEnd]}),rightArea:jsxs(Fragment,{children:[o?.rightAreaStart,o?.rightAreaEnd]}),centerArea:o?.centerArea},slotProps:r,...i}),_=J;var M=styled(K,{shouldForwardProp:t=>t!=="isNavMini"})(({theme:t,isNavMini:o})=>({padding:8,top:15,position:"fixed",color:t.palette.action.active,backgroundColor:t.palette.background.paper,transform:"translateX(-50%)",zIndex:"var(--layout-nav-zIndex)",left:o?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)",border:`1px solid ${t.palette.divider}`,transition:t.transitions.create(["left"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),"&:hover":{color:t.palette.text.primary,backgroundColor:t.palette.background.neutral}}));var Z=({isNavMini:t,...o})=>jsx(M,{size:"small",isNavMini:t,...o,children:jsx(Y,{sx:{width:16,height:16,...t&&{transform:"scaleX(-1)"}},children:jsx("path",{fill:"currentColor",d:"M13.83 19a1 1 0 0 1-.78-.37l-4.83-6a1 1 0 0 1 0-1.27l5-6a1 1 0 0 1 1.54 1.28L10.29 12l4.32 5.36a1 1 0 0 1-.78 1.64"})})}),N=Z;styled(z)({padding:"12px 16px 24px",svg:{width:125}});styled(z)({padding:"12px 24px 24px",alignItems:"center",justifyContent:"center",svg:{width:32,height:32}});var H=styled(L,{shouldForwardProp:t=>t!=="isNavMini"&&t!=="layoutQuery"})(({theme:t,isNavMini:o,layoutQuery:r})=>({top:0,left:0,height:"100%",display:"none",position:"fixed",flexDirection:"column",backgroundColor:t.palette.background.paper,zIndex:"var(--layout-nav-zIndex)",width:o?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)",borderRight:`1px solid ${t.palette.divider}`,transition:t.transitions.create(["width"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),[t.breakpoints.up(r)]:{display:"flex"}}));var ot=({slots:t,isNavMini:o,layoutQuery:r,onToggleNav:e,children:i})=>{let a$1=useTheme(),n=jsxs(Fragment,{children:[t?.topArea,jsx(a,{fillContent:!0,sx:{p:2},children:i}),t?.bottomArea]}),m=jsxs(Fragment,{children:[t?.topArea,jsx(a,{fillContent:!0,sx:{p:2},children:i}),t?.bottomArea]});return jsxs(H,{isNavMini:o,layoutQuery:r,children:[jsx(N,{isNavMini:o,onClick:e,sx:{display:"none",[a$1.breakpoints.up(r)]:{display:"inline-flex"}}}),o?m:n]})},W=ot;var at=({sx:t,cssVars:o,children:r,footerSection:e,headerSection:i,sidebarSection:a})=>jsxs(Fragment,{children:[jsx(rt,{styles:{body:{"--layout-nav-zIndex":1101,"--layout-nav-mobile-width":"320px","--layout-header-blur":"8px","--layout-header-zIndex":1100,"--layout-header-mobile-height":"64px","--layout-header-desktop-height":"72px",...o}}}),jsx(L,{id:"root__layout",sx:t,children:a?jsxs(Fragment,{children:[a,jsxs(L,{display:"flex",flex:"1 1 auto",flexDirection:"column",className:s.hasSidebar,children:[i,r,e]})]}):jsxs(Fragment,{children:[i,r,e]})})]}),D=at;var it=({children:t,footerContent:o,headerProps:r,sidebarContent:e,sidebarProps:i,isNavMini:a,onToggleNavMini:n,mainProps:m})=>{let l=useTheme(),p="lg";return jsx(D,{headerSection:jsx(_,{layoutQuery:p,slotProps:{toolbar:{sx:{['& [data-area="right"]']:{gap:{xs:0,sm:.75}}}},container:{maxWidth:!1,sx:{px:{[p]:5}}}},slots:r?.slots}),sidebarSection:jsx(W,{isNavMini:a,layoutQuery:p,onToggleNav:n,slots:i?.slots,children:e}),footerSection:o,cssVars:{"--layout-transition-easing":"linear","--layout-transition-duration":"120ms","--layout-nav-mini-width":"88px","--layout-nav-vertical-width":"300px","--layout-nav-horizontal-height":"64px","--layout-dashboard-content-pt":l.spacing(1),"--layout-dashboard-content-pb":l.spacing(8),"--layout-dashboard-content-px":l.spacing(5)},sx:{[`& .${s.hasSidebar}`]:{[l.breakpoints.up(p)]:{transition:l.transitions.create(["padding-left"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),pl:a?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)"}}},children:jsx(b,{isNavHorizontal:!1,...m,children:t})})},oo=it;
13
+ var L=({children:o,isNavHorizontal:t,sx:r,...e})=>jsx(I,{component:"main",flex:"1 1 auto",bgcolor:"grey.100",sx:{...t&&{"--layout-dashboard-content-pt":"40px"},...r},...e,children:o}),b=L;var s={root:"layout__root",main:"layout__main",header:"layout__header",content:"layout__main__content",hasSidebar:"layout__has__sidebar"};styled("span")(({theme:o})=>({width:1,height:10,flexShrink:0,display:"none",position:"relative",alignItems:"center",flexDirection:"column",marginLeft:o.spacing(2.5),marginRight:o.spacing(2.5),backgroundColor:"currentColor","&::before, &::after":{top:-5,width:3,height:3,content:'""',flexShrink:0,borderRadius:"50%",position:"absolute",backgroundColor:"currentColor"},"&::after":{bottom:-5,top:"auto"}}));var k=styled(D)(({theme:o})=>({zIndex:"var(--layout-header-zIndex)",backgroundColor:o.palette.background.paper,"&::before":{content:'""',position:"absolute",bottom:0,left:0,width:"100%",height:"1px",backgroundColor:o.palette.divider,zIndex:1}}));var V=({sx:o,slots:t,slotProps:r,layoutQuery:e="md",...i})=>{let a=useTheme(),n={default:{minHeight:"auto",height:"var(--layout-header-mobile-height)",backgroundColor:a.palette.background.paper,transition:a.transitions.create(["height","background-color"],{easing:a.transitions.easing.easeInOut,duration:a.transitions.duration.shorter}),[a.breakpoints.up("sm")]:{minHeight:"auto"},[a.breakpoints.up(e)]:{height:"var(--layout-header-desktop-height)"}}};return jsxs(k,{position:"sticky",sx:o,...i,children:[t?.topArea,(t?.leftArea||t?.centerArea||t?.rightArea)&&jsx(G,{disableGutters:!0,...r?.toolbar,sx:{...n.default,...r?.toolbar?.sx,maxHeight:64},children:jsxs(R,{...r?.container,sx:{height:1,display:"flex",alignItems:"center",...r?.container?.sx},children:[t?.leftArea,jsx(z,{sx:{display:"flex",flex:"1 1 auto",justifyContent:"center"},children:t?.centerArea}),t?.rightArea]})}),t?.bottomArea]})},B=V;var X=({sx:o,slots:t,slotProps:r,layoutQuery:e,...i})=>jsx(B,{sx:o,layoutQuery:e,slots:{...t},slotProps:r,...i}),w=X;var A=styled(q,{shouldForwardProp:o=>o!=="isNavMini"})(({theme:o,isNavMini:t})=>({padding:8,top:15,position:"fixed",color:o.palette.action.active,backgroundColor:o.palette.background.paper,transform:"translateX(-50%)",zIndex:"var(--layout-nav-zIndex)",left:t?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)",border:`1px solid ${o.palette.divider}`,transition:o.transitions.create(["left"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),"&:hover":{color:o.palette.text.primary,backgroundColor:o.palette.background.neutral}}));var K=({isNavMini:o,...t})=>jsx(A,{size:"small",isNavMini:o,...t,children:jsx(J,{sx:{width:16,height:16,...o&&{transform:"scaleX(-1)"}},children:jsx("path",{fill:"currentColor",d:"M13.83 19a1 1 0 0 1-.78-.37l-4.83-6a1 1 0 0 1 0-1.27l5-6a1 1 0 0 1 1.54 1.28L10.29 12l4.32 5.36a1 1 0 0 1-.78 1.64"})})}),P=K;styled(I)({padding:"12px 16px 24px",svg:{width:125}});styled(I)({padding:"12px 24px 24px",alignItems:"center",justifyContent:"center",svg:{width:32,height:32}});var _=styled(z,{shouldForwardProp:o=>o!=="isNavMini"&&o!=="layoutQuery"})(({theme:o,isNavMini:t,layoutQuery:r})=>({top:0,left:0,height:"100%",display:"none",position:"fixed",flexDirection:"column",backgroundColor:o.palette.background.paper,zIndex:"var(--layout-nav-zIndex)",width:t?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)",borderRight:`1px solid ${o.palette.divider}`,transition:o.transitions.create(["width"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),[o.breakpoints.up(r)]:{display:"flex"}}));var Z=({slots:o,isNavMini:t,layoutQuery:r,onToggleNav:e,children:i})=>{let a$1=useTheme(),n=jsxs(Fragment,{children:[o?.topArea,jsx(a,{fillContent:!0,sx:{p:2},children:i}),o?.bottomArea]}),m=jsxs(Fragment,{children:[o?.topArea,jsx(a,{fillContent:!0,sx:{p:2},children:i}),o?.bottomArea]});return jsxs(_,{isNavMini:t,layoutQuery:r,children:[jsx(P,{isNavMini:t,onClick:e,sx:{display:"none",[a$1.breakpoints.up(r)]:{display:"inline-flex"}}}),t?m:n]})},N=Z;var oo=({sx:o,cssVars:t,children:r,footerSection:e,headerSection:i,sidebarSection:a})=>jsxs(Fragment,{children:[jsx(j,{styles:{body:{"--layout-nav-zIndex":1101,"--layout-nav-mobile-width":"320px","--layout-header-blur":"8px","--layout-header-zIndex":1100,"--layout-header-mobile-height":"64px","--layout-header-desktop-height":"72px",...t}}}),jsx(z,{id:"root__layout",sx:o,children:a?jsxs(Fragment,{children:[a,jsxs(z,{display:"flex",flex:"1 1 auto",flexDirection:"column",className:s.hasSidebar,children:[i,r,e]})]}):jsxs(Fragment,{children:[i,r,e]})})]}),T=oo;var ro=({children:o,footerContent:t,headerProps:r,sidebarContent:e,sidebarProps:i,isNavMini:a,onToggleNavMini:n,mainProps:m})=>{let l=useTheme(),p="lg";return jsx(T,{headerSection:jsx(w,{layoutQuery:p,slotProps:{toolbar:{sx:{['& [data-area="right"]']:{gap:{xs:0,sm:.75}}}},container:{maxWidth:!1,sx:{px:{[p]:5}}}},slots:r?.slots}),sidebarSection:jsx(N,{isNavMini:a,layoutQuery:p,onToggleNav:n,slots:i?.slots,children:e}),footerSection:t,cssVars:{"--layout-transition-easing":"linear","--layout-transition-duration":"120ms","--layout-nav-mini-width":"88px","--layout-nav-vertical-width":"300px","--layout-nav-horizontal-height":"64px","--layout-dashboard-content-pt":l.spacing(1),"--layout-dashboard-content-pb":l.spacing(8),"--layout-dashboard-content-px":l.spacing(5)},sx:{[`& .${s.hasSidebar}`]:{[l.breakpoints.up(p)]:{transition:l.transitions.create(["padding-left"],{easing:"var(--layout-transition-easing)",duration:"var(--layout-transition-duration)"}),pl:a?"var(--layout-nav-mini-width)":"var(--layout-nav-vertical-width)"}}},children:jsx(b,{isNavHorizontal:!1,...m,children:o})})},jo=ro;
14
14
 
15
- export { oo as default };
15
+ export { jo as default };
16
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/layouts/Admin/index.tsx","../../../src/layouts/Admin/Wrapper/Main.tsx","../../../src/layouts/Admin/classes.ts","../../../src/layouts/Admin/Header/HeaderSection.tsx","../../../src/layouts/Admin/Header/styles.ts","../../../src/layouts/Admin/Header/index.tsx","../../../src/layouts/Admin/Sidebar/index.tsx","../../../src/layouts/Admin/NavToggleButton/index.tsx","../../../src/layouts/Admin/NavToggleButton/styles.ts","../../../src/layouts/Admin/Sidebar/styles.ts","../../../src/layouts/Admin/Wrapper/index.tsx"],"names":["useTheme","Stack","jsx","Main","children","isNavHorizontal","sx","other","Main_default","layoutClasses","Box","Container","Toolbar","MuiAppBar","styled","StyledDivider","theme","AppBar","jsxs","HeaderSection","slots","slotProps","layoutQuery","toolbarStyles","HeaderSection_default","Fragment","Header","Header_default","SvgIcon","IconButton","Button","prop","isNavMini","NavToggleButton","NavToggleButton_default","LogoFull","LogoMini","Sidebar","onToggleNav","renderNavVertical","Scrollbar_default","renderNavMini","Sidebar_default","GlobalStyles","Wrapper","cssVars","footerSection","headerSection","sidebarSection","Wrapper_default","Admin","footerContent","headerProps","sidebarContent","sidebarProps","onToggleNavMini","mainProps","Admin_default"],"mappings":"4CAEA,OAAS,YAAAA,OAAgB,uBCFzB,OAAOC,MAAW,sBAMd,cAAAC,MAAA,oBAFJ,IAAMC,EAAO,CAAC,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,GAAAC,EAAI,GAAGC,CAAM,IAEpDL,EAACD,EAAA,CACC,UAAU,OACV,KAAK,WACL,QAAQ,WACR,GAAI,CACF,GAAII,GAAmB,CACrB,gCAAiC,MACnC,EACA,GAAGC,CACL,EACC,GAAGC,EAEH,SAAAH,EACH,EAIGI,EAAQL,ECvBR,IAAMM,EAAgB,CAC3B,KAAM,eACN,KAAM,eACN,OAAQ,iBACR,QAAS,wBACT,WAAY,sBACd,ECNA,OAAOC,MAAS,oBAChB,OAAOC,MAAe,0BACtB,OAAS,YAAAX,MAAgB,uBACzB,OAAOY,MAAa,wBCHpB,OAAOC,MAAe,uBACtB,OAAS,UAAAC,MAAc,uBAEhB,IAAMC,EAAgBD,EAAO,MAAM,EAAE,CAAC,CAAE,MAAAE,CAAM,KAAO,CAC1D,MAAO,EACP,OAAQ,GACR,WAAY,EACZ,QAAS,OACT,SAAU,WACV,WAAY,SACZ,cAAe,SACf,WAAYA,EAAM,QAAQ,GAAG,EAC7B,YAAaA,EAAM,QAAQ,GAAG,EAC9B,gBAAiB,eAEjB,sBAAuB,CACrB,IAAK,GACL,MAAO,EACP,OAAQ,EACR,QAAS,KACT,WAAY,EACZ,aAAc,MACd,SAAU,WACV,gBAAiB,cACnB,EACA,WAAY,CAAE,OAAQ,GAAI,IAAK,MAAO,CACxC,EAAE,EAEWC,EAASH,EAAOD,CAAS,EAAE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A,YAAAC,EACA,eAAAC,EACA,aAAAC,EACA,UAAAtB,EACA,gBAAAuB,EACA,UAAAC,CACF,IAAqC,CACnC,IAAMxC,EAAQhB,GAAS,EAEjBsB,EAA0B,KAEhC,OACEpB,EAAC+C,EAAA,CACC,cACE/C,EAACyB,EAAA,CACC,YAAaL,EACb,UAAW,CACT,QAAS,CACP,GAAI,CACF,CAAC,uBAAuB,EAAG,CACzB,IAAK,CAAE,GAAI,EAAG,GAAI,GAAK,CACzB,CACF,CACF,EACA,UAAW,CACT,SAAU,GACV,GAAI,CACF,GAAI,CAAE,CAACA,CAAW,EAAG,CAAE,CACzB,CACF,CACF,EACA,MAAO8B,GAAa,MACtB,EAEF,eACElD,EAACwC,EAAA,CACC,UAAWV,EACX,YAAaV,EACb,YAAaiC,EACb,MAAOD,GAAc,MAEpB,SAAAD,EACH,EAEF,cAAeF,EACf,QAAS,CACP,6BAA8B,SAC9B,+BAAgC,QAChC,0BAA2B,OAC3B,8BAA+B,QAC/B,iCAAkC,OAClC,gCAAiCnC,EAAM,QAAQ,CAAC,EAChD,gCAAiCA,EAAM,QAAQ,CAAC,EAChD,gCAAiCA,EAAM,QAAQ,CAAC,CAClD,EACA,GAAI,CACF,CAAC,MAAMP,EAAc,YAAY,EAAG,CAClC,CAACO,EAAM,YAAY,GAAGM,CAAW,CAAC,EAAG,CACnC,WAAYN,EAAM,YAAY,OAAO,CAAC,cAAc,EAAG,CACrD,OAAQ,kCACR,SAAU,mCACZ,CAAC,EACD,GAAIgB,EACA,+BACA,kCACN,CACF,CACF,EAEA,SAAA9B,EAACM,EAAA,CAAK,gBAAiB,GAAQ,GAAGgD,EAC/B,SAAApD,EACH,EACF,CAEJ,EAEOqD,GAAQP","sourcesContent":["import { PropsWithChildren } from 'react';\nimport type { Breakpoint } from '@mui/material/styles';\nimport { useTheme } from '@mui/material/styles';\n\nimport Main from './Wrapper/Main';\nimport { layoutClasses } from './classes';\nimport Header from './Header';\nimport { AdminProps } from './props';\nimport Sidebar from './Sidebar';\nimport Wrapper from './Wrapper';\n\nconst Admin = ({\n children,\n footerContent,\n headerProps,\n sidebarContent,\n sidebarProps,\n isNavMini,\n onToggleNavMini,\n mainProps,\n}: PropsWithChildren<AdminProps>) => {\n const theme = useTheme();\n\n const layoutQuery: Breakpoint = 'lg';\n\n return (\n <Wrapper\n headerSection={\n <Header\n layoutQuery={layoutQuery}\n slotProps={{\n toolbar: {\n sx: {\n ['& [data-area=\"right\"]']: {\n gap: { xs: 0, sm: 0.75 },\n },\n },\n },\n container: {\n maxWidth: false,\n sx: {\n px: { [layoutQuery]: 5 },\n },\n },\n }}\n slots={headerProps?.slots}\n />\n }\n sidebarSection={\n <Sidebar\n isNavMini={isNavMini}\n layoutQuery={layoutQuery}\n onToggleNav={onToggleNavMini}\n slots={sidebarProps?.slots}\n >\n {sidebarContent}\n </Sidebar>\n }\n footerSection={footerContent}\n cssVars={{\n '--layout-transition-easing': 'linear',\n '--layout-transition-duration': '120ms',\n '--layout-nav-mini-width': '88px',\n '--layout-nav-vertical-width': '300px',\n '--layout-nav-horizontal-height': '64px',\n '--layout-dashboard-content-pt': theme.spacing(1),\n '--layout-dashboard-content-pb': theme.spacing(8),\n '--layout-dashboard-content-px': theme.spacing(5),\n }}\n sx={{\n [`& .${layoutClasses.hasSidebar}`]: {\n [theme.breakpoints.up(layoutQuery)]: {\n transition: theme.transitions.create(['padding-left'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n pl: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n },\n },\n }}\n >\n <Main isNavHorizontal={false} {...mainProps}>\n {children}\n </Main>\n </Wrapper>\n );\n};\n\nexport default Admin;\n","import Stack from '@mui/material/Stack';\n\nimport { MainProps } from './props';\n\nconst Main = ({ children, isNavHorizontal, sx, ...other }: MainProps) => {\n return (\n <Stack\n component=\"main\"\n flex=\"1 1 auto\"\n bgcolor=\"grey.100\"\n sx={{\n ...(isNavHorizontal && {\n '--layout-dashboard-content-pt': '40px',\n }),\n ...sx,\n }}\n {...other}\n >\n {children}\n </Stack>\n );\n};\n\nexport default Main;\n","export const layoutClasses = {\n root: 'layout__root',\n main: 'layout__main',\n header: 'layout__header',\n content: 'layout__main__content',\n hasSidebar: 'layout__has__sidebar',\n};\n","import Box from '@mui/material/Box';\nimport Container from '@mui/material/Container';\nimport { useTheme } from '@mui/material/styles';\nimport Toolbar from '@mui/material/Toolbar';\n\nimport { HeaderSectionProps } from './props';\nimport { AppBar } from './styles';\n\nconst HeaderSection = ({\n sx,\n slots,\n slotProps,\n layoutQuery = 'md',\n ...other\n}: HeaderSectionProps) => {\n const theme = useTheme();\n\n const toolbarStyles = {\n default: {\n minHeight: 'auto',\n height: 'var(--layout-header-mobile-height)',\n backgroundColor: theme.palette.background.paper,\n transition: theme.transitions.create(['height', 'background-color'], {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.shorter,\n }),\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto',\n },\n [theme.breakpoints.up(layoutQuery)]: {\n height: 'var(--layout-header-desktop-height)',\n },\n },\n };\n\n return (\n <AppBar position=\"sticky\" sx={sx} {...other}>\n {slots?.topArea}\n\n <Toolbar\n disableGutters\n {...slotProps?.toolbar}\n sx={{\n ...toolbarStyles.default,\n ...slotProps?.toolbar?.sx,\n maxHeight: 64,\n }}\n >\n <Container\n {...slotProps?.container}\n sx={{\n height: 1,\n display: 'flex',\n alignItems: 'center',\n ...slotProps?.container?.sx,\n }}\n >\n {slots?.leftArea}\n\n <Box\n sx={{ display: 'flex', flex: '1 1 auto', justifyContent: 'center' }}\n >\n {slots?.centerArea}\n </Box>\n\n {slots?.rightArea}\n </Container>\n </Toolbar>\n\n {slots?.bottomArea}\n </AppBar>\n );\n};\n\nexport default HeaderSection;\n","import MuiAppBar from '@mui/material/AppBar';\nimport { styled } from '@mui/material/styles';\n\nexport const StyledDivider = styled('span')(({ theme }) => ({\n width: 1,\n height: 10,\n flexShrink: 0,\n display: 'none',\n position: 'relative',\n alignItems: 'center',\n flexDirection: 'column',\n marginLeft: theme.spacing(2.5),\n marginRight: theme.spacing(2.5),\n backgroundColor: 'currentColor',\n\n '&::before, &::after': {\n top: -5,\n width: 3,\n height: 3,\n content: '\"\"',\n flexShrink: 0,\n borderRadius: '50%',\n position: 'absolute',\n backgroundColor: 'currentColor',\n },\n '&::after': { bottom: -5, top: 'auto' },\n}));\n\nexport const AppBar = styled(MuiAppBar)(({ theme }) => ({\n zIndex: 'var(--layout-header-zIndex)',\n backgroundColor: theme.palette.background.paper,\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%',\n height: '1px',\n backgroundColor: theme.palette.divider,\n zIndex: 1,\n },\n}));\n","import HeaderSection from './HeaderSection';\nimport { HeaderProps } from './props';\nimport { StyledDivider } from './styles';\n\nconst Header = ({\n sx,\n slots,\n slotProps,\n layoutQuery,\n ...other\n}: HeaderProps) => {\n return (\n <HeaderSection\n sx={sx}\n layoutQuery={layoutQuery}\n slots={{\n ...slots,\n leftAreaStart: slots?.leftAreaStart,\n leftArea: (\n <>\n {slots?.leftAreaStart}\n\n <StyledDivider data-slot=\"divider\" />\n\n {slots?.leftAreaEnd}\n </>\n ),\n rightArea: (\n <>\n {slots?.rightAreaStart}\n\n {slots?.rightAreaEnd}\n </>\n ),\n centerArea: slots?.centerArea,\n }}\n slotProps={slotProps}\n {...other}\n />\n );\n};\n\nexport default Header;\n","import { PropsWithChildren } from 'react';\nimport { useTheme } from '@mui/material/styles';\n\nimport Scrollbar from 'components/Scrollbar';\n\nimport NavToggleButton from '../NavToggleButton';\n\nimport { SidebarProps } from './props';\nimport { Container } from './styles';\n\nconst Sidebar = ({\n slots,\n isNavMini,\n layoutQuery,\n onToggleNav,\n children,\n}: PropsWithChildren<SidebarProps>) => {\n const theme = useTheme();\n\n const renderNavVertical = (\n <>\n {slots?.topArea}\n\n <Scrollbar fillContent sx={{ p: 2 }}>\n {children}\n </Scrollbar>\n\n {slots?.bottomArea}\n </>\n );\n\n const renderNavMini = (\n <>\n {slots?.topArea}\n\n <Scrollbar fillContent sx={{ p: 2 }}>\n {children}\n </Scrollbar>\n\n {slots?.bottomArea}\n </>\n );\n\n return (\n <Container isNavMini={isNavMini} layoutQuery={layoutQuery}>\n <NavToggleButton\n isNavMini={isNavMini}\n onClick={onToggleNav}\n sx={{\n display: 'none',\n [theme.breakpoints.up(layoutQuery)]: {\n display: 'inline-flex',\n },\n }}\n />\n {isNavMini ? renderNavMini : renderNavVertical}\n </Container>\n );\n};\n\nexport default Sidebar;\n","import SvgIcon from '@mui/material/SvgIcon';\n\nimport { NavToggleButtonProps } from './props';\nimport { Button } from './styles';\n\nconst NavToggleButton = ({ isNavMini, ...other }: NavToggleButtonProps) => {\n return (\n <Button size=\"small\" isNavMini={isNavMini} {...other}>\n <SvgIcon\n sx={{\n width: 16,\n height: 16,\n ...(isNavMini && {\n transform: 'scaleX(-1)',\n }),\n }}\n >\n <path\n fill=\"currentColor\"\n d=\"M13.83 19a1 1 0 0 1-.78-.37l-4.83-6a1 1 0 0 1 0-1.27l5-6a1 1 0 0 1 1.54 1.28L10.29 12l4.32 5.36a1 1 0 0 1-.78 1.64\"\n />\n </SvgIcon>\n </Button>\n );\n};\n\nexport default NavToggleButton;\n","import IconButton from '@mui/material/IconButton';\nimport { styled } from '@mui/material/styles';\n\nexport const Button = styled(IconButton, {\n shouldForwardProp: prop => prop !== 'isNavMini',\n})<{ isNavMini: boolean }>(({ theme, isNavMini }) => ({\n padding: 8,\n top: 15,\n position: 'fixed',\n color: theme.palette.action.active,\n backgroundColor: theme.palette.background.paper,\n transform: 'translateX(-50%)',\n zIndex: 'var(--layout-nav-zIndex)',\n left: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n border: `1px solid ${theme.palette.divider}`,\n transition: theme.transitions.create(['left'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n\n '&:hover': {\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.background.neutral,\n },\n}));\n","import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport { Breakpoint, styled } from '@mui/material/styles';\n\nexport const LogoFull = styled(Stack)({\n padding: '12px 16px 24px',\n\n svg: {\n width: 125,\n },\n});\n\nexport const LogoMini = styled(Stack)({\n padding: '12px 24px 24px',\n alignItems: 'center',\n justifyContent: 'center',\n\n svg: {\n width: 32,\n height: 32,\n },\n});\n\nexport const Container = styled(Box, {\n shouldForwardProp: prop => prop !== 'isNavMini' && prop !== 'layoutQuery',\n})<{\n isNavMini: boolean;\n layoutQuery: Breakpoint;\n}>(({ theme, isNavMini, layoutQuery }) => ({\n top: 0,\n left: 0,\n height: '100%',\n display: 'none',\n position: 'fixed',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n zIndex: 'var(--layout-nav-zIndex)',\n width: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n borderRight: `1px solid ${theme.palette.divider}`,\n\n transition: theme.transitions.create(['width'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n\n [theme.breakpoints.up(layoutQuery)]: {\n display: 'flex',\n },\n}));\n","import Box from '@mui/material/Box';\nimport GlobalStyles from '@mui/material/GlobalStyles';\n\nimport { layoutClasses } from '../classes';\n\nimport { LayoutSectionProps } from './props';\n\nconst Wrapper = ({\n sx,\n cssVars,\n children,\n footerSection,\n headerSection,\n sidebarSection,\n}: LayoutSectionProps) => {\n return (\n <>\n <GlobalStyles\n styles={{\n body: {\n '--layout-nav-zIndex': 1101,\n '--layout-nav-mobile-width': '320px',\n '--layout-header-blur': '8px',\n '--layout-header-zIndex': 1100,\n '--layout-header-mobile-height': '64px',\n '--layout-header-desktop-height': '72px',\n ...cssVars,\n },\n }}\n />\n\n <Box id=\"root__layout\" sx={sx}>\n {sidebarSection ? (\n <>\n {sidebarSection}\n <Box\n display=\"flex\"\n flex=\"1 1 auto\"\n flexDirection=\"column\"\n className={layoutClasses.hasSidebar}\n >\n {headerSection}\n {children}\n {footerSection}\n </Box>\n </>\n ) : (\n <>\n {headerSection}\n {children}\n {footerSection}\n </>\n )}\n </Box>\n </>\n );\n};\n\nexport default Wrapper;\n"]}
1
+ {"version":3,"sources":["../../../src/layouts/Admin/index.tsx","../../../src/layouts/Admin/Wrapper/Main.tsx","../../../src/layouts/Admin/classes.ts","../../../src/layouts/Admin/Header/HeaderSection.tsx","../../../src/layouts/Admin/Header/styles.ts","../../../src/layouts/Admin/Header/index.tsx","../../../src/layouts/Admin/Sidebar/index.tsx","../../../src/layouts/Admin/NavToggleButton/index.tsx","../../../src/layouts/Admin/NavToggleButton/styles.ts","../../../src/layouts/Admin/Sidebar/styles.ts","../../../src/layouts/Admin/Wrapper/index.tsx"],"names":["useTheme","Stack","jsx","Main","children","isNavHorizontal","sx","other","Main_default","layoutClasses","Box","Container","Toolbar","MuiAppBar","styled","StyledDivider","theme","AppBar","jsxs","HeaderSection","slots","slotProps","layoutQuery","toolbarStyles","HeaderSection_default","Header","Header_default","SvgIcon","IconButton","Button","prop","isNavMini","NavToggleButton","NavToggleButton_default","LogoFull","LogoMini","Fragment","Sidebar","onToggleNav","renderNavVertical","Scrollbar_default","renderNavMini","Sidebar_default","GlobalStyles","Wrapper","cssVars","footerSection","headerSection","sidebarSection","Wrapper_default","Admin","footerContent","headerProps","sidebarContent","sidebarProps","onToggleNavMini","mainProps","Admin_default"],"mappings":"4CAEA,OAAS,YAAAA,OAAgB,uBCFzB,OAAOC,MAAW,sBAMd,cAAAC,MAAA,oBAFJ,IAAMC,EAAO,CAAC,CAAE,SAAAC,EAAU,gBAAAC,EAAiB,GAAAC,EAAI,GAAGC,CAAM,IAEpDL,EAACD,EAAA,CACC,UAAU,OACV,KAAK,WACL,QAAQ,WACR,GAAI,CACF,GAAII,GAAmB,CACrB,gCAAiC,MACnC,EACA,GAAG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AAM,QAAQ,CAAC,CAClD,EACA,GAAI,CACF,CAAC,MAAMP,EAAc,YAAY,EAAG,CAClC,CAACO,EAAM,YAAY,GAAGM,CAAW,CAAC,EAAG,CACnC,WAAYN,EAAM,YAAY,OAAO,CAAC,cAAc,EAAG,CACrD,OAAQ,kCACR,SAAU,mCACZ,CAAC,EACD,GAAIe,EACA,+BACA,kCACN,CACF,CACF,EAEA,SAAA7B,EAACM,EAAA,CAAK,gBAAiB,GAAQ,GAAGgD,EAC/B,SAAApD,EACH,EACF,CAEJ,EAEOqD,GAAQP","sourcesContent":["import { PropsWithChildren } from 'react';\nimport type { Breakpoint } from '@mui/material/styles';\nimport { useTheme } from '@mui/material/styles';\n\nimport Main from './Wrapper/Main';\nimport { layoutClasses } from './classes';\nimport Header from './Header';\nimport { AdminProps } from './props';\nimport Sidebar from './Sidebar';\nimport Wrapper from './Wrapper';\n\nconst Admin = ({\n children,\n footerContent,\n headerProps,\n sidebarContent,\n sidebarProps,\n isNavMini,\n onToggleNavMini,\n mainProps,\n}: PropsWithChildren<AdminProps>) => {\n const theme = useTheme();\n\n const layoutQuery: Breakpoint = 'lg';\n\n return (\n <Wrapper\n headerSection={\n <Header\n layoutQuery={layoutQuery}\n slotProps={{\n toolbar: {\n sx: {\n ['& [data-area=\"right\"]']: {\n gap: { xs: 0, sm: 0.75 },\n },\n },\n },\n container: {\n maxWidth: false,\n sx: {\n px: { [layoutQuery]: 5 },\n },\n },\n }}\n slots={headerProps?.slots}\n />\n }\n sidebarSection={\n <Sidebar\n isNavMini={isNavMini}\n layoutQuery={layoutQuery}\n onToggleNav={onToggleNavMini}\n slots={sidebarProps?.slots}\n >\n {sidebarContent}\n </Sidebar>\n }\n footerSection={footerContent}\n cssVars={{\n '--layout-transition-easing': 'linear',\n '--layout-transition-duration': '120ms',\n '--layout-nav-mini-width': '88px',\n '--layout-nav-vertical-width': '300px',\n '--layout-nav-horizontal-height': '64px',\n '--layout-dashboard-content-pt': theme.spacing(1),\n '--layout-dashboard-content-pb': theme.spacing(8),\n '--layout-dashboard-content-px': theme.spacing(5),\n }}\n sx={{\n [`& .${layoutClasses.hasSidebar}`]: {\n [theme.breakpoints.up(layoutQuery)]: {\n transition: theme.transitions.create(['padding-left'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n pl: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n },\n },\n }}\n >\n <Main isNavHorizontal={false} {...mainProps}>\n {children}\n </Main>\n </Wrapper>\n );\n};\n\nexport default Admin;\n","import Stack from '@mui/material/Stack';\n\nimport { MainProps } from './props';\n\nconst Main = ({ children, isNavHorizontal, sx, ...other }: MainProps) => {\n return (\n <Stack\n component=\"main\"\n flex=\"1 1 auto\"\n bgcolor=\"grey.100\"\n sx={{\n ...(isNavHorizontal && {\n '--layout-dashboard-content-pt': '40px',\n }),\n ...sx,\n }}\n {...other}\n >\n {children}\n </Stack>\n );\n};\n\nexport default Main;\n","export const layoutClasses = {\n root: 'layout__root',\n main: 'layout__main',\n header: 'layout__header',\n content: 'layout__main__content',\n hasSidebar: 'layout__has__sidebar',\n};\n","import Box from '@mui/material/Box';\nimport Container from '@mui/material/Container';\nimport { useTheme } from '@mui/material/styles';\nimport Toolbar from '@mui/material/Toolbar';\n\nimport { HeaderSectionProps } from './props';\nimport { AppBar } from './styles';\n\nconst HeaderSection = ({\n sx,\n slots,\n slotProps,\n layoutQuery = 'md',\n ...other\n}: HeaderSectionProps) => {\n const theme = useTheme();\n\n const toolbarStyles = {\n default: {\n minHeight: 'auto',\n height: 'var(--layout-header-mobile-height)',\n backgroundColor: theme.palette.background.paper,\n transition: theme.transitions.create(['height', 'background-color'], {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.shorter,\n }),\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto',\n },\n [theme.breakpoints.up(layoutQuery)]: {\n height: 'var(--layout-header-desktop-height)',\n },\n },\n };\n\n return (\n <AppBar position=\"sticky\" sx={sx} {...other}>\n {slots?.topArea}\n\n {(slots?.leftArea || slots?.centerArea || slots?.rightArea) && (\n <Toolbar\n disableGutters\n {...slotProps?.toolbar}\n sx={{\n ...toolbarStyles.default,\n ...slotProps?.toolbar?.sx,\n maxHeight: 64,\n }}\n >\n <Container\n {...slotProps?.container}\n sx={{\n height: 1,\n display: 'flex',\n alignItems: 'center',\n ...slotProps?.container?.sx,\n }}\n >\n {slots?.leftArea}\n\n <Box\n sx={{\n display: 'flex',\n flex: '1 1 auto',\n justifyContent: 'center',\n }}\n >\n {slots?.centerArea}\n </Box>\n\n {slots?.rightArea}\n </Container>\n </Toolbar>\n )}\n\n {slots?.bottomArea}\n </AppBar>\n );\n};\n\nexport default HeaderSection;\n","import MuiAppBar from '@mui/material/AppBar';\nimport { styled } from '@mui/material/styles';\n\nexport const StyledDivider = styled('span')(({ theme }) => ({\n width: 1,\n height: 10,\n flexShrink: 0,\n display: 'none',\n position: 'relative',\n alignItems: 'center',\n flexDirection: 'column',\n marginLeft: theme.spacing(2.5),\n marginRight: theme.spacing(2.5),\n backgroundColor: 'currentColor',\n\n '&::before, &::after': {\n top: -5,\n width: 3,\n height: 3,\n content: '\"\"',\n flexShrink: 0,\n borderRadius: '50%',\n position: 'absolute',\n backgroundColor: 'currentColor',\n },\n '&::after': { bottom: -5, top: 'auto' },\n}));\n\nexport const AppBar = styled(MuiAppBar)(({ theme }) => ({\n zIndex: 'var(--layout-header-zIndex)',\n backgroundColor: theme.palette.background.paper,\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%',\n height: '1px',\n backgroundColor: theme.palette.divider,\n zIndex: 1,\n },\n}));\n","import HeaderSection from './HeaderSection';\nimport { HeaderProps } from './props';\n\nconst Header = ({\n sx,\n slots,\n slotProps,\n layoutQuery,\n ...other\n}: HeaderProps) => {\n return (\n <HeaderSection\n sx={sx}\n layoutQuery={layoutQuery}\n slots={{\n ...slots,\n }}\n slotProps={slotProps}\n {...other}\n />\n );\n};\n\nexport default Header;\n","import { PropsWithChildren } from 'react';\nimport { useTheme } from '@mui/material/styles';\n\nimport Scrollbar from 'components/Scrollbar';\n\nimport NavToggleButton from '../NavToggleButton';\n\nimport { SidebarProps } from './props';\nimport { Container } from './styles';\n\nconst Sidebar = ({\n slots,\n isNavMini,\n layoutQuery,\n onToggleNav,\n children,\n}: PropsWithChildren<SidebarProps>) => {\n const theme = useTheme();\n\n const renderNavVertical = (\n <>\n {slots?.topArea}\n\n <Scrollbar fillContent sx={{ p: 2 }}>\n {children}\n </Scrollbar>\n\n {slots?.bottomArea}\n </>\n );\n\n const renderNavMini = (\n <>\n {slots?.topArea}\n\n <Scrollbar fillContent sx={{ p: 2 }}>\n {children}\n </Scrollbar>\n\n {slots?.bottomArea}\n </>\n );\n\n return (\n <Container isNavMini={isNavMini} layoutQuery={layoutQuery}>\n <NavToggleButton\n isNavMini={isNavMini}\n onClick={onToggleNav}\n sx={{\n display: 'none',\n [theme.breakpoints.up(layoutQuery)]: {\n display: 'inline-flex',\n },\n }}\n />\n {isNavMini ? renderNavMini : renderNavVertical}\n </Container>\n );\n};\n\nexport default Sidebar;\n","import SvgIcon from '@mui/material/SvgIcon';\n\nimport { NavToggleButtonProps } from './props';\nimport { Button } from './styles';\n\nconst NavToggleButton = ({ isNavMini, ...other }: NavToggleButtonProps) => {\n return (\n <Button size=\"small\" isNavMini={isNavMini} {...other}>\n <SvgIcon\n sx={{\n width: 16,\n height: 16,\n ...(isNavMini && {\n transform: 'scaleX(-1)',\n }),\n }}\n >\n <path\n fill=\"currentColor\"\n d=\"M13.83 19a1 1 0 0 1-.78-.37l-4.83-6a1 1 0 0 1 0-1.27l5-6a1 1 0 0 1 1.54 1.28L10.29 12l4.32 5.36a1 1 0 0 1-.78 1.64\"\n />\n </SvgIcon>\n </Button>\n );\n};\n\nexport default NavToggleButton;\n","import IconButton from '@mui/material/IconButton';\nimport { styled } from '@mui/material/styles';\n\nexport const Button = styled(IconButton, {\n shouldForwardProp: prop => prop !== 'isNavMini',\n})<{ isNavMini: boolean }>(({ theme, isNavMini }) => ({\n padding: 8,\n top: 15,\n position: 'fixed',\n color: theme.palette.action.active,\n backgroundColor: theme.palette.background.paper,\n transform: 'translateX(-50%)',\n zIndex: 'var(--layout-nav-zIndex)',\n left: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n border: `1px solid ${theme.palette.divider}`,\n transition: theme.transitions.create(['left'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n\n '&:hover': {\n color: theme.palette.text.primary,\n backgroundColor: theme.palette.background.neutral,\n },\n}));\n","import Box from '@mui/material/Box';\nimport Stack from '@mui/material/Stack';\nimport { Breakpoint, styled } from '@mui/material/styles';\n\nexport const LogoFull = styled(Stack)({\n padding: '12px 16px 24px',\n\n svg: {\n width: 125,\n },\n});\n\nexport const LogoMini = styled(Stack)({\n padding: '12px 24px 24px',\n alignItems: 'center',\n justifyContent: 'center',\n\n svg: {\n width: 32,\n height: 32,\n },\n});\n\nexport const Container = styled(Box, {\n shouldForwardProp: prop => prop !== 'isNavMini' && prop !== 'layoutQuery',\n})<{\n isNavMini: boolean;\n layoutQuery: Breakpoint;\n}>(({ theme, isNavMini, layoutQuery }) => ({\n top: 0,\n left: 0,\n height: '100%',\n display: 'none',\n position: 'fixed',\n flexDirection: 'column',\n backgroundColor: theme.palette.background.paper,\n zIndex: 'var(--layout-nav-zIndex)',\n width: isNavMini\n ? 'var(--layout-nav-mini-width)'\n : 'var(--layout-nav-vertical-width)',\n borderRight: `1px solid ${theme.palette.divider}`,\n\n transition: theme.transitions.create(['width'], {\n easing: 'var(--layout-transition-easing)',\n duration: 'var(--layout-transition-duration)',\n }),\n\n [theme.breakpoints.up(layoutQuery)]: {\n display: 'flex',\n },\n}));\n","import Box from '@mui/material/Box';\nimport GlobalStyles from '@mui/material/GlobalStyles';\n\nimport { layoutClasses } from '../classes';\n\nimport { LayoutSectionProps } from './props';\n\nconst Wrapper = ({\n sx,\n cssVars,\n children,\n footerSection,\n headerSection,\n sidebarSection,\n}: LayoutSectionProps) => {\n return (\n <>\n <GlobalStyles\n styles={{\n body: {\n '--layout-nav-zIndex': 1101,\n '--layout-nav-mobile-width': '320px',\n '--layout-header-blur': '8px',\n '--layout-header-zIndex': 1100,\n '--layout-header-mobile-height': '64px',\n '--layout-header-desktop-height': '72px',\n ...cssVars,\n },\n }}\n />\n\n <Box id=\"root__layout\" sx={sx}>\n {sidebarSection ? (\n <>\n {sidebarSection}\n <Box\n display=\"flex\"\n flex=\"1 1 auto\"\n flexDirection=\"column\"\n className={layoutClasses.hasSidebar}\n >\n {headerSection}\n {children}\n {footerSection}\n </Box>\n </>\n ) : (\n <>\n {headerSection}\n {children}\n {footerSection}\n </>\n )}\n </Box>\n </>\n );\n};\n\nexport default Wrapper;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.8.60",
3
+ "version": "2.8.62",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",