@xyo-network/react-webapp 2.64.0-rc.6 → 2.64.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 (132) hide show
  1. package/dist/browser/components/Body.cjs +116 -0
  2. package/dist/browser/components/Body.cjs.map +1 -0
  3. package/dist/browser/components/Body.d.cts +12 -0
  4. package/dist/browser/components/Body.d.cts.map +1 -0
  5. package/dist/browser/components/Chrome.cjs +246 -0
  6. package/dist/browser/components/Chrome.cjs.map +1 -0
  7. package/dist/browser/components/Chrome.d.cts +14 -0
  8. package/dist/browser/components/Chrome.d.cts.map +1 -0
  9. package/dist/browser/components/ErrorPage.cjs +211 -0
  10. package/dist/browser/components/ErrorPage.cjs.map +1 -0
  11. package/dist/browser/components/ErrorPage.d.cts +9 -0
  12. package/dist/browser/components/ErrorPage.d.cts.map +1 -0
  13. package/dist/browser/components/NotFoundPage/Page.cjs +207 -0
  14. package/dist/browser/components/NotFoundPage/Page.cjs.map +1 -0
  15. package/dist/browser/components/NotFoundPage/Page.d.cts +6 -0
  16. package/dist/browser/components/NotFoundPage/Page.d.cts.map +1 -0
  17. package/dist/browser/components/NotFoundPage/index.cjs +209 -0
  18. package/dist/browser/components/NotFoundPage/index.cjs.map +1 -0
  19. package/dist/browser/components/NotFoundPage/index.d.cts +2 -0
  20. package/dist/browser/components/NotFoundPage/index.d.cts.map +1 -0
  21. package/dist/browser/components/Page.cjs +200 -0
  22. package/dist/browser/components/Page.cjs.map +1 -0
  23. package/dist/browser/components/Page.d.cts +13 -0
  24. package/dist/browser/components/Page.d.cts.map +1 -0
  25. package/dist/browser/components/index.cjs +261 -0
  26. package/dist/browser/components/index.cjs.map +1 -0
  27. package/dist/browser/components/index.d.cts +6 -0
  28. package/dist/browser/components/index.d.cts.map +1 -0
  29. package/dist/browser/components/lib/cssValues.cjs +43 -0
  30. package/dist/{node/components/lib/cssValues.mjs.map → browser/components/lib/cssValues.cjs.map} +1 -1
  31. package/dist/browser/components/lib/cssValues.d.cts +6 -0
  32. package/dist/browser/components/lib/cssValues.d.cts.map +1 -0
  33. package/dist/browser/components/lib/index.cjs +45 -0
  34. package/dist/browser/components/lib/index.cjs.map +1 -0
  35. package/dist/browser/components/lib/index.d.cts +2 -0
  36. package/dist/browser/components/lib/index.d.cts.map +1 -0
  37. package/dist/browser/index.cjs +261 -0
  38. package/dist/browser/index.cjs.map +1 -0
  39. package/dist/browser/index.d.cts +2 -0
  40. package/dist/browser/index.d.cts.map +1 -0
  41. package/dist/docs.json +94282 -0
  42. package/dist/node/components/Body.cjs +120 -0
  43. package/dist/node/components/Body.cjs.map +1 -0
  44. package/dist/node/components/Body.d.cts +12 -0
  45. package/dist/node/components/Body.d.cts.map +1 -0
  46. package/dist/node/components/Body.js +34 -40
  47. package/dist/node/components/Body.js.map +1 -1
  48. package/dist/node/components/Chrome.cjs +250 -0
  49. package/dist/node/components/Chrome.cjs.map +1 -0
  50. package/dist/node/components/Chrome.d.cts +14 -0
  51. package/dist/node/components/Chrome.d.cts.map +1 -0
  52. package/dist/node/components/Chrome.js +207 -44
  53. package/dist/node/components/Chrome.js.map +1 -1
  54. package/dist/node/components/ErrorPage.cjs +216 -0
  55. package/dist/node/components/ErrorPage.cjs.map +1 -0
  56. package/dist/node/components/ErrorPage.d.cts +9 -0
  57. package/dist/node/components/ErrorPage.d.cts.map +1 -0
  58. package/dist/node/components/ErrorPage.js +185 -34
  59. package/dist/node/components/ErrorPage.js.map +1 -1
  60. package/dist/node/components/NotFoundPage/Page.cjs +212 -0
  61. package/dist/node/components/NotFoundPage/Page.cjs.map +1 -0
  62. package/dist/node/components/NotFoundPage/Page.d.cts +6 -0
  63. package/dist/node/components/NotFoundPage/Page.d.cts.map +1 -0
  64. package/dist/node/components/NotFoundPage/Page.js +182 -31
  65. package/dist/node/components/NotFoundPage/Page.js.map +1 -1
  66. package/dist/node/components/NotFoundPage/index.cjs +214 -0
  67. package/dist/node/components/NotFoundPage/index.cjs.map +1 -0
  68. package/dist/node/components/NotFoundPage/index.d.cts +2 -0
  69. package/dist/node/components/NotFoundPage/index.d.cts.map +1 -0
  70. package/dist/node/components/NotFoundPage/index.js +184 -21
  71. package/dist/node/components/NotFoundPage/index.js.map +1 -1
  72. package/dist/node/components/Page.cjs +205 -0
  73. package/dist/node/components/Page.cjs.map +1 -0
  74. package/dist/node/components/Page.d.cts +13 -0
  75. package/dist/node/components/Page.d.cts.map +1 -0
  76. package/dist/node/components/Page.js +117 -49
  77. package/dist/node/components/Page.js.map +1 -1
  78. package/dist/node/components/index.cjs +272 -0
  79. package/dist/node/components/index.cjs.map +1 -0
  80. package/dist/node/components/index.d.cts +6 -0
  81. package/dist/node/components/index.d.cts.map +1 -0
  82. package/dist/node/components/index.js +236 -29
  83. package/dist/node/components/index.js.map +1 -1
  84. package/dist/node/components/{NotFoundPage/Page.stories.js → lib/cssValues.cjs} +26 -23
  85. package/dist/node/components/lib/cssValues.cjs.map +1 -0
  86. package/dist/node/components/lib/cssValues.d.cts +6 -0
  87. package/dist/node/components/lib/cssValues.d.cts.map +1 -0
  88. package/dist/node/components/lib/cssValues.js +7 -33
  89. package/dist/node/components/lib/cssValues.js.map +1 -1
  90. package/dist/node/components/lib/index.cjs +52 -0
  91. package/dist/node/components/lib/index.cjs.map +1 -0
  92. package/dist/node/components/lib/index.d.cts +2 -0
  93. package/dist/node/components/lib/index.d.cts.map +1 -0
  94. package/dist/node/components/lib/index.js +20 -21
  95. package/dist/node/components/lib/index.js.map +1 -1
  96. package/dist/node/index.cjs +272 -0
  97. package/dist/node/index.cjs.map +1 -0
  98. package/dist/node/index.d.cts +2 -0
  99. package/dist/node/index.d.cts.map +1 -0
  100. package/dist/node/index.js +236 -21
  101. package/dist/node/index.js.map +1 -1
  102. package/package.json +25 -25
  103. package/dist/browser/components/Chrome.stories.js +0 -53
  104. package/dist/browser/components/Chrome.stories.js.map +0 -1
  105. package/dist/browser/components/NotFoundPage/Page.stories.js +0 -23
  106. package/dist/browser/components/NotFoundPage/Page.stories.js.map +0 -1
  107. package/dist/node/components/Body.mjs +0 -77
  108. package/dist/node/components/Body.mjs.map +0 -1
  109. package/dist/node/components/Chrome.mjs +0 -38
  110. package/dist/node/components/Chrome.mjs.map +0 -1
  111. package/dist/node/components/Chrome.stories.js +0 -79
  112. package/dist/node/components/Chrome.stories.js.map +0 -1
  113. package/dist/node/components/Chrome.stories.mjs +0 -53
  114. package/dist/node/components/Chrome.stories.mjs.map +0 -1
  115. package/dist/node/components/ErrorPage.mjs +0 -14
  116. package/dist/node/components/ErrorPage.mjs.map +0 -1
  117. package/dist/node/components/NotFoundPage/Page.mjs +0 -10
  118. package/dist/node/components/NotFoundPage/Page.mjs.map +0 -1
  119. package/dist/node/components/NotFoundPage/Page.stories.js.map +0 -1
  120. package/dist/node/components/NotFoundPage/Page.stories.mjs +0 -23
  121. package/dist/node/components/NotFoundPage/Page.stories.mjs.map +0 -1
  122. package/dist/node/components/NotFoundPage/index.mjs +0 -2
  123. package/dist/node/components/NotFoundPage/index.mjs.map +0 -1
  124. package/dist/node/components/Page.mjs +0 -86
  125. package/dist/node/components/Page.mjs.map +0 -1
  126. package/dist/node/components/index.mjs +0 -6
  127. package/dist/node/components/index.mjs.map +0 -1
  128. package/dist/node/components/lib/cssValues.mjs +0 -21
  129. package/dist/node/components/lib/index.mjs +0 -2
  130. package/dist/node/components/lib/index.mjs.map +0 -1
  131. package/dist/node/index.mjs +0 -2
  132. package/dist/node/index.mjs.map +0 -1
