@learningpool/ui 1.15.4 → 1.16.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/assets/Images.js +7 -18
- package/components/atoms/Autocomplete/Autocomplete.js +3 -14
- package/components/atoms/Button/Button.js +2 -13
- package/components/atoms/Checkbox/Checkbox.js +3 -26
- package/components/atoms/IconButton/IconButton.js +2 -13
- package/components/atoms/Radio/Radio.js +3 -26
- package/components/atoms/Select/Select.js +3 -26
- package/components/atoms/Slider/Slider.js +3 -26
- package/components/atoms/Switch/Switch.js +3 -26
- package/components/atoms/TextField/TextField.js +2 -13
- package/components/atoms/ToggleButton/ToggleButton.js +3 -26
- package/components/datadisplay/Avatar/Avatar.js +13 -28
- package/components/datadisplay/Chip/Chip.js +3 -26
- package/components/datadisplay/List/List.js +2 -13
- package/components/feedback/Alert/Alert.js +3 -26
- package/components/landmarks/Header/Header.js +15 -41
- package/components/landmarks/Header/HeaderActionButtons.d.ts +1 -2
- package/components/landmarks/Header/HeaderActionButtons.js +22 -33
- package/components/landmarks/Header/HeaderStyles.js +54 -11
- package/components/navigation/Drawer/Drawer.js +5 -31
- package/components/navigation/MobileNavigation/MobileNavigation.js +70 -82
- package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +75 -83
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +102 -52
- package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +71 -13
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +1 -1
- package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +41 -68
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +34 -18
- package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +133 -20
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +22 -45
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +8 -19
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +151 -52
- package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +171 -50
- package/components/navigation/MobileNavigation/MobileNavigationMotion.js +11 -11
- package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +11 -15
- package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +1 -2
- package/components/navigation/MobileNavigation/MobileNavigationSearch.js +25 -34
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +34 -18
- package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +47 -9
- package/components/navigation/MobileNavigation/MobileNavigationStyles.js +262 -66
- package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +21 -20
- package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +21 -20
- package/components/navigation/VerticalNavigation/VerticalNavigation.js +150 -185
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +50 -61
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +102 -52
- package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +86 -14
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +27 -51
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +15 -28
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +135 -39
- package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +167 -29
- package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +11 -11
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +34 -18
- package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +236 -42
- package/components/navigation/helpers.d.ts +1 -2
- package/components/navigation/helpers.js +28 -32
- package/components/pages/ErrorPage/ErrorPage.js +6 -17
- package/components/pages/ErrorPage/ErrorPageStyles.js +13 -18
- package/components/pages/SideInSide/SideInSide.js +12 -23
- package/components/pages/SideInSide/SideInSideStyles.js +6 -6
- package/components/stream/AppHub/AppHub.js +13 -42
- package/components/stream/AppHub/AppHubAdvertStyles.js +24 -8
- package/components/stream/AppHub/AppHubBannerAdvert.d.ts +1 -2
- package/components/stream/AppHub/AppHubBannerAdvert.js +10 -20
- package/components/stream/AppHub/AppHubCustom.js +8 -19
- package/components/stream/AppHub/AppHubCustomStyles.d.ts +1 -1
- package/components/stream/AppHub/AppHubCustomStyles.js +78 -18
- package/components/stream/AppHub/AppHubProduct.js +26 -48
- package/components/stream/AppHub/AppHubProductStyles.js +104 -19
- package/components/stream/AppHub/AppHubStyles.js +31 -11
- package/components/stream/AppHub/constants.d.ts +1 -2
- package/components/stream/AppHub/constants.js +14 -14
- package/components/stream/AppSwitcher/AppSwitcher.js +225 -316
- package/components/stream/AppSwitcher/AppSwitcherItem.js +11 -22
- package/components/stream/AppSwitcher/AppSwitcherStyles.js +337 -42
- package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +255 -21
- package/components/stream/AppSwitcher/PromotionalCampaignItem.js +7 -19
- package/components/stream/AppSwitcher/constants.d.ts +1 -0
- package/components/stream/AppSwitcher/constants.js +6 -5
- package/lang/en-us.d.ts +1 -0
- package/lang/en-us.js +2 -1
- package/package.json +7 -2
- package/utils/constants.d.ts +7 -0
- package/utils/constants.js +11 -4
- package/utils/dataAttributes.js +1 -1
- package/utils/helpers.js +33 -40
- package/utils/hooks.js +10 -11
- package/utils/theme.js +26 -19
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
|
|
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 } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
13
2
|
import React from 'react';
|
|
14
3
|
import { Link, ListItemText } from '../../../../index';
|
|
15
4
|
import { FlyoutMenuPaper, FlyoutMenuWrap, FlyoutMenuList, FlyoutMenuButton, FlyoutMenuItem } from './MobileNavigationItemFlyoutMenuStyles';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (_jsx(FlyoutMenuPaper,
|
|
5
|
+
const MobileNavigationItemFlyoutMenu = (props) => {
|
|
6
|
+
const { label, children, isDrawerOpen, anchorEl } = props;
|
|
7
|
+
const [flyoutHovered, setFlyoutHovered] = React.useState(false);
|
|
8
|
+
const open = flyoutHovered || props?.open;
|
|
9
|
+
return (_jsx(FlyoutMenuPaper, { isDrawerOpen: isDrawerOpen, open: open, anchorEl: anchorEl ?? undefined, onMouseEnter: () => setFlyoutHovered(true), onMouseLeave: () => setFlyoutHovered(false), onFocus: () => setFlyoutHovered(true), onBlur: () => setFlyoutHovered(false), children: _jsx(FlyoutMenuWrap, { open: open, children: _jsx(FlyoutMenuList, { "aria-label": label, open: open, children: children?.map(childItem => (_jsx(FlyoutMenuItem, { children: _jsx(FlyoutMenuButton
|
|
21
10
|
// @ts-expect-error
|
|
22
|
-
,
|
|
11
|
+
, {
|
|
23
12
|
// @ts-expect-error
|
|
24
|
-
component: Link, onClick: childItem.onClick, role: 'link'
|
|
13
|
+
component: Link, onClick: childItem.onClick, role: 'link', children: _jsx(ListItemText, { primary: childItem.label }) }, childItem.label) }))) }) }) }));
|
|
25
14
|
};
|
|
26
15
|
export default MobileNavigationItemFlyoutMenu;
|
|
@@ -1,66 +1,165 @@
|
|
|
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
1
|
import { List, ListItem, ListItemButton as SSListItemButton, Paper, Typography } from '../../../../index';
|
|
6
2
|
import { styled } from '@mui/material/styles';
|
|
7
3
|
import { motion } from '../../../../utils/theme';
|
|
8
4
|
import { NotchMiniSVG } from '../../../../assets/Images';
|
|
9
|
-
export
|
|
5
|
+
export const DRAWER_WIDTH = {
|
|
10
6
|
Collapsed: 60,
|
|
11
7
|
Expanded: 300
|
|
12
8
|
};
|
|
13
|
-
export
|
|
14
|
-
shouldForwardProp:
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
export const FlyoutMenuPaper = styled(Paper, {
|
|
10
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'open' && prop !== 'anchorEl'
|
|
11
|
+
}) `
|
|
12
|
+
background: transparent none;
|
|
13
|
+
box-shadow: none;
|
|
14
|
+
left: ${props => props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded}px` : `${DRAWER_WIDTH.Collapsed - 3}px`};
|
|
15
|
+
perspective: 800px;
|
|
16
|
+
pointer-events: ${props => props.open ? 'auto' : 'none'};
|
|
17
|
+
position: fixed;
|
|
18
|
+
/* Check against height of browser should be top or bottom positioned */
|
|
19
|
+
top: ${props => props.anchorEl
|
|
20
|
+
? `${props.anchorEl.getBoundingClientRect().top}px`
|
|
21
|
+
: 'auto'};
|
|
22
|
+
width: 200px;
|
|
23
|
+
z-index: 2;
|
|
24
|
+
`;
|
|
25
|
+
export const FlyoutMenuWrap = styled('div', {
|
|
26
|
+
shouldForwardProp: (prop) => prop !== 'open'
|
|
27
|
+
}) `
|
|
28
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
21
29
|
? props.theme.palette.primary.dark
|
|
22
|
-
: '#E6EAF0';
|
|
30
|
+
: '#E6EAF0'};
|
|
31
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
32
|
+
? props.theme.palette.primary.contrastText
|
|
33
|
+
: props.theme.palette.getContrastText(props.theme.palette.background.paper)};
|
|
34
|
+
border-radius: 0 8px 8px 0;
|
|
35
|
+
box-shadow: 5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%);
|
|
36
|
+
opacity: ${props => props.open ? 1 : 0};
|
|
37
|
+
visibility: ${props => props.open ? 'visible' : 'hidden'};
|
|
38
|
+
transform: ${props => props.open ? 'rotateY(0deg) scale(1)' : 'rotateY(15deg) scale(.97)'};
|
|
39
|
+
transform-origin: left center;
|
|
40
|
+
transition: ${props => props.open
|
|
41
|
+
? `all 250ms ${motion.easeInOut}`
|
|
42
|
+
: `all 150ms ${motion.easeOut}`};
|
|
43
|
+
`;
|
|
44
|
+
export const FlyoutMenuList = styled(List, {
|
|
45
|
+
shouldForwardProp: (prop) => prop !== 'open'
|
|
46
|
+
}) `
|
|
47
|
+
padding: ${props => props.theme.spacing(1, 2)};
|
|
48
|
+
pointer-events: ${props => props.open ? 'auto' : 'none'};
|
|
49
|
+
`;
|
|
50
|
+
export const FlyoutMenuHeader = styled(Typography) `
|
|
51
|
+
font-weight: bold;
|
|
52
|
+
padding: 12px ${props => props.theme.spacing(2)} 0 ${props => props.theme.spacing(3)};
|
|
53
|
+
`;
|
|
54
|
+
export const FlyoutMenuItem = styled(ListItem) `
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
padding: 0;
|
|
57
|
+
white-space: normal;
|
|
58
|
+
background: transparent !important;
|
|
59
|
+
`;
|
|
60
|
+
export const FlyoutMenuButton = styled(SSListItemButton, {
|
|
61
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'isExpanded'
|
|
62
|
+
}) `
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
background-color: transparent;
|
|
65
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
23
66
|
? props.theme.palette.primary.contrastText
|
|
24
|
-
: props.theme.palette.getContrastText(props.theme.palette.background.paper)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
: props.theme.palette.getContrastText(props.theme.palette.background.paper)};
|
|
68
|
+
border-radius: 5px;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-wrap: wrap;
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
text-transform: none;
|
|
73
|
+
transition: all 225ms ${motion.easeInOut} 0;
|
|
74
|
+
padding: ${props => props.theme.spacing(1, 2)};
|
|
75
|
+
width: 100%;
|
|
76
|
+
|
|
77
|
+
/* Indicator */
|
|
78
|
+
:before {
|
|
79
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
80
|
+
? 'rgba(255, 255, 255, 0.5)'
|
|
81
|
+
: props.theme.palette.primary.main};
|
|
82
|
+
border-radius: 50px;
|
|
83
|
+
content: '';
|
|
84
|
+
height: calc(100% - 10px);
|
|
85
|
+
opacity: 0;
|
|
86
|
+
position: absolute;
|
|
87
|
+
top: 5px;
|
|
88
|
+
left: 5px;
|
|
89
|
+
transition: all 180ms ${motion.easeInOut};
|
|
90
|
+
width: 4px;
|
|
91
|
+
transform: scale(.95);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:hover:before,
|
|
95
|
+
:focus:before {
|
|
96
|
+
opacity: 1;
|
|
97
|
+
transform: scale(1);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:hover {
|
|
101
|
+
background-color: rgba(0, 0, 0, .05);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:focus {
|
|
105
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
106
|
+
? props.theme.palette.primary.dark
|
|
107
|
+
: '#E6EAF0'};
|
|
108
|
+
}
|
|
109
|
+
`;
|
|
49
110
|
// FullHeight
|
|
50
|
-
export
|
|
51
|
-
shouldForwardProp:
|
|
52
|
-
})
|
|
111
|
+
export const FullHeightFlyoutMenuPaper = styled(Paper, {
|
|
112
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'open'
|
|
113
|
+
}) `
|
|
114
|
+
background: transparent none;
|
|
115
|
+
box-shadow: none;
|
|
116
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
53
117
|
? props.theme.palette.primary.contrastText
|
|
54
|
-
: props.theme.palette.getContrastText(props.theme.palette.background.paper)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
118
|
+
: props.theme.palette.getContrastText(props.theme.palette.background.paper)};
|
|
119
|
+
height: 100%;
|
|
120
|
+
left: ${props => props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded}px` : `${DRAWER_WIDTH.Collapsed - 3}px`};
|
|
121
|
+
perspective: 800px;
|
|
122
|
+
pointer-events: ${props => props.open ? 'auto' : 'none'};
|
|
123
|
+
position: fixed;
|
|
124
|
+
top: 0;
|
|
125
|
+
z-index: 1;
|
|
126
|
+
`;
|
|
127
|
+
export const FullHeightFlyoutMenuWrapper = styled('div', {
|
|
128
|
+
shouldForwardProp: (prop) => prop !== 'open'
|
|
129
|
+
}) `
|
|
130
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
58
131
|
? props.theme.palette.primary.main
|
|
59
|
-
: props.theme.palette.background.paper
|
|
60
|
-
|
|
132
|
+
: props.theme.palette.background.paper};
|
|
133
|
+
box-shadow: 35px 0 15px 0 rgb(0 0 0 / 10%);
|
|
134
|
+
height: 100%;
|
|
135
|
+
max-width: 300px;
|
|
136
|
+
min-width: 300px;
|
|
137
|
+
opacity: ${props => props.open ? 1 : 0};
|
|
138
|
+
pointer-events: ${props => props.open ? 'auto' : 'none'};
|
|
139
|
+
transform: ${props => props.open ? 'rotateY(0deg) scale(1)' : 'rotateY(8deg) scale(.98)'};
|
|
140
|
+
transform-origin: left center;
|
|
141
|
+
transition: ${props => props.open ? `all 150ms ${motion.easeInOut}` : `all 100ms ${motion.easeOut}`};
|
|
142
|
+
visibility: ${props => props.open ? 'visible' : 'hidden'};
|
|
143
|
+
width: ${props => props.open ? '300' : 0};
|
|
144
|
+
`;
|
|
145
|
+
export const FlyoutNotchMask = styled('div') `
|
|
146
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
61
147
|
? props.theme.palette.primary.dark
|
|
62
|
-
: '#E6EAF0'
|
|
63
|
-
|
|
148
|
+
: '#E6EAF0'};
|
|
149
|
+
content: '';
|
|
150
|
+
display: block;
|
|
151
|
+
height: 80px;
|
|
152
|
+
left: -40px;
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 65px;
|
|
155
|
+
width: 80px;
|
|
156
|
+
z-index: -1;
|
|
157
|
+
`;
|
|
158
|
+
export const NotchMini = styled(NotchMiniSVG) `
|
|
159
|
+
fill: ${props => props.theme.palette.mode === 'dark'
|
|
64
160
|
? props.theme.palette.primary.dark
|
|
65
|
-
: '#E6EAF0'
|
|
66
|
-
|
|
161
|
+
: '#E6EAF0'};
|
|
162
|
+
left: -12px;
|
|
163
|
+
pointer-events: none;
|
|
164
|
+
position: absolute;
|
|
165
|
+
`;
|
package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js
CHANGED
|
@@ -1,68 +1,189 @@
|
|
|
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
1
|
import { ListItem as SSListItem, ListItemButton as SSListItemButton, ListItemText as SSListItemText, ListItemIcon as SSListItemIcon } from '../../../../index';
|
|
6
2
|
import { getNavigationContrastText } from '../../helpers';
|
|
7
3
|
import { styled } from '@mui/material/styles';
|
|
8
4
|
import { motion } from '../../../../utils/theme';
|
|
9
5
|
import ArrowRightIcon from '@mui/icons-material/ArrowRight';
|
|
10
|
-
export
|
|
6
|
+
export const DRAWER_WIDTH = {
|
|
11
7
|
Collapsed: 60,
|
|
12
8
|
Expanded: 300
|
|
13
9
|
};
|
|
14
|
-
|
|
10
|
+
const ICON = {
|
|
15
11
|
Height: 40,
|
|
16
12
|
Width: 57
|
|
17
13
|
};
|
|
18
|
-
export
|
|
19
|
-
shouldForwardProp:
|
|
20
|
-
})
|
|
14
|
+
export const ListItem = styled(SSListItem, {
|
|
15
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
|
|
16
|
+
}) `
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
21
19
|
? props.theme.palette.primary.contrastText
|
|
22
|
-
: props.theme.palette.getContrastText(props.theme.palette.background.paper)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
: props.theme.palette.getContrastText(props.theme.palette.background.paper)};
|
|
21
|
+
min-height: ${ICON.Height + 8}px;
|
|
22
|
+
padding: 0 !important;
|
|
23
|
+
transition: width 225ms ${motion.easeInOut} ${props => props.isDrawerOpen ? '0ms' : '250ms'};
|
|
24
|
+
width: ${DRAWER_WIDTH.Expanded}px;
|
|
25
|
+
|
|
26
|
+
.MuiListItemIcon-root: {
|
|
27
|
+
margin: ${props => props.theme.spacing(0.5)} 0 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.MuiListItemText-root .MuiTypography-root: {
|
|
31
|
+
white-space: normal;
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
export const ListItemButton = styled(SSListItemButton, {
|
|
35
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'isExpanded'
|
|
36
|
+
}) `
|
|
37
|
+
align-items: flex-start !important;
|
|
38
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
39
|
+
? props.theme.palette.primary.main
|
|
40
|
+
: props.theme.palette.background.paper};
|
|
41
|
+
color: ${props => getNavigationContrastText(props.theme)};
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
min-height: ${ICON.Height + 8}px;
|
|
45
|
+
max-height: ${props => props.isDrawerOpen
|
|
30
46
|
? props.isExpanded
|
|
31
47
|
? 'auto'
|
|
32
48
|
: '200px'
|
|
33
|
-
:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
: `${ICON.Height + 8}px`};
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
text-transform: none;
|
|
52
|
+
transition: all 225ms ${motion.easeInOut} 0ms !important;
|
|
53
|
+
padding: 0 ${props => props.theme.spacing(2)} 0 0;
|
|
54
|
+
width: 100%;
|
|
55
|
+
|
|
56
|
+
/* Indicator */
|
|
57
|
+
:before {
|
|
58
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
59
|
+
? 'rgba(255, 255, 255, 0.5)'
|
|
60
|
+
: props.theme.palette.primary.main};
|
|
61
|
+
border-radius: 50px;
|
|
62
|
+
content: '';
|
|
63
|
+
height: calc(100% - 10px);
|
|
64
|
+
opacity: 0;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 5px;
|
|
67
|
+
left: 3px;
|
|
68
|
+
transition: all 180ms ${motion.easeInOut};
|
|
69
|
+
width: 4px;
|
|
70
|
+
transform: scale(.95);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:hover:before,
|
|
74
|
+
:focus-visible:before {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: scale(1);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:hover {
|
|
80
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
81
|
+
? props.theme.palette.primary.main
|
|
82
|
+
: props.theme.palette.background.paper};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:focus-visible {
|
|
86
|
+
background-color: ${props => props.theme.palette.mode === 'dark'
|
|
87
|
+
? props.theme.palette.primary.dark
|
|
88
|
+
: '#E6EAF0'};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:active {
|
|
92
|
+
background-color: transparent
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
export const ListItemButtonChild = styled(SSListItemButton, {
|
|
96
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'index'
|
|
97
|
+
}) `
|
|
98
|
+
align-items: center;
|
|
99
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
49
100
|
? 'rgba(255, 255, 255, 0.75)'
|
|
50
|
-
: 'rgba(0, 0, 0, 0.75)'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
101
|
+
: 'rgba(0, 0, 0, 0.75)'};
|
|
102
|
+
display: flex;
|
|
103
|
+
min-height: none;
|
|
104
|
+
max-height: none;
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
text-transform: none;
|
|
107
|
+
transition: max-height 225ms ${motion.easeInOut} 0ms !important;
|
|
108
|
+
padding: 0;
|
|
109
|
+
width: 100%;
|
|
110
|
+
|
|
111
|
+
.MuiTypography-root: {
|
|
112
|
+
font-size: .9rem;
|
|
113
|
+
opacity: ${props => props.isDrawerOpen ? 1 : 0};
|
|
114
|
+
transition: opacity 225ms ${motion.easeInOut} ${props => props.index !== undefined ? props.index / 50 : 0.02}s !important;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.MuiListItemText-root: {
|
|
118
|
+
padding: .25rem .5rem;
|
|
119
|
+
}
|
|
120
|
+
`;
|
|
121
|
+
export const ListItemAvatar = styled(ListItemButton, {
|
|
122
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
|
|
123
|
+
}) `
|
|
124
|
+
align-items: center;
|
|
125
|
+
min-height: 52px;
|
|
126
|
+
max-height: ${props => props.isDrawerOpen
|
|
54
127
|
? '200px'
|
|
55
|
-
:
|
|
56
|
-
|
|
128
|
+
: `${ICON.Height + 8}px`};
|
|
129
|
+
transition: max-height 225ms ${motion.easeInOut} 0ms !important;
|
|
130
|
+
|
|
131
|
+
.MuiListItemIcon-root {
|
|
132
|
+
justify-content: center;
|
|
133
|
+
margin: 0;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.MuiAvatar-root {
|
|
138
|
+
height: 32px;
|
|
139
|
+
width: 32px;
|
|
140
|
+
}
|
|
141
|
+
`;
|
|
142
|
+
export const ListItemIcon = styled(SSListItemIcon) `
|
|
143
|
+
align-items: center;
|
|
144
|
+
color: ${props => props.theme.palette.mode === 'dark'
|
|
57
145
|
? props.theme.palette.primary.contrastText
|
|
58
|
-
: props.theme.palette.getContrastText(props.theme.palette.background.paper)
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
146
|
+
: props.theme.palette.getContrastText(props.theme.palette.background.paper)};
|
|
147
|
+
height: ${ICON.Height + 8}px;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
margin-top: 0 !important;
|
|
150
|
+
min-width: ${ICON.Width};
|
|
151
|
+
width: ${ICON.Width};
|
|
152
|
+
|
|
153
|
+
[theme.breakpoints.up('sm')] {
|
|
154
|
+
min-width: ${ICON.Width + 8}px;
|
|
155
|
+
width: ${ICON.Width + 8}px;
|
|
156
|
+
}
|
|
157
|
+
`;
|
|
158
|
+
export const ListItemText = styled(SSListItemText, {
|
|
159
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen' && prop !== 'index'
|
|
160
|
+
}) `
|
|
161
|
+
max-width: 210px;
|
|
162
|
+
opacity: ${props => props.isDrawerOpen ? 1 : 0};
|
|
163
|
+
padding: 0.5rem;
|
|
164
|
+
transition: opacity 225ms ${motion.easeInOut} ${props => props.index !== undefined ? props.index / 50 : 0.02}s !important;
|
|
165
|
+
white-space: normal;
|
|
166
|
+
width: auto;
|
|
167
|
+
`;
|
|
168
|
+
export const StyledExpandLess = styled(ArrowRightIcon, {
|
|
169
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
|
|
170
|
+
}) `
|
|
171
|
+
align-self: center;
|
|
172
|
+
font-size: 1.25rem;
|
|
173
|
+
left: ${props => props.isDrawerOpen ? '20px' : '-40px'};
|
|
174
|
+
margin-right: ${props => props.theme.spacing(1)};
|
|
175
|
+
opacity: 1;
|
|
176
|
+
position: relative;
|
|
177
|
+
transition: opacity 225ms ${motion.easeInOut} 200ms !important;
|
|
178
|
+
`;
|
|
179
|
+
export const StyledExpandMore = styled(ArrowRightIcon, {
|
|
180
|
+
shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
|
|
181
|
+
}) `
|
|
182
|
+
align-self: center;
|
|
183
|
+
font-size: 1.25rem;
|
|
184
|
+
left: ${props => props.isDrawerOpen ? '20px' : '-40px'};
|
|
185
|
+
margin-right: ${props => props.theme.spacing(1)};
|
|
186
|
+
opacity: 1;
|
|
187
|
+
position: relative;
|
|
188
|
+
transition: opacity 225ms ${motion.easeInOut} 200ms !important;
|
|
189
|
+
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const motionParent = {
|
|
2
2
|
open: {
|
|
3
3
|
transition: { staggerChildren: 0.07, delayChildren: 0 }
|
|
4
4
|
},
|
|
@@ -6,7 +6,7 @@ export var motionParent = {
|
|
|
6
6
|
transition: { staggerChildren: 0.05, staggerDirection: -1 }
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export const motionFadeIn = {
|
|
10
10
|
open: {
|
|
11
11
|
opacity: 1
|
|
12
12
|
},
|
|
@@ -14,7 +14,7 @@ export var motionFadeIn = {
|
|
|
14
14
|
opacity: 0
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export const motionFadeInUp = {
|
|
18
18
|
open: {
|
|
19
19
|
y: 0,
|
|
20
20
|
opacity: 1,
|
|
@@ -30,14 +30,14 @@ export var motionFadeInUp = {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export const motionWhileHover = {
|
|
34
34
|
scale: 1.02
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export const motionWhileTap = {
|
|
37
37
|
scale: 0.95
|
|
38
38
|
};
|
|
39
39
|
// Old ones...
|
|
40
|
-
export
|
|
40
|
+
export const variantsLogo = {
|
|
41
41
|
open: {
|
|
42
42
|
opacity: 1
|
|
43
43
|
},
|
|
@@ -45,7 +45,7 @@ export var variantsLogo = {
|
|
|
45
45
|
opacity: 0
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export const variantsUl = {
|
|
49
49
|
open: {
|
|
50
50
|
transition: { staggerChildren: 0.07, delayChildren: 0.2 }
|
|
51
51
|
},
|
|
@@ -53,7 +53,7 @@ export var variantsUl = {
|
|
|
53
53
|
transition: { staggerChildren: 0.05, staggerDirection: -1 }
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export const variantsLi = {
|
|
57
57
|
open: {
|
|
58
58
|
y: 0,
|
|
59
59
|
opacity: 1,
|
|
@@ -69,7 +69,7 @@ export var variantsLi = {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
export
|
|
72
|
+
export const variantsSecondaryUl = {
|
|
73
73
|
open: {
|
|
74
74
|
transition: { staggerChildren: 0.05, delayChildren: 0.5 }
|
|
75
75
|
},
|
|
@@ -77,7 +77,7 @@ export var variantsSecondaryUl = {
|
|
|
77
77
|
transition: { staggerChildren: 0.05, staggerDirection: -1 }
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export const variantsSecondaryLi = {
|
|
81
81
|
open: {
|
|
82
82
|
y: 0,
|
|
83
83
|
opacity: 1,
|
|
@@ -93,7 +93,7 @@ export var variantsSecondaryLi = {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
export
|
|
96
|
+
export const variantsDivider = {
|
|
97
97
|
open: {
|
|
98
98
|
scaleX: 1,
|
|
99
99
|
opacity: 1,
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
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";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
13
2
|
import { useSpring, animated } from '@react-spring/web';
|
|
14
3
|
import { StyledNotchShadow, StyledNotchShadowMask, StyledNotchSVG } from './MobileNavigationStyles';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const NotchIndicator = (props) => {
|
|
5
|
+
const styles = useSpring({
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
return (_jsxs(animated.div, { style: {
|
|
9
|
+
bottom: '58px',
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
zIndex: '-1',
|
|
12
|
+
...styles
|
|
13
|
+
}, children: [_jsx(StyledNotchShadow, {}), _jsx(StyledNotchSVG, { viewBox: "0 0 22 85", xmlns: "http://www.w3.org/2000/svg", children: _jsx(animated.path, { d: "M0 0V85V76.0381C0.774 69.7533 4.9101 64.7829 7.5488 63.5975C7.668 63.5518 7.7867 63.5052 7.9049 63.4576C16.1679 60.1279 22 52.035 22 42.5799C22 33.1612 16.2126 25.0941 8 21.7408C7.8723 21.6887 7.7441 21.6377 7.6153 21.5879C4.8325 20.3142 0.4173 14.8748 0 8.13255V0Z" }) }), _jsx(StyledNotchShadowMask, {})] }));
|
|
18
14
|
};
|
|
19
15
|
export default NotchIndicator;
|