@xyo-network/react-drawer 10.0.3 → 10.0.4
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAIhD,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,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,CA6D5C,CAAA"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// src/components/Drawer.tsx
|
|
2
|
+
import { FlexCol } from "@ariestools/sdk-react/flexbox";
|
|
2
3
|
import {
|
|
3
4
|
Drawer,
|
|
4
5
|
Paper,
|
|
5
6
|
styled,
|
|
6
7
|
Typography
|
|
7
8
|
} from "@mui/material";
|
|
8
|
-
import { FlexCol } from "@xylabs/react-flexbox";
|
|
9
9
|
import { useMemo } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
var DrawerEx = ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/Drawer.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { DrawerProps } from '@mui/material'\nimport {\n Drawer, Paper, styled, Typography,\n} from '@mui/material'\nimport
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { FlexCol } from '@ariestools/sdk-react/flexbox'\nimport type { DrawerProps } from '@mui/material'\nimport {\n Drawer, Paper, styled, Typography,\n} from '@mui/material'\nimport type { MouseEvent, PropsWithChildren } from 'react'\nimport React, { 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: MouseEvent) => event.stopPropagation()}\n sx={{ width: widthVariant === 'full' ? '100%' : undefined }}\n >\n {title || subTitle\n ? (\n <FlexCol\n sx={{\n alignItems: 'start',\n gap: 1,\n }}\n >\n {title\n ? <StyledEllipsisTypography variant=\"h3\">{title}</StyledEllipsisTypography>\n : null}\n {subTitle\n ? (\n <Typography\n variant=\"subtitle1\"\n sx={{ textTransform: 'none' }}\n >\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')]: { width: widthVariant === 'full' ? '100%' : '50%' },\n [theme.breakpoints.up('md')]: { width: widthVariant === 'full' ? '100%' : '75%' },\n}))\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAQ;AAAA,OAClB;AAEP,SAAgB,eAAe;AA4CjB,SAOM,KAPN;AAnCP,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,QAAO,OAAM,SAAmB,GAAG,mBAAoB,GAAG,OAEhE;AAAA,IA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EAAE,OAAO,iBAAiB,SAAS,SAAS,MAAM;AAClF,EAAE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-drawer",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,36 +41,62 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@
|
|
44
|
+
"@ariestools/sdk": "^7.0.5",
|
|
45
|
+
"@ariestools/sdk-react": "^10.0.2",
|
|
46
|
+
"@mui/icons-material": "^9.2.0",
|
|
47
|
+
"@mui/material": "^9.2.0",
|
|
45
48
|
"@opentelemetry/api": "^1.9.1",
|
|
46
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
49
|
+
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
50
|
+
"@react-spring/web": "^10.1.2",
|
|
47
51
|
"@storybook/react-vite": "~10.4.6",
|
|
48
52
|
"@types/react": "^19.2.17",
|
|
49
|
-
"@xylabs/
|
|
50
|
-
"@xylabs/
|
|
51
|
-
"@xylabs/toolchain": "~8.5.
|
|
52
|
-
"@xylabs/tsconfig": "^8.5.
|
|
53
|
-
"@xylabs/tsconfig-dom": "^8.5.
|
|
54
|
-
"@xylabs/tsconfig-react": "~8.5.
|
|
53
|
+
"@xylabs/eth-address": "^7.0.5",
|
|
54
|
+
"@xylabs/pixel": "^7.0.5",
|
|
55
|
+
"@xylabs/toolchain": "~8.5.15",
|
|
56
|
+
"@xylabs/tsconfig": "^8.5.15",
|
|
57
|
+
"@xylabs/tsconfig-dom": "^8.5.15",
|
|
58
|
+
"@xylabs/tsconfig-react": "~8.5.15",
|
|
55
59
|
"async-mutex": "^0.5.0",
|
|
60
|
+
"clsx": "^2.1.1",
|
|
56
61
|
"eslint": "^10.6.0",
|
|
62
|
+
"ethers": "^6.17.0",
|
|
63
|
+
"lru-cache": "^11.5.1",
|
|
64
|
+
"md5": "^2.3.0",
|
|
65
|
+
"numeral": "^2.0.6",
|
|
66
|
+
"query-string": "^9.4.1",
|
|
57
67
|
"react": "^19.2.7",
|
|
58
68
|
"react-dom": "^19.2.7",
|
|
69
|
+
"react-router-dom": "^7.18.1",
|
|
59
70
|
"storybook": "^10.4.6",
|
|
60
71
|
"typescript": "^6.0.3",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
72
|
+
"viem": "^2.54.2",
|
|
73
|
+
"vite": "^8.1.3",
|
|
74
|
+
"zod": "^4.4.3",
|
|
75
|
+
"zustand": "^5.0.14"
|
|
63
76
|
},
|
|
64
77
|
"peerDependencies": {
|
|
78
|
+
"@ariestools/sdk": "^7.0",
|
|
79
|
+
"@ariestools/sdk-react": "^10.0",
|
|
80
|
+
"@mui/icons-material": "^9.0",
|
|
65
81
|
"@mui/material": "^9.0",
|
|
66
82
|
"@opentelemetry/api": "^1.9",
|
|
67
83
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
68
|
-
"@
|
|
69
|
-
"@xylabs/
|
|
84
|
+
"@react-spring/web": "^10.1",
|
|
85
|
+
"@xylabs/eth-address": "^7.0",
|
|
86
|
+
"@xylabs/pixel": "^7.0",
|
|
70
87
|
"async-mutex": "^0.5",
|
|
88
|
+
"clsx": "^2.1",
|
|
89
|
+
"ethers": "^6.16",
|
|
90
|
+
"lru-cache": "^11.3",
|
|
91
|
+
"md5": "^2.3",
|
|
92
|
+
"numeral": "^2.0",
|
|
93
|
+
"query-string": "^9.3",
|
|
71
94
|
"react": "^19.2",
|
|
72
95
|
"react-dom": "^19.2",
|
|
73
|
-
"
|
|
96
|
+
"react-router-dom": "^7.15",
|
|
97
|
+
"viem": "^2.48",
|
|
98
|
+
"zod": "^4.4",
|
|
99
|
+
"zustand": "^5.0"
|
|
74
100
|
},
|
|
75
101
|
"publishConfig": {
|
|
76
102
|
"access": "public"
|