@xyo-network/react-drawer 2.81.10 → 2.83.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.d.ts +12 -2
- package/dist/browser/index.mjs +82 -0
- package/dist/browser/index.mjs.map +1 -0
- package/package.json +11 -27
- package/src/components/Drawer.stories.tsx +2 -2
- package/src/components/Drawer.tsx +20 -16
- package/src/components/index.ts +1 -1
- package/src/index.ts +1 -1
- package/xy.config.ts +12 -0
- package/dist/browser/components/Drawer.d.cts +0 -10
- package/dist/browser/components/Drawer.d.cts.map +0 -1
- package/dist/browser/components/Drawer.d.mts +0 -10
- package/dist/browser/components/Drawer.d.mts.map +0 -1
- package/dist/browser/components/Drawer.d.ts +0 -10
- package/dist/browser/components/Drawer.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -2
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -2
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -2
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -98
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -75
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/components/Drawer.d.cts +0 -10
- package/dist/neutral/components/Drawer.d.cts.map +0 -1
- package/dist/neutral/components/Drawer.d.mts +0 -10
- package/dist/neutral/components/Drawer.d.mts.map +0 -1
- package/dist/neutral/components/Drawer.d.ts +0 -10
- package/dist/neutral/components/Drawer.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -2
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -2
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -2
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -98
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -2
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.js +0 -75
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/components/Drawer.d.cts +0 -10
- package/dist/node/components/Drawer.d.cts.map +0 -1
- package/dist/node/components/Drawer.d.mts +0 -10
- package/dist/node/components/Drawer.d.mts.map +0 -1
- package/dist/node/components/Drawer.d.ts +0 -10
- package/dist/node/components/Drawer.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -2
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -2
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -2
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -102
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.js +0 -75
- package/dist/node/index.js.map +0 -1
package/dist/browser/index.d.ts
CHANGED
@@ -1,2 +1,12 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { DrawerProps } from '@mui/material';
|
2
|
+
import React, { PropsWithChildren } from 'react';
|
3
|
+
|
4
|
+
interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
5
|
+
heightVariant?: 'full' | 'auto';
|
6
|
+
subTitle?: string;
|
7
|
+
title?: string;
|
8
|
+
widthVariant?: 'full' | 'partial';
|
9
|
+
}
|
10
|
+
declare const DrawerEx: React.FC<DrawerExProps>;
|
11
|
+
|
12
|
+
export { DrawerEx, type DrawerExProps };
|
@@ -0,0 +1,82 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
3
|
+
|
4
|
+
// src/components/Drawer.tsx
|
5
|
+
import { Drawer, Paper, styled, Typography } from "@mui/material";
|
6
|
+
import { FlexCol } from "@xylabs/react-flexbox";
|
7
|
+
import React, { useMemo } from "react";
|
8
|
+
var DrawerEx = /* @__PURE__ */ __name(({ children, heightVariant = "full", subTitle, title, onClose, widthVariant = "partial", ...props }) => {
|
9
|
+
const variantBasedProps = useMemo(() => {
|
10
|
+
return {
|
11
|
+
PaperProps: {
|
12
|
+
sx: {
|
13
|
+
alignItems: "center",
|
14
|
+
background: "transparent",
|
15
|
+
boxShadow: "none",
|
16
|
+
height: heightVariant === "full" ? "100%" : "auto",
|
17
|
+
width: widthVariant === "partial" ? "auto" : "100%"
|
18
|
+
}
|
19
|
+
},
|
20
|
+
onClick: /* @__PURE__ */ __name((event) => onClose?.(event, "backdropClick"), "onClick")
|
21
|
+
};
|
22
|
+
}, [
|
23
|
+
heightVariant,
|
24
|
+
onClose,
|
25
|
+
widthVariant
|
26
|
+
]);
|
27
|
+
return /* @__PURE__ */ React.createElement(Drawer, {
|
28
|
+
anchor: "top",
|
29
|
+
onClose,
|
30
|
+
...variantBasedProps,
|
31
|
+
...props
|
32
|
+
}, /* @__PURE__ */ React.createElement(StyledDrawerContentPaper, {
|
33
|
+
widthVariant,
|
34
|
+
elevation: 16,
|
35
|
+
onClick: /* @__PURE__ */ __name((event) => event.stopPropagation(), "onClick"),
|
36
|
+
sx: {
|
37
|
+
width: widthVariant === "full" ? "100%" : void 0
|
38
|
+
}
|
39
|
+
}, title || subTitle ? /* @__PURE__ */ React.createElement(FlexCol, {
|
40
|
+
alignItems: "start",
|
41
|
+
gap: 1
|
42
|
+
}, title ? /* @__PURE__ */ React.createElement(StyledEllipsisTypography, {
|
43
|
+
variant: "h3"
|
44
|
+
}, title) : null, subTitle ? /* @__PURE__ */ React.createElement(Typography, {
|
45
|
+
variant: "subtitle1",
|
46
|
+
textTransform: "none"
|
47
|
+
}, subTitle) : null) : null, children));
|
48
|
+
}, "DrawerEx");
|
49
|
+
var StyledEllipsisTypography = styled(Typography, {
|
50
|
+
name: "StyledEllipsisTypography"
|
51
|
+
})(() => ({
|
52
|
+
maxWidth: "100%",
|
53
|
+
overflowX: "hidden",
|
54
|
+
textOverflow: "ellipsis",
|
55
|
+
whiteSpace: "nowrap"
|
56
|
+
}));
|
57
|
+
var StyledDrawerContentPaper = styled(Paper, {
|
58
|
+
name: "StyledDrawerContentPaper",
|
59
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => ![
|
60
|
+
"widthVariant"
|
61
|
+
].includes(prop), "shouldForwardProp")
|
62
|
+
})(({ theme, widthVariant }) => ({
|
63
|
+
alignItems: "stretch",
|
64
|
+
borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
|
65
|
+
display: "flex",
|
66
|
+
flexDirection: "column",
|
67
|
+
gap: theme.spacing(2),
|
68
|
+
height: "100%",
|
69
|
+
maxWidth: "100%",
|
70
|
+
overflowX: "hidden",
|
71
|
+
padding: theme.spacing(3),
|
72
|
+
[theme.breakpoints.up("lg")]: {
|
73
|
+
width: widthVariant === "full" ? "100%" : "50%"
|
74
|
+
},
|
75
|
+
[theme.breakpoints.up("md")]: {
|
76
|
+
width: widthVariant === "full" ? "100%" : "75%"
|
77
|
+
}
|
78
|
+
}));
|
79
|
+
export {
|
80
|
+
DrawerEx
|
81
|
+
};
|
82
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../src/components/Drawer.tsx"],"sourcesContent":["import { Drawer, DrawerProps, Paper, styled, Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport React, { MouseEvent, PropsWithChildren, useMemo } from 'react'\n\nexport interface DrawerExProps extends PropsWithChildren<DrawerProps> {\n heightVariant?: 'full' | 'auto'\n subTitle?: string\n title?: string\n widthVariant?: 'full' | 'partial'\n}\n\nexport const DrawerEx: React.FC<DrawerExProps> = ({\n children,\n heightVariant = 'full',\n subTitle,\n title,\n onClose,\n widthVariant = 'partial',\n ...props\n}) => {\n const variantBasedProps = useMemo(() => {\n return {\n PaperProps: {\n sx: {\n alignItems: 'center',\n background: 'transparent',\n boxShadow: 'none',\n height: heightVariant === 'full' ? '100%' : 'auto',\n width: widthVariant === 'partial' ? 'auto' : '100%',\n },\n },\n onClick: (event: MouseEvent) => onClose?.(event, 'backdropClick'),\n }\n }, [heightVariant, onClose, widthVariant])\n\n return (\n <Drawer anchor=\"top\" onClose={onClose} {...variantBasedProps} {...props}>\n {/* Trap the event to prevent triggering the backdrop onClick */}\n <StyledDrawerContentPaper\n widthVariant={widthVariant}\n elevation={16}\n onClick={event => event.stopPropagation()}\n sx={{ width: widthVariant === 'full' ? '100%' : undefined }}\n >\n {title || subTitle\n ? (\n <FlexCol alignItems=\"start\" gap={1}>\n {title\n ? <StyledEllipsisTypography variant=\"h3\">{title}</StyledEllipsisTypography>\n : null}\n {subTitle\n ? (\n <Typography variant=\"subtitle1\" textTransform=\"none\">\n {subTitle}\n </Typography>\n )\n : null}\n </FlexCol>\n )\n : null}\n {children}\n </StyledDrawerContentPaper>\n </Drawer>\n )\n}\n\nconst StyledEllipsisTypography = styled(Typography, { name: 'StyledEllipsisTypography' })(() => ({\n maxWidth: '100%',\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}))\n\nconst StyledDrawerContentPaper = styled(Paper, {\n name: 'StyledDrawerContentPaper',\n shouldForwardProp: prop => !['widthVariant'].includes(prop as string),\n})<DrawerExProps>(({ theme, widthVariant }) => ({\n alignItems: 'stretch',\n borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n height: '100%',\n maxWidth: '100%',\n overflowX: 'hidden',\n padding: theme.spacing(3),\n [theme.breakpoints.up('lg')]: {\n width: widthVariant === 'full' ? '100%' : '50%',\n },\n [theme.breakpoints.up('md')]: {\n width: widthVariant === 'full' ? '100%' : '75%',\n },\n}))\n"],"mappings":";;;;AAAA,SAASA,QAAqBC,OAAOC,QAAQC,kBAAkB;AAC/D,SAASC,eAAe;AACxB,OAAOC,SAAwCC,eAAe;AASvD,IAAMC,WAAoC,wBAAC,EAChDC,UACAC,gBAAgB,QAChBC,UACAC,OACAC,SACAC,eAAe,WACf,GAAGC,MAAAA,MACJ;AACC,QAAMC,oBAAoBC,QAAQ,MAAA;AAChC,WAAO;MACLC,YAAY;QACVC,IAAI;UACFC,YAAY;UACZC,YAAY;UACZC,WAAW;UACXC,QAAQb,kBAAkB,SAAS,SAAS;UAC5Cc,OAAOV,iBAAiB,YAAY,SAAS;QAC/C;MACF;MACAW,SAAS,wBAACC,UAAsBb,UAAUa,OAAO,eAAA,GAAxC;IACX;EACF,GAAG;IAAChB;IAAeG;IAASC;GAAa;AAEzC,SACE,sBAAA,cAACa,QAAAA;IAAOC,QAAO;IAAMf;IAAmB,GAAGG;IAAoB,GAAGD;KAEhE,sBAAA,cAACc,0BAAAA;IACCf;IACAgB,WAAW;IACXL,SAASC,wBAAAA,UAASA,MAAMK,gBAAe,GAA9BL;IACTP,IAAI;MAAEK,OAAOV,iBAAiB,SAAS,SAASkB;IAAU;KAEzDpB,SAASD,WAEJ,sBAAA,cAACsB,SAAAA;IAAQb,YAAW;IAAQc,KAAK;KAC9BtB,QACG,sBAAA,cAACuB,0BAAAA;IAAyBC,SAAQ;KAAMxB,KAAAA,IACxC,MACHD,WAEK,sBAAA,cAAC0B,YAAAA;IAAWD,SAAQ;IAAYE,eAAc;KAC3C3B,QAAAA,IAGL,IAAA,IAGR,MACHF,QAAAA,CAAAA;AAIT,GArDiD;AAuDjD,IAAM0B,2BAA2BI,OAAOF,YAAY;EAAEG,MAAM;AAA2B,CAAA,EAAG,OAAO;EAC/FC,UAAU;EACVC,WAAW;EACXC,cAAc;EACdC,YAAY;AACd,EAAA;AAEA,IAAMf,2BAA2BU,OAAOM,OAAO;EAC7CL,MAAM;EACNM,mBAAmBC,wBAAAA,SAAQ,CAAC;IAAC;IAAgBC,SAASD,IAAAA,GAAnCA;AACrB,CAAA,EAAkB,CAAC,EAAEE,OAAOnC,aAAY,OAAQ;EAC9CM,YAAY;EACZ8B,cAAc,OAAOD,MAAME,MAAMD,YAAY,MAAMD,MAAME,MAAMD,YAAY;EAC3EE,SAAS;EACTC,eAAe;EACfnB,KAAKe,MAAMK,QAAQ,CAAA;EACnB/B,QAAQ;EACRkB,UAAU;EACVC,WAAW;EACXa,SAASN,MAAMK,QAAQ,CAAA;EACvB,CAACL,MAAMO,YAAYC,GAAG,IAAA,CAAA,GAAQ;IAC5BjC,OAAOV,iBAAiB,SAAS,SAAS;EAC5C;EACA,CAACmC,MAAMO,YAAYC,GAAG,IAAA,CAAA,GAAQ;IAC5BjC,OAAOV,iBAAiB,SAAS,SAAS;EAC5C;AACF,EAAA;","names":["Drawer","Paper","styled","Typography","FlexCol","React","useMemo","DrawerEx","children","heightVariant","subTitle","title","onClose","widthVariant","props","variantBasedProps","useMemo","PaperProps","sx","alignItems","background","boxShadow","height","width","onClick","event","Drawer","anchor","StyledDrawerContentPaper","elevation","stopPropagation","undefined","FlexCol","gap","StyledEllipsisTypography","variant","Typography","textTransform","styled","name","maxWidth","overflowX","textOverflow","whiteSpace","Paper","shouldForwardProp","prop","includes","theme","borderRadius","shape","display","flexDirection","spacing","padding","breakpoints","up"]}
|
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@xylabs/react-flexbox": "^3.4.
|
13
|
+
"@xylabs/react-flexbox": "^3.4.2"
|
14
14
|
},
|
15
15
|
"peerDependencies": {
|
16
16
|
"@mui/material": "^5",
|
@@ -19,41 +19,25 @@
|
|
19
19
|
"react-dom": "^18"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
22
|
-
"@storybook/react": "^
|
23
|
-
"@xylabs/ts-scripts-yarn3": "^
|
24
|
-
"@xylabs/tsconfig-react": "^
|
22
|
+
"@storybook/react": "^8.2.7",
|
23
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.7",
|
24
|
+
"@xylabs/tsconfig-react": "^4.0.0-rc.7",
|
25
25
|
"typescript": "^5.5.4"
|
26
26
|
},
|
27
27
|
"description": "Common React library for all XYO projects that use React",
|
28
28
|
"docs": "dist/docs.json",
|
29
29
|
"exports": {
|
30
30
|
".": {
|
31
|
-
"
|
32
|
-
"
|
33
|
-
|
34
|
-
"default": "./dist/node/index.js"
|
35
|
-
},
|
36
|
-
"require": {
|
37
|
-
"types": "./dist/node/index.d.cts",
|
38
|
-
"default": "./dist/node/index.cjs"
|
39
|
-
}
|
31
|
+
"import": {
|
32
|
+
"types": "./dist/browser/index.d.ts",
|
33
|
+
"default": "./dist/browser/index.mjs"
|
40
34
|
},
|
41
|
-
"
|
42
|
-
|
43
|
-
"types": "./dist/browser/index.d.mts",
|
44
|
-
"default": "./dist/browser/index.js"
|
45
|
-
},
|
46
|
-
"require": {
|
47
|
-
"types": "./dist/browser/index.d.cts",
|
48
|
-
"default": "./dist/browser/index.cjs"
|
49
|
-
}
|
50
|
-
},
|
51
|
-
"default": "./dist/browser/index.js"
|
35
|
+
"types": "./dist/browser/index.d.ts",
|
36
|
+
"default": "./dist/browser/index.mjs"
|
52
37
|
},
|
53
38
|
"./package.json": "./package.json"
|
54
39
|
},
|
55
|
-
"
|
56
|
-
"module": "dist/browser/index.js",
|
40
|
+
"module": "dist/browser/index.mjs",
|
57
41
|
"homepage": "https://xyo.network",
|
58
42
|
"keywords": [
|
59
43
|
"xyo",
|
@@ -75,6 +59,6 @@
|
|
75
59
|
},
|
76
60
|
"sideEffects": false,
|
77
61
|
"types": "dist/browser/index.d.ts",
|
78
|
-
"version": "2.
|
62
|
+
"version": "2.83.0",
|
79
63
|
"type": "module"
|
80
64
|
}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
2
|
+
import React from 'react'
|
2
3
|
|
3
|
-
import { DrawerEx, DrawerExProps } from './Drawer.
|
4
|
+
import { DrawerEx, DrawerExProps } from './Drawer.tsx'
|
4
5
|
|
5
|
-
// eslint-disable-next-line import/no-default-export
|
6
6
|
export default {
|
7
7
|
title: 'modules/drawer/Ex',
|
8
8
|
} as Meta
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Drawer, DrawerProps, Paper, styled, Typography } from '@mui/material'
|
2
2
|
import { FlexCol } from '@xylabs/react-flexbox'
|
3
|
-
import { MouseEvent, PropsWithChildren, useMemo } from 'react'
|
3
|
+
import React, { MouseEvent, PropsWithChildren, useMemo } from 'react'
|
4
4
|
|
5
5
|
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
6
6
|
heightVariant?: 'full' | 'auto'
|
@@ -34,26 +34,30 @@ export const DrawerEx: React.FC<DrawerExProps> = ({
|
|
34
34
|
}, [heightVariant, onClose, widthVariant])
|
35
35
|
|
36
36
|
return (
|
37
|
-
<Drawer anchor=
|
37
|
+
<Drawer anchor="top" onClose={onClose} {...variantBasedProps} {...props}>
|
38
38
|
{/* Trap the event to prevent triggering the backdrop onClick */}
|
39
39
|
<StyledDrawerContentPaper
|
40
40
|
widthVariant={widthVariant}
|
41
41
|
elevation={16}
|
42
|
-
onClick={
|
42
|
+
onClick={event => event.stopPropagation()}
|
43
43
|
sx={{ width: widthVariant === 'full' ? '100%' : undefined }}
|
44
44
|
>
|
45
|
-
{title || subTitle
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
45
|
+
{title || subTitle
|
46
|
+
? (
|
47
|
+
<FlexCol alignItems="start" gap={1}>
|
48
|
+
{title
|
49
|
+
? <StyledEllipsisTypography variant="h3">{title}</StyledEllipsisTypography>
|
50
|
+
: null}
|
51
|
+
{subTitle
|
52
|
+
? (
|
53
|
+
<Typography variant="subtitle1" textTransform="none">
|
54
|
+
{subTitle}
|
55
|
+
</Typography>
|
56
|
+
)
|
57
|
+
: null}
|
58
|
+
</FlexCol>
|
59
|
+
)
|
60
|
+
: null}
|
57
61
|
{children}
|
58
62
|
</StyledDrawerContentPaper>
|
59
63
|
</Drawer>
|
@@ -69,7 +73,7 @@ const StyledEllipsisTypography = styled(Typography, { name: 'StyledEllipsisTypog
|
|
69
73
|
|
70
74
|
const StyledDrawerContentPaper = styled(Paper, {
|
71
75
|
name: 'StyledDrawerContentPaper',
|
72
|
-
shouldForwardProp:
|
76
|
+
shouldForwardProp: prop => !['widthVariant'].includes(prop as string),
|
73
77
|
})<DrawerExProps>(({ theme, widthVariant }) => ({
|
74
78
|
alignItems: 'stretch',
|
75
79
|
borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
|
package/src/components/index.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from './Drawer.
|
1
|
+
export * from './Drawer.tsx'
|
package/src/index.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export * from './components/index.
|
1
|
+
export * from './components/index.ts'
|
package/xy.config.ts
ADDED
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
package/dist/browser/index.cjs
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __export = (target, all) => {
|
7
|
-
for (var name in all)
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
-
};
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
-
for (let key of __getOwnPropNames(from))
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
-
}
|
16
|
-
return to;
|
17
|
-
};
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
|
20
|
-
// src/index.ts
|
21
|
-
var src_exports = {};
|
22
|
-
__export(src_exports, {
|
23
|
-
DrawerEx: () => DrawerEx
|
24
|
-
});
|
25
|
-
module.exports = __toCommonJS(src_exports);
|
26
|
-
|
27
|
-
// src/components/Drawer.tsx
|
28
|
-
var import_material = require("@mui/material");
|
29
|
-
var import_react_flexbox = require("@xylabs/react-flexbox");
|
30
|
-
var import_react = require("react");
|
31
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
32
|
-
var DrawerEx = ({
|
33
|
-
children,
|
34
|
-
heightVariant = "full",
|
35
|
-
subTitle,
|
36
|
-
title,
|
37
|
-
onClose,
|
38
|
-
widthVariant = "partial",
|
39
|
-
...props
|
40
|
-
}) => {
|
41
|
-
const variantBasedProps = (0, import_react.useMemo)(() => {
|
42
|
-
return {
|
43
|
-
PaperProps: {
|
44
|
-
sx: {
|
45
|
-
alignItems: "center",
|
46
|
-
background: "transparent",
|
47
|
-
boxShadow: "none",
|
48
|
-
height: heightVariant === "full" ? "100%" : "auto",
|
49
|
-
width: widthVariant === "partial" ? "auto" : "100%"
|
50
|
-
}
|
51
|
-
},
|
52
|
-
onClick: (event) => onClose?.(event, "backdropClick")
|
53
|
-
};
|
54
|
-
}, [heightVariant, onClose, widthVariant]);
|
55
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Drawer, { anchor: "top", onClose, ...variantBasedProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
56
|
-
StyledDrawerContentPaper,
|
57
|
-
{
|
58
|
-
widthVariant,
|
59
|
-
elevation: 16,
|
60
|
-
onClick: (event) => event.stopPropagation(),
|
61
|
-
sx: { width: widthVariant === "full" ? "100%" : void 0 },
|
62
|
-
children: [
|
63
|
-
title || subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexCol, { alignItems: "start", gap: 1, children: [
|
64
|
-
title ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledEllipsisTypography, { variant: "h3", children: title }) : null,
|
65
|
-
subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", textTransform: "none", children: subTitle }) : null
|
66
|
-
] }) : null,
|
67
|
-
children
|
68
|
-
]
|
69
|
-
}
|
70
|
-
) });
|
71
|
-
};
|
72
|
-
var StyledEllipsisTypography = (0, import_material.styled)(import_material.Typography, { name: "StyledEllipsisTypography" })(() => ({
|
73
|
-
maxWidth: "100%",
|
74
|
-
overflowX: "hidden",
|
75
|
-
textOverflow: "ellipsis",
|
76
|
-
whiteSpace: "nowrap"
|
77
|
-
}));
|
78
|
-
var StyledDrawerContentPaper = (0, import_material.styled)(import_material.Paper, {
|
79
|
-
name: "StyledDrawerContentPaper",
|
80
|
-
shouldForwardProp: (prop) => !["widthVariant"].includes(prop)
|
81
|
-
})(({ theme, widthVariant }) => ({
|
82
|
-
alignItems: "stretch",
|
83
|
-
borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
|
84
|
-
display: "flex",
|
85
|
-
flexDirection: "column",
|
86
|
-
gap: theme.spacing(2),
|
87
|
-
height: "100%",
|
88
|
-
maxWidth: "100%",
|
89
|
-
overflowX: "hidden",
|
90
|
-
padding: theme.spacing(3),
|
91
|
-
[theme.breakpoints.up("lg")]: {
|
92
|
-
width: widthVariant === "full" ? "100%" : "50%"
|
93
|
-
},
|
94
|
-
[theme.breakpoints.up("md")]: {
|
95
|
-
width: widthVariant === "full" ? "100%" : "75%"
|
96
|
-
}
|
97
|
-
}));
|
98
|
-
//# sourceMappingURL=index.cjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts","../../src/components/Drawer.tsx"],"sourcesContent":["export * from './components/index.js'\n","import { Drawer, DrawerProps, Paper, styled, Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { MouseEvent, PropsWithChildren, useMemo } from 'react'\n\nexport interface DrawerExProps extends PropsWithChildren<DrawerProps> {\n heightVariant?: 'full' | 'auto'\n subTitle?: string\n title?: string\n widthVariant?: 'full' | 'partial'\n}\n\nexport const DrawerEx: React.FC<DrawerExProps> = ({\n children,\n heightVariant = 'full',\n subTitle,\n title,\n onClose,\n widthVariant = 'partial',\n ...props\n}) => {\n const variantBasedProps = useMemo(() => {\n return {\n PaperProps: {\n sx: {\n alignItems: 'center',\n background: 'transparent',\n boxShadow: 'none',\n height: heightVariant === 'full' ? '100%' : 'auto',\n width: widthVariant === 'partial' ? 'auto' : '100%',\n },\n },\n onClick: (event: MouseEvent) => onClose?.(event, 'backdropClick'),\n }\n }, [heightVariant, onClose, widthVariant])\n\n return (\n <Drawer anchor={'top'} onClose={onClose} {...variantBasedProps} {...props}>\n {/* Trap the event to prevent triggering the backdrop onClick */}\n <StyledDrawerContentPaper\n widthVariant={widthVariant}\n elevation={16}\n onClick={(event) => event.stopPropagation()}\n sx={{ width: widthVariant === 'full' ? '100%' : undefined }}\n >\n {title || subTitle ?\n <FlexCol alignItems=\"start\" gap={1}>\n {title ?\n <StyledEllipsisTypography variant={'h3'}>{title}</StyledEllipsisTypography>\n : null}\n {subTitle ?\n <Typography variant={'subtitle1'} textTransform=\"none\">\n {subTitle}\n </Typography>\n : null}\n </FlexCol>\n : null}\n {children}\n </StyledDrawerContentPaper>\n </Drawer>\n )\n}\n\nconst StyledEllipsisTypography = styled(Typography, { name: 'StyledEllipsisTypography' })(() => ({\n maxWidth: '100%',\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}))\n\nconst StyledDrawerContentPaper = styled(Paper, {\n name: 'StyledDrawerContentPaper',\n shouldForwardProp: (prop) => !['widthVariant'].includes(prop as string),\n})<DrawerExProps>(({ theme, widthVariant }) => ({\n alignItems: 'stretch',\n borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n height: '100%',\n maxWidth: '100%',\n overflowX: 'hidden',\n padding: theme.spacing(3),\n [theme.breakpoints.up('lg')]: {\n width: widthVariant === 'full' ? '100%' : '50%',\n },\n [theme.breakpoints.up('md')]: {\n width: widthVariant === 'full' ? '100%' : '75%',\n },\n}))\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA+D;AAC/D,2BAAwB;AACxB,mBAAuD;AA2C7C;AAlCH,IAAM,WAAoC,CAAC;AAAA,EAChD;AAAA,EACA,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,QAAM,wBAAoB,sBAAQ,MAAM;AACtC,WAAO;AAAA,MACL,YAAY;AAAA,QACV,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,QAAQ,kBAAkB,SAAS,SAAS;AAAA,UAC5C,OAAO,iBAAiB,YAAY,SAAS;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,SAAS,CAAC,UAAsB,UAAU,OAAO,eAAe;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,eAAe,SAAS,YAAY,CAAC;AAEzC,SACE,4CAAC,0BAAO,QAAQ,OAAO,SAAmB,GAAG,mBAAoB,GAAG,OAElE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,MACX,SAAS,CAAC,UAAU,MAAM,gBAAgB;AAAA,MAC1C,IAAI,EAAE,OAAO,iBAAiB,SAAS,SAAS,OAAU;AAAA,MAEzD;AAAA,iBAAS,WACR,6CAAC,gCAAQ,YAAW,SAAQ,KAAK,GAC9B;AAAA,kBACC,4CAAC,4BAAyB,SAAS,MAAO,iBAAM,IAChD;AAAA,UACD,WACC,4CAAC,8BAAW,SAAS,aAAa,eAAc,QAC7C,oBACH,IACA;AAAA,WACJ,IACA;AAAA,QACD;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,IAAM,+BAA2B,wBAAO,4BAAY,EAAE,MAAM,2BAA2B,CAAC,EAAE,OAAO;AAAA,EAC/F,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AACd,EAAE;AAEF,IAAM,+BAA2B,wBAAO,uBAAO;AAAA,EAC7C,MAAM;AAAA,EACN,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,SAAS,IAAc;AACxE,CAAC,EAAiB,CAAC,EAAE,OAAO,aAAa,OAAO;AAAA,EAC9C,YAAY;AAAA,EACZ,cAAc,OAAO,MAAM,MAAM,YAAY,MAAM,MAAM,MAAM,YAAY;AAAA,EAC3E,SAAS;AAAA,EACT,eAAe;AAAA,EACf,KAAK,MAAM,QAAQ,CAAC;AAAA,EACpB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS,MAAM,QAAQ,CAAC;AAAA,EACxB,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAO,iBAAiB,SAAS,SAAS;AAAA,EAC5C;AAAA,EACA,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAO,iBAAiB,SAAS,SAAS;AAAA,EAC5C;AACF,EAAE;","names":[]}
|
package/dist/browser/index.d.cts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/browser/index.d.mts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/browser/index.js
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
// src/components/Drawer.tsx
|
2
|
-
import { Drawer, Paper, styled, Typography } from "@mui/material";
|
3
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
4
|
-
import { useMemo } from "react";
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
6
|
-
var DrawerEx = ({
|
7
|
-
children,
|
8
|
-
heightVariant = "full",
|
9
|
-
subTitle,
|
10
|
-
title,
|
11
|
-
onClose,
|
12
|
-
widthVariant = "partial",
|
13
|
-
...props
|
14
|
-
}) => {
|
15
|
-
const variantBasedProps = useMemo(() => {
|
16
|
-
return {
|
17
|
-
PaperProps: {
|
18
|
-
sx: {
|
19
|
-
alignItems: "center",
|
20
|
-
background: "transparent",
|
21
|
-
boxShadow: "none",
|
22
|
-
height: heightVariant === "full" ? "100%" : "auto",
|
23
|
-
width: widthVariant === "partial" ? "auto" : "100%"
|
24
|
-
}
|
25
|
-
},
|
26
|
-
onClick: (event) => onClose?.(event, "backdropClick")
|
27
|
-
};
|
28
|
-
}, [heightVariant, onClose, widthVariant]);
|
29
|
-
return /* @__PURE__ */ jsx(Drawer, { anchor: "top", onClose, ...variantBasedProps, ...props, children: /* @__PURE__ */ jsxs(
|
30
|
-
StyledDrawerContentPaper,
|
31
|
-
{
|
32
|
-
widthVariant,
|
33
|
-
elevation: 16,
|
34
|
-
onClick: (event) => event.stopPropagation(),
|
35
|
-
sx: { width: widthVariant === "full" ? "100%" : void 0 },
|
36
|
-
children: [
|
37
|
-
title || subTitle ? /* @__PURE__ */ jsxs(FlexCol, { alignItems: "start", gap: 1, children: [
|
38
|
-
title ? /* @__PURE__ */ jsx(StyledEllipsisTypography, { variant: "h3", children: title }) : null,
|
39
|
-
subTitle ? /* @__PURE__ */ jsx(Typography, { variant: "subtitle1", textTransform: "none", children: subTitle }) : null
|
40
|
-
] }) : null,
|
41
|
-
children
|
42
|
-
]
|
43
|
-
}
|
44
|
-
) });
|
45
|
-
};
|
46
|
-
var StyledEllipsisTypography = styled(Typography, { name: "StyledEllipsisTypography" })(() => ({
|
47
|
-
maxWidth: "100%",
|
48
|
-
overflowX: "hidden",
|
49
|
-
textOverflow: "ellipsis",
|
50
|
-
whiteSpace: "nowrap"
|
51
|
-
}));
|
52
|
-
var StyledDrawerContentPaper = styled(Paper, {
|
53
|
-
name: "StyledDrawerContentPaper",
|
54
|
-
shouldForwardProp: (prop) => !["widthVariant"].includes(prop)
|
55
|
-
})(({ theme, widthVariant }) => ({
|
56
|
-
alignItems: "stretch",
|
57
|
-
borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
|
58
|
-
display: "flex",
|
59
|
-
flexDirection: "column",
|
60
|
-
gap: theme.spacing(2),
|
61
|
-
height: "100%",
|
62
|
-
maxWidth: "100%",
|
63
|
-
overflowX: "hidden",
|
64
|
-
padding: theme.spacing(3),
|
65
|
-
[theme.breakpoints.up("lg")]: {
|
66
|
-
width: widthVariant === "full" ? "100%" : "50%"
|
67
|
-
},
|
68
|
-
[theme.breakpoints.up("md")]: {
|
69
|
-
width: widthVariant === "full" ? "100%" : "75%"
|
70
|
-
}
|
71
|
-
}));
|
72
|
-
export {
|
73
|
-
DrawerEx
|
74
|
-
};
|
75
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/components/Drawer.tsx"],"sourcesContent":["import { Drawer, DrawerProps, Paper, styled, Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { MouseEvent, PropsWithChildren, useMemo } from 'react'\n\nexport interface DrawerExProps extends PropsWithChildren<DrawerProps> {\n heightVariant?: 'full' | 'auto'\n subTitle?: string\n title?: string\n widthVariant?: 'full' | 'partial'\n}\n\nexport const DrawerEx: React.FC<DrawerExProps> = ({\n children,\n heightVariant = 'full',\n subTitle,\n title,\n onClose,\n widthVariant = 'partial',\n ...props\n}) => {\n const variantBasedProps = useMemo(() => {\n return {\n PaperProps: {\n sx: {\n alignItems: 'center',\n background: 'transparent',\n boxShadow: 'none',\n height: heightVariant === 'full' ? '100%' : 'auto',\n width: widthVariant === 'partial' ? 'auto' : '100%',\n },\n },\n onClick: (event: MouseEvent) => onClose?.(event, 'backdropClick'),\n }\n }, [heightVariant, onClose, widthVariant])\n\n return (\n <Drawer anchor={'top'} onClose={onClose} {...variantBasedProps} {...props}>\n {/* Trap the event to prevent triggering the backdrop onClick */}\n <StyledDrawerContentPaper\n widthVariant={widthVariant}\n elevation={16}\n onClick={(event) => event.stopPropagation()}\n sx={{ width: widthVariant === 'full' ? '100%' : undefined }}\n >\n {title || subTitle ?\n <FlexCol alignItems=\"start\" gap={1}>\n {title ?\n <StyledEllipsisTypography variant={'h3'}>{title}</StyledEllipsisTypography>\n : null}\n {subTitle ?\n <Typography variant={'subtitle1'} textTransform=\"none\">\n {subTitle}\n </Typography>\n : null}\n </FlexCol>\n : null}\n {children}\n </StyledDrawerContentPaper>\n </Drawer>\n )\n}\n\nconst StyledEllipsisTypography = styled(Typography, { name: 'StyledEllipsisTypography' })(() => ({\n maxWidth: '100%',\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n}))\n\nconst StyledDrawerContentPaper = styled(Paper, {\n name: 'StyledDrawerContentPaper',\n shouldForwardProp: (prop) => !['widthVariant'].includes(prop as string),\n})<DrawerExProps>(({ theme, widthVariant }) => ({\n alignItems: 'stretch',\n borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(2),\n height: '100%',\n maxWidth: '100%',\n overflowX: 'hidden',\n padding: theme.spacing(3),\n [theme.breakpoints.up('lg')]: {\n width: widthVariant === 'full' ? '100%' : '50%',\n },\n [theme.breakpoints.up('md')]: {\n width: widthVariant === 'full' ? '100%' : '75%',\n },\n}))\n"],"mappings":";AAAA,SAAS,QAAqB,OAAO,QAAQ,kBAAkB;AAC/D,SAAS,eAAe;AACxB,SAAwC,eAAe;AA2C7C,SAEI,KAFJ;AAlCH,IAAM,WAAoC,CAAC;AAAA,EAChD;AAAA,EACA,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,QAAQ,MAAM;AACtC,WAAO;AAAA,MACL,YAAY;AAAA,QACV,IAAI;AAAA,UACF,YAAY;AAAA,UACZ,YAAY;AAAA,UACZ,WAAW;AAAA,UACX,QAAQ,kBAAkB,SAAS,SAAS;AAAA,UAC5C,OAAO,iBAAiB,YAAY,SAAS;AAAA,QAC/C;AAAA,MACF;AAAA,MACA,SAAS,CAAC,UAAsB,UAAU,OAAO,eAAe;AAAA,IAClE;AAAA,EACF,GAAG,CAAC,eAAe,SAAS,YAAY,CAAC;AAEzC,SACE,oBAAC,UAAO,QAAQ,OAAO,SAAmB,GAAG,mBAAoB,GAAG,OAElE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,MACX,SAAS,CAAC,UAAU,MAAM,gBAAgB;AAAA,MAC1C,IAAI,EAAE,OAAO,iBAAiB,SAAS,SAAS,OAAU;AAAA,MAEzD;AAAA,iBAAS,WACR,qBAAC,WAAQ,YAAW,SAAQ,KAAK,GAC9B;AAAA,kBACC,oBAAC,4BAAyB,SAAS,MAAO,iBAAM,IAChD;AAAA,UACD,WACC,oBAAC,cAAW,SAAS,aAAa,eAAc,QAC7C,oBACH,IACA;AAAA,WACJ,IACA;AAAA,QACD;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,IAAM,2BAA2B,OAAO,YAAY,EAAE,MAAM,2BAA2B,CAAC,EAAE,OAAO;AAAA,EAC/F,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,YAAY;AACd,EAAE;AAEF,IAAM,2BAA2B,OAAO,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc,EAAE,SAAS,IAAc;AACxE,CAAC,EAAiB,CAAC,EAAE,OAAO,aAAa,OAAO;AAAA,EAC9C,YAAY;AAAA,EACZ,cAAc,OAAO,MAAM,MAAM,YAAY,MAAM,MAAM,MAAM,YAAY;AAAA,EAC3E,SAAS;AAAA,EACT,eAAe;AAAA,EACf,KAAK,MAAM,QAAQ,CAAC;AAAA,EACpB,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS,MAAM,QAAQ,CAAC;AAAA,EACxB,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAO,iBAAiB,SAAS,SAAS;AAAA,EAC5C;AAAA,EACA,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG;AAAA,IAC5B,OAAO,iBAAiB,SAAS,SAAS;AAAA,EAC5C;AACF,EAAE;","names":[]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { DrawerProps } from '@mui/material';
|
2
|
-
import { PropsWithChildren } from 'react';
|
3
|
-
export interface DrawerExProps extends PropsWithChildren<DrawerProps> {
|
4
|
-
heightVariant?: 'full' | 'auto';
|
5
|
-
subTitle?: string;
|
6
|
-
title?: string;
|
7
|
-
widthVariant?: 'full' | 'partial';
|
8
|
-
}
|
9
|
-
export declare const DrawerEx: React.FC<DrawerExProps>;
|
10
|
-
//# sourceMappingURL=Drawer.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAA6B,MAAM,eAAe,CAAA;AAE9E,OAAO,EAAc,iBAAiB,EAAW,MAAM,OAAO,CAAA;AAE9D,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,WAAW,CAAC;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiD5C,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
|