@xyo-network/react-webapp 2.81.10 → 2.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/browser/components/Body.d.cts.map +1 -1
  2. package/dist/browser/components/Body.d.mts.map +1 -1
  3. package/dist/browser/components/Body.d.ts.map +1 -1
  4. package/dist/browser/components/Chrome.d.cts +2 -2
  5. package/dist/browser/components/Chrome.d.cts.map +1 -1
  6. package/dist/browser/components/Chrome.d.mts +2 -2
  7. package/dist/browser/components/Chrome.d.mts.map +1 -1
  8. package/dist/browser/components/Chrome.d.ts +2 -2
  9. package/dist/browser/components/Chrome.d.ts.map +1 -1
  10. package/dist/browser/components/ErrorPage.d.cts +3 -2
  11. package/dist/browser/components/ErrorPage.d.cts.map +1 -1
  12. package/dist/browser/components/ErrorPage.d.mts +3 -2
  13. package/dist/browser/components/ErrorPage.d.mts.map +1 -1
  14. package/dist/browser/components/ErrorPage.d.ts +3 -2
  15. package/dist/browser/components/ErrorPage.d.ts.map +1 -1
  16. package/dist/browser/components/NotFoundPage/Page.d.cts +3 -2
  17. package/dist/browser/components/NotFoundPage/Page.d.cts.map +1 -1
  18. package/dist/browser/components/NotFoundPage/Page.d.mts +3 -2
  19. package/dist/browser/components/NotFoundPage/Page.d.mts.map +1 -1
  20. package/dist/browser/components/NotFoundPage/Page.d.ts +3 -2
  21. package/dist/browser/components/NotFoundPage/Page.d.ts.map +1 -1
  22. package/dist/browser/components/NotFoundPage/index.d.cts +1 -1
  23. package/dist/browser/components/NotFoundPage/index.d.cts.map +1 -1
  24. package/dist/browser/components/NotFoundPage/index.d.mts +1 -1
  25. package/dist/browser/components/NotFoundPage/index.d.mts.map +1 -1
  26. package/dist/browser/components/NotFoundPage/index.d.ts +1 -1
  27. package/dist/browser/components/NotFoundPage/index.d.ts.map +1 -1
  28. package/dist/browser/components/Page.d.cts +3 -2
  29. package/dist/browser/components/Page.d.cts.map +1 -1
  30. package/dist/browser/components/Page.d.mts +3 -2
  31. package/dist/browser/components/Page.d.mts.map +1 -1
  32. package/dist/browser/components/Page.d.ts +3 -2
  33. package/dist/browser/components/Page.d.ts.map +1 -1
  34. package/dist/browser/components/index.d.cts +5 -5
  35. package/dist/browser/components/index.d.cts.map +1 -1
  36. package/dist/browser/components/index.d.mts +5 -5
  37. package/dist/browser/components/index.d.mts.map +1 -1
  38. package/dist/browser/components/index.d.ts +5 -5
  39. package/dist/browser/components/index.d.ts.map +1 -1
  40. package/dist/browser/components/lib/index.d.cts +1 -1
  41. package/dist/browser/components/lib/index.d.mts +1 -1
  42. package/dist/browser/components/lib/index.d.ts +1 -1
  43. package/dist/browser/index.cjs +138 -110
  44. package/dist/browser/index.cjs.map +1 -1
  45. package/dist/browser/index.d.cts +1 -1
  46. package/dist/browser/index.d.mts +1 -1
  47. package/dist/browser/index.d.ts +1 -1
  48. package/dist/browser/index.mjs +258 -0
  49. package/dist/browser/index.mjs.map +1 -0
  50. package/dist/neutral/components/Body.d.cts.map +1 -1
  51. package/dist/neutral/components/Body.d.mts.map +1 -1
  52. package/dist/neutral/components/Body.d.ts.map +1 -1
  53. package/dist/neutral/components/Chrome.d.cts +2 -2
  54. package/dist/neutral/components/Chrome.d.cts.map +1 -1
  55. package/dist/neutral/components/Chrome.d.mts +2 -2
  56. package/dist/neutral/components/Chrome.d.mts.map +1 -1
  57. package/dist/neutral/components/Chrome.d.ts +2 -2
  58. package/dist/neutral/components/Chrome.d.ts.map +1 -1
  59. package/dist/neutral/components/ErrorPage.d.cts +3 -2
  60. package/dist/neutral/components/ErrorPage.d.cts.map +1 -1
  61. package/dist/neutral/components/ErrorPage.d.mts +3 -2
  62. package/dist/neutral/components/ErrorPage.d.mts.map +1 -1
  63. package/dist/neutral/components/ErrorPage.d.ts +3 -2
  64. package/dist/neutral/components/ErrorPage.d.ts.map +1 -1
  65. package/dist/neutral/components/NotFoundPage/Page.d.cts +3 -2
  66. package/dist/neutral/components/NotFoundPage/Page.d.cts.map +1 -1
  67. package/dist/neutral/components/NotFoundPage/Page.d.mts +3 -2
  68. package/dist/neutral/components/NotFoundPage/Page.d.mts.map +1 -1
  69. package/dist/neutral/components/NotFoundPage/Page.d.ts +3 -2
  70. package/dist/neutral/components/NotFoundPage/Page.d.ts.map +1 -1
  71. package/dist/neutral/components/NotFoundPage/index.d.cts +1 -1
  72. package/dist/neutral/components/NotFoundPage/index.d.cts.map +1 -1
  73. package/dist/neutral/components/NotFoundPage/index.d.mts +1 -1
  74. package/dist/neutral/components/NotFoundPage/index.d.mts.map +1 -1
  75. package/dist/neutral/components/NotFoundPage/index.d.ts +1 -1
  76. package/dist/neutral/components/NotFoundPage/index.d.ts.map +1 -1
  77. package/dist/neutral/components/Page.d.cts +3 -2
  78. package/dist/neutral/components/Page.d.cts.map +1 -1
  79. package/dist/neutral/components/Page.d.mts +3 -2
  80. package/dist/neutral/components/Page.d.mts.map +1 -1
  81. package/dist/neutral/components/Page.d.ts +3 -2
  82. package/dist/neutral/components/Page.d.ts.map +1 -1
  83. package/dist/neutral/components/index.d.cts +5 -5
  84. package/dist/neutral/components/index.d.cts.map +1 -1
  85. package/dist/neutral/components/index.d.mts +5 -5
  86. package/dist/neutral/components/index.d.mts.map +1 -1
  87. package/dist/neutral/components/index.d.ts +5 -5
  88. package/dist/neutral/components/index.d.ts.map +1 -1
  89. package/dist/neutral/components/lib/index.d.cts +1 -1
  90. package/dist/neutral/components/lib/index.d.mts +1 -1
  91. package/dist/neutral/components/lib/index.d.ts +1 -1
  92. package/dist/neutral/index.cjs +138 -110
  93. package/dist/neutral/index.cjs.map +1 -1
  94. package/dist/neutral/index.d.cts +1 -1
  95. package/dist/neutral/index.d.mts +1 -1
  96. package/dist/neutral/index.d.ts +1 -1
  97. package/dist/neutral/index.mjs +258 -0
  98. package/dist/neutral/index.mjs.map +1 -0
  99. package/dist/node/components/Body.d.cts.map +1 -1
  100. package/dist/node/components/Body.d.mts.map +1 -1
  101. package/dist/node/components/Body.d.ts.map +1 -1
  102. package/dist/node/components/Chrome.d.cts +2 -2
  103. package/dist/node/components/Chrome.d.cts.map +1 -1
  104. package/dist/node/components/Chrome.d.mts +2 -2
  105. package/dist/node/components/Chrome.d.mts.map +1 -1
  106. package/dist/node/components/Chrome.d.ts +2 -2
  107. package/dist/node/components/Chrome.d.ts.map +1 -1
  108. package/dist/node/components/ErrorPage.d.cts +3 -2
  109. package/dist/node/components/ErrorPage.d.cts.map +1 -1
  110. package/dist/node/components/ErrorPage.d.mts +3 -2
  111. package/dist/node/components/ErrorPage.d.mts.map +1 -1
  112. package/dist/node/components/ErrorPage.d.ts +3 -2
  113. package/dist/node/components/ErrorPage.d.ts.map +1 -1
  114. package/dist/node/components/NotFoundPage/Page.d.cts +3 -2
  115. package/dist/node/components/NotFoundPage/Page.d.cts.map +1 -1
  116. package/dist/node/components/NotFoundPage/Page.d.mts +3 -2
  117. package/dist/node/components/NotFoundPage/Page.d.mts.map +1 -1
  118. package/dist/node/components/NotFoundPage/Page.d.ts +3 -2
  119. package/dist/node/components/NotFoundPage/Page.d.ts.map +1 -1
  120. package/dist/node/components/NotFoundPage/index.d.cts +1 -1
  121. package/dist/node/components/NotFoundPage/index.d.cts.map +1 -1
  122. package/dist/node/components/NotFoundPage/index.d.mts +1 -1
  123. package/dist/node/components/NotFoundPage/index.d.mts.map +1 -1
  124. package/dist/node/components/NotFoundPage/index.d.ts +1 -1
  125. package/dist/node/components/NotFoundPage/index.d.ts.map +1 -1
  126. package/dist/node/components/Page.d.cts +3 -2
  127. package/dist/node/components/Page.d.cts.map +1 -1
  128. package/dist/node/components/Page.d.mts +3 -2
  129. package/dist/node/components/Page.d.mts.map +1 -1
  130. package/dist/node/components/Page.d.ts +3 -2
  131. package/dist/node/components/Page.d.ts.map +1 -1
  132. package/dist/node/components/index.d.cts +5 -5
  133. package/dist/node/components/index.d.cts.map +1 -1
  134. package/dist/node/components/index.d.mts +5 -5
  135. package/dist/node/components/index.d.mts.map +1 -1
  136. package/dist/node/components/index.d.ts +5 -5
  137. package/dist/node/components/index.d.ts.map +1 -1
  138. package/dist/node/components/lib/index.d.cts +1 -1
  139. package/dist/node/components/lib/index.d.mts +1 -1
  140. package/dist/node/components/lib/index.d.ts +1 -1
  141. package/dist/node/index.cjs +138 -110
  142. package/dist/node/index.cjs.map +1 -1
  143. package/dist/node/index.d.cts +1 -1
  144. package/dist/node/index.d.mts +1 -1
  145. package/dist/node/index.d.ts +1 -1
  146. package/dist/node/index.mjs +258 -0
  147. package/dist/node/index.mjs.map +1 -0
  148. package/package.json +26 -26
  149. package/src/components/Body.tsx +8 -6
  150. package/src/components/Chrome.stories.tsx +10 -10
  151. package/src/components/Chrome.tsx +21 -17
  152. package/src/components/ErrorPage.tsx +2 -1
  153. package/src/components/NotFoundPage/Page.stories.tsx +1 -1
  154. package/src/components/NotFoundPage/Page.tsx +2 -1
  155. package/src/components/NotFoundPage/index.ts +1 -1
  156. package/src/components/Page.tsx +34 -31
  157. package/src/components/index.ts +5 -5
  158. package/src/components/lib/index.ts +1 -1
  159. package/src/index.ts +1 -1
  160. package/dist/browser/index.js +0 -238
  161. package/dist/browser/index.js.map +0 -1
  162. package/dist/neutral/index.js +0 -238
  163. package/dist/neutral/index.js.map +0 -1
  164. package/dist/node/index.js +0 -238
  165. package/dist/node/index.js.map +0 -1
