@xyo-network/react-appbar 2.35.12 → 2.35.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/CollapsibleDrawer/CollapseToggle.d.ts.map +1 -1
- package/dist/cjs/components/CollapsibleDrawer/CollapseToggle.js +2 -5
- package/dist/cjs/components/CollapsibleDrawer/CollapseToggle.js.map +1 -1
- package/dist/cjs/components/CollapsibleDrawer/ExampleMenuData.d.ts +4 -0
- package/dist/cjs/components/CollapsibleDrawer/ExampleMenuData.d.ts.map +1 -0
- package/dist/cjs/components/CollapsibleDrawer/ExampleMenuData.js +69 -0
- package/dist/cjs/components/CollapsibleDrawer/ExampleMenuData.js.map +1 -0
- package/dist/cjs/components/SiteMenu/MenuIcon.d.ts +2 -2
- package/dist/cjs/components/SiteMenu/MenuIcon.d.ts.map +1 -1
- package/dist/cjs/components/SiteMenu/MenuIcon.js +1 -1
- package/dist/cjs/components/SiteMenu/MenuIcon.js.map +1 -1
- package/dist/cjs/components/SiteMenu/MenuItems.d.ts +12 -0
- package/dist/cjs/components/SiteMenu/MenuItems.d.ts.map +1 -1
- package/dist/cjs/components/SiteMenu/MenuItems.js +13 -2
- package/dist/cjs/components/SiteMenu/MenuItems.js.map +1 -1
- package/dist/cjs/components/SiteMenu/MenuListItemButtonEx.js +1 -1
- package/dist/cjs/components/SiteMenu/MenuListItemButtonEx.js.map +1 -1
- package/dist/cjs/components/SiteMenu/MenuSection.d.ts +10 -0
- package/dist/cjs/components/SiteMenu/MenuSection.d.ts.map +1 -0
- package/dist/cjs/components/SiteMenu/MenuSection.js +13 -0
- package/dist/cjs/components/SiteMenu/MenuSection.js.map +1 -0
- package/dist/cjs/components/SiteMenu/index.d.ts +1 -0
- package/dist/cjs/components/SiteMenu/index.d.ts.map +1 -1
- package/dist/cjs/components/SiteMenu/index.js +1 -0
- package/dist/cjs/components/SiteMenu/index.js.map +1 -1
- package/dist/docs.json +581 -138
- package/dist/esm/components/CollapsibleDrawer/CollapseToggle.d.ts.map +1 -1
- package/dist/esm/components/CollapsibleDrawer/CollapseToggle.js +2 -4
- package/dist/esm/components/CollapsibleDrawer/CollapseToggle.js.map +1 -1
- package/dist/esm/components/CollapsibleDrawer/ExampleMenuData.d.ts +4 -0
- package/dist/esm/components/CollapsibleDrawer/ExampleMenuData.d.ts.map +1 -0
- package/dist/esm/components/CollapsibleDrawer/ExampleMenuData.js +66 -0
- package/dist/esm/components/CollapsibleDrawer/ExampleMenuData.js.map +1 -0
- package/dist/esm/components/SiteMenu/MenuIcon.d.ts +2 -2
- package/dist/esm/components/SiteMenu/MenuIcon.d.ts.map +1 -1
- package/dist/esm/components/SiteMenu/MenuIcon.js +1 -1
- package/dist/esm/components/SiteMenu/MenuIcon.js.map +1 -1
- package/dist/esm/components/SiteMenu/MenuItems.d.ts +12 -0
- package/dist/esm/components/SiteMenu/MenuItems.d.ts.map +1 -1
- package/dist/esm/components/SiteMenu/MenuItems.js +13 -2
- package/dist/esm/components/SiteMenu/MenuItems.js.map +1 -1
- package/dist/esm/components/SiteMenu/MenuListItemButtonEx.js +1 -1
- package/dist/esm/components/SiteMenu/MenuListItemButtonEx.js.map +1 -1
- package/dist/esm/components/SiteMenu/MenuSection.d.ts +10 -0
- package/dist/esm/components/SiteMenu/MenuSection.d.ts.map +1 -0
- package/dist/esm/components/SiteMenu/MenuSection.js +7 -0
- package/dist/esm/components/SiteMenu/MenuSection.js.map +1 -0
- package/dist/esm/components/SiteMenu/index.d.ts +1 -0
- package/dist/esm/components/SiteMenu/index.d.ts.map +1 -1
- package/dist/esm/components/SiteMenu/index.js +1 -0
- package/dist/esm/components/SiteMenu/index.js.map +1 -1
- package/package.json +7 -6
- package/src/components/CollapsibleDrawer/CollapseDrawer.stories.tsx +9 -17
- package/src/components/CollapsibleDrawer/CollapseToggle.tsx +2 -4
- package/src/components/CollapsibleDrawer/ExampleMenuData.tsx +81 -0
- package/src/components/SiteMenu/MenuIcon.tsx +3 -4
- package/src/components/SiteMenu/MenuItem.stories.tsx +9 -10
- package/src/components/SiteMenu/MenuItems.tsx +65 -8
- package/src/components/SiteMenu/MenuListItemButtonEx.tsx +1 -1
- package/src/components/SiteMenu/MenuSection.tsx +22 -0
- package/src/components/SiteMenu/index.ts +1 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CollapseToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"CollapseToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAK7D,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoBrD,CAAA"}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import KeyboardDoubleArrowLeftRoundedIcon from '@mui/icons-material/KeyboardDoubleArrowLeftRounded';
|
3
|
-
import KeyboardDoubleArrowRightRounded from '@mui/icons-material/KeyboardDoubleArrowRightRounded';
|
4
2
|
import { IconButton } from '@mui/material';
|
5
3
|
import { FlexRow } from '@xylabs/react-flexbox';
|
4
|
+
import { VscArrowSmallLeft, VscArrowSmallRight } from 'react-icons/vsc';
|
6
5
|
import { useCollapsible } from '../../contexts';
|
7
6
|
export const CollapseToggleFlex = (props) => {
|
8
7
|
const { collapse, setCollapse, setCollapseEnd } = useCollapsible();
|
@@ -12,7 +11,6 @@ export const CollapseToggleFlex = (props) => {
|
|
12
11
|
};
|
13
12
|
return (_jsx(FlexRow, { mt: 2, py: 2, ...props, children: _jsx(IconButton, { onClick: handleCollapseToggle, sx: {
|
14
13
|
flexDirection: 'column',
|
15
|
-
|
16
|
-
}, children: !collapse ? _jsx(KeyboardDoubleArrowLeftRoundedIcon, {}) : _jsx(KeyboardDoubleArrowRightRounded, {}) }) }));
|
14
|
+
}, children: !collapse ? _jsx(VscArrowSmallLeft, {}) : _jsx(VscArrowSmallRight, {}) }) }));
|
17
15
|
};
|
18
16
|
//# sourceMappingURL=CollapseToggle.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CollapseToggle.js","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,
|
1
|
+
{"version":3,"file":"CollapseToggle.js","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/CollapseToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAgB,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,CAAC,MAAM,kBAAkB,GAA2B,CAAC,KAAK,EAAE,EAAE;IAClE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAA;IAElE,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAChC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAA;QACxB,cAAc,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC/D,CAAC,CAAA;IAED,OAAO,CACL,KAAC,OAAO,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAM,KAAK,YAC9B,KAAC,UAAU,IACT,OAAO,EAAE,oBAAoB,EAC7B,EAAE,EAAE;gBACF,aAAa,EAAE,QAAQ;aACxB,YAEA,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,iBAAiB,KAAG,CAAC,CAAC,CAAC,KAAC,kBAAkB,KAAG,GAChD,GACL,CACX,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExampleMenuData.d.ts","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/ExampleMenuData.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAEnD,eAAO,MAAM,WAAW,EAAE,qBAAqB,EAoC9C,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,qBAAqB,EAyBjD,CAAA"}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { VscAccount, VscAdd, VscDashboard, VscGlobe, VscGraph, VscGraphLine, VscJson, VscServer, VscSettingsGear, VscSymbolMethod, VscSymbolNamespace, VscTable, } from 'react-icons/vsc';
|
3
|
+
export const menuDataTop = [
|
4
|
+
{
|
5
|
+
icon: _jsx(VscGlobe, { fontSize: "body1" }),
|
6
|
+
primary: 'Explore',
|
7
|
+
to: '',
|
8
|
+
tooltip: 'View global archivist data on a world map.',
|
9
|
+
},
|
10
|
+
{
|
11
|
+
icon: _jsx(VscSymbolMethod, { fontSize: "body1" }),
|
12
|
+
primary: 'Blocks',
|
13
|
+
to: '',
|
14
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
15
|
+
},
|
16
|
+
{
|
17
|
+
icon: _jsx(VscSymbolNamespace, { fontSize: "body1" }),
|
18
|
+
primary: 'Payloads',
|
19
|
+
to: '',
|
20
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
21
|
+
},
|
22
|
+
{
|
23
|
+
icon: _jsx(VscGraph, { fontSize: "body1" }),
|
24
|
+
primary: 'Queries',
|
25
|
+
to: '',
|
26
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
27
|
+
},
|
28
|
+
{
|
29
|
+
icon: _jsx(VscServer, { fontSize: "body1" }),
|
30
|
+
primary: 'Archives',
|
31
|
+
subNavListItems: [
|
32
|
+
{ icon: _jsx(VscDashboard, { fontSize: "body2" }), primary: 'Dashboard', to: '', tooltip: 'View data for all archives on this network.' },
|
33
|
+
{ icon: _jsx(VscAdd, { fontSize: "body2" }), primary: 'Create Archive', to: '', tooltip: 'Create a new archive on this network.' },
|
34
|
+
{ icon: _jsx(VscTable, { fontSize: "body2" }), primary: 'Archive Table', to: '', tooltip: 'View all archives on this network as a table.' },
|
35
|
+
],
|
36
|
+
to: '',
|
37
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
38
|
+
},
|
39
|
+
];
|
40
|
+
export const menuDataBottom = [
|
41
|
+
{
|
42
|
+
icon: _jsx(VscGraphLine, { fontSize: "body1" }),
|
43
|
+
primary: 'Statistics',
|
44
|
+
to: '',
|
45
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
46
|
+
},
|
47
|
+
{
|
48
|
+
icon: _jsx(VscJson, { fontSize: "body1" }),
|
49
|
+
primary: 'Schema',
|
50
|
+
to: '',
|
51
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
icon: _jsx(VscAccount, { fontSize: "body1" }),
|
55
|
+
primary: 'Account',
|
56
|
+
to: '',
|
57
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
58
|
+
},
|
59
|
+
{
|
60
|
+
icon: _jsx(VscSettingsGear, { fontSize: "body1" }),
|
61
|
+
primary: 'Settings',
|
62
|
+
to: '',
|
63
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
64
|
+
},
|
65
|
+
];
|
66
|
+
//# sourceMappingURL=ExampleMenuData.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ExampleMenuData.js","sourceRoot":"","sources":["../../../../src/components/CollapsibleDrawer/ExampleMenuData.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,MAAM,EACN,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GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,+CAA+C,EAAE;SACpI;QACD,EAAE,EAAE,EAAE;QACN,OAAO,EAAE,6EAA6E;KACvF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAA4B;IACrD;QACE,IAAI,EAAE,KAAC,YAAY,IAAC,QAAQ,EAAC,OAAO,GAAG;QACvC,OAAO,EAAE,YAAY;QACrB,EAAE,EAAE,EAAE;QACN,OAAO,EAAE,6EAA6E;KACvF;IACD;QACE,IAAI,EAAE,KAAC,OAAO,IAAC,QAAQ,EAAC,OAAO,GAAG;QAClC,OAAO,EAAE,QAAQ;QACjB,EAAE,EAAE,EAAE;QACN,OAAO,EAAE,6EAA6E;KACvF;IACD;QACE,IAAI,EAAE,KAAC,UAAU,IAAC,QAAQ,EAAC,OAAO,GAAG;QACrC,OAAO,EAAE,SAAS;QAClB,EAAE,EAAE,EAAE;QACN,OAAO,EAAE,6EAA6E;KACvF;IACD;QACE,IAAI,EAAE,KAAC,eAAe,IAAC,QAAQ,EAAC,OAAO,GAAG;QAC1C,OAAO,EAAE,UAAU;QACnB,EAAE,EAAE,EAAE;QACN,OAAO,EAAE,6EAA6E;KACvF;CACF,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { TypographyProps } from '@mui/material';
|
2
2
|
import { ReactNode } from 'react';
|
3
|
-
export interface MenuIconProps extends
|
3
|
+
export interface MenuIconProps extends TypographyProps {
|
4
4
|
icon?: ReactNode;
|
5
5
|
}
|
6
6
|
export declare const MenuIcon: React.FC<MenuIconProps>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuIcon.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"MenuIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAM5C,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { Typography } from '@mui/material';
|
3
3
|
export const MenuIcon = ({ icon, ...props }) => {
|
4
|
-
return (_jsx(Typography, { display: "flex",
|
4
|
+
return (_jsx(Typography, { display: "flex", ...props, children: icon }));
|
5
5
|
};
|
6
6
|
//# sourceMappingURL=MenuIcon.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuIcon.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,
|
1
|
+
{"version":3,"file":"MenuIcon.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAA;AAO3D,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACtE,OAAO,CACL,KAAC,UAAU,IAAC,OAAO,EAAC,MAAM,KAAK,KAAK,YACjC,IAAI,GACM,CACd,CAAA;AACH,CAAC,CAAA"}
|
@@ -6,8 +6,20 @@ import { SiteMenuListItemBase } from './lib';
|
|
6
6
|
export interface SiteMenuListItemProps extends SiteMenuListItemBase, ListItemProps {
|
7
7
|
primary: ListItemTextProps['primary'];
|
8
8
|
to?: To;
|
9
|
+
href?: string;
|
9
10
|
icon?: ReactNode;
|
10
11
|
onButtonClick?: ListItemButtonExProps['onClick'];
|
12
|
+
subNavListItems?: SubNavListItemProps[];
|
13
|
+
tooltip?: string;
|
14
|
+
subNavOpen?: boolean;
|
15
|
+
}
|
16
|
+
export interface SubNavListItemProps {
|
17
|
+
primary: ListItemTextProps['primary'];
|
18
|
+
to?: To;
|
19
|
+
href?: string;
|
20
|
+
icon?: ReactNode;
|
21
|
+
onButtonClick?: ListItemButtonExProps['onClick'];
|
22
|
+
tooltip?: string;
|
11
23
|
}
|
12
24
|
export declare const SiteMenuListItem: React.FC<SiteMenuListItemProps>;
|
13
25
|
//# sourceMappingURL=MenuItems.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuItems.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuItems.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"MenuItems.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuItems.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,aAAa,EAAE,iBAAiB,EAAqB,MAAM,eAAe,CAAA;AAE/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAE3C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;AAGrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAM5C,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB,EAAE,aAAa;IAChF,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACrC,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAA;IAChD,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAA;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACrC,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,aAAa,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAA;IAChD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8D5D,CAAA"}
|
@@ -1,10 +1,21 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { Collapse, IconButton, List, Tooltip, useTheme } from '@mui/material';
|
3
|
+
import { FlexCol, FlexRow } from '@xylabs/react-flexbox';
|
4
|
+
import { useState } from 'react';
|
5
|
+
import { VscChevronDown, VscInfo } from 'react-icons/vsc';
|
6
|
+
import { useCollapsible } from '../../contexts';
|
2
7
|
import { MenuIcon } from './MenuIcon';
|
3
8
|
import { MenuListItem } from './MenuListItem';
|
4
9
|
import { MenuListItemButtonEx } from './MenuListItemButtonEx';
|
5
10
|
import { MenuListItemText } from './MenuListItemText';
|
6
|
-
export const SiteMenuListItem = ({ style,
|
11
|
+
export const SiteMenuListItem = ({ style, subNavListItems, iconOnly, tooltip, collapseEnd, icon, primary, onButtonClick, to, ...props }) => {
|
7
12
|
const { dense } = props;
|
8
|
-
|
13
|
+
const theme = useTheme();
|
14
|
+
const { collapse } = useCollapsible();
|
15
|
+
const [openSubNav, setOpenSubNav] = useState(false);
|
16
|
+
const [hovered, setHovered] = useState(false);
|
17
|
+
return (_jsxs(MenuListItem, { disableGutters: true, style: { whiteSpace: 'nowrap', ...style }, iconOnly: iconOnly, ...props, children: [_jsxs(MenuListItemButtonEx, { iconOnly: iconOnly, onClick: onButtonClick, collapseEnd: collapseEnd, dense: dense, to: to, sx: { justifyContent: 'space-between' }, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [_jsxs(FlexRow, { children: [_jsx(MenuIcon, { icon: icon, paddingRight: theme.spacing(1), color: hovered ? 'primary' : 'inherit' }), _jsx(MenuListItemText, { primary: primary, iconOnly: iconOnly })] }), _jsxs(FlexRow, { children: [subNavListItems ? (_jsx(IconButton, { onClick: () => setOpenSubNav(!openSubNav), sx: { marginRight: theme.spacing(1) }, children: _jsx(VscChevronDown, { fontSize: "16px" }) })) : null, tooltip ? (_jsx(Tooltip, { title: tooltip, placement: "right", children: _jsx("div", { children: _jsx(FlexCol, { justifyContent: "center", children: _jsx(VscInfo, { color: "grey" }) }) }) })) : null] })] }), subNavListItems ? (_jsx(Collapse, { in: collapse == true ? false : openSubNav, children: _jsx(List, { children: subNavListItems.map((item, index) => {
|
18
|
+
return _jsx(SiteMenuListItem, { sx: { pl: theme.spacing(1) }, ...item }, index);
|
19
|
+
}) }) })) : null] }));
|
9
20
|
};
|
10
21
|
//# sourceMappingURL=MenuItems.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuItems.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuItems.tsx"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"MenuItems.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuItems.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAoC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC/G,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,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-network/react-shared';
|
3
3
|
export const MenuListItemButtonEx = ({ iconOnly, collapseEnd, sx, children, ...props }) => {
|
4
|
-
const
|
4
|
+
const dense = props;
|
5
5
|
const listItemButtonSx = iconOnly ? { borderRadius: '50%', display: 'inline-flex', flexGrow: 0 } : {};
|
6
6
|
// wait till collapseEnds to remove the spacing between items
|
7
7
|
const spacingSx = collapseEnd ? { columnGap: 0 } : { columnGap: 1.5 };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MenuListItemButtonEx.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuListItemButtonEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,2BAA2B,CAAA;AAMnF,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC7H,MAAM,
|
1
|
+
{"version":3,"file":"MenuListItemButtonEx.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuListItemButtonEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,2BAA2B,CAAA;AAMnF,MAAM,CAAC,MAAM,oBAAoB,GAAwC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC7H,MAAM,KAAK,GAAG,KAAK,CAAA;IACnB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IACrG,6DAA6D;IAC7D,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAA;IACrE,6EAA6E;IAC7E,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAA;IACxD,OAAO,CACL,KAAC,gBAAgB,IAAC,EAAE,EAAE,EAAE,GAAG,gBAAgB,EAAE,GAAG,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,EAAE,KAAM,KAAK,YACxF,QAAQ,GACQ,CACpB,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ListProps } from '@mui/material';
|
3
|
+
import { SiteMenuListItemProps } from './MenuItems';
|
4
|
+
export interface MenuSectionProps extends ListProps {
|
5
|
+
title: string;
|
6
|
+
listItems: SiteMenuListItemProps[];
|
7
|
+
showTitle?: boolean;
|
8
|
+
}
|
9
|
+
export declare const MenuSection: React.FC<MenuSectionProps>;
|
10
|
+
//# sourceMappingURL=MenuSection.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MenuSection.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAiB,MAAM,eAAe,CAAA;AAE9D,OAAO,EAAoB,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAErE,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,qBAAqB,EAAE,CAAA;IAClC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAWlD,CAAA"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { List, ListSubheader } from '@mui/material';
|
3
|
+
import { SiteMenuListItem } from './MenuItems';
|
4
|
+
export const MenuSection = ({ title, listItems, showTitle = true, ...props }) => {
|
5
|
+
return (_jsxs(List, { ...props, children: [showTitle ? _jsx(ListSubheader, { children: title }) : null, listItems.map((item, index) => (_jsx(_Fragment, { children: _jsx(SiteMenuListItem, { ...item }, index) })))] }));
|
6
|
+
};
|
7
|
+
//# sourceMappingURL=MenuSection.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"MenuSection.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/MenuSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAa,aAAa,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,EAAE,gBAAgB,EAAyB,MAAM,aAAa,CAAA;AAQrE,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC1G,OAAO,CACL,MAAC,IAAI,OAAK,KAAK,aACZ,SAAS,CAAC,CAAC,CAAC,KAAC,aAAa,cAAE,KAAK,GAAiB,CAAC,CAAC,CAAC,IAAI,EACzD,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,4BACE,KAAC,gBAAgB,OAAiB,IAAI,IAAf,KAAK,CAA+B,GAC1D,CACJ,CAAC,IACG,CACR,CAAA;AACH,CAAC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/SiteMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/SiteMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA"}
|
package/package.json
CHANGED
@@ -16,11 +16,11 @@
|
|
16
16
|
"@xylabs/react-flexbox": "^2.14.20",
|
17
17
|
"@xylabs/react-link": "^2.14.20",
|
18
18
|
"@xylabs/react-shared": "^2.14.20",
|
19
|
-
"@xyo-network/react-app-settings": "^2.35.
|
20
|
-
"@xyo-network/react-archive": "^2.35.
|
21
|
-
"@xyo-network/react-auth-sets": "^2.35.
|
22
|
-
"@xyo-network/react-network": "^2.35.
|
23
|
-
"@xyo-network/react-shared": "^2.35.
|
19
|
+
"@xyo-network/react-app-settings": "^2.35.13",
|
20
|
+
"@xyo-network/react-archive": "^2.35.13",
|
21
|
+
"@xyo-network/react-auth-sets": "^2.35.13",
|
22
|
+
"@xyo-network/react-network": "^2.35.13",
|
23
|
+
"@xyo-network/react-shared": "^2.35.13",
|
24
24
|
"tslib": "^2.4.0"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
@@ -31,6 +31,7 @@
|
|
31
31
|
"@xyo-network/payload": "*",
|
32
32
|
"react": "^18.2.0",
|
33
33
|
"react-dom": "^18.2.0",
|
34
|
+
"react-icons": "^4.4.0",
|
34
35
|
"react-router-dom": "^6.3.0"
|
35
36
|
},
|
36
37
|
"description": "Common React library for all XYO projects that use React",
|
@@ -76,5 +77,5 @@
|
|
76
77
|
},
|
77
78
|
"sideEffects": false,
|
78
79
|
"types": "dist/esm/index.d.ts",
|
79
|
-
"version": "2.35.
|
80
|
+
"version": "2.35.13"
|
80
81
|
}
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import
|
2
|
-
import { Divider, List, useTheme } from '@mui/material'
|
1
|
+
import { useTheme } from '@mui/material'
|
3
2
|
import { ComponentMeta, ComponentStory, DecoratorFn } from '@storybook/react'
|
4
3
|
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
5
4
|
|
6
5
|
import { CollapsibleProvider, useCollapsible } from '../../contexts'
|
7
|
-
import {
|
6
|
+
import { MenuSection } from '../SiteMenu'
|
8
7
|
import { CollapseToggleFlex } from './CollapseToggle'
|
9
8
|
import { CollapsibleDrawer } from './CollapsibleDrawer'
|
9
|
+
import { menuDataBottom, menuDataTop } from './ExampleMenuData'
|
10
10
|
|
11
11
|
const CollapseProviderDecorator: DecoratorFn = (Story, args) => {
|
12
12
|
return (
|
@@ -28,35 +28,27 @@ const StorybookEntry = {
|
|
28
28
|
title: 'appbar/CollapseDrawer',
|
29
29
|
} as ComponentMeta<typeof CollapsibleDrawer>
|
30
30
|
|
31
|
-
const SiteMenuList: React.FC<SiteMenuListItemProps> = (args) => {
|
32
|
-
return (
|
33
|
-
<List>
|
34
|
-
<SiteMenuListItem {...args} />
|
35
|
-
<SiteMenuListItem {...args} />
|
36
|
-
<SiteMenuListItem {...args} />
|
37
|
-
</List>
|
38
|
-
)
|
39
|
-
}
|
40
|
-
|
41
31
|
const Template: ComponentStory<typeof CollapsibleDrawer> = (args) => {
|
42
|
-
const { collapse, setCollapseEnd
|
32
|
+
const { collapse, setCollapseEnd } = useCollapsible()
|
43
33
|
const theme = useTheme()
|
44
34
|
return (
|
45
35
|
<>
|
46
36
|
<FlexGrowCol alignItems="start" height="calc(100vh - 2rem)">
|
47
37
|
<CollapsibleDrawer in={!collapse} orientation="horizontal" collapsedSize={theme.spacing(5)} onExited={() => setCollapseEnd?.(true)} {...args}>
|
48
|
-
<
|
38
|
+
<MenuSection title="Explore & Create" listItems={menuDataTop} showTitle={!collapse} />
|
39
|
+
<MenuSection title="Settings & Analytics" listItems={menuDataBottom} showTitle={!collapse} />
|
49
40
|
<FlexGrowCol />
|
50
41
|
<CollapseToggleFlex justifyContent="start" />
|
51
42
|
</CollapsibleDrawer>
|
52
|
-
<Divider orientation="vertical" flexItem />
|
53
43
|
</FlexGrowCol>
|
54
44
|
</>
|
55
45
|
)
|
56
46
|
}
|
57
47
|
|
58
48
|
const Default = Template.bind({})
|
59
|
-
Default.args = {
|
49
|
+
Default.args = {
|
50
|
+
collapsedSize: '40px',
|
51
|
+
}
|
60
52
|
|
61
53
|
export { Default }
|
62
54
|
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import KeyboardDoubleArrowLeftRoundedIcon from '@mui/icons-material/KeyboardDoubleArrowLeftRounded'
|
2
|
-
import KeyboardDoubleArrowRightRounded from '@mui/icons-material/KeyboardDoubleArrowRightRounded'
|
3
1
|
import { IconButton } from '@mui/material'
|
4
2
|
import { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'
|
3
|
+
import { VscArrowSmallLeft, VscArrowSmallRight } from 'react-icons/vsc'
|
5
4
|
|
6
5
|
import { useCollapsible } from '../../contexts'
|
7
6
|
|
@@ -19,10 +18,9 @@ export const CollapseToggleFlex: React.FC<FlexBoxProps> = (props) => {
|
|
19
18
|
onClick={handleCollapseToggle}
|
20
19
|
sx={{
|
21
20
|
flexDirection: 'column',
|
22
|
-
ml: 1,
|
23
21
|
}}
|
24
22
|
>
|
25
|
-
{!collapse ? <
|
23
|
+
{!collapse ? <VscArrowSmallLeft /> : <VscArrowSmallRight />}
|
26
24
|
</IconButton>
|
27
25
|
</FlexRow>
|
28
26
|
)
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import {
|
2
|
+
VscAccount,
|
3
|
+
VscAdd,
|
4
|
+
VscDashboard,
|
5
|
+
VscGlobe,
|
6
|
+
VscGraph,
|
7
|
+
VscGraphLine,
|
8
|
+
VscJson,
|
9
|
+
VscServer,
|
10
|
+
VscSettingsGear,
|
11
|
+
VscSymbolMethod,
|
12
|
+
VscSymbolNamespace,
|
13
|
+
VscTable,
|
14
|
+
} from 'react-icons/vsc'
|
15
|
+
|
16
|
+
import { SiteMenuListItemProps } from '../SiteMenu'
|
17
|
+
|
18
|
+
export const menuDataTop: SiteMenuListItemProps[] = [
|
19
|
+
{
|
20
|
+
icon: <VscGlobe fontSize="body1" />,
|
21
|
+
primary: 'Explore',
|
22
|
+
to: '',
|
23
|
+
tooltip: 'View global archivist data on a world map.',
|
24
|
+
},
|
25
|
+
{
|
26
|
+
icon: <VscSymbolMethod fontSize="body1" />,
|
27
|
+
primary: 'Blocks',
|
28
|
+
to: '',
|
29
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
30
|
+
},
|
31
|
+
{
|
32
|
+
icon: <VscSymbolNamespace fontSize="body1" />,
|
33
|
+
primary: 'Payloads',
|
34
|
+
to: '',
|
35
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
36
|
+
},
|
37
|
+
{
|
38
|
+
icon: <VscGraph fontSize="body1" />,
|
39
|
+
primary: 'Queries',
|
40
|
+
to: '',
|
41
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
42
|
+
},
|
43
|
+
{
|
44
|
+
icon: <VscServer fontSize="body1" />,
|
45
|
+
primary: 'Archives',
|
46
|
+
subNavListItems: [
|
47
|
+
{ icon: <VscDashboard fontSize="body2" />, primary: 'Dashboard', to: '', tooltip: 'View data for all archives on this network.' },
|
48
|
+
{ icon: <VscAdd fontSize="body2" />, primary: 'Create Archive', to: '', tooltip: 'Create a new archive on this network.' },
|
49
|
+
{ icon: <VscTable fontSize="body2" />, primary: 'Archive Table', to: '', tooltip: 'View all archives on this network as a table.' },
|
50
|
+
],
|
51
|
+
to: '',
|
52
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
53
|
+
},
|
54
|
+
]
|
55
|
+
|
56
|
+
export const menuDataBottom: SiteMenuListItemProps[] = [
|
57
|
+
{
|
58
|
+
icon: <VscGraphLine fontSize="body1" />,
|
59
|
+
primary: 'Statistics',
|
60
|
+
to: '',
|
61
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
62
|
+
},
|
63
|
+
{
|
64
|
+
icon: <VscJson fontSize="body1" />,
|
65
|
+
primary: 'Schema',
|
66
|
+
to: '',
|
67
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
68
|
+
},
|
69
|
+
{
|
70
|
+
icon: <VscAccount fontSize="body1" />,
|
71
|
+
primary: 'Account',
|
72
|
+
to: '',
|
73
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
74
|
+
},
|
75
|
+
{
|
76
|
+
icon: <VscSettingsGear fontSize="body1" />,
|
77
|
+
primary: 'Settings',
|
78
|
+
to: '',
|
79
|
+
tooltip: 'The most recent blocks seen in the in temp archive on your current network.',
|
80
|
+
},
|
81
|
+
]
|
@@ -1,14 +1,13 @@
|
|
1
|
-
import { Typography } from '@mui/material'
|
2
|
-
import { TypographyExProps } from '@xyo-network/react-shared'
|
1
|
+
import { Typography, TypographyProps } from '@mui/material'
|
3
2
|
import { ReactNode } from 'react'
|
4
3
|
|
5
|
-
export interface MenuIconProps extends
|
4
|
+
export interface MenuIconProps extends TypographyProps {
|
6
5
|
icon?: ReactNode
|
7
6
|
}
|
8
7
|
|
9
8
|
export const MenuIcon: React.FC<MenuIconProps> = ({ icon, ...props }) => {
|
10
9
|
return (
|
11
|
-
<Typography display="flex"
|
10
|
+
<Typography display="flex" {...props}>
|
12
11
|
{icon}
|
13
12
|
</Typography>
|
14
13
|
)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import PublicRoundedIcon from '@mui/icons-material/PublicRounded'
|
2
1
|
import { List } from '@mui/material'
|
3
2
|
import { ComponentMeta, ComponentStory } from '@storybook/react'
|
3
|
+
import { FaGlobeAmericas } from 'react-icons/fa'
|
4
4
|
|
5
5
|
import { SiteMenuListItem, SiteMenuListItemProps } from './MenuItems'
|
6
6
|
|
@@ -31,19 +31,18 @@ const Template: ComponentStory<typeof SiteMenuListItem> = (args) => {
|
|
31
31
|
|
32
32
|
const Default = Template.bind({})
|
33
33
|
Default.args = {
|
34
|
-
|
35
|
-
|
34
|
+
dense: true,
|
35
|
+
icon: <FaGlobeAmericas />,
|
36
|
+
primary: 'Explore',
|
37
|
+
tooltip: 'View global archivist data on a world map.',
|
36
38
|
}
|
37
39
|
|
38
40
|
const WithChildren = Template.bind({})
|
39
41
|
WithChildren.args = {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
),
|
45
|
-
icon: <PublicRoundedIcon />,
|
46
|
-
primary: 'Test',
|
42
|
+
icon: <FaGlobeAmericas />,
|
43
|
+
primary: 'Explore',
|
44
|
+
subNavListItems: [{ primary: 'Explore', to: '/explore', tooltip: 'View global archivist data on a world map.' }],
|
45
|
+
tooltip: 'View global archivist data on a world map.',
|
47
46
|
}
|
48
47
|
|
49
48
|
export { Default, WithChildren }
|