@learningpool/ui 1.5.0 → 1.6.0-beta.10
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/assets/Images.d.ts +9 -0
- package/assets/Images.js +4 -1
- package/components/navigation/MobileNavigation/MobileNavigation.d.ts +39 -0
- package/components/navigation/MobileNavigation/MobileNavigation.js +183 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +28 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +122 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +827 -0
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +33 -0
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +24 -0
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +148 -0
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +392 -0
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +44 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +19 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +91 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +15 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +26 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +112 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +66 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +126 -0
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +71 -0
- package/components/navigation/MobileNavigation/MobileNavigationMotion.d.ts +141 -0
- package/components/navigation/MobileNavigation/MobileNavigationMotion.js +109 -0
- package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +10 -0
- package/components/navigation/MobileNavigation/MobileNavigationSearch.js +52 -0
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +257 -0
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +20 -0
- package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +405 -0
- package/components/navigation/MobileNavigation/MobileNavigationStyles.js +104 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +2 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +32 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +2 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +26 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.d.ts +36 -0
- package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.js +10 -0
- package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +25 -10
- package/components/navigation/VerticalNavigation/VerticalNavigation.js +179 -92
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +4 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +84 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +827 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +31 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +4 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +91 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +15 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +29 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +112 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +69 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +126 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +70 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +141 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +109 -0
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +31 -90
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +73 -259
- package/components/stream/AppSwitcher/AppSwitcher.d.ts +36 -0
- package/components/stream/AppSwitcher/AppSwitcher.js +307 -0
- package/components/stream/AppSwitcher/AppSwitcherItem.d.ts +16 -0
- package/components/stream/AppSwitcher/AppSwitcherItem.js +51 -0
- package/components/stream/AppSwitcher/AppSwitcherStyles.d.ts +17 -0
- package/components/stream/AppSwitcher/AppSwitcherStyles.js +48 -0
- package/components/stream/AppSwitcher/constants.d.ts +34 -0
- package/components/stream/AppSwitcher/constants.js +27 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lang/en-us.d.ts +6 -0
- package/lang/en-us.js +6 -0
- package/package.json +6 -2
- package/types/components/navigation/VerticalNavigation.d.ts +48 -0
- package/types/components/navigation/VerticalNavigation.js +1 -0
- package/types/components/navigation/VerticalNavigationAvatar.d.ts +22 -0
- package/types/components/navigation/VerticalNavigationAvatar.js +1 -0
- package/types/components/stream/AppSwitcher.d.ts +9 -0
- package/types/components/stream/AppSwitcher.js +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +3 -0
- package/utils/constants.d.ts +6 -0
- package/utils/constants.js +6 -0
- package/utils/helpers.d.ts +6 -0
- package/utils/helpers.js +17 -0
- package/utils/hooks.d.ts +1 -0
- package/utils/hooks.js +29 -0
- package/utils/theme.d.ts +4 -0
- package/utils/theme.js +4 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { motion } from 'framer-motion';
|
|
14
|
+
var Path = function (props) { return (_jsx(motion.path, __assign({ fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round' }, props))); };
|
|
15
|
+
export var ToggleX = function () {
|
|
16
|
+
return (_jsxs("svg", __assign({ width: "40", height: "40", viewBox: "0 0 50 50" }, { children: [_jsx(Path, { variants: {
|
|
17
|
+
closed: { d: 'M 10 15 L 40 15' },
|
|
18
|
+
open: { d: 'M 15 15 L 35 35' }
|
|
19
|
+
} }), _jsx(Path, { d: 'M 10 25 L 40 25', variants: {
|
|
20
|
+
closed: { opacity: 1, scale: 1 },
|
|
21
|
+
open: { opacity: 0, scale: 0 }
|
|
22
|
+
} }), _jsx(Path, { variants: {
|
|
23
|
+
closed: { d: 'M 10 35 L 40 35' },
|
|
24
|
+
open: { d: 'M 15 35 L 35 15' }
|
|
25
|
+
} })] })));
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledButtonBase: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
4
|
+
centerRipple?: boolean | undefined;
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
disableRipple?: boolean | undefined;
|
|
9
|
+
disableTouchRipple?: boolean | undefined;
|
|
10
|
+
focusRipple?: boolean | undefined;
|
|
11
|
+
focusVisibleClassName?: string | undefined;
|
|
12
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
13
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
14
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
15
|
+
tabIndex?: number | undefined;
|
|
16
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
|
+
} & Omit<{
|
|
19
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
20
|
+
centerRipple?: boolean | undefined;
|
|
21
|
+
children?: import("react").ReactNode;
|
|
22
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
23
|
+
disabled?: boolean | undefined;
|
|
24
|
+
disableRipple?: boolean | undefined;
|
|
25
|
+
disableTouchRipple?: boolean | undefined;
|
|
26
|
+
focusRipple?: boolean | undefined;
|
|
27
|
+
focusVisibleClassName?: string | undefined;
|
|
28
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
29
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
30
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
31
|
+
tabIndex?: number | undefined;
|
|
32
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
33
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
34
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
35
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
36
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "children" | "sx" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { ButtonBase } from '../../../index';
|
|
6
|
+
import { styled } from '@mui/material/styles';
|
|
7
|
+
export var StyledButtonBase = styled(ButtonBase)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n stroke: ", ";\n padding: 0px;\n min-width: 80px;\n max-width: 168px;\n height: 56px;\n"], ["\n stroke: ", ";\n padding: 0px;\n min-width: 80px;\n max-width: 168px;\n height: 56px;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
8
|
+
? props.theme.palette.primary.contrastText
|
|
9
|
+
: props.theme.palette.text.primary; });
|
|
10
|
+
var templateObject_1;
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
icon: React.ReactElement;
|
|
5
|
-
onClick?: any;
|
|
6
|
-
isActive?: boolean;
|
|
7
|
-
}
|
|
8
|
-
interface VerticalNaviationProps {
|
|
2
|
+
import { IApplication, IAvatarMenuItemProps, IVerticalNavigationItemProps } from '../../../types';
|
|
3
|
+
interface VerticalNavigationProps {
|
|
9
4
|
logo?: string;
|
|
10
5
|
logoText?: string;
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
logoOnClick?: any;
|
|
7
|
+
items?: IVerticalNavigationItemProps[];
|
|
8
|
+
secondaryItems?: IVerticalNavigationItemProps[];
|
|
13
9
|
hasStreamHome?: boolean;
|
|
10
|
+
streamHomeAccessToken?: string;
|
|
11
|
+
streamHomeBaseUrl?: string;
|
|
12
|
+
streamHomeApiKey?: string;
|
|
13
|
+
streamHomeApplications?: IApplication[];
|
|
14
14
|
avatarName?: string;
|
|
15
15
|
isDrawerOpen?: boolean;
|
|
16
|
+
isPersistent?: boolean;
|
|
17
|
+
setIsPersistent?: any;
|
|
18
|
+
appRootID?: string;
|
|
19
|
+
hasAvatar?: boolean;
|
|
20
|
+
avatarPanelOnClickSwitchDirection?: any;
|
|
21
|
+
avatarPanelOnClickLogout?: any;
|
|
22
|
+
avatarPanelOnClickViewProfile?: any;
|
|
23
|
+
avatarPanelViewProfileString?: string;
|
|
24
|
+
avatarPanelOnClickEditProfile?: any;
|
|
25
|
+
avatarPanelEditProfileString?: string;
|
|
26
|
+
avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
|
|
27
|
+
avatarPanelOnClickMainAction?: any;
|
|
28
|
+
avatarPanelMainActionString?: string;
|
|
29
|
+
avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
|
|
30
|
+
avatarPanelFootnote?: any;
|
|
16
31
|
}
|
|
17
|
-
declare const VerticalNavigation: (props:
|
|
32
|
+
declare const VerticalNavigation: (props: VerticalNavigationProps) => React.ReactElement;
|
|
18
33
|
export default VerticalNavigation;
|
|
@@ -9,46 +9,76 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import React, { useEffect } from 'react';
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
25
|
+
import { useTheme } from '@mui/material/styles';
|
|
26
|
+
import { Avatar, List, Tooltip } from '../../../index';
|
|
27
|
+
import { Box } from '@mui/material';
|
|
28
|
+
import { StreamSuiteLogo, NotchSVG, NotchExtendSVG } from '../../../assets/Images';
|
|
29
|
+
import AppSwitcher from '../../stream/AppSwitcher/AppSwitcher';
|
|
30
|
+
import { Apps, ChevronLeft, ChevronRight, PushPin } from '@mui/icons-material';
|
|
31
|
+
import VerticalNavigationItem from './VerticalNavigationItem/VerticalNavigationItem';
|
|
32
|
+
import { DRAWER_WIDTH, DrawerHeader, DrawerToggle, DrawerToggleHitboxContent, StyledDivider, StyledNav, StyledNavSecondary, DrawerShadow, StyledAside, NotchContainer, NotchBackground, NotchBackgroundClip, NotchSeemMask, StyledDrawer } from './VerticalNavigationStyles';
|
|
33
|
+
import { ListItemText } from './VerticalNavigationItem/VerticalNavigationItemStyles';
|
|
34
|
+
import AvatarPanel from './VerticalNavigationAvatar';
|
|
35
|
+
import { motion } from '../../../utils/theme';
|
|
36
|
+
import { handleAvatarInitials } from '../../../utils/helpers';
|
|
37
|
+
import { DEFAULT_REACT_APP_ID } from '../../../utils/constants';
|
|
27
38
|
var VerticalNavigation = function (props) {
|
|
28
39
|
var _a, _b;
|
|
29
40
|
var theme = useTheme();
|
|
30
|
-
var items = props.items, secondaryItems = props.secondaryItems, hasStreamHome = props.hasStreamHome,
|
|
41
|
+
var items = props.items, secondaryItems = props.secondaryItems, logo = props.logo, logoText = props.logoText, logoOnClick = props.logoOnClick, appRootID = props.appRootID, hasStreamHome = props.hasStreamHome, streamHomeApiKey = props.streamHomeApiKey, streamHomeBaseUrl = props.streamHomeBaseUrl, streamHomeAccessToken = props.streamHomeAccessToken, streamHomeApplications = props.streamHomeApplications, rest = __rest(props, ["items", "secondaryItems", "logo", "logoText", "logoOnClick", "appRootID", "hasStreamHome", "streamHomeApiKey", "streamHomeBaseUrl", "streamHomeAccessToken", "streamHomeApplications"]);
|
|
31
42
|
var propIsDrawerOpen = typeof (props === null || props === void 0 ? void 0 : props.isDrawerOpen) === 'boolean' ? props.isDrawerOpen : undefined;
|
|
43
|
+
var propIsPersistent = typeof (props === null || props === void 0 ? void 0 : props.isPersistent) === 'boolean' ? props.isPersistent : undefined;
|
|
32
44
|
var avatarName = (_a = props === null || props === void 0 ? void 0 : props.avatarName) !== null && _a !== void 0 ? _a : 'Avatar name';
|
|
33
45
|
var _c = React.useState(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false), isDrawerOpen = _c[0], setIsDrawerOpen = _c[1];
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
var
|
|
46
|
+
var _d = React.useState(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false), isPersistent = _d[0], setIsPersistent = _d[1];
|
|
47
|
+
// Controls whether the application panel is open or not.
|
|
48
|
+
var _e = React.useState(false), isAppSwitcherOpen = _e[0], setIsAppSwitcherOpen = _e[1];
|
|
49
|
+
/**
|
|
50
|
+
* Toggles display of the Stream suite application dialog.
|
|
51
|
+
*/
|
|
52
|
+
var handleToggleAppsClick = function () {
|
|
53
|
+
setIsAppSwitcherOpen(!isAppSwitcherOpen);
|
|
54
|
+
};
|
|
55
|
+
var logoHeight = 38;
|
|
56
|
+
var logoWidth = 38;
|
|
37
57
|
useEffect(function () { return setIsDrawerOpen(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false); }, [propIsDrawerOpen]);
|
|
58
|
+
useEffect(function () { return setIsDrawerOpen(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false); }, [propIsPersistent]);
|
|
38
59
|
useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [avatarName]);
|
|
39
|
-
|
|
60
|
+
// This fixes an issue with how MUI handles the modal and aria-hidden.
|
|
61
|
+
// When open, the Modal adds aria-hidden="true" to a top-level element,
|
|
62
|
+
// which causes some screen readers to annouce the elements as "blank".
|
|
63
|
+
// This fix just overrides the default aria-hidden attribute.
|
|
64
|
+
//
|
|
65
|
+
// https://github.com/mui/material-ui/issues/19450
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
if (isDrawerOpen) {
|
|
68
|
+
var root = window.document.getElementById(appRootID !== null && appRootID !== void 0 ? appRootID : DEFAULT_REACT_APP_ID);
|
|
69
|
+
root === null || root === void 0 ? void 0 : root.removeAttribute('aria-hidden');
|
|
70
|
+
}
|
|
71
|
+
}, [isDrawerOpen]);
|
|
72
|
+
var handleIsPersistent = function () {
|
|
40
73
|
var _a, _b;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (((_b = avatarName.split(' ')[1]) === null || _b === void 0 ? void 0 : _b.length) > 0) {
|
|
46
|
-
secondInitial = avatarName === null || avatarName === void 0 ? void 0 : avatarName.split(' ')[1][0];
|
|
47
|
-
}
|
|
74
|
+
if (props === null || props === void 0 ? void 0 : props.setIsPersistent) {
|
|
75
|
+
props.setIsPersistent((_a = !propIsPersistent) !== null && _a !== void 0 ? _a : false);
|
|
76
|
+
setIsPersistent((_b = !propIsPersistent) !== null && _b !== void 0 ? _b : false);
|
|
77
|
+
return;
|
|
48
78
|
}
|
|
49
|
-
|
|
79
|
+
setIsPersistent(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false);
|
|
50
80
|
};
|
|
51
|
-
var
|
|
81
|
+
var _f = React.useState((_b = handleAvatarInitials(avatarName)) !== null && _b !== void 0 ? _b : 'AN'), avatarInitials = _f[0], setAvatarInitials = _f[1];
|
|
52
82
|
var toggleDrawer = function (open) { return function (event) {
|
|
53
83
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
54
84
|
if (event.type === 'keydown') {
|
|
@@ -56,85 +86,142 @@ var VerticalNavigation = function (props) {
|
|
|
56
86
|
return;
|
|
57
87
|
}
|
|
58
88
|
}
|
|
89
|
+
setIsAppSwitcherOpen(false);
|
|
59
90
|
setIsDrawerOpen(open !== null && open !== void 0 ? open : !isDrawerOpen);
|
|
60
91
|
}; };
|
|
61
|
-
var listContent = function () {
|
|
62
|
-
|
|
63
|
-
|
|
92
|
+
var listContent = function () { return (_jsxs(Box, __assign({ sx: {
|
|
93
|
+
display: 'flex',
|
|
94
|
+
flex: '1 auto',
|
|
95
|
+
flexDirection: 'column',
|
|
96
|
+
justifyContent: 'flex-start',
|
|
97
|
+
'.wrapper': {
|
|
64
98
|
display: 'flex',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
99
|
+
position: 'relative'
|
|
100
|
+
},
|
|
101
|
+
'.wrapper > :not(:first-child)': {
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
right: 0,
|
|
104
|
+
background: 'transparent',
|
|
105
|
+
fontSize: 0
|
|
106
|
+
}
|
|
107
|
+
}, className: 'grid-container' }, { children: [_jsx("div", __assign({ className: 'wrapper', style: {
|
|
108
|
+
backgroundColor: theme.palette.mode === 'dark'
|
|
109
|
+
? theme.palette.primary.main
|
|
110
|
+
: theme.palette.background.paper
|
|
111
|
+
} }, { children: _jsxs(DrawerHeader, __assign({ onClick: logoOnClick !== null && logoOnClick !== void 0 ? logoOnClick : null, isDrawerOpen: isDrawerOpen || isPersistent }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: isDrawerOpen || isPersistent, disableFocusListener: isDrawerOpen || isPersistent, disableTouchListener: isDrawerOpen || isPersistent, title: logoText !== null && logoText !== void 0 ? logoText : '', placement: theme.direction === 'rtl' ? 'left' : 'right' }, { children: logo
|
|
69
112
|
? typeof logo === 'string'
|
|
70
|
-
? (_jsx("img", { src: logo, height: logoHeight, width: logoWidth, style: {
|
|
71
|
-
marginRight:
|
|
113
|
+
? (_jsx("img", { src: logo, height: "".concat(logoHeight, "px"), width: "".concat(logoWidth, "px"), style: {
|
|
114
|
+
marginRight: '16px'
|
|
72
115
|
}, alt: "Site Logo" }))
|
|
73
116
|
: logo
|
|
74
117
|
: (_jsx(StreamSuiteLogo, { style: {
|
|
75
|
-
height: logoHeight,
|
|
76
|
-
width: logoWidth,
|
|
77
|
-
marginRight:
|
|
118
|
+
height: "".concat(logoHeight, "px"),
|
|
119
|
+
width: "".concat(logoWidth, "px"),
|
|
120
|
+
marginRight: '16px',
|
|
78
121
|
fill: theme.palette.mode === 'dark'
|
|
79
122
|
? theme.palette.primary.contrastText
|
|
80
123
|
: theme.palette.primary.main
|
|
81
|
-
} })) })), _jsx(ListItemText, { primary: logoText !== null && logoText !== void 0 ? logoText : '', isDrawerOpen: isDrawerOpen })] }), _jsxs(NotchContainer, { children: [_jsx(NotchBackground, {}), _jsx(NotchBackgroundClip, {}), _jsx(NotchSeemMask, {})] }), _jsx(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
124
|
+
} })) })), _jsx(ListItemText, { primary: logoText !== null && logoText !== void 0 ? logoText : '', isDrawerOpen: isDrawerOpen || isPersistent })] })) })), _jsxs("div", __assign({ className: 'wrapper' }, { children: [_jsxs(NotchContainer, __assign({ sx: { height: '85px', position: 'relative !important' } }, { children: [_jsx(NotchBackground, {}), !isPersistent && _jsx(NotchBackgroundClip, {}), _jsx(NotchSeemMask, {})] })), !isPersistent && _jsx(DrawerToggle, __assign({ onClick: toggleDrawer(!isDrawerOpen), "aria-label": isDrawerOpen ? 'Close Navigation' : 'Open Navigation', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": "vertical-navigation" }, { children: _jsx(DrawerToggleHitboxContent, { children: isDrawerOpen
|
|
125
|
+
? (_jsx(ChevronLeft, { style: {
|
|
126
|
+
fontSize: '1.75rem',
|
|
127
|
+
height: '1.75rem',
|
|
128
|
+
width: '1.75rem'
|
|
129
|
+
} }))
|
|
130
|
+
: (_jsx(ChevronRight, { style: {
|
|
131
|
+
fontSize: '1.75rem',
|
|
132
|
+
height: '1.75rem',
|
|
133
|
+
width: '1.75rem'
|
|
134
|
+
} })) }) })), _jsx(Box, { style: {
|
|
135
|
+
borderRadius: '50%',
|
|
136
|
+
boxShadow: '5px 0 15px 0 rgb(0 0 0 / 10%)',
|
|
137
|
+
display: 'none',
|
|
138
|
+
height: '50px',
|
|
139
|
+
left: '12px',
|
|
140
|
+
position: 'fixed',
|
|
141
|
+
right: 'auto !important',
|
|
142
|
+
top: '50%',
|
|
143
|
+
transform: 'translate(50%, -50%)',
|
|
144
|
+
width: '50px'
|
|
145
|
+
} }), _jsxs(DrawerToggle, __assign({ onClick: handleIsPersistent, "aria-label": isDrawerOpen ? 'Close Navigation' : 'Open Navigation', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": "vertical-navigation", style: {
|
|
146
|
+
display: 'none',
|
|
147
|
+
position: 'fixed',
|
|
148
|
+
top: '50%',
|
|
149
|
+
transform: 'translate(50%, -50%)',
|
|
150
|
+
zIndex: 10
|
|
151
|
+
} }, { children: [_jsx(NotchExtendSVG, { style: {
|
|
152
|
+
display: 'block',
|
|
153
|
+
fill: theme.palette.mode === 'dark'
|
|
154
|
+
? theme.palette.primary.main
|
|
155
|
+
: theme.palette.background.paper,
|
|
156
|
+
height: '165px',
|
|
157
|
+
left: '-12px',
|
|
158
|
+
padding: '0',
|
|
159
|
+
position: 'absolute',
|
|
160
|
+
top: '-61px',
|
|
161
|
+
transition: 'none',
|
|
162
|
+
width: '90px',
|
|
163
|
+
zIndex: '-1'
|
|
164
|
+
} }), _jsx(DrawerToggleHitboxContent, __assign({ style: {
|
|
165
|
+
background: 'transparent',
|
|
166
|
+
boxShadow: 'none',
|
|
167
|
+
fontSize: '1.3rem',
|
|
168
|
+
height: '1.3rem',
|
|
169
|
+
padding: theme.spacing(1),
|
|
170
|
+
width: '1.3rem'
|
|
171
|
+
} }, { children: isPersistent
|
|
172
|
+
? (_jsx(PushPin, { style: {
|
|
173
|
+
fontSize: '1.3rem',
|
|
174
|
+
height: '1.3rem',
|
|
175
|
+
width: '1.3rem'
|
|
176
|
+
} }))
|
|
177
|
+
: (_jsx(PushPin, { style: {
|
|
178
|
+
fontSize: '1.3rem',
|
|
179
|
+
height: '1.3rem',
|
|
180
|
+
width: '1.3rem'
|
|
181
|
+
} })) }))] }))] })), _jsx(NotchSVG, { style: { height: '0', position: 'absolute', width: '0' } }), _jsx("div", __assign({ className: 'wrapper', style: {
|
|
182
|
+
backgroundColor: theme.palette.mode === 'dark'
|
|
183
|
+
? theme.palette.primary.main
|
|
184
|
+
: theme.palette.background.paper,
|
|
185
|
+
flex: '1 1px',
|
|
186
|
+
overflow: 'auto',
|
|
187
|
+
position: 'relative'
|
|
188
|
+
} }, { children: _jsx(StyledNav, __assign({ tabIndex: -1, "aria-label": 'Primary' }, { children: _jsx(List, __assign({ style: {
|
|
189
|
+
height: '100%',
|
|
190
|
+
width: DRAWER_WIDTH.Expanded,
|
|
191
|
+
marginTop: "-".concat(theme.spacing(0.5), " !important")
|
|
192
|
+
} }, { children: items && items.length > 0 && items.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent }))); }) })) })) })), _jsx("div", __assign({ className: 'wrapper', style: {
|
|
193
|
+
backgroundColor: theme.palette.mode === 'dark'
|
|
194
|
+
? theme.palette.primary.main
|
|
195
|
+
: theme.palette.background.paper
|
|
196
|
+
} }, { children: _jsxs(StyledNavSecondary, __assign({ "aria-label": 'Secondary' }, { children: [_jsx(StyledDivider, { isDrawerOpen: isDrawerOpen || isPersistent }), _jsxs(List, __assign({ style: {
|
|
93
197
|
width: DRAWER_WIDTH.Expanded,
|
|
94
|
-
marginTop: 'auto',
|
|
95
198
|
backgroundColor: theme.palette.mode === 'dark'
|
|
96
199
|
? theme.palette.primary.main
|
|
97
200
|
: theme.palette.background.paper
|
|
98
201
|
} }, { children: [hasStreamHome
|
|
99
|
-
? (_jsx(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
return (_jsxs(StyledAside, { children: [_jsx(DrawerShadow, { className: 'drawerShadow', "aria-hidden": 'true', isDrawerOpen: isDrawerOpen }), _jsx(Modal, __assign({ "aria-hidden": false, keepMounted: true, disablePortal: true, open: isDrawerOpen, onClose: toggleDrawer(false) }, { children: _jsxs(StyledDrawer, __assign({ "aria-label": 'Navigation Menu', id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen, onClose: toggleDrawer(false), ModalProps: {
|
|
125
|
-
keepMounted: true
|
|
126
|
-
}, variant: 'permanent' }, { children: [_jsx(DrawerToggle, __assign({ onClick: toggleDrawer(!isDrawerOpen), "aria-label": isDrawerOpen ? 'Close Navigation Menu' : 'Open Navigation Menu', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": "vertical-navigation", sx: {
|
|
127
|
-
left: isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 21, "px") : (isMediumAndUp ? '44px' : '36px')
|
|
128
|
-
} }, { children: _jsx(DrawerToggleHitboxContent, { children: isDrawerOpen
|
|
129
|
-
? (_jsx(ChevronLeft, { sx: {
|
|
130
|
-
fontSize: '1.75rem',
|
|
131
|
-
height: '1.75rem',
|
|
132
|
-
width: '1.75rem'
|
|
133
|
-
} }))
|
|
134
|
-
: (_jsx(ChevronRight, { sx: {
|
|
135
|
-
fontSize: '1.75rem',
|
|
136
|
-
height: '1.75rem',
|
|
137
|
-
width: '1.75rem'
|
|
138
|
-
} })) }) })), listContent()] })) }))] }));
|
|
202
|
+
? (_jsx(VerticalNavigationItem, { label: 'App Switcher', icon: _jsx(Apps, {}), onClick: handleToggleAppsClick, content: (_jsx(AppSwitcher, { isAppSwitcherOpen: isAppSwitcherOpen, setIsAppSwitcherOpen: setIsAppSwitcherOpen, applications: streamHomeApplications, apiKey: streamHomeApiKey !== null && streamHomeApiKey !== void 0 ? streamHomeApiKey : '', baseUrl: streamHomeBaseUrl !== null && streamHomeBaseUrl !== void 0 ? streamHomeBaseUrl : '', token: streamHomeAccessToken !== null && streamHomeAccessToken !== void 0 ? streamHomeAccessToken : '', isDrawerOpen: isDrawerOpen })), isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true, hasCustomContent: true }))
|
|
203
|
+
: null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true }))); }), avatarName
|
|
204
|
+
? (_jsx(VerticalNavigationItem, { label: avatarName, "aria-controls": 'avatar-panel', icon: _jsx(Avatar, __assign({ style: {
|
|
205
|
+
// backgroundColor: mainTheme.colorButtonText,
|
|
206
|
+
// color: mainTheme.colorButton,
|
|
207
|
+
fontSize: '0.75rem',
|
|
208
|
+
height: 32,
|
|
209
|
+
width: 32
|
|
210
|
+
} }, { children: avatarInitials })), style: {
|
|
211
|
+
maxHeight: isDrawerOpen ? '200px' : '48px',
|
|
212
|
+
overflow: 'hidden',
|
|
213
|
+
padding: 0,
|
|
214
|
+
minHeight: 52,
|
|
215
|
+
transition: "max-height 225ms ".concat(motion.easeInOut, " 0ms !important")
|
|
216
|
+
}, hasFlyout: true, fullHeightFlyout: true, content: _jsx(AvatarPanel, __assign({ avatarName: avatarName }, rest)), isDrawerOpen: isDrawerOpen }))
|
|
217
|
+
: null] }))] })) }))] }))); };
|
|
218
|
+
return (_jsxs(StyledAside, __assign({ "aria-label": "Site navigation" }, { children: [_jsx(DrawerShadow, { className: 'drawerShadow', "aria-hidden": 'true', isDrawerOpen: isDrawerOpen || isPersistent, style: {
|
|
219
|
+
display: isPersistent ? 'none' : 'block'
|
|
220
|
+
} }), _jsx(StyledDrawer, __assign({ id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant: isDrawerOpen ? 'temporary' : 'permanent', ModalProps: {
|
|
221
|
+
keepMounted: true,
|
|
222
|
+
disablePortal: true,
|
|
223
|
+
open: isDrawerOpen,
|
|
224
|
+
onClose: toggleDrawer(false)
|
|
225
|
+
} }, { children: listContent() }))] })));
|
|
139
226
|
};
|
|
140
227
|
export default VerticalNavigation;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import React, { useEffect } from 'react';
|
|
14
|
+
import { Box, ButtonGroup, Button, Link, List, ListItem, ListItemIcon, ListItemText } from '../../../index';
|
|
15
|
+
import { StyledBox, StyledBoxProfile, StyledAvatarName, StyledAvatar, StyledOutlineButton, StyledBoxProfileEdit, StyledListItemButton } from './VerticalNavigationAvatarStyles';
|
|
16
|
+
import { useTheme } from '@mui/material/styles';
|
|
17
|
+
import EditIcon from '@mui/icons-material/Edit';
|
|
18
|
+
import LogoutIcon from '@mui/icons-material/Logout';
|
|
19
|
+
import { motion } from 'framer-motion';
|
|
20
|
+
import { motionParent, motionFadeIn, motionFadeInUp, motionWhileHover, motionWhileTap } from './VerticalNavigationMotion';
|
|
21
|
+
import { handleAvatarInitials } from '../../../utils/helpers';
|
|
22
|
+
import { Person, Settings } from '@mui/icons-material';
|
|
23
|
+
var AvatarPanel = function (props) {
|
|
24
|
+
var _a;
|
|
25
|
+
var theme = useTheme();
|
|
26
|
+
var avatarName = props.avatarName, avatarPanelOnClickLogout = props.avatarPanelOnClickLogout, logoutText = props.logoutText, avatarPanelOnClickViewProfile = props.avatarPanelOnClickViewProfile, avatarPanelViewProfileString = props.avatarPanelViewProfileString, avatarPanelOnClickEditProfile = props.avatarPanelOnClickEditProfile, avatarPanelEditProfileString = props.avatarPanelEditProfileString, avatarPanelMenuItems = props.avatarPanelMenuItems, avatarPanelOnClickMainAction = props.avatarPanelOnClickMainAction, avatarPanelMainActionString = props.avatarPanelMainActionString, avatarPanelSettingItems = props.avatarPanelSettingItems, avatarPanelFootnote = props.avatarPanelFootnote;
|
|
27
|
+
useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [
|
|
28
|
+
avatarName
|
|
29
|
+
]);
|
|
30
|
+
var _b = React.useState((_a = handleAvatarInitials(avatarName)) !== null && _a !== void 0 ? _a : 'AN'), avatarInitials = _b[0], setAvatarInitials = _b[1];
|
|
31
|
+
return (_jsxs(StyledBox
|
|
32
|
+
// TODO: add check for isAvatarOpen to trigger animation effects
|
|
33
|
+
// animate={ isAvatarOpen ? 'open' : 'closed' }
|
|
34
|
+
, __assign({
|
|
35
|
+
// TODO: add check for isAvatarOpen to trigger animation effects
|
|
36
|
+
// animate={ isAvatarOpen ? 'open' : 'closed' }
|
|
37
|
+
variants: motionParent }, { children: [avatarPanelOnClickLogout && (_jsx(Button
|
|
38
|
+
// @ts-expect-error
|
|
39
|
+
, __assign({
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
component: motion.button, variants: motionFadeIn, style: {
|
|
42
|
+
left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto',
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
|
|
45
|
+
top: theme.spacing(1)
|
|
46
|
+
}, onClick: avatarPanelOnClickLogout, startIcon: _jsx(LogoutIcon, {}), variant: 'text', color: 'inherit' }, { children: logoutText !== null && logoutText !== void 0 ? logoutText : 'Logout' }))), _jsxs(Box, __assign({ style: {
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column'
|
|
50
|
+
} }, { children: [_jsxs(StyledBoxProfile, __assign({ variants: motionFadeInUp }, { children: [_jsx(StyledAvatar, __assign({ style: { marginRight: '0.5rem' } }, { children: avatarInitials })), _jsxs(StyledAvatarName, { children: [_jsx("span", __assign({ style: { fontWeight: 300 } }, { children: "Hi," })), " ", _jsx("strong", { children: avatarName.split(' ')[0] })] })] })), avatarPanelOnClickViewProfile && (_jsx(StyledBoxProfileEdit, __assign({ variants: motionFadeInUp, style: {
|
|
51
|
+
flexDirection: 'row',
|
|
52
|
+
marginBottom: theme.spacing(2)
|
|
53
|
+
} }, { children: _jsxs(ButtonGroup, __assign({ variant: "contained", "aria-label": "split button" }, { children: [_jsx(Button, __assign({ variant: 'contained', color: 'primary', size: 'medium', onClick: avatarPanelOnClickViewProfile, startIcon: _jsx(Person, {}) }, { children: avatarPanelViewProfileString !== null && avatarPanelViewProfileString !== void 0 ? avatarPanelViewProfileString : 'View Profile' })), avatarPanelOnClickEditProfile && (_jsx(Button, __assign({ size: 'medium', "aria-label": avatarPanelEditProfileString !== null && avatarPanelEditProfileString !== void 0 ? avatarPanelEditProfileString : 'Edit Profile', onClick: avatarPanelOnClickEditProfile }, { children: _jsx(EditIcon, {}) })))] })) })))] })), _jsxs(Box, __assign({ style: {
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
display: 'flex',
|
|
56
|
+
flexDirection: 'column'
|
|
57
|
+
} }, { children: [avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (_jsx(List, __assign({ style: {
|
|
58
|
+
marginBottom: theme.spacing(2),
|
|
59
|
+
maxWidth: '14rem'
|
|
60
|
+
} }, { children: avatarPanelMenuItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
|
|
61
|
+
// TODO: figure out if these are links or buttons
|
|
62
|
+
// @ts-expect-error
|
|
63
|
+
, __assign({
|
|
64
|
+
// TODO: figure out if these are links or buttons
|
|
65
|
+
// @ts-expect-error
|
|
66
|
+
component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
|
|
67
|
+
minWidth: theme.spacing(5)
|
|
68
|
+
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))), avatarPanelOnClickMainAction && _jsx(StyledOutlineButton
|
|
69
|
+
// @ts-expect-error
|
|
70
|
+
, __assign({
|
|
71
|
+
// @ts-expect-error
|
|
72
|
+
component: motion.button, variants: motionFadeInUp, disablePadding: true, variant: 'outlined', color: 'primary', size: 'medium', onClick: avatarPanelOnClickMainAction, startIcon: _jsx(Settings, {}) }, { children: avatarPanelMainActionString })), _jsx(List, __assign({ style: { marginBottom: theme.spacing(2) } }, { children: avatarPanelSettingItems &&
|
|
73
|
+
avatarPanelSettingItems.length > 0 &&
|
|
74
|
+
avatarPanelSettingItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
|
|
75
|
+
// TODO: figure out if these are links or buttons
|
|
76
|
+
// @ts-expect-error
|
|
77
|
+
, __assign({
|
|
78
|
+
// TODO: figure out if these are links or buttons
|
|
79
|
+
// @ts-expect-error
|
|
80
|
+
component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
|
|
81
|
+
minWidth: theme.spacing(5)
|
|
82
|
+
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))] })), _jsx(Box, __assign({ className: 'avatar-panel-footnote' }, { children: avatarPanelFootnote && avatarPanelFootnote }))] })));
|
|
83
|
+
};
|
|
84
|
+
export default AvatarPanel;
|