@@ -0,0 +1,258 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/components/Body.tsx
5
+ import { styled } from "@mui/material";
6
+ import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
7
+ import React from "react";
8
+
9
+ // src/components/lib/cssValues.ts
10
+ var scrollableWrap = {
11
+ inset: 0,
12
+ position: "absolute"
13
+ };
14
+ var fixedWrap = {
15
+ inset: "unset",
16
+ position: "relative"
17
+ };
18
+ var scrollableContent = {
19
+ ...fixedWrap
20
+ };
21
+ var fixedContent = {
22
+ ...scrollableWrap
23
+ };
24
+
25
+ // src/components/Body.tsx
26
+ var WebAppBodyName = "WebAppBody";
27
+ var propsNotForwarded = /* @__PURE__ */ new Set([
28
+ "mobileScrollingBreakpoint",
29
+ "variant",
30
+ "spacing",
31
+ "disableBreadcrumbGutter"
32
+ ]);
33
+ var defaultStyledOptions = {
34
+ shouldForwardProp: /* @__PURE__ */ __name((prop) => !propsNotForwarded.has(prop), "shouldForwardProp")
35
+ };
36
+ var WebAppBodyRoot = styled(FlexGrowCol, {
37
+ ...defaultStyledOptions,
38
+ name: WebAppBodyName,
39
+ slot: "Root"
40
+ })(({ spacing, theme, mobileScrollingBreakpoint = "sm", variant }) => {
41
+ const scrollable = variant === "scrollable";
42
+ return theme.unstable_sx({
43
+ alignItems: "stretch",
44
+ gap: 1,
45
+ justifyContent: "flex-start",
46
+ overflowX: "visible",
47
+ overflowY: scrollable ? "scroll" : "hidden",
48
+ paddingY: spacing,
49
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
50
+ overflowY: "scroll"
51
+ }
52
+ });
53
+ });
54
+ var WebAppBodyBreadcrumb = styled(FlexRow, {
55
+ ...defaultStyledOptions,
56
+ name: WebAppBodyName,
57
+ slot: "Breadcrumb"
58
+ })(({ theme, disableBreadcrumbGutter, spacing }) => theme.unstable_sx({
59
+ justifyContent: "start",
60
+ marginX: disableBreadcrumbGutter ? 0 : spacing
61
+ }));
62
+ var WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
63
+ name: WebAppBodyName,
64
+ slot: "ScrollableWrapper"
65
+ })(() => ({
66
+ alignItems: "stretch"
67
+ }));
68
+ var WebAppBodyScrollable = styled(FlexGrowCol, {
69
+ ...defaultStyledOptions,
70
+ name: WebAppBodyName,
71
+ slot: "Scrollable"
72
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
73
+ const props = variant === "scrollable" ? scrollableContent : fixedContent;
74
+ return {
75
+ ...props,
76
+ alignItems: "stretch",
77
+ justifyContent: "start",
78
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
79
+ inset: "unset",
80
+ position: "relative"
81
+ }
82
+ };
83
+ });
84
+ var WebAppBody = /* @__PURE__ */ __name(({ children, breadcrumbs, disableBreadcrumbGutter, mobileScrollingBreakpoint, spacing = 1, variant, ...props }) => {
85
+ return /* @__PURE__ */ React.createElement(WebAppBodyRoot, {
86
+ mobileScrollingBreakpoint,
87
+ spacing,
88
+ variant,
89
+ ...props
90
+ }, breadcrumbs ? /* @__PURE__ */ React.createElement(WebAppBodyBreadcrumb, {
91
+ disableBreadcrumbGutter,
92
+ spacing
93
+ }, breadcrumbs) : null, /* @__PURE__ */ React.createElement(WebAppBodyScrollableWrapper, null, /* @__PURE__ */ React.createElement(WebAppBodyScrollable, {
94
+ mobileScrollingBreakpoint,
95
+ variant
96
+ }, children)));
97
+ }, "WebAppBody");
98
+
99
+ // src/components/Chrome.tsx
100
+ import { Divider, Paper } from "@mui/material";
101
+ import { FlexCol, FlexGrowCol as FlexGrowCol3, FlexGrowRow } from "@xylabs/react-flexbox";
102
+ import { ApplicationAppBar, SystemToolbar } from "@xyo-network/react-appbar";
103
+ import { Footer } from "@xyo-network/react-footer";
104
+ import { ErrorBoundary } from "@xyo-network/react-shared";
105
+ import React4, { forwardRef } from "react";
106
+ import { Helmet as Helmet2 } from "react-helmet";
107
+
108
+ // src/components/ErrorPage.tsx
109
+ import { ButtonEx } from "@xylabs/react-button";
110
+ import React3 from "react";
111
+
112
+ // src/components/Page.tsx
113
+ import { Container, styled as styled2 } from "@mui/material";
114
+ import { useAsyncEffect } from "@xylabs/react-async-effect";
115
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
116
+ import { useUserEvents } from "@xylabs/react-pixel";
117
+ import React2 from "react";
118
+ import { Helmet } from "react-helmet";
119
+ import { useLocation } from "react-router-dom";
120
+ var WebAppPageRoot = styled2(FlexGrowCol2, {
121
+ name: "WebAppPage",
122
+ shouldForwardProp: /* @__PURE__ */ __name((propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant", "shouldForwardProp"),
123
+ slot: "Root"
124
+ })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
125
+ const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
126
+ return {
127
+ ...props,
128
+ alignItems: "stretch",
129
+ justifyContent: "start",
130
+ maxWidth: "100vw",
131
+ [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
132
+ inset: 0,
133
+ position: "absolute"
134
+ }
135
+ };
136
+ });
137
+ var WebAppPage = /* @__PURE__ */ __name(({ disableGutters, disableBreadcrumbGutter, title, container, children, breadcrumbs, mobileScrollingBreakpoint, variant = "scrollable", ...props }) => {
138
+ const userEvents = useUserEvents();
139
+ const { pathname } = useLocation();
140
+ useAsyncEffect(async () => {
141
+ await (userEvents == null ? void 0 : userEvents.viewContent({
142
+ name: title ?? "NodeBasePage",
143
+ path: location.pathname
144
+ }));
145
+ }, [
146
+ pathname,
147
+ title,
148
+ userEvents
149
+ ]);
150
+ return /* @__PURE__ */ React2.createElement(WebAppPageRoot, {
151
+ mobileScrollingBreakpoint,
152
+ variant,
153
+ ...props
154
+ }, /* @__PURE__ */ React2.createElement(Helmet, {
155
+ title
156
+ }), container && container !== "none" ? /* @__PURE__ */ React2.createElement(Container, {
157
+ disableGutters,
158
+ style: {
159
+ alignItems: "stretch",
160
+ display: "flex",
161
+ flexDirection: "column",
162
+ flexGrow: 1,
163
+ justifyContent: "flex-start"
164
+ },
165
+ maxWidth: container
166
+ }, /* @__PURE__ */ React2.createElement(WebAppBody, {
167
+ disableBreadcrumbGutter,
168
+ breadcrumbs,
169
+ mobileScrollingBreakpoint,
170
+ variant,
171
+ ...props
172
+ }, children)) : /* @__PURE__ */ React2.createElement(WebAppBody, {
173
+ disableBreadcrumbGutter,
174
+ breadcrumbs,
175
+ mobileScrollingBreakpoint,
176
+ paddingX: disableGutters ? 0 : 1,
177
+ variant,
178
+ ...props
179
+ }, children));
180
+ }, "WebAppPage");
181
+ var FlexPage = WebAppPage;
182
+
183
+ // src/components/ErrorPage.tsx
184
+ var WebAppErrorPage = /* @__PURE__ */ __name(({ error, ...props }) => /* @__PURE__ */ React3.createElement(WebAppPage, {
185
+ title: "Oops! Something went wrong",
186
+ ...props
187
+ }, /* @__PURE__ */ React3.createElement("h1", null, "Oops! Something went wrong!"), /* @__PURE__ */ React3.createElement("p", null, `${error}`), /* @__PURE__ */ React3.createElement(ButtonEx, {
188
+ href: "/",
189
+ variant: "contained"
190
+ }, "Homepage")), "WebAppErrorPage");
191
+ var ErrorPage = WebAppErrorPage;
192
+
193
+ // src/components/Chrome.tsx
194
+ var WebAppChrome = /* @__PURE__ */ forwardRef(({ appName, appbar, children, errorBoundary, errorPage, footer, footerElevation = 4, menuItems, navigationType = "menu", ...props }, ref) => {
195
+ return /* @__PURE__ */ React4.createElement(FlexCol, {
196
+ id: "web-chrome-flex",
197
+ alignItems: "stretch",
198
+ overflow: "hidden",
199
+ height: "100vh",
200
+ ref,
201
+ ...props
202
+ }, /* @__PURE__ */ React4.createElement(Helmet2, {
203
+ defaultTitle: appName,
204
+ titleTemplate: `%s | ${appName}`
205
+ }, /* @__PURE__ */ React4.createElement("meta", {
206
+ content: "website",
207
+ property: "og:type"
208
+ })), appbar ?? /* @__PURE__ */ React4.createElement(ApplicationAppBar, {
209
+ systemToolbar: /* @__PURE__ */ React4.createElement(SystemToolbar, {
210
+ menuItems: navigationType === "menu" ? menuItems : void 0
211
+ })
212
+ }), /* @__PURE__ */ React4.createElement(FlexGrowRow, {
213
+ id: "sidebar-nav-flex",
214
+ overflow: "hidden",
215
+ alignItems: "stretch"
216
+ }, navigationType === "menu" ? null : /* @__PURE__ */ React4.createElement(React4.Fragment, null, menuItems, /* @__PURE__ */ React4.createElement(Divider, {
217
+ orientation: "vertical"
218
+ })), /* @__PURE__ */ React4.createElement(FlexGrowCol3, {
219
+ id: "main-flex",
220
+ justifyContent: "flex-start",
221
+ alignItems: "stretch"
222
+ }, errorBoundary ? /* @__PURE__ */ React4.createElement(ErrorBoundary, {
223
+ fallbackWithError: /* @__PURE__ */ __name((error) => {
224
+ return errorPage ?? /* @__PURE__ */ React4.createElement(WebAppErrorPage, {
225
+ error
226
+ });
227
+ }, "fallbackWithError")
228
+ }, children) : children)), /* @__PURE__ */ React4.createElement(FlexCol, {
229
+ id: "footer-flex",
230
+ alignItems: "stretch"
231
+ }, /* @__PURE__ */ React4.createElement(Paper, {
232
+ elevation: footerElevation,
233
+ square: true
234
+ }, footer ?? /* @__PURE__ */ React4.createElement(Footer, {
235
+ dynamicHeight: true
236
+ }))));
237
+ });
238
+ WebAppChrome.displayName = "WebAppChrome";
239
+
240
+ // src/components/NotFoundPage/Page.tsx
241
+ import { NotFound } from "@xyo-network/react-shared";
242
+ import React5 from "react";
243
+ var WebAppNotFoundPage = /* @__PURE__ */ __name(({ title, ...props }) => /* @__PURE__ */ React5.createElement(WebAppPage, {
244
+ title: title ?? "Sorry! Page Not Found",
245
+ ...props
246
+ }, /* @__PURE__ */ React5.createElement(NotFound, null)), "WebAppNotFoundPage");
247
+ var NotFoundPage = WebAppNotFoundPage;
248
+ export {
249
+ ErrorPage,
250
+ FlexPage,
251
+ NotFoundPage,
252
+ WebAppBody,
253
+ WebAppChrome,
254
+ WebAppErrorPage,
255
+ WebAppNotFoundPage,
256
+ WebAppPage
257
+ };
258
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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 { Breakpoint, styled } from '@mui/material'\nimport { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'\nimport React, { ReactNode } from 'react'\n\nimport { fixedContent, scrollableContent } from './lib/index.ts'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.has(prop),\n}\n\nconst WebAppBodyRoot = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Root',\n})<WebAppBodyProps>(({ spacing, theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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)]: {\n overflowY: 'scroll',\n },\n })\n})\n\nconst WebAppBodyBreadcrumb = styled(FlexRow, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Breadcrumb',\n})<WebAppBodyProps>(({ theme, disableBreadcrumbGutter, spacing }) =>\n theme.unstable_sx({\n justifyContent: 'start',\n marginX: disableBreadcrumbGutter ? 0 : spacing,\n }),\n)\n\nconst WebAppBodyScrollableWrapper = styled(FlexGrowCol, {\n name: WebAppBodyName,\n slot: 'ScrollableWrapper',\n})<WebAppBodyProps>(() => ({\n alignItems: 'stretch',\n}))\n\nconst WebAppBodyScrollable = styled(FlexGrowCol, {\n ...defaultStyledOptions,\n name: WebAppBodyName,\n slot: 'Scrollable',\n})<WebAppBodyProps>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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 { 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 = {\n ...fixedWrap,\n} as const\n\nexport const fixedContent: CSSProperties = {\n ...scrollableWrap,\n} as const\n","import { Divider, Paper } from '@mui/material'\nimport { FlexBoxProps, FlexCol, FlexGrowCol, FlexGrowRow } from '@xylabs/react-flexbox'\nimport { WebAppNavigationType } from '@xyo-network/react-app-settings'\nimport { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar'\nimport { Footer } from '@xyo-network/react-footer'\nimport { ErrorBoundary } from '@xyo-network/react-shared'\nimport React, { forwardRef, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage.tsx'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\n errorBoundary?: boolean\n errorPage?: ReactNode\n footer?: ReactNode\n footerElevation?: number\n menuItems?: ReactNode\n navigationType?: WebAppNavigationType\n}\n\nexport const WebAppChrome = forwardRef<HTMLDivElement, WebAppChromeProps>(\n ({ appName, appbar, children, errorBoundary, errorPage, footer, footerElevation = 4, menuItems, navigationType = 'menu', ...props }, ref) => {\n return (\n <FlexCol id=\"web-chrome-flex\" alignItems=\"stretch\" overflow=\"hidden\" height=\"100vh\" ref={ref} {...props}>\n <Helmet defaultTitle={appName} titleTemplate={`%s | ${appName}`}>\n <meta content=\"website\" property=\"og:type\" />\n </Helmet>\n {appbar ?? <ApplicationAppBar systemToolbar={<SystemToolbar menuItems={navigationType === 'menu' ? menuItems : undefined} />} />}\n <FlexGrowRow id=\"sidebar-nav-flex\" overflow=\"hidden\" alignItems=\"stretch\">\n {navigationType === 'menu'\n ? null\n : (\n <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n )}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n {errorBoundary\n ? (\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\n )\n : children}\n </FlexGrowCol>\n </FlexGrowRow>\n <FlexCol id=\"footer-flex\" alignItems=\"stretch\">\n <Paper elevation={footerElevation} square>\n {footer ?? <Footer dynamicHeight />}\n </Paper>\n </FlexCol>\n </FlexCol>\n )\n },\n)\n\nWebAppChrome.displayName = 'WebAppChrome'\n","import { ButtonEx } from '@xylabs/react-button'\nimport React from 'react'\n\nimport { WebAppPage, WebAppPageProps } 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 { Container, ContainerProps, styled } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexBoxProps, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useUserEvents } from '@xylabs/react-pixel'\nimport { WithChildren } from '@xylabs/react-shared'\nimport React from 'react'\nimport { Helmet } from 'react-helmet'\nimport { useLocation } from 'react-router-dom'\n\nimport { WebAppBody, WebAppBodyProps } 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>(({ theme, mobileScrollingBreakpoint = 'sm', variant }) => {\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<WithChildren<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={{ alignItems: 'stretch', display: 'flex', flexDirection: 'column', flexGrow: 1, justifyContent: 'flex-start' }}\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 { WebAppPage, WebAppPageProps } 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":";;;;AAAA,SAAqBA,cAAc;AACnC,SAAuBC,aAAaC,eAAe;AACnD,OAAOC,WAA0B;;;ACA1B,IAAMC,iBAAgC;EAC3CC,OAAO;EACPC,UAAU;AACZ;AAEO,IAAMC,YAA2B;EACtCF,OAAO;EACPC,UAAU;AACZ;AAGO,IAAME,oBAAmC;EAC9C,GAAGD;AACL;AAEO,IAAME,eAA8B;EACzC,GAAGL;AACL;;;ADbA,IAAMM,iBAAiB;AACvB,IAAMC,oBAAoB,oBAAIC,IAAI;EAAC;EAA6B;EAAW;EAAW;CAA0B;AAChH,IAAMC,uBAAuB;EAC3BC,mBAAmB,wBAACC,SAAiB,CAACJ,kBAAkBK,IAAID,IAAAA,GAAzC;AACrB;AAEA,IAAME,iBAAiBC,OAAOC,aAAa;EACzC,GAAGN;EACHO,MAAMV;EACNW,MAAM;AACR,CAAA,EAAoB,CAAC,EAAEC,SAASC,OAAOC,4BAA4B,MAAMC,QAAO,MAAE;AAChF,QAAMC,aAAaD,YAAY;AAC/B,SAAOF,MAAMI,YAAY;IACvBC,YAAY;IACZC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AAA,cAACc,eAAAA;MAAclB,WAAWC,mBAAmB,SAASD,YAAYmB;;MAC/G,gBAAAf,OAAA,cAACgB,aAAAA;IAAYd,IAAG;IAAmBE,UAAS;IAASD,YAAW;KAC7DN,mBAAmB,SAChB,OAEE,gBAAAG,OAAA,cAAAA,OAAA,UAAA,MACGJ,WACD,gBAAAI,OAAA,cAACiB,SAAAA;IAAQC,aAAY;OAG7B,gBAAAlB,OAAA,cAACmB,cAAAA;IAAYjB,IAAG;IAAYkB,gBAAe;IAAajB,YAAW;KAChEX,gBAEK,gBAAAQ,OAAA,cAACqB,eAAAA;IACCC,mBAAmB,wBAACC,UAAAA;AAClB,aAAO9B,aAAa,gBAAAO,OAAA,cAACwB,iBAAAA;QAAgBD;;IACvC,GAFmB;KAIlBhC,QAAAA,IAGLA,QAAAA,CAAAA,GAGR,gBAAAS,OAAA,cAACC,SAAAA;IAAQC,IAAG;IAAcC,YAAW;KACnC,gBAAAH,OAAA,cAACyB,OAAAA;IAAMC,WAAW/B;IAAiBgC,QAAAA;KAChCjC,UAAU,gBAAAM,OAAA,cAAC4B,QAAAA;IAAOC,eAAAA;;AAK7B,CAAA;AAGF1C,aAAa2C,cAAc;;;AG/D3B,SAASC,gBAAgB;AACzB,OAAOC,YAAW;AAIX,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","Divider","Paper","FlexCol","FlexGrowCol","FlexGrowRow","ApplicationAppBar","SystemToolbar","Footer","ErrorBoundary","React","forwardRef","Helmet","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","WebAppChrome","forwardRef","appName","appbar","children","errorBoundary","errorPage","footer","footerElevation","menuItems","navigationType","props","ref","React","FlexCol","id","alignItems","overflow","height","Helmet","defaultTitle","titleTemplate","meta","content","property","ApplicationAppBar","systemToolbar","SystemToolbar","undefined","FlexGrowRow","Divider","orientation","FlexGrowCol","justifyContent","ErrorBoundary","fallbackWithError","error","WebAppErrorPage","Paper","elevation","square","Footer","dynamicHeight","displayName","NotFound","React","WebAppNotFoundPage","title","props","React","WebAppPage","NotFound","NotFoundPage"]}
package/package.json CHANGED
@@ -10,34 +10,34 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@mui/icons-material": "^5.16.5",
14
- "@mui/material": "^5.16.5",
15
- "@mui/styles": "^5.16.5",
16
- "@xylabs/react-async-effect": "^3.4.1",
17
- "@xylabs/react-button": "^3.4.1",
18
- "@xylabs/react-flexbox": "^3.4.1",
19
- "@xylabs/react-pixel": "^3.4.1",
20
- "@xylabs/react-shared": "^3.4.1",
21
- "@xyo-network/react-app-settings": "^2.81.10",
22
- "@xyo-network/react-appbar": "^2.81.10",
23
- "@xyo-network/react-footer": "^2.81.10",
24
- "@xyo-network/react-shared": "^2.81.10",
13
+ "@mui/icons-material": "^5.16.6",
14
+ "@mui/material": "^5.16.6",
15
+ "@mui/styles": "^5.16.6",
16
+ "@xylabs/react-async-effect": "^3.4.2",
17
+ "@xylabs/react-button": "^3.4.2",
18
+ "@xylabs/react-flexbox": "^3.4.2",
19
+ "@xylabs/react-pixel": "^3.4.2",
20
+ "@xylabs/react-shared": "^3.4.2",
21
+ "@xyo-network/react-app-settings": "^2.82.0",
22
+ "@xyo-network/react-appbar": "^2.82.0",
23
+ "@xyo-network/react-footer": "^2.82.0",
24
+ "@xyo-network/react-shared": "^2.82.0",
25
25
  "react": "^18.3.1",
26
26
  "react-dom": "^18.3.1",
27
27
  "react-helmet": "^6.1.0",
28
28
  "react-icons": "^5.2.1",
29
- "react-router-dom": "^6.25.1"
29
+ "react-router-dom": "^6.26.0"
30
30
  },
31
31
  "devDependencies": {
32
- "@storybook/react": "^7.6.20",
32
+ "@storybook/react": "^8.2.7",
33
33
  "@types/react-helmet": "^6.1.11",
34
- "@xylabs/react-button": "^3.4.1",
35
- "@xylabs/react-flexbox": "^3.4.1",
36
- "@xylabs/react-link": "^3.4.1",
37
- "@xylabs/react-pixel": "^3.4.1",
38
- "@xylabs/react-shared": "^3.4.1",
39
- "@xylabs/ts-scripts-yarn3": "^3.12.4",
40
- "@xylabs/tsconfig-react": "^3.12.4",
34
+ "@xylabs/react-button": "^3.4.2",
35
+ "@xylabs/react-flexbox": "^3.4.2",
36
+ "@xylabs/react-link": "^3.4.2",
37
+ "@xylabs/react-pixel": "^3.4.2",
38
+ "@xylabs/react-shared": "^3.4.2",
39
+ "@xylabs/ts-scripts-yarn3": "^3.15.16",
40
+ "@xylabs/tsconfig-react": "^3.15.16",
41
41
  "typescript": "^5.5.4"
42
42
  },
43
43
  "description": "Common React library for all XYO projects that use React",
@@ -47,7 +47,7 @@
47
47
  "node": {
48
48
  "import": {
49
49
  "types": "./dist/node/index.d.mts",
50
- "default": "./dist/node/index.js"
50
+ "default": "./dist/node/index.mjs"
51
51
  },
52
52
  "require": {
53
53
  "types": "./dist/node/index.d.cts",
@@ -57,19 +57,19 @@
57
57
  "browser": {
58
58
  "import": {
59
59
  "types": "./dist/browser/index.d.mts",
60
- "default": "./dist/browser/index.js"
60
+ "default": "./dist/browser/index.mjs"
61
61
  },
62
62
  "require": {
63
63
  "types": "./dist/browser/index.d.cts",
64
64
  "default": "./dist/browser/index.cjs"
65
65
  }
66
66
  },
67
- "default": "./dist/browser/index.js"
67
+ "default": "./dist/browser/index.mjs"
68
68
  },
69
69
  "./package.json": "./package.json"
70
70
  },
71
71
  "main": "dist/browser/index.cjs",
72
- "module": "dist/browser/index.js",
72
+ "module": "dist/browser/index.mjs",
73
73
  "homepage": "https://xyo.network",
74
74
  "keywords": [
75
75
  "xyo",
@@ -91,6 +91,6 @@
91
91
  },
92
92
  "sideEffects": false,
93
93
  "types": "dist/browser/index.d.ts",
94
- "version": "2.81.10",
94
+ "version": "2.82.0",
95
95
  "type": "module"
96
96
  }