package/package.json CHANGED
@@ -10,11 +10,11 @@
10
10
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/react-async-effect": "^3.1.0-rc.6",
14
- "@xyo-network/react-app-settings": "~2.64.0-rc.6",
15
- "@xyo-network/react-appbar": "~2.64.0-rc.6",
16
- "@xyo-network/react-footer": "~2.64.0-rc.6",
17
- "@xyo-network/react-shared": "~2.64.0-rc.6"
13
+ "@xylabs/react-async-effect": "^3.0.5",
14
+ "@xyo-network/react-app-settings": "~2.64.0",
15
+ "@xyo-network/react-appbar": "~2.64.0",
16
+ "@xyo-network/react-footer": "~2.64.0",
17
+ "@xyo-network/react-shared": "~2.64.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@mui/icons-material": "^5",
@@ -33,17 +33,17 @@
33
33
  "react-router-dom": "^6"
34
34
  },
35
35
  "devDependencies": {
36
- "@storybook/react": "^7.4.4",
37
- "@types/react-helmet": "^6.1.6",
36
+ "@storybook/react": "^7.4.5",
37
+ "@types/react-helmet": "^6.1.7",
38
38
  "@xylabs/pixel": "^1.4.14",
39
- "@xylabs/react-button": "^3.1.0-rc.6",
40
- "@xylabs/react-flexbox": "^3.1.0-rc.6",
41
- "@xylabs/react-link": "^3.1.0-rc.6",
42
- "@xylabs/react-pixel": "^3.1.0-rc.6",
43
- "@xylabs/react-shared": "^3.1.0-rc.6",
44
- "@xylabs/ts-scripts-yarn3": "^3.0.55",
45
- "@xylabs/tsconfig-react": "^3.0.55",
46
- "axios": "^1.5.0",
39
+ "@xylabs/react-button": "^3.0.5",
40
+ "@xylabs/react-flexbox": "^3.0.5",
41
+ "@xylabs/react-link": "^3.0.5",
42
+ "@xylabs/react-pixel": "^3.0.5",
43
+ "@xylabs/react-shared": "^3.0.5",
44
+ "@xylabs/ts-scripts-yarn3": "^3.0.78",
45
+ "@xylabs/tsconfig-react": "^3.0.78",
46
+ "axios": "^1.5.1",
47
47
  "typescript": "^5.2.2"
48
48
  },
49
49
  "description": "Common React library for all XYO projects that use React",
@@ -53,28 +53,28 @@
53
53
  "node": {
54
54
  "import": {
55
55
  "types": "./dist/node/index.d.mts",
56
- "default": "./dist/node/index.mjs"
56
+ "default": "./dist/node/index.js"
57
57
  },
58
58
  "require": {
59
- "types": "./dist/node/index.d.ts",
60
- "default": "./dist/node/index.js"
59
+ "types": "./dist/node/index.d.cts",
60
+ "default": "./dist/node/index.cjs"
61
61
  }
62
62
  },
63
63
  "browser": {
64
64
  "import": {
65
- "types": "./dist/browser/index.d.ts",
65
+ "types": "./dist/browser/index.d.mts",
66
66
  "default": "./dist/browser/index.js"
67
67
  },
68
68
  "require": {
69
- "types": "./dist/browser/index.d.ts",
70
- "default": "./dist/browser/index.js"
69
+ "types": "./dist/browser/index.d.cts",
70
+ "default": "./dist/browser/index.cjs"
71
71
  }
72
72
  },
73
- "default": "./dist/browser/index.mjs"
73
+ "default": "./dist/browser/index.js"
74
74
  },
75
75
  "./package.json": "./package.json"
76
76
  },
77
- "main": "dist/browser/index.js",
77
+ "main": "dist/browser/index.cjs",
78
78
  "module": "dist/browser/index.js",
