@learningpool/ui 1.6.0-beta.8 → 1.6.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.
- package/components/landmarks/Header/Header.d.ts +26 -0
- package/components/landmarks/Header/Header.js +75 -0
- package/components/landmarks/Header/HeaderActionButtons.d.ts +3 -0
- package/components/landmarks/Header/HeaderActionButtons.js +66 -0
- package/components/landmarks/Header/HeaderStyles.d.ts +55 -0
- package/components/landmarks/Header/HeaderStyles.js +13 -0
- package/components/navigation/MobileNavigation/MobileNavigation.d.ts +1 -2
- package/components/navigation/MobileNavigation/MobileNavigation.js +29 -82
- package/components/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +1 -1
- package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +26 -8
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +3 -4
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +3 -3
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +1 -1
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +1 -1
- package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +3 -0
- package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +31 -0
- package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -254
- package/components/navigation/MobileNavigation/MobileNavigationStyles.js +19 -24
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +2 -1
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +2 -1
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +2 -1
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +2 -1
- package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +4 -2
- package/components/navigation/VerticalNavigation/VerticalNavigation.js +19 -22
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +1 -21
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +4 -4
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +3 -3
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +1 -15
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +28 -24
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +1 -1
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +1 -1
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -1
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +1 -3
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -5
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +2 -2
- 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 +4 -3
- package/types/components/navigation/VerticalNavigation.d.ts +49 -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 +1 -0
- package/utils/constants.js +3 -0
- package/utils/theme.d.ts +2 -2
- package/utils/theme.js +3 -3
|
@@ -24,13 +24,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
import React, { useEffect } from 'react';
|
|
25
25
|
import { useTheme } from '@mui/material/styles';
|
|
26
26
|
import { Avatar, List, Tooltip } from '../../../index';
|
|
27
|
-
import { Box } from '@mui/material';
|
|
27
|
+
import { Box, Modal } from '@mui/material';
|
|
28
28
|
import { StreamSuiteLogo, NotchSVG, NotchExtendSVG } from '../../../assets/Images';
|
|
29
|
-
import
|
|
30
|
-
import { ChevronLeft, ChevronRight, PushPin } from '@mui/icons-material';
|
|
29
|
+
import AppSwitcher from '../../stream/AppSwitcher/AppSwitcher';
|
|
30
|
+
import { Apps, ChevronLeft, ChevronRight, PushPin } from '@mui/icons-material';
|
|
31
31
|
import VerticalNavigationItem from './VerticalNavigationItem/VerticalNavigationItem';
|
|
32
32
|
import { DRAWER_WIDTH, DrawerHeader, DrawerToggle, DrawerToggleHitboxContent, StyledDivider, StyledNav, StyledNavSecondary, DrawerShadow, StyledAside, NotchContainer, NotchBackground, NotchBackgroundClip, NotchSeemMask, StyledDrawer } from './VerticalNavigationStyles';
|
|
33
|
-
import {
|
|
33
|
+
import { ListItemText } from './VerticalNavigationItem/VerticalNavigationItemStyles';
|
|
34
34
|
import AvatarPanel from './VerticalNavigationAvatar';
|
|
35
35
|
import { motion } from '../../../utils/theme';
|
|
36
36
|
import { handleAvatarInitials } from '../../../utils/helpers';
|
|
@@ -38,12 +38,20 @@ import { DEFAULT_REACT_APP_ID } from '../../../utils/constants';
|
|
|
38
38
|
var VerticalNavigation = function (props) {
|
|
39
39
|
var _a, _b;
|
|
40
40
|
var theme = useTheme();
|
|
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, rest = __rest(props, ["items", "secondaryItems", "logo", "logoText", "logoOnClick", "appRootID", "hasStreamHome", "streamHomeApiKey", "streamHomeBaseUrl", "streamHomeAccessToken"]);
|
|
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"]);
|
|
42
42
|
var propIsDrawerOpen = typeof (props === null || props === void 0 ? void 0 : props.isDrawerOpen) === 'boolean' ? props.isDrawerOpen : undefined;
|
|
43
43
|
var propIsPersistent = typeof (props === null || props === void 0 ? void 0 : props.isPersistent) === 'boolean' ? props.isPersistent : undefined;
|
|
44
44
|
var avatarName = (_a = props === null || props === void 0 ? void 0 : props.avatarName) !== null && _a !== void 0 ? _a : 'Avatar name';
|
|
45
45
|
var _c = React.useState(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false), isDrawerOpen = _c[0], setIsDrawerOpen = _c[1];
|
|
46
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
|
+
};
|
|
47
55
|
var logoHeight = 38;
|
|
48
56
|
var logoWidth = 38;
|
|
49
57
|
useEffect(function () { return setIsDrawerOpen(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false); }, [propIsDrawerOpen]);
|
|
@@ -70,7 +78,7 @@ var VerticalNavigation = function (props) {
|
|
|
70
78
|
}
|
|
71
79
|
setIsPersistent(propIsPersistent !== null && propIsPersistent !== void 0 ? propIsPersistent : false);
|
|
72
80
|
};
|
|
73
|
-
var
|
|
81
|
+
var _f = React.useState((_b = handleAvatarInitials(avatarName)) !== null && _b !== void 0 ? _b : 'AN'), avatarInitials = _f[0], setAvatarInitials = _f[1];
|
|
74
82
|
var toggleDrawer = function (open) { return function (event) {
|
|
75
83
|
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
|
76
84
|
if (event.type === 'keydown') {
|
|
@@ -78,6 +86,7 @@ var VerticalNavigation = function (props) {
|
|
|
78
86
|
return;
|
|
79
87
|
}
|
|
80
88
|
}
|
|
89
|
+
setIsAppSwitcherOpen(false);
|
|
81
90
|
setIsDrawerOpen(open !== null && open !== void 0 ? open : !isDrawerOpen);
|
|
82
91
|
}; };
|
|
83
92
|
var listContent = function () { return (_jsxs(Box, __assign({ sx: {
|
|
@@ -190,21 +199,14 @@ var VerticalNavigation = function (props) {
|
|
|
190
199
|
? theme.palette.primary.main
|
|
191
200
|
: theme.palette.background.paper
|
|
192
201
|
} }, { children: [hasStreamHome
|
|
193
|
-
? (_jsx(
|
|
194
|
-
minHeight: 48,
|
|
195
|
-
justifyContent: isDrawerOpen || isPersistent ? 'initial' : 'center'
|
|
196
|
-
} }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: isDrawerOpen || isPersistent, disableFocusListener: isDrawerOpen || isPersistent, disableTouchListener: isDrawerOpen || isPersistent, title: 'App switcher', placement: theme.direction === 'rtl' ? 'left' : 'right' }, { children: _jsx(ListItemIcon, __assign({ sx: {
|
|
197
|
-
minWidth: 0,
|
|
198
|
-
mr: isDrawerOpen || isPersistent ? 2.5 : 'auto',
|
|
199
|
-
justifyContent: 'center'
|
|
200
|
-
} }, { children: _jsx(AppSwitcher, { apiKey: streamHomeApiKey !== null && streamHomeApiKey !== void 0 ? streamHomeApiKey : '', baseUrl: streamHomeBaseUrl !== null && streamHomeBaseUrl !== void 0 ? streamHomeBaseUrl : '', token: streamHomeAccessToken !== null && streamHomeAccessToken !== void 0 ? streamHomeAccessToken : '' }) })) })), _jsx(ListItemText, { primary: 'App switcher', isDrawerOpen: isDrawerOpen || isPersistent })] })) })))
|
|
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 }))
|
|
201
203
|
: null, secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) { return (_jsx(VerticalNavigationItem, __assign({}, item, { index: index, isDrawerOpen: isDrawerOpen || isPersistent, isSecondary: true }))); }), avatarName
|
|
202
204
|
? (_jsx(VerticalNavigationItem, { label: avatarName, "aria-controls": 'avatar-panel', icon: _jsx(Avatar, __assign({ style: {
|
|
203
205
|
// backgroundColor: mainTheme.colorButtonText,
|
|
204
206
|
// color: mainTheme.colorButton,
|
|
205
207
|
fontSize: '0.75rem',
|
|
206
|
-
height:
|
|
207
|
-
width:
|
|
208
|
+
height: 32,
|
|
209
|
+
width: 32
|
|
208
210
|
} }, { children: avatarInitials })), style: {
|
|
209
211
|
maxHeight: isDrawerOpen ? '200px' : '48px',
|
|
210
212
|
overflow: 'hidden',
|
|
@@ -215,11 +217,6 @@ var VerticalNavigation = function (props) {
|
|
|
215
217
|
: null] }))] })) }))] }))); };
|
|
216
218
|
return (_jsxs(StyledAside, __assign({ "aria-label": "Site navigation" }, { children: [_jsx(DrawerShadow, { className: 'drawerShadow', "aria-hidden": 'true', isDrawerOpen: isDrawerOpen || isPersistent, style: {
|
|
217
219
|
display: isPersistent ? 'none' : 'block'
|
|
218
|
-
} }), _jsx(StyledDrawer, __assign({ id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant:
|
|
219
|
-
keepMounted: true,
|
|
220
|
-
disablePortal: true,
|
|
221
|
-
open: isDrawerOpen,
|
|
222
|
-
onClose: toggleDrawer(false)
|
|
223
|
-
} }, { children: listContent() }))] })));
|
|
220
|
+
} }), _jsx(Modal, __assign({ "aria-hidden": false, keepMounted: true, disablePortal: true, open: isDrawerOpen, onClose: toggleDrawer(false) }, { children: _jsx(StyledDrawer, __assign({ id: 'vertical-navigation', anchor: 'left', open: isDrawerOpen || isPersistent, onClose: toggleDrawer(false), variant: 'permanent' }, { children: listContent() })) }))] })));
|
|
224
221
|
};
|
|
225
222
|
export default VerticalNavigation;
|
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
icon: any;
|
|
5
|
-
onClick: any;
|
|
6
|
-
}
|
|
7
|
-
export interface IAvatarPanelProps {
|
|
8
|
-
avatarName: string;
|
|
9
|
-
editProfileText?: string;
|
|
10
|
-
logoutText?: string;
|
|
11
|
-
avatarPanelOnClickSwitchDirection?: any;
|
|
12
|
-
avatarPanelOnClickLogout?: any;
|
|
13
|
-
avatarPanelOnClickViewProfile?: any;
|
|
14
|
-
avatarPanelViewProfileString?: string;
|
|
15
|
-
avatarPanelOnClickEditProfile?: any;
|
|
16
|
-
avatarPanelEditProfileString?: string;
|
|
17
|
-
avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
|
|
18
|
-
avatarPanelOnClickMainAction?: any;
|
|
19
|
-
avatarPanelMainActionString?: string;
|
|
20
|
-
avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
|
|
21
|
-
avatarPanelInvertNavString?: string;
|
|
22
|
-
}
|
|
2
|
+
import { IAvatarPanelProps } from '../../../types';
|
|
23
3
|
declare const AvatarPanel: (props: IAvatarPanelProps) => React.ReactElement;
|
|
24
4
|
export default AvatarPanel;
|
|
@@ -23,7 +23,7 @@ import { Person, Settings } from '@mui/icons-material';
|
|
|
23
23
|
var AvatarPanel = function (props) {
|
|
24
24
|
var _a;
|
|
25
25
|
var theme = useTheme();
|
|
26
|
-
var avatarName = props.avatarName, avatarPanelOnClickLogout = props.avatarPanelOnClickLogout,
|
|
26
|
+
var avatarName = props.avatarName, avatarPanelOnClickLogout = props.avatarPanelOnClickLogout, avatarPanelLogoutString = props.avatarPanelLogoutString, 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
27
|
useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [
|
|
28
28
|
avatarName
|
|
29
29
|
]);
|
|
@@ -43,13 +43,13 @@ var AvatarPanel = function (props) {
|
|
|
43
43
|
position: 'absolute',
|
|
44
44
|
right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
|
|
45
45
|
top: theme.spacing(1)
|
|
46
|
-
}, onClick: avatarPanelOnClickLogout, startIcon: _jsx(LogoutIcon, {}), variant: 'text', color: 'inherit' }, { children:
|
|
46
|
+
}, onClick: avatarPanelOnClickLogout, startIcon: _jsx(LogoutIcon, {}), variant: 'text', color: 'inherit' }, { children: avatarPanelLogoutString !== null && avatarPanelLogoutString !== void 0 ? avatarPanelLogoutString : 'Logout' }))), _jsxs(Box, __assign({ style: {
|
|
47
47
|
alignItems: 'center',
|
|
48
48
|
display: 'flex',
|
|
49
49
|
flexDirection: 'column'
|
|
50
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
51
|
flexDirection: 'row',
|
|
52
|
-
marginBottom: theme.spacing(
|
|
52
|
+
marginBottom: theme.spacing(2)
|
|
53
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
54
|
alignItems: 'center',
|
|
55
55
|
display: 'flex',
|
|
@@ -79,6 +79,6 @@ var AvatarPanel = function (props) {
|
|
|
79
79
|
// @ts-expect-error
|
|
80
80
|
component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
|
|
81
81
|
minWidth: theme.spacing(5)
|
|
82
|
-
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))] }))] })));
|
|
82
|
+
} }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))] })), _jsx(Box, __assign({ className: 'avatar-panel-footnote' }, { children: avatarPanelFootnote && avatarPanelFootnote }))] })));
|
|
83
83
|
};
|
|
84
84
|
export default AvatarPanel;
|
|
@@ -9,10 +9,10 @@ import { motion } from 'framer-motion';
|
|
|
9
9
|
export var StyledSwipeableAvatar = styled(Drawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .MuiPaper-root {\n color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"], ["\n .MuiPaper-root {\n color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
10
10
|
? props.theme.palette.primary.contrastText
|
|
11
11
|
: props.theme.palette.text.primary; });
|
|
12
|
-
export var StyledBox = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex-direction: column;\n
|
|
12
|
+
export var StyledBox = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n font-family: ", ";\n height: 100%;\n justify-content: flex-start;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n font-family: ", ";\n height: 100%;\n justify-content: flex-start;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
13
13
|
? props.theme.palette.primary.dark
|
|
14
|
-
: '#E6EAF0'; }, function (props) { return props.theme.spacing(2); });
|
|
15
|
-
export var StyledBoxProfile = styled(motion.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 2rem
|
|
14
|
+
: '#E6EAF0'; }, function (props) { return props.theme.typography.fontFamily; }, function (props) { return props.theme.spacing(2); });
|
|
15
|
+
export var StyledBoxProfile = styled(motion.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 2rem;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 2rem;\n"])));
|
|
16
16
|
export var StyledBoxProfileEdit = styled(motion.div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
17
17
|
export var StyledAvatarName = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-size: 1.75rem;\n"], ["\n color: ", ";\n font-size: 1.75rem;\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
18
18
|
? props.theme.palette.primary.contrastText
|
package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
label: string;
|
|
4
|
-
icon?: React.ReactElement;
|
|
5
|
-
onClick?: any;
|
|
6
|
-
isActive?: boolean;
|
|
7
|
-
children?: IVerticalNavigationItemProps[];
|
|
8
|
-
isDrawerOpen?: boolean;
|
|
9
|
-
index?: number;
|
|
10
|
-
isSecondary?: boolean;
|
|
11
|
-
hasFlyout?: boolean;
|
|
12
|
-
fullHeightFlyout?: boolean;
|
|
13
|
-
content?: React.ReactElement;
|
|
14
|
-
style?: any;
|
|
15
|
-
open?: boolean;
|
|
16
|
-
}
|
|
2
|
+
import { IVerticalNavigationItemProps } from '../../../../types';
|
|
17
3
|
declare const VerticalNavigationItem: (props: IVerticalNavigationItemProps) => React.ReactElement;
|
|
18
4
|
export default VerticalNavigationItem;
|
package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js
CHANGED
|
@@ -31,9 +31,8 @@ import VerticalNavigationItemFlyoutMenu from './VerticalNavigationItemFlyoutMenu
|
|
|
31
31
|
var VerticalNavigationItem = function (props) {
|
|
32
32
|
var _a, _b, _c;
|
|
33
33
|
var theme = useTheme();
|
|
34
|
-
var label = props.label, icon = props.icon, onClick = props.onClick, isActive = props.isActive, children = props.children, isDrawerOpen = props.isDrawerOpen, index = props.index, hasFlyout = props.hasFlyout, fullHeightFlyout = props.fullHeightFlyout, isSecondary = props.isSecondary, content = props.content, style = props.style, rest = __rest(props, ["label", "icon", "onClick", "isActive", "children", "isDrawerOpen", "index", "hasFlyout", "fullHeightFlyout", "isSecondary", "content", "style"]);
|
|
35
|
-
var _d = React.useState(
|
|
36
|
-
var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
|
|
34
|
+
var label = props.label, icon = props.icon, onClick = props.onClick, isActive = props.isActive, children = props.children, isDrawerOpen = props.isDrawerOpen, index = props.index, hasFlyout = props.hasFlyout, fullHeightFlyout = props.fullHeightFlyout, isSecondary = props.isSecondary, content = props.content, style = props.style, hasCustomContent = props.hasCustomContent, rest = __rest(props, ["label", "icon", "onClick", "isActive", "children", "isDrawerOpen", "index", "hasFlyout", "fullHeightFlyout", "isSecondary", "content", "style", "hasCustomContent"]);
|
|
35
|
+
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
37
36
|
var open = Boolean(anchorEl);
|
|
38
37
|
var handlePopoverOpen = function (event) {
|
|
39
38
|
if (open) {
|
|
@@ -50,42 +49,47 @@ var VerticalNavigationItem = function (props) {
|
|
|
50
49
|
handlePopoverOpen(event);
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
if (children && children.length > 0) {
|
|
54
|
-
setIsExpanded(!isExpanded);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
52
|
if (onClick) {
|
|
58
53
|
onClick(event);
|
|
59
54
|
}
|
|
60
55
|
setAnchorEl(null);
|
|
61
56
|
};
|
|
57
|
+
var handleChildItemClick = function (event, item) {
|
|
58
|
+
if (!event) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
if (item.onClick) {
|
|
63
|
+
item.onClick(event);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
62
66
|
return (_jsxs(ListItem, __assign({ disablePadding: true, style: style }, rest, { isDrawerOpen: isDrawerOpen }, { children: [_jsxs(ListItemButton
|
|
63
67
|
// @ts-expect-error
|
|
64
68
|
, __assign({
|
|
65
69
|
// @ts-expect-error
|
|
66
|
-
component: Link, onClick: handleClick, isActive: isActive, isDrawerOpen: isDrawerOpen,
|
|
70
|
+
component: Link, onClick: handleClick, isActive: isActive, isDrawerOpen: isDrawerOpen, open: open, onMouseEnter: function (event) { return (fullHeightFlyout || isDrawerOpen)
|
|
67
71
|
? null
|
|
68
|
-
: handlePopoverOpen(event); }, onMouseLeave: function () { return fullHeightFlyout
|
|
72
|
+
: handlePopoverOpen(event); }, onMouseLeave: function () { return (fullHeightFlyout || isDrawerOpen)
|
|
69
73
|
? null
|
|
70
|
-
: handlePopoverClose(); }, onFocus: function (event) { return fullHeightFlyout
|
|
74
|
+
: handlePopoverClose(); }, onFocus: function (event) { return (fullHeightFlyout || isDrawerOpen)
|
|
71
75
|
? null
|
|
72
|
-
: handlePopoverOpen(event); }, onBlur: function () { return fullHeightFlyout
|
|
76
|
+
: handlePopoverOpen(event); }, onBlur: function () { return (fullHeightFlyout || isDrawerOpen)
|
|
73
77
|
? null
|
|
74
|
-
: handlePopoverClose(); }, "aria-expanded":
|
|
78
|
+
: handlePopoverClose(); }, "aria-expanded": fullHeightFlyout ? open : null, "aria-current": isActive ? 'page' : null, role: (children && children.length > 0) || fullHeightFlyout ? 'button' : 'link' }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: (_a = (children && children.length > 0)) !== null && _a !== void 0 ? _a : isDrawerOpen, disableFocusListener: (_b = (children && children.length > 0)) !== null && _b !== void 0 ? _b : isDrawerOpen, disableTouchListener: (_c = (children && children.length > 0)) !== null && _c !== void 0 ? _c : isDrawerOpen, title: label, placement: theme.direction === 'rtl' ? 'left' : 'right', enterDelay: tooltipDelay.start, leaveDelay: tooltipDelay.end }, { children: _jsx(ListItemIcon, __assign({ "aria-hidden": true }, { children: icon !== null && icon !== void 0 ? icon : _jsx(MailIcon, {}) })) })), _jsx(ListItemText, { primary: label, isDrawerOpen: isDrawerOpen, index: index, sx: {
|
|
75
79
|
'& .MuiTypography-root': {
|
|
76
80
|
fontSize: isSecondary ? '14px' : 'inherit'
|
|
77
81
|
}
|
|
78
|
-
} }), children && children.length > 0 && (_jsx(Collapse, __assign({ component: 'div', in: isDrawerOpen
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
} })] }), label), children && children.length > 0 && (_jsx(Collapse, __assign({ component: 'div', in: isDrawerOpen }, { children: _jsx(List, __assign({ "aria-label": label, disablePadding: true }, { children: children.map(function (childItem, index) { return (_jsx(ListItem, __assign({ disablePadding: true, isDrawerOpen: isDrawerOpen }, { children: _jsxs(ListItemButtonChild
|
|
83
|
+
// @ts-expect-error
|
|
84
|
+
, __assign({
|
|
85
|
+
// @ts-expect-error
|
|
86
|
+
component: Link, role: 'link', index: index, isDrawerOpen: isDrawerOpen, onClick: function (event) { return handleChildItemClick(event, childItem); } }, { children: [_jsx(ListItemIcon, { children: childItem.icon }), _jsx(ListItemText, { primary: childItem.label, isDrawerOpen: isDrawerOpen, sx: {
|
|
87
|
+
'& .MuiTypography-root': {
|
|
88
|
+
fontSize: '14px !important',
|
|
89
|
+
color: theme.palette.mode === 'dark'
|
|
90
|
+
? theme.palette.primary.contrastText
|
|
91
|
+
: theme.palette.getContrastText(theme.palette.background.paper)
|
|
92
|
+
}
|
|
93
|
+
} })] }), label) }))); }) })) }))), hasCustomContent && content, !fullHeightFlyout && children && children.length > 0 && !isDrawerOpen && (_jsx(VerticalNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, anchorEl: anchorEl, open: open, children: children, label: label })), fullHeightFlyout && content && (_jsx(VerticalNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, fullHeightFlyout: true, anchorEl: anchorEl, open: open, content: content }))] })));
|
|
90
94
|
};
|
|
91
95
|
export default VerticalNavigationItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IVerticalNavigationItemProps } from '
|
|
2
|
+
import { IVerticalNavigationItemProps } from '../../../../types';
|
|
3
3
|
export interface IVerticalNavigationItemFlyoutMenuProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
children?: IVerticalNavigationItemProps[];
|
|
@@ -24,6 +24,6 @@ var VerticalNavigationItemFlyoutMenu = function (props) {
|
|
|
24
24
|
// @ts-expect-error
|
|
25
25
|
, __assign({
|
|
26
26
|
// @ts-expect-error
|
|
27
|
-
component: Link, onClick: childItem.onClick
|
|
27
|
+
component: Link, role: 'link', onClick: childItem.onClick }, { children: _jsx(ListItemText, { primary: childItem.label }) }), childItem.label) })); }) }))] })) })));
|
|
28
28
|
};
|
|
29
29
|
export default VerticalNavigationItemFlyoutMenu;
|
|
@@ -56,7 +56,7 @@ export declare const FlyoutMenuItem: import("@emotion/styled").StyledComponent<{
|
|
|
56
56
|
} | undefined;
|
|
57
57
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
|
|
58
58
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
59
|
-
}, "className" | "style" | "classes" | "button" | "children" | "sx" | "alignItems" | "disabled" | "autoFocus" | "selected" | "dense" | "components" | "componentsProps" | "disablePadding" | "disableGutters" | "
|
|
59
|
+
}, "className" | "style" | "classes" | "button" | "children" | "sx" | "alignItems" | "disabled" | "autoFocus" | "selected" | "dense" | "components" | "componentsProps" | "disablePadding" | "disableGutters" | "divider" | "ContainerComponent" | "ContainerProps" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
60
60
|
export declare const FlyoutMenuButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
61
61
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
62
62
|
centerRipple?: boolean | undefined;
|
|
@@ -14,7 +14,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
|
14
14
|
} | undefined;
|
|
15
15
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
|
|
16
16
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
17
|
-
}, "className" | "style" | "classes" | "button" | "children" | "sx" | "alignItems" | "disabled" | "autoFocus" | "selected" | "dense" | "components" | "componentsProps" | "disablePadding" | "disableGutters" | "
|
|
17
|
+
}, "className" | "style" | "classes" | "button" | "children" | "sx" | "alignItems" | "disabled" | "autoFocus" | "selected" | "dense" | "components" | "componentsProps" | "disablePadding" | "disableGutters" | "divider" | "ContainerComponent" | "ContainerProps" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
18
18
|
isDrawerOpen?: boolean | undefined;
|
|
19
19
|
}, {}, {}>;
|
|
20
20
|
export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
@@ -37,7 +37,6 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
37
37
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
38
38
|
}, "className" | "style" | "classes" | "tabIndex" | "children" | "sx" | "alignItems" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
39
39
|
isDrawerOpen?: boolean | undefined;
|
|
40
|
-
isExpanded?: boolean | undefined;
|
|
41
40
|
}, {}, {}>;
|
|
42
41
|
export declare const ListItemButtonChild: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
|
|
43
42
|
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
@@ -81,7 +80,6 @@ export declare const ListItemAvatar: import("@emotion/styled").StyledComponent<i
|
|
|
81
80
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
82
81
|
}, "className" | "style" | "classes" | "tabIndex" | "children" | "sx" | "alignItems" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "selected" | "dense" | "disableGutters" | "divider"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
83
82
|
isDrawerOpen?: boolean | undefined;
|
|
84
|
-
isExpanded?: boolean | undefined;
|
|
85
83
|
} & {
|
|
86
84
|
children?: import("react").ReactNode;
|
|
87
85
|
} & {
|
|
@@ -15,11 +15,11 @@ var ICON = {
|
|
|
15
15
|
};
|
|
16
16
|
export var ListItem = styled(SSListItem, {
|
|
17
17
|
shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
|
|
18
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n color: ", ";\n min-height: ", "px;\n padding: 0 !important;\n transition: width\n ", "ms\n ", "\n ", ";\n width: ", "px;\n\n .MuiListItemIcon-root: {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root .MuiTypography-root: {\n white-space: normal;\n }\n"], ["\n align-items: flex-start;\n color: ", ";\n min-height: ", "px;\n padding: 0 !important;\n transition: width\n ", "ms\n ", "\n ", ";\n width: ", "px;\n\n .MuiListItemIcon-root: {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root .MuiTypography-root: {\n white-space: normal;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
18
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: flex-start;\n color: ", ";\n flex-direction: column;\n min-height: ", "px;\n padding: 0 !important;\n transition: width\n ", "ms\n ", "\n ", ";\n width: ", "px;\n\n .MuiListItemIcon-root: {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root .MuiTypography-root: {\n white-space: normal;\n }\n"], ["\n align-items: flex-start;\n color: ", ";\n flex-direction: column;\n min-height: ", "px;\n padding: 0 !important;\n transition: width\n ", "ms\n ", "\n ", ";\n width: ", "px;\n\n .MuiListItemIcon-root: {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root .MuiTypography-root: {\n white-space: normal;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
|
|
19
19
|
? props.theme.palette.primary.contrastText
|
|
20
20
|
: props.theme.palette.getContrastText(props.theme.palette.background.paper); }, ICON.Height + 8, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.isDrawerOpen ? '0ms' : '250ms'; }, DRAWER_WIDTH.Expanded, function (props) { return props.theme.spacing(0.5); });
|
|
21
21
|
export var ListItemButton = styled(SSListItemButton, {
|
|
22
|
-
shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'
|
|
22
|
+
shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
|
|
23
23
|
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n align-items: flex-start !important;\n background-color: ", ";\n color: ", ";\n display: flex;\n flex-wrap: wrap;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-transform: none;\n transition: all\n ", "ms\n ", "\n 0ms !important;\n padding: 0 ", " 0 0;\n width: 100%;\n\n /* Indicator */\n :before {\n background-color: ", ";\n border-radius: 50px;\n content: '';\n height: calc(100% - 10px);\n opacity: 0;\n position: absolute;\n top: 5px;\n left: 3px;\n transition: all\n ", "ms\n ", ";\n width: 4px;\n transform: scale(.95);\n }\n\n :hover:before,\n :focus-visible:before {\n opacity: 1;\n transform: scale(1);\n }\n\n :hover {\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n }\n\n :active {\n background-color: transparent\n }\n"], ["\n align-items: flex-start !important;\n background-color: ", ";\n color: ", ";\n display: flex;\n flex-wrap: wrap;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-transform: none;\n transition: all\n ", "ms\n ", "\n 0ms !important;\n padding: 0 ", " 0 0;\n width: 100%;\n\n /* Indicator */\n :before {\n background-color: ", ";\n border-radius: 50px;\n content: '';\n height: calc(100% - 10px);\n opacity: 0;\n position: absolute;\n top: 5px;\n left: 3px;\n transition: all\n ", "ms\n ", ";\n width: 4px;\n transform: scale(.95);\n }\n\n :hover:before,\n :focus-visible:before {\n opacity: 1;\n transform: scale(1);\n }\n\n :hover {\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n }\n\n :active {\n background-color: transparent\n }\n"])), function (props) {
|
|
24
24
|
return props.theme.palette.mode === 'dark'
|
|
25
25
|
? props.theme.palette.primary.main
|
|
@@ -29,9 +29,7 @@ export var ListItemButton = styled(SSListItemButton, {
|
|
|
29
29
|
? props.theme.palette.primary.contrastText
|
|
30
30
|
: props.theme.palette.getContrastText(props.theme.palette.background.paper);
|
|
31
31
|
}, ICON.Height + 8, function (props) { return props.isDrawerOpen
|
|
32
|
-
?
|
|
33
|
-
? 'auto'
|
|
34
|
-
: '200px'
|
|
32
|
+
? 'auto'
|
|
35
33
|
: "".concat(ICON.Height + 8, "px"); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.spacing(2); }, function (props) {
|
|
36
34
|
return props.theme.palette.mode === 'dark'
|
|
37
35
|
? 'rgba(255, 255, 255, 0.5)'
|
|
@@ -81,9 +81,9 @@ export var NotchSeemMask = styled(Box)(templateObject_12 || (templateObject_12 =
|
|
|
81
81
|
: props.theme.palette.background.paper; });
|
|
82
82
|
export var StyledDrawer = styled(Drawer, {
|
|
83
83
|
shouldForwardProp: function (prop) { return prop !== 'open'; }
|
|
84
|
-
})(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n
|
|
84
|
+
})(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width\n ", "ms\n ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width\n ", "ms\n ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n }\n"])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
|
|
85
85
|
return props.theme.palette.mode === 'dark'
|
|
86
86
|
? props.theme.palette.primary.contrastText
|
|
87
87
|
: props.theme.palette.getContrastText(props.theme.palette.background.paper);
|
|
88
|
-
}, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }
|
|
88
|
+
}, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
|
|
89
89
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { IApplication } from '../../../types';
|
|
4
|
+
interface IProps {
|
|
5
|
+
userId?: string;
|
|
6
|
+
layout?: string;
|
|
7
|
+
token?: string;
|
|
8
|
+
apiKey?: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
applications?: IApplication[] | null;
|
|
11
|
+
currentApplicationId?: number;
|
|
12
|
+
localization?: any;
|
|
13
|
+
isAppSwitcherOpen?: boolean;
|
|
14
|
+
setIsAppSwitcherOpen?: any;
|
|
15
|
+
isDrawerOpen?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const AppSwitcher: {
|
|
18
|
+
(props: IProps): ReactElement | null;
|
|
19
|
+
propTypes: {
|
|
20
|
+
accessToken: PropTypes.Requireable<string>;
|
|
21
|
+
apiKey: PropTypes.Requireable<string>;
|
|
22
|
+
layout: PropTypes.Requireable<string>;
|
|
23
|
+
userId: PropTypes.Requireable<number>;
|
|
24
|
+
baseUrl: PropTypes.Requireable<string>;
|
|
25
|
+
localization: PropTypes.Requireable<object>;
|
|
26
|
+
currentApplicationId: PropTypes.Requireable<number>;
|
|
27
|
+
applications: PropTypes.Requireable<any[]>;
|
|
28
|
+
};
|
|
29
|
+
defaultProps: {
|
|
30
|
+
layout: string;
|
|
31
|
+
baseUrl: string;
|
|
32
|
+
localization: {};
|
|
33
|
+
applications: never[];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default AppSwitcher;
|