@zydon/common 2.7.99 → 2.8.0
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.
|
@@ -6,6 +6,7 @@ import { StackProps } from '@mui/material/Stack';
|
|
|
6
6
|
|
|
7
7
|
interface DrawerProps extends DrawerProps$1 {
|
|
8
8
|
headerTitle: ReactNode;
|
|
9
|
+
headerProps?: StackProps;
|
|
9
10
|
onClose?: VoidFunction;
|
|
10
11
|
contentProps?: StackProps;
|
|
11
12
|
maxWidth?: number;
|
|
@@ -13,6 +14,6 @@ interface DrawerProps extends DrawerProps$1 {
|
|
|
13
14
|
actionsProps?: DialogActionsProps;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
declare const Drawer: ({ headerTitle, onClose, children, contentProps, maxWidth, actions, actionsProps, id, ...other }: DrawerProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare const Drawer: ({ headerTitle, headerProps, onClose, children, contentProps, maxWidth, actions, actionsProps, id, ...other }: DrawerProps) => react_jsx_runtime.JSX.Element;
|
|
17
18
|
|
|
18
19
|
export { Drawer as default };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a } from '../../chunk-QVOKZISA.js';
|
|
2
2
|
import '../../chunk-S7KQI2WJ.js';
|
|
3
3
|
import { a as a$1 } from '../../chunk-F65ZXAGV.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import b from '@mui/material/Drawer';
|
|
5
|
+
import T from '@mui/material/IconButton';
|
|
6
|
+
import c from '@mui/material/Stack';
|
|
7
|
+
import D from '@mui/material/DialogActions';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var l=styled(c)(({theme:o})=>({alignItems:"center",borderBottom:`1px solid ${o.palette.grey[300]}`,padding:"22px 20px",gap:16})),m=styled(c)(({theme:o})=>({flexDirection:"row",alignItems:"center",gap:8,flex:1,fontSize:o.typography.subtitle1.fontSize,fontWeight:o.typography.subtitle1.fontWeight,fontFamily:o.typography.fontFamily})),d=styled(D)(({theme:o})=>({borderTop:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.background.paper}));var P=({children:o,actionsProps:t})=>jsx(d,{"data-testid":"drawer-actions",...t,children:o}),f=P;var C=({headerTitle:o,headerProps:t,onClose:e,children:A,contentProps:w,maxWidth:h=684,actions:p,actionsProps:x,id:a$2,...u})=>{let y=a$2||"actions";return jsxs(b,{anchor:"right",id:a$2,PaperProps:{sx:{width:1,maxWidth:h}},onClose:e,...u,children:[jsxs(l,{direction:"row",...t,children:[jsx(T,{size:"small",onClick:e,children:jsx(a,{icon:"CLOSE_MARK_BUTTON",width:18})}),jsx(m,{children:o})]}),jsx(a$1,{children:jsx(c,{p:3,...w,children:A})}),p&&jsx(f,{actionsProps:{...x,id:y},children:p})]})},K=C;
|
|
12
12
|
|
|
13
|
-
export {
|
|
13
|
+
export { K as default };
|
|
14
14
|
//# sourceMappingURL=out.js.map
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Drawer/index.tsx","../../../src/components/Drawer/styles.ts","../../../src/components/Drawer/Actions.tsx"],"names":["MuiDrawer","IconButton","Stack","DialogActions","styled","Header","theme","HeaderTitle","Actions","jsx","children","actionsProps","Actions_default","jsxs","Drawer","headerTitle","onClose","contentProps","maxWidth","actions","id","other","DRAWER_ACTIONS","Icon_default","Scrollbar_default","Drawer_default"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Drawer/index.tsx","../../../src/components/Drawer/styles.ts","../../../src/components/Drawer/Actions.tsx"],"names":["MuiDrawer","IconButton","Stack","DialogActions","styled","Header","theme","HeaderTitle","Actions","jsx","children","actionsProps","Actions_default","jsxs","Drawer","headerTitle","headerProps","onClose","contentProps","maxWidth","actions","id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EAEJ,UAAAT,EAACR,EAAA,CAAO,UAAU,MAAO,GAAGW,EAC1B,UAAAP,EAACR,EAAA,CAAW,KAAK,QAAQ,QAASgB,EAChC,SAAAR,EAACe,EAAA,CAAK,KAAK,oBAAoB,MAAO,GAAI,EAC5C,EAEAf,EAACF,EAAA,CAAa,SAAAQ,EAAY,GAC5B,EACAN,EAACgB,EAAA,CACC,SAAAhB,EAACP,EAAA,CAAM,EAAG,EAAI,GAAGgB,EACd,SAAAR,EACH,EACF,EAECU,GACCX,EAACG,EAAA,CAAQ,aAAc,CAAE,GAAGD,EAAc,GAAIY,CAAe,EAC1D,SAAAH,EACH,GAEJ,CAEJ,EAEOM,EAAQZ","sourcesContent":["import MuiDrawer from '@mui/material/Drawer';\nimport IconButton from '@mui/material/IconButton';\nimport Stack from '@mui/material/Stack';\n\nimport Icon from '../Icon';\nimport Scrollbar from '../Scrollbar';\n\nimport Actions from './Actions';\nimport { DrawerProps } from './props';\nimport { Header, HeaderTitle } from './styles';\n\nconst Drawer = ({\n headerTitle,\n headerProps,\n onClose,\n children,\n contentProps,\n maxWidth = 684,\n actions,\n actionsProps,\n id,\n ...other\n}: DrawerProps) => {\n const DRAWER_ACTIONS = id || '' + 'actions';\n return (\n <MuiDrawer\n anchor=\"right\"\n id={id}\n PaperProps={{\n sx: { width: 1, maxWidth: maxWidth },\n }}\n onClose={onClose}\n {...other}\n >\n <Header direction=\"row\" {...headerProps}>\n <IconButton size=\"small\" onClick={onClose}>\n <Icon icon=\"CLOSE_MARK_BUTTON\" width={18} />\n </IconButton>\n\n <HeaderTitle>{headerTitle}</HeaderTitle>\n </Header>\n <Scrollbar>\n <Stack p={3} {...contentProps}>\n {children}\n </Stack>\n </Scrollbar>\n\n {actions && (\n <Actions actionsProps={{ ...actionsProps, id: DRAWER_ACTIONS }}>\n {actions}\n </Actions>\n )}\n </MuiDrawer>\n );\n};\n\nexport default Drawer;\n","import DialogActions from '@mui/material/DialogActions';\nimport Stack from '@mui/material/Stack';\nimport { styled } from '@mui/material/styles';\n\nexport const Header = styled(Stack)(({ theme }) => ({\n alignItems: 'center',\n borderBottom: `1px solid ${theme.palette.grey[300]}`,\n padding: '22px 20px',\n gap: 16,\n}));\n\nexport const HeaderTitle = styled(Stack)(({ theme }) => ({\n flexDirection: 'row',\n alignItems: 'center',\n gap: 8,\n flex: 1,\n fontSize: theme.typography.subtitle1.fontSize,\n fontWeight: theme.typography.subtitle1.fontWeight,\n fontFamily: theme.typography.fontFamily,\n}));\n\nexport const Actions = styled(DialogActions)(({ theme }) => ({\n borderTop: `1px solid ${theme.palette.divider}`,\n backgroundColor: theme.palette.background.paper,\n}));\n","import { PropsWithChildren } from 'react';\n\nimport { DrawerActionsProps } from './props';\nimport { Actions as ActionsElem } from './styles';\n\nconst Actions = ({\n children,\n actionsProps,\n}: PropsWithChildren<DrawerActionsProps>) => {\n return (\n <ActionsElem data-testid=\"drawer-actions\" {...actionsProps}>\n {children}\n </ActionsElem>\n );\n};\n\nexport default Actions;\n"]}
|