@xyo-network/react-webapp 2.25.54 → 2.25.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Page.d.ts +1 -0
- package/dist/cjs/components/Page.js +2 -2
- package/dist/cjs/components/Page.js.map +1 -1
- package/dist/docs.json +849 -828
- package/dist/esm/components/Page.d.ts +1 -0
- package/dist/esm/components/Page.js +2 -2
- package/dist/esm/components/Page.js.map +1 -1
- package/package.json +4 -4
- package/src/components/Page.tsx +8 -3
|
@@ -3,6 +3,7 @@ import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export interface WebAppPageProps extends FlexBoxProps {
|
|
5
5
|
container?: ContainerProps['maxWidth'];
|
|
6
|
+
disableGutters?: boolean;
|
|
6
7
|
breadcrumbs?: ReactNode;
|
|
7
8
|
}
|
|
8
9
|
export declare const WebAppPage: React.FC<WebAppPageProps>;
|
|
@@ -5,7 +5,7 @@ import { useUserEvents } from '@xylabs/react-pixel';
|
|
|
5
5
|
import { useAsyncEffect } from '@xylabs/react-shared';
|
|
6
6
|
import { Helmet } from 'react-helmet';
|
|
7
7
|
import { useLocation } from 'react-router-dom';
|
|
8
|
-
export const WebAppPage = ({ title, container, breadcrumbs, children, ...props }) => {
|
|
8
|
+
export const WebAppPage = ({ disableGutters, title, container, breadcrumbs, children, ...props }) => {
|
|
9
9
|
const userEvents = useUserEvents();
|
|
10
10
|
const { pathname } = useLocation();
|
|
11
11
|
useAsyncEffect(
|
|
@@ -14,7 +14,7 @@ export const WebAppPage = ({ title, container, breadcrumbs, children, ...props }
|
|
|
14
14
|
await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname });
|
|
15
15
|
}, [pathname, title, userEvents]);
|
|
16
16
|
const Body = (props) => (_jsxs(FlexGrowCol, { gap: 2, paddingY: 2, justifyContent: "flex-start", alignItems: "stretch", ...props, children: [breadcrumbs, children] }));
|
|
17
|
-
return (_jsxs(FlexGrowCol, { alignItems: "stretch", justifyContent: "flex-start", minHeight: 0, overflow: "visible scroll", children: [_jsx(Helmet, { title: title }), container ? (_jsx(Container, { style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(Body, { ...props }) })) : (_jsx(Body, { ...props }))] }));
|
|
17
|
+
return (_jsxs(FlexGrowCol, { alignItems: "stretch", justifyContent: "flex-start", minHeight: 0, overflow: "visible scroll", children: [_jsx(Helmet, { title: title }), container ? (_jsx(Container, { disableGutters: disableGutters, style: { alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }, maxWidth: container, children: _jsx(Body, { ...props }) })) : (_jsx(Body, { paddingX: disableGutters ? 0 : 1, ...props }))] }));
|
|
18
18
|
};
|
|
19
19
|
/** @deprecated use WebAppPagePage instead */
|
|
20
20
|
export const FlexPage = WebAppPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,eAAe,CAAA;AACzD,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,eAAe,CAAA;AACzD,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,C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,EAAE,cAAc,EAAE,YAAY,EAAE,EACrH,QAAQ,EAAE,SAAS,YAEnB,KAAC,IAAI,OAAK,KAAK,GAAI,GACT,CACb,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAM,KAAK,GAAI,CACtD,IACW,CACf,CAAA;AACH,CAAC,CAAA;AAED,6CAA6C;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@xylabs/react-flexbox": "^2.12.23",
|
|
18
18
|
"@xylabs/react-pixel": "^2.12.23",
|
|
19
19
|
"@xylabs/react-shared": "^2.12.23",
|
|
20
|
-
"@xyo-network/react-appbar": "^2.25.
|
|
21
|
-
"@xyo-network/react-footer": "^2.25.
|
|
22
|
-
"@xyo-network/react-shared": "^2.25.
|
|
20
|
+
"@xyo-network/react-appbar": "^2.25.57",
|
|
21
|
+
"@xyo-network/react-footer": "^2.25.57",
|
|
22
|
+
"@xyo-network/react-shared": "^2.25.57",
|
|
23
23
|
"react": "^18.1.0",
|
|
24
24
|
"react-dom": "^18.1.0",
|
|
25
25
|
"react-helmet": "^6.1.0",
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
},
|
|
84
84
|
"sideEffects": false,
|
|
85
85
|
"types": "dist/esm/index.d.ts",
|
|
86
|
-
"version": "2.25.
|
|
86
|
+
"version": "2.25.57",
|
|
87
87
|
"packageManager": "yarn@3.1.1"
|
|
88
88
|
}
|
package/src/components/Page.tsx
CHANGED
|
@@ -7,10 +7,11 @@ import { Helmet } from 'react-helmet'
|
|
|
7
7
|
import { useLocation } from 'react-router-dom'
|
|
8
8
|
export interface WebAppPageProps extends FlexBoxProps {
|
|
9
9
|
container?: ContainerProps['maxWidth']
|
|
10
|
+
disableGutters?: boolean
|
|
10
11
|
breadcrumbs?: ReactNode
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export const WebAppPage: React.FC<WebAppPageProps> = ({ title, container, breadcrumbs, children, ...props }) => {
|
|
14
|
+
export const WebAppPage: React.FC<WebAppPageProps> = ({ disableGutters, title, container, breadcrumbs, children, ...props }) => {
|
|
14
15
|
const userEvents = useUserEvents()
|
|
15
16
|
const { pathname } = useLocation()
|
|
16
17
|
|
|
@@ -33,11 +34,15 @@ export const WebAppPage: React.FC<WebAppPageProps> = ({ title, container, breadc
|
|
|
33
34
|
<FlexGrowCol alignItems="stretch" justifyContent="flex-start" minHeight={0} overflow="visible scroll">
|
|
34
35
|
<Helmet title={title} />
|
|
35
36
|
{container ? (
|
|
36
|
-
<Container
|
|
37
|
+
<Container
|
|
38
|
+
disableGutters={disableGutters}
|
|
39
|
+
style={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}
|
|
40
|
+
maxWidth={container}
|
|
41
|
+
>
|
|
37
42
|
<Body {...props} />
|
|
38
43
|
</Container>
|
|
39
44
|
) : (
|
|
40
|
-
<Body {...props} />
|
|
45
|
+
<Body paddingX={disableGutters ? 0 : 1} {...props} />
|
|
41
46
|
)}
|
|
42
47
|
</FlexGrowCol>
|
|
43
48
|
)
|