79
79
  "homepage": "https://xyo.network",
80
80
  "keywords": [
@@ -97,6 +97,6 @@
97
97
  },
98
98
  "sideEffects": false,
99
99
  "types": "dist/browser/index.d.ts",
100
- "version": "2.64.0-rc.6",
101
- "stableVersion": "2.63.1"
100
+ "version": "2.64.0",
101
+ "type": "module"
102
102
  }
@@ -1,53 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Breadcrumbs, List } from "@mui/material";
3
- import { FlexRow } from "@xylabs/react-flexbox";
4
- import { LinkEx } from "@xylabs/react-link";
5
- import { MenuListItemContainer } from "@xyo-network/react-appbar";
6
- import { BrowserRouter } from "react-router-dom";
7
- import { WebAppChrome } from "./Chrome";
8
- import { WebAppPage } from "./Page";
9
- const StorybookEntry = {
10
- argTypes: {},
11
- component: WebAppChrome,
12
- parameters: {
13
- docs: {
14
- page: null
15
- }
16
- },
17
- title: "webapp/WebAppChrome"
18
- };
19
- const rowArray = [32, 64, 128, 256, 512, 1024];
20
- const Children = (props) => /* @__PURE__ */ jsx(
21
- WebAppPage,
22
- {
23
- breadcrumbs: /* @__PURE__ */ jsx(Breadcrumbs, { children: /* @__PURE__ */ jsx(LinkEx, { children: "BreadCrumbs" }) }),
24
- ...props,
25
- children: rowArray.map((height) => {
26
- return /* @__PURE__ */ jsx(FlexRow, { height, children: height }, height);
27
- })
28
- }
29
- );
30
- const Template = (args) => {
31
- return /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(
32
- WebAppChrome,
33
- {
34
- menuItems: /* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsx(MenuListItemContainer, { primary: "Hello" }) }),
35
- height: "calc(100vh - 2rem)",
36
- ...args
37
- }
38
- ) });
39
- };
40
- const Default = Template.bind({});
41
- Default.args = {};
42
- const DefaultSideBar = Template.bind({});
43
- DefaultSideBar.args = { children: /* @__PURE__ */ jsx(Children, {}), navigationType: "sidebar" };
44
- const WithFixedSizePage = Template.bind({});
45
- WithFixedSizePage.args = { children: /* @__PURE__ */ jsx(Children, { variant: "fixed" }), navigationType: "sidebar" };
46
- var Chrome_stories_default = StorybookEntry;
47
- export {
48
- Default,
49
- DefaultSideBar,
50
- WithFixedSizePage,
51
- Chrome_stories_default as default
52
- };
53
- //# sourceMappingURL=Chrome.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Chrome.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { Breadcrumbs, List } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { MenuListItemContainer } from '@xyo-network/react-appbar'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport { WebAppChrome } from './Chrome'\nimport { WebAppPage, WebAppPageProps } from './Page'\n\nconst StorybookEntry = {\n argTypes: {},\n component: WebAppChrome,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/WebAppChrome',\n} as Meta<typeof WebAppChrome>\n\nconst rowArray = [32, 64, 128, 256, 512, 1024]\n\nconst Children: React.FC<WebAppPageProps> = (props) => (\n <WebAppPage\n breadcrumbs={\n <Breadcrumbs>\n <LinkEx>BreadCrumbs</LinkEx>\n </Breadcrumbs>\n }\n {...props}\n >\n {rowArray.map((height) => {\n return (\n <FlexRow key={height} height={height}>\n {height}\n </FlexRow>\n )\n })}\n </WebAppPage>\n)\n\nconst Template: StoryFn<typeof WebAppChrome> = (args) => {\n return (\n <BrowserRouter>\n <WebAppChrome\n menuItems={\n <List>\n <MenuListItemContainer primary=\"Hello\" />\n </List>\n }\n height=\"calc(100vh - 2rem)\"\n {...args}\n ></WebAppChrome>\n </BrowserRouter>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst DefaultSideBar = Template.bind({})\nDefaultSideBar.args = { children: <Children />, navigationType: 'sidebar' }\n\nconst WithFixedSizePage = Template.bind({})\nWithFixedSizePage.args = { children: <Children variant=\"fixed\" />, navigationType: 'sidebar' }\n\nexport { Default, DefaultSideBar, WithFixedSizePage }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AA4BQ;AA3BR,SAAS,aAAa,YAAY;AAElC,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAC7B,SAAS,kBAAmC;AAE5C,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAW,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI;AAE7C,MAAM,WAAsC,CAAC,UAC3C;AAAA,EAAC;AAAA;AAAA,IACC,aACE,oBAAC,eACC,8BAAC,UAAO,yBAAW,GACrB;AAAA,IAED,GAAG;AAAA,IAEH,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE,oBAAC,WAAqB,QACnB,oBADW,MAEd;AAAA,IAEJ,CAAC;AAAA;AACH;AAGF,MAAM,WAAyC,CAAC,SAAS;AACvD,SACE,oBAAC,iBACC;AAAA,IAAC;AAAA;AAAA,MACC,WACE,oBAAC,QACC,8BAAC,yBAAsB,SAAQ,SAAQ,GACzC;AAAA,MAEF,QAAO;AAAA,MACN,GAAG;AAAA;AAAA,EACL,GACH;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,UAAU,oBAAC,YAAS,GAAI,gBAAgB,UAAU;AAE1E,MAAM,oBAAoB,SAAS,KAAK,CAAC,CAAC;AAC1C,kBAAkB,OAAO,EAAE,UAAU,oBAAC,YAAS,SAAQ,SAAQ,GAAI,gBAAgB,UAAU;AAK7F,IAAO,yBAAQ;","names":[]}
@@ -1,23 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { NotFound } from "@xyo-network/react-shared";
3
- const StorybookEntry = {
4
- argTypes: {},
5
- component: NotFound,
6
- parameters: {
7
- docs: {
8
- page: null
9
- }
10
- },
11
- title: "webapp/NotFound"
12
- };
13
- const Template = () => {
14
- return /* @__PURE__ */ jsx(NotFound, {});
15
- };
16
- const Default = Template.bind({});
17
- Default.args = {};
18
- var Page_stories_default = StorybookEntry;
19
- export {
20
- Default,
21
- Page_stories_default as default
22
- };
23
- //# sourceMappingURL=Page.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/NotFoundPage/Page.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { NotFound } from '@xyo-network/react-shared'\n\nconst StorybookEntry = {\n argTypes: {},\n component: NotFound,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/NotFound',\n} as Meta<typeof NotFound>\n\nconst Template: StoryFn<typeof NotFound> = () => {\n return <NotFound />\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nexport { Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAeS;AAdT,SAAS,gBAAgB;AAEzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,MAAM;AAC/C,SAAO,oBAAC,YAAS;AACnB;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAKhB,IAAO,uBAAQ;","names":[]}
@@ -1,77 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { styled } from "@mui/material";
3
- import { FlexGrowCol, FlexRow } from "@xylabs/react-flexbox";
4
- import { fixedContent, scrollableContent } from "./lib";
5
- const WebAppBodyName = "WebAppBody";
6
- const propsNotForwarded = ["mobileScrollingBreakpoint", "variant", "spacing", "disableBreadcrumbGutter"];
7
- const defaultStyledOptions = {
8
- shouldForwardProp: (prop) => !propsNotForwarded.includes(prop)
9
- };
10
- const WebAppBodyRoot = styled(FlexGrowCol, {
11
- ...defaultStyledOptions,
12
- name: WebAppBodyName,
13
- slot: "Root"
14
- })(({ spacing, theme, mobileScrollingBreakpoint = "sm", variant }) => {
15
- const scrollable = variant === "scrollable";
16
- return theme.unstable_sx({
17
- alignItems: "stretch",
18
- gap: 1,
19
- justifyContent: "flex-start",
20
- overflowX: "visible",
21
- overflowY: scrollable ? "scroll" : "hidden",
22
- paddingY: spacing,
23
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
24
- overflowY: "scroll"
25
- }
26
- });
27
- });
28
- const WebAppBodyBreadcrumb = styled(FlexRow, {
29
- ...defaultStyledOptions,
30
- name: WebAppBodyName,
31
- slot: "Breadcrumb"
32
- })(
33
- ({ theme, disableBreadcrumbGutter, spacing }) => theme.unstable_sx({
34
- justifyContent: "start",
35
- marginX: disableBreadcrumbGutter ? 0 : spacing
36
- })
37
- );
38
- const WebAppBodyScrollableWrapper = styled(FlexGrowCol, {
39
- name: WebAppBodyName,
40
- slot: "ScrollableWrapper"
41
- })(() => ({
42
- alignItems: "stretch"
43
- }));
44
- const WebAppBodyScrollable = styled(FlexGrowCol, {
45
- ...defaultStyledOptions,
46
- name: WebAppBodyName,
47
- slot: "Scrollable"
48
- })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
49
- const props = variant === "scrollable" ? scrollableContent : fixedContent;
50
- return {
51
- ...props,
52
- alignItems: "stretch",
53
- justifyContent: "start",
54
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
55
- inset: "unset",
56
- position: "relative"
57
- }
58
- };
59
- });
60
- const WebAppBody = ({
61
- children,
62
- breadcrumbs,
63
- disableBreadcrumbGutter,
64
- mobileScrollingBreakpoint,
65
- spacing = 1,
66
- variant,
67
- ...props
68
- }) => {
69
- return /* @__PURE__ */ jsxs(WebAppBodyRoot, { mobileScrollingBreakpoint, spacing, variant, ...props, children: [
70
- breadcrumbs ? /* @__PURE__ */ jsx(WebAppBodyBreadcrumb, { disableBreadcrumbGutter, spacing, children: breadcrumbs }) : null,
71
- /* @__PURE__ */ jsx(WebAppBodyScrollableWrapper, { children: /* @__PURE__ */ jsx(WebAppBodyScrollable, { mobileScrollingBreakpoint, variant, children }) })
72
- ] });
73
- };
74
- export {
75
- WebAppBody
76
- };
77
- //# sourceMappingURL=Body.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Body.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'\n\nconst WebAppBodyName = 'WebAppBody'\nconst propsNotForwarded = ['mobileScrollingBreakpoint', 'variant', 'spacing', 'disableBreadcrumbGutter']\nconst defaultStyledOptions = {\n shouldForwardProp: (prop: string) => !propsNotForwarded.includes(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 <WebAppBodyBreadcrumb disableBreadcrumbGutter={disableBreadcrumbGutter} spacing={spacing}>\n {breadcrumbs}\n </WebAppBodyBreadcrumb>\n ) : null}\n <WebAppBodyScrollableWrapper>\n <WebAppBodyScrollable mobileScrollingBreakpoint={mobileScrollingBreakpoint} variant={variant}>\n {children}\n </WebAppBodyScrollable>\n </WebAppBodyScrollableWrapper>\n </WebAppBodyRoot>\n )\n}\n"],"mappings":"AAoFI,SAEI,KAFJ;AApFJ,SAAqB,cAAc;AACnC,SAAuB,aAAa,eAAe;AAGnD,SAAS,cAAc,yBAAyB;AAEhD,MAAM,iBAAiB;AACvB,MAAM,oBAAoB,CAAC,6BAA6B,WAAW,WAAW,yBAAyB;AACvG,MAAM,uBAAuB;AAAA,EAC3B,mBAAmB,CAAC,SAAiB,CAAC,kBAAkB,SAAS,IAAI;AACvE;AAEA,MAAM,iBAAiB,OAAO,aAAa;AAAA,EACzC,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,CAAC,EAAE,SAAS,OAAO,4BAA4B,MAAM,QAAQ,MAAM;AACrF,QAAM,aAAa,YAAY;AAC/B,SAAO,MAAM,YAAY;AAAA,IACvB,YAAY;AAAA,IACZ,KAAK;AAAA,IACL,gBAAgB;AAAA,IAChB,WAAW;AAAA,IACX,WAAW,aAAa,WAAW;AAAA,IACnC,UAAU;AAAA,IACV,CAAC,MAAM,YAAY,KAAK,yBAAyB,CAAC,GAAG;AAAA,MACnD,WAAW;AAAA,IACb;AAAA,EACF,CAAC;AACH,CAAC;AAED,MAAM,uBAAuB,OAAO,SAAS;AAAA,EAC3C,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC;AAAA,EAAmB,CAAC,EAAE,OAAO,yBAAyB,QAAQ,MAC7D,MAAM,YAAY;AAAA,IAChB,gBAAgB;AAAA,IAChB,SAAS,0BAA0B,IAAI;AAAA,EACzC,CAAC;AACH;AAEA,MAAM,8BAA8B,OAAO,aAAa;AAAA,EACtD,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,OAAO;AAAA,EACzB,YAAY;AACd,EAAE;AAEF,MAAM,uBAAuB,OAAO,aAAa;AAAA,EAC/C,GAAG;AAAA,EACH,MAAM;AAAA,EACN,MAAM;AACR,CAAC,EAAmB,CAAC,EAAE,OAAO,4BAA4B,MAAM,QAAQ,MAAM;AAC5E,QAAM,QAAQ,YAAY,eAAe,oBAAoB;AAC7D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,CAAC,MAAM,YAAY,KAAK,yBAAyB,CAAC,GAAG;AAAA,MACnD,OAAO;AAAA,MACP,UAAU;AAAA,IACZ;AAAA,EACF;AACF,CAAC;AAUM,MAAM,aAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,GAAG;AACL,MAAM;AACJ,SACE,qBAAC,kBAAe,2BAAsD,SAAkB,SAAmB,GAAG,OAC3G;AAAA,kBACC,oBAAC,wBAAqB,yBAAkD,SACrE,uBACH,IACE;AAAA,IACJ,oBAAC,+BACC,8BAAC,wBAAqB,2BAAsD,SACzE,UACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -1,38 +0,0 @@
1
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { Divider, Paper } from "@mui/material";
3
- import { FlexCol, FlexGrowCol, FlexGrowRow } from "@xylabs/react-flexbox";
4
- import { ApplicationAppBar, SystemToolbar } from "@xyo-network/react-appbar";
5
- import { Footer } from "@xyo-network/react-footer";
6
- import { ErrorBoundary } from "@xyo-network/react-shared";
7
- import { forwardRef } from "react";
8
- import { Helmet } from "react-helmet";
9
- import { WebAppErrorPage } from "./ErrorPage";
10
- const WebAppChrome = forwardRef(
11
- ({ appName, appbar, children, errorPage, footer, footerElevation = 4, menuItems, navigationType = "menu", ...props }, ref) => {
12
- return /* @__PURE__ */ jsxs(FlexCol, { id: "web-chrome-flex", alignItems: "stretch", overflow: "hidden", height: "100vh", ref, ...props, children: [
13
- /* @__PURE__ */ jsx(Helmet, { defaultTitle: appName, titleTemplate: `%s | ${appName}`, children: /* @__PURE__ */ jsx("meta", { content: "website", property: "og:type" }) }),
14
- appbar ?? /* @__PURE__ */ jsx(ApplicationAppBar, { systemToolbar: /* @__PURE__ */ jsx(SystemToolbar, { menuItems: navigationType === "menu" ? menuItems : void 0 }) }),
15
- /* @__PURE__ */ jsxs(FlexGrowRow, { id: "sidebar-nav-flex", overflow: "hidden", alignItems: "stretch", children: [
16
- navigationType !== "menu" ? /* @__PURE__ */ jsxs(Fragment, { children: [
17
- menuItems,
18
- /* @__PURE__ */ jsx(Divider, { orientation: "vertical" })
19
- ] }) : null,
20
- /* @__PURE__ */ jsx(FlexGrowCol, { id: "main-flex", justifyContent: "flex-start", alignItems: "stretch", children: /* @__PURE__ */ jsx(
21
- ErrorBoundary,
22
- {
23
- fallbackWithError: (error) => {
24
- return errorPage ?? /* @__PURE__ */ jsx(WebAppErrorPage, { error });
25
- },
26
- children
27
- }
28
- ) })
29
- ] }),
30
- /* @__PURE__ */ jsx(FlexCol, { id: "footer-flex", alignItems: "stretch", children: /* @__PURE__ */ jsx(Paper, { elevation: footerElevation, square: true, children: footer ?? /* @__PURE__ */ jsx(Footer, { dynamicHeight: true }) }) })
31
- ] });
32
- }
33
- );
34
- WebAppChrome.displayName = "WebAppChrome";
35
- export {
36
- WebAppChrome
37
- };
38
- //# sourceMappingURL=Chrome.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Chrome.tsx"],"sourcesContent":["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 { forwardRef, ReactNode } from 'react'\nimport { Helmet } from 'react-helmet'\n\nimport { WebAppErrorPage } from './ErrorPage'\n\nexport interface WebAppChromeProps extends FlexBoxProps {\n appName: string\n appbar?: ReactNode\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, 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 <>\n {menuItems}\n <Divider orientation=\"vertical\" />\n </>\n ) : null}\n <FlexGrowCol id=\"main-flex\" justifyContent=\"flex-start\" alignItems=\"stretch\">\n <ErrorBoundary\n fallbackWithError={(error) => {\n return errorPage ?? <WebAppErrorPage error={error} />\n }}\n >\n {children}\n </ErrorBoundary>\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"],"mappings":"AA0BU,SAKE,UALF,KAKE,YALF;AA1BV,SAAS,SAAS,aAAa;AAC/B,SAAuB,SAAS,aAAa,mBAAmB;AAEhE,SAAS,mBAAmB,qBAAqB;AACjD,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,kBAA6B;AACtC,SAAS,cAAc;AAEvB,SAAS,uBAAuB;AAYzB,MAAM,eAAe;AAAA,EAC1B,CAAC,EAAE,SAAS,QAAQ,UAAU,WAAW,QAAQ,kBAAkB,GAAG,WAAW,iBAAiB,QAAQ,GAAG,MAAM,GAAG,QAAQ;AAC5H,WACE,qBAAC,WAAQ,IAAG,mBAAkB,YAAW,WAAU,UAAS,UAAS,QAAO,SAAQ,KAAW,GAAG,OAChG;AAAA,0BAAC,UAAO,cAAc,SAAS,eAAe,QAAQ,OAAO,IAC3D,8BAAC,UAAK,SAAQ,WAAU,UAAS,WAAU,GAC7C;AAAA,MACC,UAAU,oBAAC,qBAAkB,eAAe,oBAAC,iBAAc,WAAW,mBAAmB,SAAS,YAAY,QAAW,GAAI;AAAA,MAC9H,qBAAC,eAAY,IAAG,oBAAmB,UAAS,UAAS,YAAW,WAC7D;AAAA,2BAAmB,SAClB,iCACG;AAAA;AAAA,UACD,oBAAC,WAAQ,aAAY,YAAW;AAAA,WAClC,IACE;AAAA,QACJ,oBAAC,eAAY,IAAG,aAAY,gBAAe,cAAa,YAAW,WACjE;AAAA,UAAC;AAAA;AAAA,YACC,mBAAmB,CAAC,UAAU;AAC5B,qBAAO,aAAa,oBAAC,mBAAgB,OAAc;AAAA,YACrD;AAAA,YAEC;AAAA;AAAA,QACH,GACF;AAAA,SACF;AAAA,MACA,oBAAC,WAAQ,IAAG,eAAc,YAAW,WACnC,8BAAC,SAAM,WAAW,iBAAiB,QAAM,MACtC,oBAAU,oBAAC,UAAO,eAAa,MAAC,GACnC,GACF;AAAA,OACF;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":[]}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var Chrome_stories_exports = {};
20
- __export(Chrome_stories_exports, {
21
- Default: () => Default,
22
- DefaultSideBar: () => DefaultSideBar,
23
- WithFixedSizePage: () => WithFixedSizePage,
24
- default: () => Chrome_stories_default
25
- });
26
- module.exports = __toCommonJS(Chrome_stories_exports);
27
- var import_jsx_runtime = require("react/jsx-runtime");
28
- var import_material = require("@mui/material");
29
- var import_react_flexbox = require("@xylabs/react-flexbox");
30
- var import_react_link = require("@xylabs/react-link");
31
- var import_react_appbar = require("@xyo-network/react-appbar");
32
- var import_react_router_dom = require("react-router-dom");
33
- var import_Chrome = require("./Chrome");
34
- var import_Page = require("./Page");
35
- const StorybookEntry = {
36
- argTypes: {},
37
- component: import_Chrome.WebAppChrome,
38
- parameters: {
39
- docs: {
40
- page: null
41
- }
42
- },
43
- title: "webapp/WebAppChrome"
44
- };
45
- const rowArray = [32, 64, 128, 256, 512, 1024];
46
- const Children = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
- import_Page.WebAppPage,
48
- {
49
- breadcrumbs: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Breadcrumbs, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_link.LinkEx, { children: "BreadCrumbs" }) }),
50
- ...props,
51
- children: rowArray.map((height) => {
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { height, children: height }, height);
53
- })
54
- }
55
- );
56
- const Template = (args) => {
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.BrowserRouter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
58
- import_Chrome.WebAppChrome,
59
- {
60
- menuItems: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.List, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_appbar.MenuListItemContainer, { primary: "Hello" }) }),
61
- height: "calc(100vh - 2rem)",
62
- ...args
63
- }
64
- ) });
65
- };
66
- const Default = Template.bind({});
67
- Default.args = {};
68
- const DefaultSideBar = Template.bind({});
69
- DefaultSideBar.args = { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Children, {}), navigationType: "sidebar" };
70
- const WithFixedSizePage = Template.bind({});
71
- WithFixedSizePage.args = { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Children, { variant: "fixed" }), navigationType: "sidebar" };
72
- var Chrome_stories_default = StorybookEntry;
73
- // Annotate the CommonJS export names for ESM import in node:
74
- 0 && (module.exports = {
75
- Default,
76
- DefaultSideBar,
77
- WithFixedSizePage
78
- });
79
- //# sourceMappingURL=Chrome.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Chrome.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { Breadcrumbs, List } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { MenuListItemContainer } from '@xyo-network/react-appbar'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport { WebAppChrome } from './Chrome'\nimport { WebAppPage, WebAppPageProps } from './Page'\n\nconst StorybookEntry = {\n argTypes: {},\n component: WebAppChrome,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/WebAppChrome',\n} as Meta<typeof WebAppChrome>\n\nconst rowArray = [32, 64, 128, 256, 512, 1024]\n\nconst Children: React.FC<WebAppPageProps> = (props) => (\n <WebAppPage\n breadcrumbs={\n <Breadcrumbs>\n <LinkEx>BreadCrumbs</LinkEx>\n </Breadcrumbs>\n }\n {...props}\n >\n {rowArray.map((height) => {\n return (\n <FlexRow key={height} height={height}>\n {height}\n </FlexRow>\n )\n })}\n </WebAppPage>\n)\n\nconst Template: StoryFn<typeof WebAppChrome> = (args) => {\n return (\n <BrowserRouter>\n <WebAppChrome\n menuItems={\n <List>\n <MenuListItemContainer primary=\"Hello\" />\n </List>\n }\n height=\"calc(100vh - 2rem)\"\n {...args}\n ></WebAppChrome>\n </BrowserRouter>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst DefaultSideBar = Template.bind({})\nDefaultSideBar.args = { children: <Children />, navigationType: 'sidebar' }\n\nconst WithFixedSizePage = Template.bind({})\nWithFixedSizePage.args = { children: <Children variant=\"fixed\" />, navigationType: 'sidebar' }\n\nexport { Default, DefaultSideBar, WithFixedSizePage }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BQ;AA3BR,sBAAkC;AAElC,2BAAwB;AACxB,wBAAuB;AACvB,0BAAsC;AACtC,8BAA8B;AAE9B,oBAA6B;AAC7B,kBAA4C;AAE5C,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAW,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI;AAE7C,MAAM,WAAsC,CAAC,UAC3C;AAAA,EAAC;AAAA;AAAA,IACC,aACE,4CAAC,+BACC,sDAAC,4BAAO,yBAAW,GACrB;AAAA,IAED,GAAG;AAAA,IAEH,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE,4CAAC,gCAAqB,QACnB,oBADW,MAEd;AAAA,IAEJ,CAAC;AAAA;AACH;AAGF,MAAM,WAAyC,CAAC,SAAS;AACvD,SACE,4CAAC,yCACC;AAAA,IAAC;AAAA;AAAA,MACC,WACE,4CAAC,wBACC,sDAAC,6CAAsB,SAAQ,SAAQ,GACzC;AAAA,MAEF,QAAO;AAAA,MACN,GAAG;AAAA;AAAA,EACL,GACH;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,UAAU,4CAAC,YAAS,GAAI,gBAAgB,UAAU;AAE1E,MAAM,oBAAoB,SAAS,KAAK,CAAC,CAAC;AAC1C,kBAAkB,OAAO,EAAE,UAAU,4CAAC,YAAS,SAAQ,SAAQ,GAAI,gBAAgB,UAAU;AAK7F,IAAO,yBAAQ;","names":[]}
@@ -1,53 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Breadcrumbs, List } from "@mui/material";
3
- import { FlexRow } from "@xylabs/react-flexbox";
4
- import { LinkEx } from "@xylabs/react-link";
5
- import { MenuListItemContainer } from "@xyo-network/react-appbar";
6
- import { BrowserRouter } from "react-router-dom";
7
- import { WebAppChrome } from "./Chrome";
8
- import { WebAppPage } from "./Page";
9
- const StorybookEntry = {
10
- argTypes: {},
11
- component: WebAppChrome,
12
- parameters: {
13
- docs: {
14
- page: null
15
- }
16
- },
17
- title: "webapp/WebAppChrome"
18
- };
19
- const rowArray = [32, 64, 128, 256, 512, 1024];
20
- const Children = (props) => /* @__PURE__ */ jsx(
21
- WebAppPage,
22
- {
23
- breadcrumbs: /* @__PURE__ */ jsx(Breadcrumbs, { children: /* @__PURE__ */ jsx(LinkEx, { children: "BreadCrumbs" }) }),
24
- ...props,
25
- children: rowArray.map((height) => {
26
- return /* @__PURE__ */ jsx(FlexRow, { height, children: height }, height);
27
- })
28
- }
29
- );
30
- const Template = (args) => {
31
- return /* @__PURE__ */ jsx(BrowserRouter, { children: /* @__PURE__ */ jsx(
32
- WebAppChrome,
33
- {
34
- menuItems: /* @__PURE__ */ jsx(List, { children: /* @__PURE__ */ jsx(MenuListItemContainer, { primary: "Hello" }) }),
35
- height: "calc(100vh - 2rem)",
36
- ...args
37
- }
38
- ) });
39
- };
40
- const Default = Template.bind({});
41
- Default.args = {};
42
- const DefaultSideBar = Template.bind({});
43
- DefaultSideBar.args = { children: /* @__PURE__ */ jsx(Children, {}), navigationType: "sidebar" };
44
- const WithFixedSizePage = Template.bind({});
45
- WithFixedSizePage.args = { children: /* @__PURE__ */ jsx(Children, { variant: "fixed" }), navigationType: "sidebar" };
46
- var Chrome_stories_default = StorybookEntry;
47
- export {
48
- Default,
49
- DefaultSideBar,
50
- WithFixedSizePage,
51
- Chrome_stories_default as default
52
- };
53
- //# sourceMappingURL=Chrome.stories.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Chrome.stories.tsx"],"sourcesContent":["/* eslint-disable import/no-internal-modules */\nimport { Breadcrumbs, List } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { LinkEx } from '@xylabs/react-link'\nimport { MenuListItemContainer } from '@xyo-network/react-appbar'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport { WebAppChrome } from './Chrome'\nimport { WebAppPage, WebAppPageProps } from './Page'\n\nconst StorybookEntry = {\n argTypes: {},\n component: WebAppChrome,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/WebAppChrome',\n} as Meta<typeof WebAppChrome>\n\nconst rowArray = [32, 64, 128, 256, 512, 1024]\n\nconst Children: React.FC<WebAppPageProps> = (props) => (\n <WebAppPage\n breadcrumbs={\n <Breadcrumbs>\n <LinkEx>BreadCrumbs</LinkEx>\n </Breadcrumbs>\n }\n {...props}\n >\n {rowArray.map((height) => {\n return (\n <FlexRow key={height} height={height}>\n {height}\n </FlexRow>\n )\n })}\n </WebAppPage>\n)\n\nconst Template: StoryFn<typeof WebAppChrome> = (args) => {\n return (\n <BrowserRouter>\n <WebAppChrome\n menuItems={\n <List>\n <MenuListItemContainer primary=\"Hello\" />\n </List>\n }\n height=\"calc(100vh - 2rem)\"\n {...args}\n ></WebAppChrome>\n </BrowserRouter>\n )\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst DefaultSideBar = Template.bind({})\nDefaultSideBar.args = { children: <Children />, navigationType: 'sidebar' }\n\nconst WithFixedSizePage = Template.bind({})\nWithFixedSizePage.args = { children: <Children variant=\"fixed\" />, navigationType: 'sidebar' }\n\nexport { Default, DefaultSideBar, WithFixedSizePage }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AA4BQ;AA3BR,SAAS,aAAa,YAAY;AAElC,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAC7B,SAAS,kBAAmC;AAE5C,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAW,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI;AAE7C,MAAM,WAAsC,CAAC,UAC3C;AAAA,EAAC;AAAA;AAAA,IACC,aACE,oBAAC,eACC,8BAAC,UAAO,yBAAW,GACrB;AAAA,IAED,GAAG;AAAA,IAEH,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE,oBAAC,WAAqB,QACnB,oBADW,MAEd;AAAA,IAEJ,CAAC;AAAA;AACH;AAGF,MAAM,WAAyC,CAAC,SAAS;AACvD,SACE,oBAAC,iBACC;AAAA,IAAC;AAAA;AAAA,MACC,WACE,oBAAC,QACC,8BAAC,yBAAsB,SAAQ,SAAQ,GACzC;AAAA,MAEF,QAAO;AAAA,MACN,GAAG;AAAA;AAAA,EACL,GACH;AAEJ;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO,EAAE,UAAU,oBAAC,YAAS,GAAI,gBAAgB,UAAU;AAE1E,MAAM,oBAAoB,SAAS,KAAK,CAAC,CAAC;AAC1C,kBAAkB,OAAO,EAAE,UAAU,oBAAC,YAAS,SAAQ,SAAQ,GAAI,gBAAgB,UAAU;AAK7F,IAAO,yBAAQ;","names":[]}
@@ -1,14 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { ButtonEx } from "@xylabs/react-button";
3
- import { WebAppPage } from "./Page";
4
- const WebAppErrorPage = ({ error, ...props }) => /* @__PURE__ */ jsxs(WebAppPage, { title: "Oops! Something went wrong", ...props, children: [
5
- /* @__PURE__ */ jsx("h1", { children: "Oops! Something went wrong!" }),
6
- /* @__PURE__ */ jsx("p", { children: `${error}` }),
7
- /* @__PURE__ */ jsx(ButtonEx, { href: "/", variant: "contained", children: "Homepage" })
8
- ] });
9
- const ErrorPage = WebAppErrorPage;
10
- export {
11
- ErrorPage,
12
- WebAppErrorPage
13
- };
14
- //# sourceMappingURL=ErrorPage.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ErrorPage.tsx"],"sourcesContent":["import { ButtonEx } from '@xylabs/react-button'\n\nimport { WebAppPage, WebAppPageProps } from './Page'\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"],"mappings":"AASE,SACE,KADF;AATF,SAAS,gBAAgB;AAEzB,SAAS,kBAAmC;AAMrC,MAAM,kBAAkD,CAAC,EAAE,OAAO,GAAG,MAAM,MAChF,qBAAC,cAAW,OAAM,8BAA8B,GAAG,OACjD;AAAA,sBAAC,QAAG,yCAA2B;AAAA,EAC/B,oBAAC,OAAG,aAAG,KAAK,IAAG;AAAA,EACf,oBAAC,YAAS,MAAK,KAAI,SAAQ,aAAY,sBAEvC;AAAA,GACF;AAIK,MAAM,YAAY;","names":[]}
@@ -1,10 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { NotFound } from "@xyo-network/react-shared";
3
- import { WebAppPage } from "../Page";
4
- const WebAppNotFoundPage = ({ title, ...props }) => /* @__PURE__ */ jsx(WebAppPage, { title: title ?? "Sorry! Page Not Found", ...props, children: /* @__PURE__ */ jsx(NotFound, {}) });
5
- const NotFoundPage = WebAppNotFoundPage;
6
- export {
7
- NotFoundPage,
8
- WebAppNotFoundPage
9
- };
10
- //# sourceMappingURL=Page.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/NotFoundPage/Page.tsx"],"sourcesContent":["import { NotFound } from '@xyo-network/react-shared'\n\nimport { WebAppPage, WebAppPageProps } from '../Page'\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":"AAMI;AANJ,SAAS,gBAAgB;AAEzB,SAAS,kBAAmC;AAErC,MAAM,qBAAgD,CAAC,EAAE,OAAO,GAAG,MAAM,MAC9E,oBAAC,cAAW,OAAO,SAAS,yBAA0B,GAAG,OACvD,8BAAC,YAAS,GACZ;AAIK,MAAM,eAAe;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/NotFoundPage/Page.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { NotFound } from '@xyo-network/react-shared'\n\nconst StorybookEntry = {\n argTypes: {},\n component: NotFound,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/NotFound',\n} as Meta<typeof NotFound>\n\nconst Template: StoryFn<typeof NotFound> = () => {\n return <NotFound />\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nexport { Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeS;AAdT,0BAAyB;AAEzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,MAAM;AAC/C,SAAO,4CAAC,gCAAS;AACnB;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAKhB,IAAO,uBAAQ;","names":[]}
@@ -1,23 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { NotFound } from "@xyo-network/react-shared";
3
- const StorybookEntry = {
4
- argTypes: {},
5
- component: NotFound,
6
- parameters: {
7
- docs: {
8
- page: null
9
- }
10
- },
11
- title: "webapp/NotFound"
12
- };
13
- const Template = () => {
14
- return /* @__PURE__ */ jsx(NotFound, {});
15
- };
16
- const Default = Template.bind({});
17
- Default.args = {};
18
- var Page_stories_default = StorybookEntry;
19
- export {
20
- Default,
21
- Page_stories_default as default
22
- };
23
- //# sourceMappingURL=Page.stories.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/NotFoundPage/Page.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { NotFound } from '@xyo-network/react-shared'\n\nconst StorybookEntry = {\n argTypes: {},\n component: NotFound,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'webapp/NotFound',\n} as Meta<typeof NotFound>\n\nconst Template: StoryFn<typeof NotFound> = () => {\n return <NotFound />\n}\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nexport { Default }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAeS;AAdT,SAAS,gBAAgB;AAEzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,MAAM;AAC/C,SAAO,oBAAC,YAAS;AACnB;AAEA,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAKhB,IAAO,uBAAQ;","names":[]}
@@ -1,2 +0,0 @@
1
- export * from "./Page";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/NotFoundPage/index.ts"],"sourcesContent":["export * from './Page'\n"],"mappings":"AAAA,cAAc;","names":[]}
@@ -1,86 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Container, styled } from "@mui/material";
3
- import { useAsyncEffect } from "@xylabs/react-async-effect";
4
- import { FlexGrowCol } from "@xylabs/react-flexbox";
5
- import { useUserEvents } from "@xylabs/react-pixel";
6
- import { Helmet } from "react-helmet";
7
- import { useLocation } from "react-router-dom";
8
- import { WebAppBody } from "./Body";
9
- import { fixedWrap, scrollableWrap } from "./lib";
10
- const WebAppPageRoot = styled(FlexGrowCol, {
11
- name: "WebAppPage",
12
- shouldForwardProp: (propName) => propName !== "mobileScrollingBreakpoint" && propName !== "variant",
13
- slot: "Root"
14
- })(({ theme, mobileScrollingBreakpoint = "sm", variant }) => {
15
- const props = variant === "scrollable" ? scrollableWrap : fixedWrap;
16
- return {
17
- ...props,
18
- alignItems: "stretch",
19
- justifyContent: "start",
20
- maxWidth: "100vw",
21
- [theme.breakpoints.down(mobileScrollingBreakpoint)]: {
22
- inset: 0,
23
- position: "absolute"
24
- }
25
- };
26
- });
27
- const WebAppPage = ({
28
- disableGutters,
29
- disableBreadcrumbGutter,
30
- title,
31
- container,
32
- children,
33
- breadcrumbs,
34
- mobileScrollingBreakpoint,
35
- variant = "scrollable",
36
- ...props
37
- }) => {
38
- const userEvents = useUserEvents();
39
- const { pathname } = useLocation();
40
- useAsyncEffect(
41
- // eslint-disable-next-line react-hooks/exhaustive-deps
42
- async () => {
43
- await userEvents?.viewContent({ name: title ?? "NodeBasePage", path: location.pathname });
44
- },
45
- [pathname, title, userEvents]
46
- );
47
- return /* @__PURE__ */ jsxs(WebAppPageRoot, { mobileScrollingBreakpoint, variant, ...props, children: [
48
- /* @__PURE__ */ jsx(Helmet, { title }),
49
- container && container !== "none" ? /* @__PURE__ */ jsx(
50
- Container,
51
- {
52
- disableGutters,
53
- style: { alignItems: "stretch", display: "flex", flexDirection: "column", flexGrow: 1, justifyContent: "flex-start" },
54
- maxWidth: container,
55
- children: /* @__PURE__ */ jsx(
56
- WebAppBody,
57
- {
58
- disableBreadcrumbGutter,
59
- breadcrumbs,
60
- mobileScrollingBreakpoint,
61
- variant,
62
- ...props,
63
- children
64
- }
65
- )
66
- }
67
- ) : /* @__PURE__ */ jsx(
68
- WebAppBody,
69
- {
70
- disableBreadcrumbGutter,
71
- breadcrumbs,
72
- mobileScrollingBreakpoint,
73
- paddingX: disableGutters ? 0 : 1,
74
- variant,
75
- ...props,
76
- children
77
- }
78
- )
79
- ] });
80
- };
81
- const FlexPage = WebAppPage;
82
- export {
83
- FlexPage,
84
- WebAppPage
85
- };
86
- //# sourceMappingURL=Page.mjs.map