@@ -2,7 +2,7 @@ import { Breakpoint, styled } from '@mui/material'
2
2
  import { FlexBoxProps, FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'
3
3
  import React, { ReactNode } from 'react'
4
4
 
5
- import { fixedContent, scrollableContent } from './lib/index.js'
5
+ import { fixedContent, scrollableContent } from './lib/index.ts'
6
6
 
7
7
  const WebAppBodyName = 'WebAppBody'
8
8
  const propsNotForwarded = new Set(['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter'])
@@ -83,11 +83,13 @@ export const WebAppBody: React.FC<WebAppBodyProps> = ({
83
83
  }) => {
84
84
  return (
85
85
  <WebAppBodyRoot mobileScrollingBreakpoint={mobileScrollingBreakpoint} spacing={spacing} variant={variant} {...props}>
86
- {breadcrumbs ?
87
- <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>
88
- {breadcrumbs}
89
- </WebAppBodyBreadcrumb>
90
- : null}
86
+ {breadcrumbs
87
+ ? (
88
+ <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>
89
+ {breadcrumbs}
90
+ </WebAppBodyBreadcrumb>
91
+ )
92
+ : null}
91
93
  <WebAppBodyScrollableWrapper>
92
94
  <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>
93
95
  {children}
@@ -1,13 +1,13 @@
1
- /* eslint-disable import/no-internal-modules */
2
1
  import { Breadcrumbs, List } from '@mui/material'
3
2
  import { Meta, StoryFn } from '@storybook/react'
4
3
  import { FlexRow } from '@xylabs/react-flexbox'
5
4
  import { LinkEx } from '@xylabs/react-link'
6
5
  import { MenuListItemContainer } from '@xyo-network/react-appbar'
6
+ import React from 'react'
7
7
  import { BrowserRouter } from 'react-router-dom'
8
8
 
9
- import { WebAppChrome } from './Chrome.js'
10
- import { WebAppPage, WebAppPageProps } from './Page.js'
9
+ import { WebAppChrome } from './Chrome.tsx'
10
+ import { WebAppPage, WebAppPageProps } from './Page.tsx'
11
11
 
12
12
  const StorybookEntry = {
13
13
  argTypes: {},
@@ -22,13 +22,13 @@ const StorybookEntry = {
22
22
 
23
23
  const rowArray = [32, 64, 128, 256, 512, 1024]
24
24
 
25
- const Children: React.FC<WebAppPageProps> = (props) => (
25
+ const Children: React.FC<WebAppPageProps> = props => (
26
26
  <WebAppPage
27
- breadcrumbs={
27
+ breadcrumbs={(
28
28
  <Breadcrumbs>
29
29
  <LinkEx>BreadCrumbs</LinkEx>
30
30
  </Breadcrumbs>
31
- }
31
+ )}
32
32
  {...props}
33
33
  >
34
34
  {rowArray.map((height) => {
@@ -45,14 +45,15 @@ const Template: StoryFn<typeof WebAppChrome> = (args) => {
45
45
  return (
46
46
  <BrowserRouter>
47
47
  <WebAppChrome
48
- menuItems={
48
+ menuItems={(
49
49
  <List>
50
50
  <MenuListItemContainer primary="Hello" />
51
51
  </List>
52
- }
52
+ )}
53
53
  height="calc(100vh - 2rem)"
54
54
  {...args}
55
- ></WebAppChrome>
55
+ >
56
+ </WebAppChrome>
56
57
  </BrowserRouter>
57
58
  )
58
59
  }
@@ -68,5 +69,4 @@ WithFixedSizePage.args = { children: <Children variant="fixed" />, navigationTyp
68
69
 
69
70
  export { Default, DefaultSideBar, WithFixedSizePage }
70
71
 
71
- // eslint-disable-next-line import/no-default-export
72
72
  export default StorybookEntry
@@ -4,10 +4,10 @@ import { WebAppNavigationType } from '@xyo-network/react-app-settings'
4
4
  import { ApplicationAppBar, SystemToolbar } from '@xyo-network/react-appbar'
5
5
  import { Footer } from '@xyo-network/react-footer'
6
6
  import { ErrorBoundary } from '@xyo-network/react-shared'
7
- import { forwardRef, ReactNode } from 'react'
7
+ import React, { forwardRef, ReactNode } from 'react'
8
8
  import { Helmet } from 'react-helmet'
9
9
 
10
- import { WebAppErrorPage } from './ErrorPage.js'
10
+ import { WebAppErrorPage } from './ErrorPage.tsx'
11
11
 
12
12
  export interface WebAppChromeProps extends FlexBoxProps {
13
13
  appName: string
@@ -29,22 +29,26 @@ export const WebAppChrome = forwardRef<HTMLDivElement, WebAppChromeProps>(
29
29
  </Helmet>
30
30
  {appbar ?? <ApplicationAppBar systemToolbar={<SystemToolbar menuItems={navigationType === 'menu' ? menuItems : undefined} />} />}
31
31
  <FlexGrowRow id="sidebar-nav-flex" overflow="hidden" alignItems="stretch">
32
- {navigationType === 'menu' ? null : (
33
- <>
34
- {menuItems}
35
- <Divider orientation="vertical" />
36
- </>
37
- )}
32
+ {navigationType === 'menu'
33
+ ? null
34
+ : (
35
+ <>
36
+ {menuItems}
37
+ <Divider orientation="vertical" />
38
+ </>
39
+ )}
38
40
  <FlexGrowCol id="main-flex" justifyContent="flex-start" alignItems="stretch">
39
- {errorBoundary ?
40
- <ErrorBoundary
41
- fallbackWithError={(error) => {
42
- return errorPage ?? <WebAppErrorPage error={error} />
43
- }}
44
- >
45
- {children}
46
- </ErrorBoundary>
47
- : children}
41
+ {errorBoundary
42
+ ? (
43
+ <ErrorBoundary
44
+ fallbackWithError={(error) => {
45
+ return errorPage ?? <WebAppErrorPage error={error} />
46
+ }}
47
+ >
48
+ {children}
49
+ </ErrorBoundary>
50
+ )
51
+ : children}
48
52
  </FlexGrowCol>
49
53
  </FlexGrowRow>
50
54
  <FlexCol id="footer-flex" alignItems="stretch">
@@ -1,6 +1,7 @@
1
1
  import { ButtonEx } from '@xylabs/react-button'
2
+ import React from 'react'
2
3
 
3
- import { WebAppPage, WebAppPageProps } from './Page.js'
4
+ import { WebAppPage, WebAppPageProps } from './Page.tsx'
4
5
 
5
6
  export interface WebAppErrorPageProps extends WebAppPageProps {
6
7
  error?: Error
@@ -1,5 +1,6 @@
1
1
  import { Meta, StoryFn } from '@storybook/react'
2
2
  import { NotFound } from '@xyo-network/react-shared'
3
+ import React from 'react'
3
4
 
4
5
  const StorybookEntry = {
5
6
  argTypes: {},
@@ -21,5 +22,4 @@ Default.args = {}
21
22
 
22
23
  export { Default }
23
24
 
24
- // eslint-disable-next-line import/no-default-export
25
25
  export default StorybookEntry
@@ -1,6 +1,7 @@
1
1
  import { NotFound } from '@xyo-network/react-shared'
2
+ import React from 'react'
2
3
 
3
- import { WebAppPage, WebAppPageProps } from '../Page.js'
4
+ import { WebAppPage, WebAppPageProps } from '../Page.tsx'
4
5
 
5
6
  export const WebAppNotFoundPage: React.FC<WebAppPageProps> = ({ title, ...props }) => (
6
7
  <WebAppPage title={title ?? 'Sorry! Page Not Found'} {...props}>
@@ -1 +1 @@
1
- export * from './Page.js'
1
+ export * from './Page.tsx'