@xyo-network/react-webapp 4.4.10 → 5.0.0-rc.1
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/browser/index.mjs +3 -3
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/components/Body.d.ts +13 -0
- package/dist/types/components/Body.d.ts.map +1 -0
- package/dist/types/components/Chrome.d.ts +11 -0
- package/dist/types/components/Chrome.d.ts.map +1 -0
- package/dist/types/components/ErrorPage.d.ts +9 -0
- package/dist/types/components/ErrorPage.d.ts.map +1 -0
- package/dist/types/components/NotFoundPage/Page.d.ts +6 -0
- package/dist/types/components/NotFoundPage/Page.d.ts.map +1 -0
- package/dist/types/components/NotFoundPage/index.d.ts +2 -0
- package/dist/types/components/NotFoundPage/index.d.ts.map +1 -0
- package/dist/types/components/Page.d.ts +13 -0
- package/dist/types/components/Page.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/types/components/lib/cssValues.d.ts +6 -0
- package/dist/types/components/lib/cssValues.d.ts.map +1 -0
- package/dist/types/components/lib/index.d.ts +2 -0
- package/dist/types/components/lib/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +30 -28
- package/src/components/Chrome.tsx +15 -17
- package/dist/browser/index.d.ts +0 -35
package/dist/browser/index.mjs
CHANGED
|
@@ -100,8 +100,8 @@ var WebAppBody = /* @__PURE__ */ __name(({ children, breadcrumbs, disableBreadcr
|
|
|
100
100
|
import { WebAppChrome } from "@xylabs/react-webapp";
|
|
101
101
|
import { XyoApplicationAppBar } from "@xyo-network/react-appbar";
|
|
102
102
|
import { Footer } from "@xyo-network/react-footer";
|
|
103
|
-
import React2
|
|
104
|
-
var XyoWebAppChrome = /* @__PURE__ */
|
|
103
|
+
import React2 from "react";
|
|
104
|
+
var XyoWebAppChrome = /* @__PURE__ */ __name(({ ref, appbar, footer, footerElevation = 4, navigationType = "menu", ...props }) => {
|
|
105
105
|
return /* @__PURE__ */ React2.createElement(WebAppChrome, {
|
|
106
106
|
ref,
|
|
107
107
|
appbar: appbar ?? /* @__PURE__ */ React2.createElement(XyoApplicationAppBar, null),
|
|
@@ -112,7 +112,7 @@ var XyoWebAppChrome = /* @__PURE__ */ forwardRef(({ appbar, footer, footerElevat
|
|
|
112
112
|
}),
|
|
113
113
|
...props
|
|
114
114
|
});
|
|
115
|
-
});
|
|
115
|
+
}, "XyoWebAppChrome");
|
|
116
116
|
XyoWebAppChrome.displayName = "XyoWebAppChrome";
|
|
117
117
|
|
|
118
118
|
// src/components/ErrorPage.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'\nimport { XyoApplicationAppBar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport React, { forwardRef } from 'react'\n\nexport interface XyoWebAppChromeProps extends WebAppChromeProps {}\n\nexport const XyoWebAppChrome = forwardRef<HTMLDivElement, XyoWebAppChromeProps>(\n ({\n appbar, footer, footerElevation = 4, navigationType = 'menu', ...props\n }, ref) => {\n return (\n <WebAppChrome\n ref={ref}\n appbar={appbar ?? <XyoApplicationAppBar />}\n footerElevation={footerElevation}\n navigationType={navigationType}\n footer={footer ?? <Footer dynamicHeight />}\n {...props}\n />\n )\n },\n)\n\nXyoWebAppChrome.displayName = 'XyoWebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {container && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use WebAppNotFoundPage instead */\nexport const NotFoundPage = WebAppNotFoundPage\n"],"mappings":";;;;AACA,SAASA,cAAc;AAEvB,SAASC,aAAaC,eAAe;AAErC,OAAOC,WAAW;;;ACHX,IAAMC,iBAAgC;EAC3CC,OAAO;EACPC,UAAU;AACZ;AAEO,IAAMC,YAA2B;EACtCF,OAAO;EACPC,UAAU;AACZ;AAGO,IAAME,oBAAmC;EAAE,GAAGD;AAAU;AAExD,IAAME,eAA8B;EAAE,GAAGL;AAAe;;;ADN/D,IAAMM,iBAAiB;AACvB,IAAMC,oBAAoB,oBAAIC,IAAI;EAAC;EAA6B;EAAW;EAAW;CAA0B;AAChH,IAAMC,uBAAuB;EAAEC,mBAAmB,wBAACC,SAAiB,CAACJ,kBAAkBK,IAAID,IAAAA,GAAzC;AAA+C;AAEjG,IAAME,iBAAiBC,OAAOC,aAAa;EACzC,GAAGN;EACHO,MAAMV;EACNW,MAAM;AACR,CAAA,EAAoB,CAAC,EACn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C,OAAA,cAACC,YAAAA;EAAWH,OAAOA,SAAS;EAA0B,GAAGC;GACvD,gBAAAC,OAAA,cAACE,UAAAA,IAAAA,CAAAA,GAFwD;AAOtD,IAAMC,eAAeN;","names":["styled","FlexGrowCol","FlexRow","React","scrollableWrap","inset","position","fixedWrap","scrollableContent","fixedContent","WebAppBodyName","propsNotForwarded","Set","defaultStyledOptions","shouldForwardProp","prop","has","WebAppBodyRoot","styled","FlexGrowCol","name","slot","spacing","theme","mobileScrollingBreakpoint","variant","scrollable","unstable_sx","alignItems","gap","justifyContent","overflowX","overflowY","paddingY","breakpoints","down","WebAppBodyBreadcrumb","FlexRow","disableBreadcrumbGutter","marginX","WebAppBodyScrollableWrapper","WebAppBodyScrollable","props","scrollableContent","fixedContent","inset","position","WebAppBody","children","breadcrumbs","WebAppChrome","XyoApplicationAppBar","Footer","React","forwardRef","XyoWebAppChrome","appbar","footer","footerElevation","navigationType","props","ref","dynamicHeight","displayName","ButtonEx","React","Container","styled","useAsyncEffect","FlexGrowCol","useUserEvents","React","Helmet","useLocation","WebAppPageRoot","styled","FlexGrowCol","name","shouldForwardProp","propName","slot","theme","mobileScrollingBreakpoint","variant","props","scrollableWrap","fixedWrap","alignItems","justifyContent","maxWidth","breakpoints","down","inset","position","WebAppPage","disableGutters","disableBreadcrumbGutter","title","container","children","breadcrumbs","userEvents","useUserEvents","pathname","useLocation","useAsyncEffect","viewContent","path","location","React","Helmet","Container","style","display","flexDirection","flexGrow","WebAppBody","paddingX","FlexPage","WebAppErrorPage","error","props","React","WebAppPage","title","h1","p","ButtonEx","href","variant","ErrorPage","NotFound","React","WebAppNotFoundPage","title","props","React","WebAppPage","NotFound","NotFoundPage"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/Body.tsx","../../src/components/lib/cssValues.ts","../../src/components/Chrome.tsx","../../src/components/ErrorPage.tsx","../../src/components/Page.tsx","../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import type { Breakpoint } from '@mui/material'\nimport { styled } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = { shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop) }\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({\n spacing, theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const scrollable = variant === 'scrollable'\n return theme.unstable_sx({\n alignItems: 'stretch',\n gap: 1,\n justifyContent: 'flex-start',\n overflowX: 'visible',\n overflowY: scrollable ? 'scroll' : 'hidden',\n paddingY: spacing,\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: { overflowY: 'scroll' },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({\n theme, disableBreadcrumbGutter, spacing,\n}) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }))\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({ alignItems: 'stretch' }))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableContent : fixedContent\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 'unset',\n position: 'relative',\n },\n }\n})\n\nexport interface WebAppBodyProps extends FlexBoxProps {\n breadcrumbs?: ReactNode\n disableBreadcrumbGutter?: boolean\n mobileScrollingBreakpoint?: Breakpoint\n spacing?: string | number\n variant?: 'scrollable' | 'fixed'\n}\n\nexport const WebAppBody: React.FC<WebAppBodyProps> = ({\n children,\n breadcrumbs,\n disableBreadcrumbGutter,\n mobileScrollingBreakpoint,\n spacing = 1,\n variant,\n ...props\n}) => {\n return (\n <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>\n {breadcrumbs\n ? (\n <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n )\n : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n","import type { CSSProperties } from 'react'\n\nexport const scrollableWrap: CSSProperties = {\n inset: 0,\n position: 'absolute',\n} as const\n\nexport const fixedWrap: CSSProperties = {\n inset: 'unset',\n position: 'relative',\n} as const\n\n// Making a scrollable vs fixed wrapper and content is an inversion of the wrap and content styles\nexport const scrollableContent: CSSProperties = { ...fixedWrap } as const\n\nexport const fixedContent: CSSProperties = { ...scrollableWrap } as const\n","import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'\nimport { XyoApplicationAppBar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport React from 'react'\n\nexport interface XyoWebAppChromeProps extends WebAppChromeProps {}\n\nexport const XyoWebAppChrome = ({\n ref, appbar, footer, footerElevation = 4, navigationType = 'menu', ...props\n}: XyoWebAppChromeProps & { ref?: React.RefObject<HTMLDivElement | null> }) => {\n return (\n <WebAppChrome\n ref={ref}\n appbar={appbar ?? <XyoApplicationAppBar />}\n footerElevation={footerElevation}\n navigationType={navigationType}\n footer={footer ?? <Footer dynamicHeight />}\n {...props}\n />\n )\n}\n\nXyoWebAppChrome.displayName = 'XyoWebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport type { WebAppPageProps } from './Page.tsx'\nimport { WebAppPage } from './Page.tsx'\n\nexport interface WebAppErrorPageProps extends WebAppPageProps {\n error?: Error\n}\n\nexport const WebAppErrorPage: React.FC<WebAppErrorPageProps> = ({ error, ...props }) => (\n <WebAppPage title=\"Oops! Something went wrong\" {...props}>\n <h1>Oops! Something went wrong!</h1>\n <p>{`${error}`}</p>\n <ButtonEx href=\"/\" variant=\"contained\">\n Homepage\n </ButtonEx>\n </WebAppPage>\n)\n\n/** @deprecated use WebAppErrorPage instead */\nexport const ErrorPage = WebAppErrorPage\n","import type { ContainerProps } from '@mui/material'\nimport { Container, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport type { WebAppBodyProps } from './Body.tsx'\nimport { WebAppBody } from './Body.tsx'\nimport { fixedWrap, scrollableWrap } from './lib/index.ts'\n\nconst WebAppPageRoot = styled(FlexGrowCol, {\n name: 'WebAppPage',\n shouldForwardProp: propName => propName !== 'mobileScrollingBreakpoint' && propName !== 'variant',\n slot: 'Root',\n})<WebAppPageProps>(({\n theme, mobileScrollingBreakpoint = 'sm', variant,\n}) => {\n const props = variant === 'scrollable' ? scrollableWrap : fixedWrap\n return {\n ...props,\n alignItems: 'stretch',\n justifyContent: 'start',\n maxWidth: '100vw',\n [theme.breakpoints.down(mobileScrollingBreakpoint)]: {\n inset: 0,\n position: 'absolute',\n },\n }\n})\n\nexport interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {\n container?: ContainerProps['maxWidth'] | 'none'\n disableGutters?: boolean\n}\n\nexport const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>> = ({\n disableGutters,\n disableBreadcrumbGutter,\n title,\n container,\n children,\n breadcrumbs,\n mobileScrollingBreakpoint,\n variant = 'scrollable',\n ...props\n}) => {\n const userEvents = useUserEvents()\n const { pathname } = useLocation()\n\n useAsyncEffect(\n async () => {\n await userEvents?.viewContent({ name: title ?? 'NodeBasePage', path: location.pathname })\n },\n [pathname, title, userEvents],\n )\n\n return (\n <WebAppPageRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant} {...props}>\n <Helmet title={title} />\n {container && container !== 'none'\n ? (\n <Container\n disableGutters={disableGutters}\n style={{\n alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start',\n }}\n maxWidth={container}\n >\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n </Container>\n )\n : (\n <WebAppBody\n disableBreadcrumbGutter={disableBreadcrumbGutter}\n breadcrumbs={breadcrumbs}\n mobileScrollingBreakpoint={mobileScrollingBreakpoint}\n paddingX={disableGutters ? 0 : 1}\n variant={variant}\n {...props}\n >\n {children}\n </WebAppBody>\n )}\n </WebAppPageRoot>\n )\n}\n\n/** @deprecated use WebAppPagePage instead */\nexport const FlexPage = WebAppPage\n","import { NotFound } from '@xyo-network/react-shared'\nimport React from 'react'\n\nimport type { WebAppPageProps } from '../Page.tsx'\nimport { WebAppPage } from '../Page.tsx'\n\nexport const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (\n <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>\n <NotFound />\n </WebAppPage>\n)\n\n/** @deprecated use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A;IACCpB;IACAI;IACAlB;IACAmC,UAAUtB,iBAAiB,IAAI;IAC/BZ;IACC,GAAGC;KAEHe,QAAAA,CAAAA;AAKf,GA1DwE;AA6DjE,IAAMmB,WAAWxB;;;AD3FjB,IAAMyB,kBAAkD,wBAAC,EAAEC,OAAO,GAAGC,MAAAA,MAC1E,gBAAAC,OAAA,cAACC,YAAAA;EAAWC,OAAM;EAA8B,GAAGH;GACjD,gBAAAC,OAAA,cAACG,MAAAA,MAAG,6BAAA,GACJ,gBAAAH,OAAA,cAACI,KAAAA,MAAG,GAAGN,KAAAA,EAAO,GACd,gBAAAE,OAAA,cAACK,UAAAA;EAASC,MAAK;EAAIC,SAAQ;GAAY,UAAA,CAAA,GAJoB;AAWxD,IAAMC,YAAYX;;;AErBzB,SAASY,gBAAgB;AACzB,OAAOC,YAAW;AAKX,IAAMC,qBAAgD,wBAAC,EAAEC,OAAO,GAAGC,MAAAA,MACxE,gBAAAC,OAAA,cAACC,YAAAA;EAAWH,OAAOA,SAAS;EAA0B,GAAGC;GACvD,gBAAAC,OAAA,cAACE,UAAAA,IAAAA,CAAAA,GAFwD;AAOtD,IAAMC,eAAeN;","names":["styled","FlexGrowCol","FlexRow","React","scrollableWrap","inset","position","fixedWrap","scrollableContent","fixedContent","WebAppBodyName","propsNotForwarded","Set","defaultStyledOptions","shouldForwardProp","prop","has","WebAppBodyRoot","styled","FlexGrowCol","name","slot","spacing","theme","mobileScrollingBreakpoint","variant","scrollable","unstable_sx","alignItems","gap","justifyContent","overflowX","overflowY","paddingY","breakpoints","down","WebAppBodyBreadcrumb","FlexRow","disableBreadcrumbGutter","marginX","WebAppBodyScrollableWrapper","WebAppBodyScrollable","props","scrollableContent","fixedContent","inset","position","WebAppBody","children","breadcrumbs","WebAppChrome","XyoApplicationAppBar","Footer","React","XyoWebAppChrome","ref","appbar","footer","footerElevation","navigationType","props","React","WebAppChrome","XyoApplicationAppBar","Footer","dynamicHeight","displayName","ButtonEx","React","Container","styled","useAsyncEffect","FlexGrowCol","useUserEvents","React","Helmet","useLocation","WebAppPageRoot","styled","FlexGrowCol","name","shouldForwardProp","propName","slot","theme","mobileScrollingBreakpoint","variant","props","scrollableWrap","fixedWrap","alignItems","justifyContent","maxWidth","breakpoints","down","inset","position","WebAppPage","disableGutters","disableBreadcrumbGutter","title","container","children","breadcrumbs","userEvents","useUserEvents","pathname","useLocation","useAsyncEffect","viewContent","path","location","React","Helmet","Container","style","display","flexDirection","flexGrow","WebAppBody","paddingX","FlexPage","WebAppErrorPage","error","props","React","WebAppPage","title","h1","p","ButtonEx","href","variant","ErrorPage","NotFound","React","WebAppNotFoundPage","title","props","React","WebAppPage","NotFound","NotFoundPage"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Breakpoint } from '@mui/material';
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface WebAppBodyProps extends FlexBoxProps {
|
|
6
|
+
breadcrumbs?: ReactNode;
|
|
7
|
+
disableBreadcrumbGutter?: boolean;
|
|
8
|
+
mobileScrollingBreakpoint?: Breakpoint;
|
|
9
|
+
spacing?: string | number;
|
|
10
|
+
variant?: 'scrollable' | 'fixed';
|
|
11
|
+
}
|
|
12
|
+
export declare const WebAppBody: React.FC<WebAppBodyProps>;
|
|
13
|
+
//# sourceMappingURL=Body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../src/components/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AA+DzB,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,yBAAyB,CAAC,EAAE,UAAU,CAAA;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAA;CACjC;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyBhD,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type WebAppChromeProps } from '@xylabs/react-webapp';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface XyoWebAppChromeProps extends WebAppChromeProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const XyoWebAppChrome: {
|
|
6
|
+
({ ref, appbar, footer, footerElevation, navigationType, ...props }: XyoWebAppChromeProps & {
|
|
7
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=Chrome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chrome.d.ts","sourceRoot":"","sources":["../../../src/components/Chrome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAG3E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;CAAG;AAElE,eAAO,MAAM,eAAe;yEAEzB,oBAAoB,GAAG;QAAE,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;KAAE;;CAWzE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WebAppPageProps } from './Page.tsx';
|
|
3
|
+
export interface WebAppErrorPageProps extends WebAppPageProps {
|
|
4
|
+
error?: Error;
|
|
5
|
+
}
|
|
6
|
+
export declare const WebAppErrorPage: React.FC<WebAppErrorPageProps>;
|
|
7
|
+
/** @deprecated use WebAppErrorPage instead */
|
|
8
|
+
export declare const ErrorPage: React.FC<WebAppErrorPageProps>;
|
|
9
|
+
//# sourceMappingURL=ErrorPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorPage.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAGjD,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAQ1D,CAAA;AAED,8CAA8C;AAC9C,eAAO,MAAM,SAAS,gCAAkB,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WebAppPageProps } from '../Page.tsx';
|
|
3
|
+
export declare const WebAppNotFoundPage: React.FC<WebAppPageProps>;
|
|
4
|
+
/** @deprecated use WebAppNotFoundPage instead */
|
|
5
|
+
export declare const NotFoundPage: React.FC<WebAppPageProps>;
|
|
6
|
+
//# sourceMappingURL=Page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../../src/components/NotFoundPage/Page.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGlD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAIxD,CAAA;AAED,kDAAkD;AAClD,eAAO,MAAM,YAAY,2BAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NotFoundPage/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContainerProps } from '@mui/material';
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
|
+
import type { PropsWithChildren } from 'react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { WebAppBodyProps } from './Body.tsx';
|
|
6
|
+
export interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {
|
|
7
|
+
container?: ContainerProps['maxWidth'] | 'none';
|
|
8
|
+
disableGutters?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>>;
|
|
11
|
+
/** @deprecated use WebAppPagePage instead */
|
|
12
|
+
export declare const FlexPage: React.FC<PropsWithChildren<WebAppPageProps>>;
|
|
13
|
+
//# sourceMappingURL=Page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../src/components/Page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAGnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAC9C,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAwBjD,MAAM,WAAW,eAAgB,SAAQ,eAAe,EAAE,YAAY;IACpE,SAAS,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,MAAM,CAAA;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA0DnE,CAAA;AAED,6CAA6C;AAC7C,eAAO,MAAM,QAAQ,8CAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
export declare const scrollableWrap: CSSProperties;
|
|
3
|
+
export declare const fixedWrap: CSSProperties;
|
|
4
|
+
export declare const scrollableContent: CSSProperties;
|
|
5
|
+
export declare const fixedContent: CSSProperties;
|
|
6
|
+
//# sourceMappingURL=cssValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssValues.d.ts","sourceRoot":"","sources":["../../../../src/components/lib/cssValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE1C,eAAO,MAAM,cAAc,EAAE,aAGnB,CAAA;AAEV,eAAO,MAAM,SAAS,EAAE,aAGd,CAAA;AAGV,eAAO,MAAM,iBAAiB,EAAE,aAAyC,CAAA;AAEzE,eAAO,MAAM,YAAY,EAAE,aAA8C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-webapp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-rc.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
30
|
"browser": {
|
|
31
|
-
"types": "./dist/
|
|
31
|
+
"types": "./dist/types/index.d.ts",
|
|
32
32
|
"default": "./dist/browser/index.mjs"
|
|
33
33
|
},
|
|
34
|
-
"types": "./dist/
|
|
34
|
+
"types": "./dist/types/index.d.ts",
|
|
35
35
|
"default": "./dist/browser/index.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./package.json": "./package.json"
|
|
@@ -43,37 +43,39 @@
|
|
|
43
43
|
"lint-pkg": "npmPkgJsonLint ."
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@mui/icons-material": "^6.4.
|
|
47
|
-
"@mui/material": "^6.4.
|
|
48
|
-
"@mui/styles": "^6.4.
|
|
49
|
-
"@xylabs/react-async-effect": "^
|
|
50
|
-
"@xylabs/react-button": "^
|
|
51
|
-
"@xylabs/react-flexbox": "^
|
|
52
|
-
"@xylabs/react-pixel": "^
|
|
53
|
-
"@xylabs/react-webapp": "^
|
|
54
|
-
"@xyo-network/react-appbar": "^
|
|
55
|
-
"@xyo-network/react-footer": "^
|
|
56
|
-
"@xyo-network/react-shared": "^
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
46
|
+
"@mui/icons-material": "^6.4.7",
|
|
47
|
+
"@mui/material": "^6.4.7",
|
|
48
|
+
"@mui/styles": "^6.4.7",
|
|
49
|
+
"@xylabs/react-async-effect": "^6.0.0-rc.2",
|
|
50
|
+
"@xylabs/react-button": "^6.0.0-rc.2",
|
|
51
|
+
"@xylabs/react-flexbox": "^6.0.0-rc.2",
|
|
52
|
+
"@xylabs/react-pixel": "^6.0.0-rc.2",
|
|
53
|
+
"@xylabs/react-webapp": "^6.0.0-rc.2",
|
|
54
|
+
"@xyo-network/react-appbar": "^5.0.0-rc.1",
|
|
55
|
+
"@xyo-network/react-footer": "^5.0.0-rc.1",
|
|
56
|
+
"@xyo-network/react-shared": "^5.0.0-rc.1",
|
|
57
|
+
"react": "^19.0.0",
|
|
58
|
+
"react-dom": "^19.0.0",
|
|
59
59
|
"react-helmet": "^6.1.0",
|
|
60
|
-
"react-router-dom": "^7.
|
|
60
|
+
"react-router-dom": "^7.3.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@storybook/react": "^8.6.
|
|
63
|
+
"@storybook/react": "^8.6.4",
|
|
64
|
+
"@types/react": "^19.0.10",
|
|
64
65
|
"@types/react-helmet": "^6.1.11",
|
|
65
|
-
"@xylabs/react-appbar": "^
|
|
66
|
-
"@xylabs/react-button": "^
|
|
67
|
-
"@xylabs/react-flexbox": "^
|
|
68
|
-
"@xylabs/react-link": "^
|
|
69
|
-
"@xylabs/react-pixel": "^
|
|
70
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
71
|
-
"@xylabs/tsconfig-react": "^
|
|
72
|
-
"storybook": "^8.6.
|
|
73
|
-
"typescript": "^5.
|
|
66
|
+
"@xylabs/react-appbar": "^6.0.0-rc.2",
|
|
67
|
+
"@xylabs/react-button": "^6.0.0-rc.2",
|
|
68
|
+
"@xylabs/react-flexbox": "^6.0.0-rc.2",
|
|
69
|
+
"@xylabs/react-link": "^6.0.0-rc.2",
|
|
70
|
+
"@xylabs/react-pixel": "^6.0.0-rc.2",
|
|
71
|
+
"@xylabs/ts-scripts-yarn3": "^6.0.3",
|
|
72
|
+
"@xylabs/tsconfig-react": "^6.0.3",
|
|
73
|
+
"storybook": "^8.6.4",
|
|
74
|
+
"typescript": "^5.8.2"
|
|
74
75
|
},
|
|
75
76
|
"publishConfig": {
|
|
76
77
|
"access": "public"
|
|
77
78
|
},
|
|
78
|
-
"docs": "dist/docs.json"
|
|
79
|
+
"docs": "dist/docs.json",
|
|
80
|
+
"stableVersion": "4.4.11"
|
|
79
81
|
}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { WebAppChrome, type WebAppChromeProps } from '@xylabs/react-webapp'
|
|
2
2
|
import { XyoApplicationAppBar } from '@xyo-network/react-appbar'
|
|
3
3
|
import { Footer } from '@xyo-network/react-footer'
|
|
4
|
-
import React
|
|
4
|
+
import React from 'react'
|
|
5
5
|
|
|
6
6
|
export interface XyoWebAppChromeProps extends WebAppChromeProps {}
|
|
7
7
|
|
|
8
|
-
export const XyoWebAppChrome =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
)
|
|
8
|
+
export const XyoWebAppChrome = ({
|
|
9
|
+
ref, appbar, footer, footerElevation = 4, navigationType = 'menu', ...props
|
|
10
|
+
}: XyoWebAppChromeProps & { ref?: React.RefObject<HTMLDivElement | null> }) => {
|
|
11
|
+
return (
|
|
12
|
+
<WebAppChrome
|
|
13
|
+
ref={ref}
|
|
14
|
+
appbar={appbar ?? <XyoApplicationAppBar />}
|
|
15
|
+
footerElevation={footerElevation}
|
|
16
|
+
navigationType={navigationType}
|
|
17
|
+
footer={footer ?? <Footer dynamicHeight />}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
)
|
|
21
|
+
}
|
|
24
22
|
|
|
25
23
|
XyoWebAppChrome.displayName = 'XyoWebAppChrome'
|
package/dist/browser/index.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Breakpoint, ContainerProps } from '@mui/material';
|
|
2
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
|
-
import React, { ReactNode, PropsWithChildren } from 'react';
|
|
4
|
-
import { WebAppChromeProps } from '@xylabs/react-webapp';
|
|
5
|
-
|
|
6
|
-
interface WebAppBodyProps extends FlexBoxProps {
|
|
7
|
-
breadcrumbs?: ReactNode;
|
|
8
|
-
disableBreadcrumbGutter?: boolean;
|
|
9
|
-
mobileScrollingBreakpoint?: Breakpoint;
|
|
10
|
-
spacing?: string | number;
|
|
11
|
-
variant?: 'scrollable' | 'fixed';
|
|
12
|
-
}
|
|
13
|
-
declare const WebAppBody: React.FC<WebAppBodyProps>;
|
|
14
|
-
|
|
15
|
-
interface XyoWebAppChromeProps extends WebAppChromeProps {
|
|
16
|
-
}
|
|
17
|
-
declare const XyoWebAppChrome: React.ForwardRefExoticComponent<XyoWebAppChromeProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
|
|
19
|
-
interface WebAppPageProps extends WebAppBodyProps, FlexBoxProps {
|
|
20
|
-
container?: ContainerProps['maxWidth'] | 'none';
|
|
21
|
-
disableGutters?: boolean;
|
|
22
|
-
}
|
|
23
|
-
declare const WebAppPage: React.FC<PropsWithChildren<WebAppPageProps>>;
|
|
24
|
-
declare const FlexPage: React.FC<PropsWithChildren<WebAppPageProps>>;
|
|
25
|
-
|
|
26
|
-
interface WebAppErrorPageProps extends WebAppPageProps {
|
|
27
|
-
error?: Error;
|
|
28
|
-
}
|
|
29
|
-
declare const WebAppErrorPage: React.FC<WebAppErrorPageProps>;
|
|
30
|
-
declare const ErrorPage: React.FC<WebAppErrorPageProps>;
|
|
31
|
-
|
|
32
|
-
declare const WebAppNotFoundPage: React.FC<WebAppPageProps>;
|
|
33
|
-
declare const NotFoundPage: React.FC<WebAppPageProps>;
|
|
34
|
-
|
|
35
|
-
export { ErrorPage, FlexPage, NotFoundPage, WebAppBody, type WebAppBodyProps, WebAppErrorPage, type WebAppErrorPageProps, WebAppNotFoundPage, WebAppPage, type WebAppPageProps, XyoWebAppChrome, type XyoWebAppChromeProps };
|