@learningpool/ui 1.8.4 → 1.8.5

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.
@@ -23,8 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
24
24
  import React, { useEffect } from 'react';
25
25
  import { Person } from '@mui/icons-material';
26
- import { StyledBottomNavigationAction, StyledPaper, StyledBottomNavigation } from './MobileNavigationStyles';
27
- import { StyledAvatar } from './MobileNavigationAvatarStyles';
26
+ import { StyledBottomNavigationAction, StyledPaper, StyledBottomNavigation, StyledAvatar } from './MobileNavigationStyles';
28
27
  import SwipeableTemporaryDrawer from './MobileNavigationDrawer';
29
28
  import SwipeableTemporarySearch from './MobileNavigationSearch';
30
29
  import SwipeableTemporaryAvatar from './MobileNavigationAvatar';
@@ -63,10 +63,10 @@ var SwipeableTemporaryAvatar = function (props) {
63
63
  alignItems: 'center',
64
64
  display: 'flex',
65
65
  flexDirection: 'column'
66
- } }, { children: [_jsxs(StyledBoxProfile, __assign({ style: useStaggerAnimation(isOpen, animationCount, incrementAnimationCount) }, { 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({ style: __assign({ flexDirection: 'row', marginBottom: theme.spacing(1) }, useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)) }, { children: _jsxs(ButtonGroup, __assign({ variant: "contained", "aria-label": "split button" }, { children: [_jsx(Button, __assign({ variant: 'contained', color: 'primary', size: 'medium', onClick: function () {
66
+ } }, { children: [_jsxs(StyledBoxProfile, __assign({ style: useStaggerAnimation(isOpen, animationCount, incrementAnimationCount) }, { 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({ style: __assign({ flexDirection: 'row', marginBottom: theme.spacing(1) }, useStaggerAnimation(isOpen, animationCount, incrementAnimationCount)) }, { children: _jsxs(ButtonGroup, __assign({ variant: 'outlined', "aria-label": "split button" }, { children: [_jsx(StyledOutlineButton, __assign({ variant: 'outlined', color: 'inherit', size: 'medium', onClick: function () {
67
67
  handleOpenState(false);
68
68
  avatarPanelOnClickViewProfile();
69
- } }, { 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: function () {
69
+ } }, { children: avatarPanelViewProfileString !== null && avatarPanelViewProfileString !== void 0 ? avatarPanelViewProfileString : 'View Profile' })), avatarPanelOnClickEditProfile && (_jsx(StyledOutlineButton, __assign({ size: 'medium', variant: 'outlined', color: 'inherit', "aria-label": avatarPanelEditProfileString !== null && avatarPanelEditProfileString !== void 0 ? avatarPanelEditProfileString : 'Edit Profile', onClick: function () {
70
70
  handleOpenState(false);
71
71
  avatarPanelOnClickEditProfile();
72
72
  } }, { children: _jsx(EditIcon, {}) })))] })) })))] })), _jsxs(Box, __assign({ style: {
@@ -95,7 +95,7 @@ var SwipeableTemporaryAvatar = function (props) {
95
95
  // @ts-expect-error
96
96
  , __assign({
97
97
  // @ts-expect-error
98
- component: animated.button, style: useStaggerAnimation(isOpen, animationCount, incrementAnimationCount), disablePadding: true, variant: 'outlined', color: 'primary', size: 'medium', onClick: function () {
98
+ component: animated.button, style: useStaggerAnimation(isOpen, animationCount, incrementAnimationCount), disablePadding: true, variant: 'outlined', color: 'inherit', size: 'medium', onClick: function () {
99
99
  handleOpenState(false);
100
100
  avatarPanelOnClickMainAction();
101
101
  } }, { children: avatarPanelMainActionString })), _jsxs(List, __assign({ style: { marginBottom: theme.spacing(2) } }, { children: [avatarPanelSettingItems &&
@@ -135,7 +135,6 @@ var SwipeableTemporaryAvatar = function (props) {
135
135
  } }))
136
136
  : (_jsx(ToggleOnIcon, { style: {
137
137
  boxSizing: 'border-box',
138
- color: 'green',
139
138
  height: '2em',
140
139
  padding: '0.15em',
141
140
  width: '2em'
@@ -3,31 +3,16 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { Avatar, Button, ListItemButton, Typography } from '../../../index';
6
+ import { getNavigationBackground, getNavigationContrastText, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
6
7
  import { Drawer } from '@mui/material';
7
8
  import { styled } from '@mui/material/styles';
8
9
  import { animated } from '@react-spring/web';
9
- export var StyledSwipeableAvatar = styled(Drawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"], ["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"])), function (props) { return props.theme.zIndex.appBar - 1; }, function (props) { return props.theme.palette.mode === 'dark'
10
- ? props.theme.palette.primary.contrastText
11
- : props.theme.palette.text.primary; });
12
- export var StyledBox = styled(animated.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"], ["\n background-color: ", ";\n background-image: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"])), function (props) { return props.theme.palette.mode === 'dark'
13
- ? '#003366'
14
- : props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
15
- ? 'none'
16
- : 'radial-gradient( circle farthest-corner at 10% 20%, #fdfbfb 0.1%, #ebedee 99.8% )'; }, function (props) { return props.theme.spacing(2); });
10
+ export var StyledSwipeableAvatar = styled(Drawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"], ["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"])), function (props) { return props.theme.zIndex.appBar - 1; });
11
+ export var StyledBox = styled(animated.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"], ["\n background-color: ", ";\n color: ", ";\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n height: 100%;\n overflow: auto;\n padding: 15vh ", ";\n position: relative;\n"])), function (props) { return getOffsetNavigationBackground(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return props.theme.spacing(2); });
17
12
  export var StyledBoxProfile = styled(animated.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"])));
18
13
  export var StyledBoxProfileEdit = styled(animated.div)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
19
- 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'
20
- ? props.theme.palette.primary.contrastText
21
- : props.theme.palette.text.primary; });
22
- export var StyledOutlineButton = styled(Button)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-color: ", ";\n color: ", ";\n"], ["\n border-color: ", ";\n color: ", ";\n"])), function (props) { return props.theme.palette.mode === 'dark'
23
- ? props.theme.palette.primary.contrastText
24
- : props.theme.palette.primary.main; }, function (props) { return props.theme.palette.mode === 'dark'
25
- ? props.theme.palette.primary.contrastText
26
- : props.theme.palette.primary.main; });
27
- export var StyledAvatar = styled(Avatar)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n"], ["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n"])), function (props) { return props.theme.palette.mode === 'dark'
28
- ? props.theme.palette.primary.contrastText
29
- : props.theme.palette.primary.main; }, function (props) { return props.theme.palette.mode === 'dark'
30
- ? props.theme.palette.primary.main
31
- : props.theme.palette.primary.contrastText; });
32
- export var StyledListItemButton = styled(ListItemButton)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n border-radius: 50px;\n margin-inline-end: 2rem;\n"], ["\n border-radius: 50px;\n margin-inline-end: 2rem;\n"])));
14
+ export var StyledAvatarName = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: 1.75rem;\n"], ["\n font-size: 1.75rem;\n"])));
15
+ export var StyledOutlineButton = styled(Button)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-color: ", ";\n color: ", ";\n\n :hover,\n :focus-visible {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n border-color: ", ";\n color: ", ";\n\n :hover,\n :focus-visible {\n background-color: ", ";\n border-color: ", ";\n }\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme); });
16
+ export var StyledAvatar = styled(Avatar)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n font-weight: bold;\n"], ["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n font-weight: bold;\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return getNavigationContrastText(props.theme); });
17
+ export var StyledListItemButton = styled(ListItemButton)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n border-radius: 50px;\n white-space: normal;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n border-radius: 50px;\n white-space: normal;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); });
33
18
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
@@ -17,6 +17,7 @@ import { StyledSwipeableDrawer, StyledBox, StyledListItem, StyledDivider, Styled
17
17
  import { StreamSuiteLogo } from '../../../assets/Images';
18
18
  import { animated } from '@react-spring/web';
19
19
  import { useStaggerAnimation } from '../../../utils/helpers';
20
+ import { getOffsetNavigationContrastText } from '../helpers';
20
21
  export default function SwipeableTemporaryDrawer(props) {
21
22
  var isDrawerOpen = props.isDrawerOpen, setIsDrawerOpen = props.setIsDrawerOpen, items = props.items, secondaryItems = props.secondaryItems, logo = props.logo, logoText = props.logoText, logoOnClick = props.logoOnClick;
22
23
  var theme = useTheme();
@@ -45,9 +46,7 @@ export default function SwipeableTemporaryDrawer(props) {
45
46
  ? (_jsx("img", { height: 38, width: 38, src: logo, alt: logoText !== null && logoText !== void 0 ? logoText : 'Site Logo' }))
46
47
  : logo
47
48
  : (_jsx(StreamSuiteLogo, { style: {
48
- fill: theme.palette.mode === 'dark'
49
- ? theme.palette.primary.main
50
- : theme.palette.primary.main
49
+ fill: getOffsetNavigationContrastText(theme)
51
50
  } })), _jsx(StyledDrawerLogoText, __assign({ variant: 'body1' }, { children: logoText !== null && logoText !== void 0 ? logoText : 'Site Logo' }))] })), _jsx(List, { children: items && items.length > 0 && items.map(function (item, index) {
52
51
  var label = item.label, children = item.children;
53
52
  return (_jsxs(StyledListItem, __assign({ disablePadding: true,
@@ -1151,7 +1151,6 @@ export declare const StyledChildListItem: import("@emotion/styled").StyledCompon
1151
1151
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
1152
1152
  ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
1153
1153
  }, "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").Theme>, {}, {}>;
1154
- export declare const StyledChildListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
1155
1154
  export declare const StyledChildListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
1156
1155
  action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
1157
1156
  centerRipple?: boolean | undefined;
@@ -1171,6 +1170,7 @@ export declare const StyledChildListItemButton: import("@emotion/styled").Styled
1171
1170
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
1172
1171
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
1173
1172
  }, "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").Theme>, {}, {}>;
1173
+ export declare const StyledChildListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
1174
1174
  export declare const StyledListSecondaryList: import("@emotion/styled").StyledComponent<{
1175
1175
  children?: import("react").ReactNode;
1176
1176
  classes?: Partial<import("@mui/material").ListClasses> | undefined;
@@ -3,42 +3,23 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { Box, List, ListItem, ListItemText, ListItemButton, Typography } from '../../../index';
6
+ import { getNavigationBackground, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
6
7
  import { Drawer } from '@mui/material';
7
8
  import { styled } from '@mui/material/styles';
8
9
  import { animated } from '@react-spring/web';
9
- export var StyledSwipeableDrawer = styled(Drawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n background-color: ", ";\n background-image: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"], ["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n background-color: ", ";\n background-image: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"])), function (props) { return props.theme.zIndex.appBar - 1; }, function (props) { return props.theme.palette.mode === 'dark'
10
- ? '#003366'
11
- : props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
12
- ? 'none'
13
- : 'radial-gradient( circle farthest-corner at 10% 20%, #fdfbfb 0.1%, #ebedee 99.8% )'; });
10
+ export var StyledSwipeableDrawer = styled(Drawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n background-color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"], ["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n background-color: ", ";\n height: 100vh;\n border: none;\n z-index: 1;\n }\n"])), function (props) { return props.theme.zIndex.appBar - 1; }, function (props) { return getOffsetNavigationBackground(props.theme); });
14
11
  export var StyledBox = styled(Box)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100%;\n overflow: auto;\n padding-bottom: 6rem;\n"], ["\n height: 100%;\n overflow: auto;\n padding-bottom: 6rem;\n"])));
15
12
  export var StyledDrawerLogo = styled(animated.div)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: transparent;\n display: flex;\n align-items: center;\n margin: 1.5rem 0 2.5rem 1.5rem;\n\n .MuiSvgIcon-root {\n width: 2rem;\n height: 2rem;\n }\n"], ["\n background-color: transparent;\n display: flex;\n align-items: center;\n margin: 1.5rem 0 2.5rem 1.5rem;\n\n .MuiSvgIcon-root {\n width: 2rem;\n height: 2rem;\n }\n"])));
16
- export var StyledDrawerLogoText = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 1.2rem;\n margin-left: .5rem;\n color: ", ";\n"], ["\n font-size: 1.2rem;\n margin-left: .5rem;\n color: ", ";\n"])), function (props) { return props.theme.palette.mode === 'dark'
17
- ? 'rgba(255,255,255,.9)'
18
- : '#555'; });
13
+ export var StyledDrawerLogoText = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 1.2rem;\n margin-left: .5rem;\n color: ", ";\n"], ["\n font-size: 1.2rem;\n margin-left: .5rem;\n color: ", ";\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); });
19
14
  export var StyledListItem = styled(ListItem)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n flex-direction: column;\n align-items: flex-start;\n margin: 0 1rem;\n max-width: calc(100% - 2rem);\n\n > .MuiListItemButton-root {\n padding: .5rem 1.5rem;\n }\n"], ["\n flex-direction: column;\n align-items: flex-start;\n margin: 0 1rem;\n max-width: calc(100% - 2rem);\n\n > .MuiListItemButton-root {\n padding: .5rem 1.5rem;\n }\n"])));
20
- export var StyledListItemButton = styled(ListItemButton)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: 50px;\n"], ["\n border-radius: 50px;\n"])));
21
- export var StyledListItemText = styled(ListItemText)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n > .MuiTypography-root {\n font-size: 1.5rem;\n font-weight: bold;\n color: ", ";\n &:hover,\n &:focus,\n &:active {\n color: ", ";\n }\n }\n"], ["\n > .MuiTypography-root {\n font-size: 1.5rem;\n font-weight: bold;\n color: ", ";\n &:hover,\n &:focus,\n &:active {\n color: ", ";\n }\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
22
- ? 'rgba(255,255,255,.85)'
23
- : '#555'; }, function (props) { return props.theme.palette.mode === 'dark'
24
- ? 'rgba(255,255,255,.97)'
25
- : '#333'; });
26
- export var StyledChildList = styled(List)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n margin: -.25rem 1rem 0 1.5rem;\n padding: 0;\n\n"], ["\n display: flex;\n flex-wrap: wrap;\n margin: -.25rem 1rem 0 1.5rem;\n padding: 0;\n\n"])));
15
+ export var StyledListItemButton = styled(ListItemButton)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-radius: 50px;\n color: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n border-radius: 50px;\n color: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); });
16
+ export var StyledListItemText = styled(ListItemText)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n > .MuiTypography-root {\n font-size: 1.5rem;\n font-weight: bold;\n }\n"], ["\n > .MuiTypography-root {\n font-size: 1.5rem;\n font-weight: bold;\n }\n"])));
17
+ export var StyledChildList = styled(List)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n margin: -.25rem 1rem 0 1.5rem;\n padding: 0;\n"], ["\n display: flex;\n flex-wrap: wrap;\n margin: -.25rem 1rem 0 1.5rem;\n padding: 0;\n"])));
27
18
  export var StyledChildListItem = styled(ListItem)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0;\n"], ["\n display: flex;\n align-items: center;\n padding: 0;\n"])));
28
- export var StyledChildListItemText = styled(ListItemText)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-size: .9rem;\n color: ", ";\n"], ["\n font-size: .9rem;\n color: ", ";\n"])), function (props) { return props.theme.palette.mode === 'dark'
29
- ? 'rgba(255,255,255,.75)'
30
- : '#666'; });
31
- export var StyledChildListItemButton = styled(ListItemButton)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n border-radius: 50px;\n flex-grow: 0;\n"], ["\n border-radius: 50px;\n flex-grow: 0;\n"])));
19
+ export var StyledChildListItemButton = styled(ListItemButton)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n border-radius: 50px;\n flex-grow: 0;\n color: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n border-radius: 50px;\n flex-grow: 0;\n color: ", ";\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); });
20
+ export var StyledChildListItemText = styled(ListItemText)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: .9rem;\n"], ["\n font-size: .9rem;\n"])));
32
21
  export var StyledListSecondaryList = styled(List)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n margin: 0 1rem;\n"], ["\n display: flex;\n flex-wrap: wrap;\n margin: 0 1rem;\n"])));
33
22
  export var StyledListSecondaryItem = styled(ListItem)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n flex: 1 0 50%;\n display: flex;\n align-items: center;\n"], ["\n flex: 1 0 50%;\n display: flex;\n align-items: center;\n"])));
34
- export var StyledListSecondaryButton = styled(ListItemButton)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n color: ", ";\n margin: 0.25rem 0.25rem 0.5rem;\n padding: 0.3rem 1rem;\n background: ", ";\n border-radius: 50px;\n box-shadow: ", ";\n"], ["\n color: ", ";\n margin: 0.25rem 0.25rem 0.5rem;\n padding: 0.3rem 1rem;\n background: ", ";\n border-radius: 50px;\n box-shadow: ", ";\n"])), function (props) { return props.theme.palette.mode === 'dark'
35
- ? 'rgba(255,255,255,.8)'
36
- : '#555'; }, function (props) { return props.theme.palette.mode === 'dark'
37
- ? 'rgba(255,255,255,.12)'
38
- : 'rgba(255,255,255,.6)'; }, function (props) { return props.theme.palette.mode === 'dark'
39
- ? '0 6px 15px rgb(36 37 38 / 16%)'
40
- : '0 6px 15px rgb(36 37 38 / 8%)'; });
41
- export var StyledDivider = styled('div')(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n width: 75%;\n height: 3px;\n border: none;\n border-radius: 3px;\n margin: 2rem auto;\n"], ["\n background-color: ", ";\n width: 75%;\n height: 3px;\n border: none;\n border-radius: 3px;\n margin: 2rem auto;\n"])), function (props) { return props.theme.palette.mode === 'dark'
42
- ? 'rgba(62, 106, 179, .5)'
43
- : 'rgba(0,0,0,.075)'; });
23
+ export var StyledListSecondaryButton = styled(ListItemButton)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n margin: 0.25rem 0.25rem 0.5rem;\n padding: 0.3rem 1rem;\n border-radius: 50px;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n background-color: ", ";\n color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n background-color: ", ";\n color: ", ";\n margin: 0.25rem 0.25rem 0.5rem;\n padding: 0.3rem 1rem;\n border-radius: 50px;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n :hover {\n background-color: ", ";\n color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (props) { return getOffsetNavigationBackground(props.theme, 0.15); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.185); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.185); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.185); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.185); });
24
+ export var StyledDivider = styled('div')(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n width: 75%;\n height: 2px;\n border: none;\n border-radius: 3px;\n margin: 2rem auto;\n"], ["\n background-color: ", ";\n width: 75%;\n height: 2px;\n border: none;\n border-radius: 3px;\n margin: 2rem auto;\n"])), function (props) { return getNavigationBackground(props.theme); });
44
25
  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, templateObject_14, templateObject_15;
@@ -3,6 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { ListItem as SSListItem, ListItemButton as SSListItemButton, ListItemText as SSListItemText, ListItemIcon as SSListItemIcon } from '../../../../index';
6
+ import { getNavigationContrastText } from '../../helpers';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { motion } from '../../../../utils/theme';
8
9
  import { ArrowRight } from '@mui/icons-material';
@@ -25,11 +26,7 @@ export var ListItemButton = styled(SSListItemButton, {
25
26
  return props.theme.palette.mode === 'dark'
26
27
  ? props.theme.palette.primary.main
27
28
  : props.theme.palette.background.paper;
28
- }, function (props) {
29
- return props.theme.palette.mode === 'dark'
30
- ? props.theme.palette.primary.contrastText
31
- : props.theme.palette.getContrastText(props.theme.palette.background.paper);
32
- }, ICON.Height + 8, function (props) { return props.isDrawerOpen
29
+ }, function (props) { return getNavigationContrastText(props.theme); }, ICON.Height + 8, function (props) { return props.isDrawerOpen
33
30
  ? props.isExpanded
34
31
  ? 'auto'
35
32
  : '200px'
@@ -50,5 +50,5 @@ export default function SwipeableTemporarySearch(props) {
50
50
  delay: isSearchOpen ? 100 : 0,
51
51
  reverse: !isSearchOpen,
52
52
  config: __assign(__assign({}, config.default), { mass: 1 })
53
- }) }, { children: _jsxs(FormControl, __assign({ fullWidth: true, variant: 'outlined' }, { children: [_jsx(StyledOutlinedInputLabel, __assign({ htmlFor: 'mobile-nav-search' }, { children: searchPanelPlaceholder !== null && searchPanelPlaceholder !== void 0 ? searchPanelPlaceholder : 'Search' })), _jsx(StyledOutlinedInput, { label: searchPanelPlaceholder !== null && searchPanelPlaceholder !== void 0 ? searchPanelPlaceholder : 'Search', id: 'mobile-nav-search', endAdornment: _jsx(InputAdornment, __assign({ position: 'end' }, { children: _jsx(IconButton, __assign({ "aria-label": 'Search', edge: 'end', onClick: handleSearch }, { children: _jsx(Search, {}) })) })), onKeyDown: handleSearch, value: searchValue, onChange: function (event) { var _a; return setSearchValue((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value); } })] })) })) })) }) })));
53
+ }) }, { children: _jsxs(FormControl, __assign({ fullWidth: true, variant: 'outlined', color: 'secondary' }, { children: [_jsx(StyledOutlinedInputLabel, __assign({ htmlFor: 'mobile-nav-search' }, { children: searchPanelPlaceholder !== null && searchPanelPlaceholder !== void 0 ? searchPanelPlaceholder : 'Search' })), _jsx(StyledOutlinedInput, { label: searchPanelPlaceholder !== null && searchPanelPlaceholder !== void 0 ? searchPanelPlaceholder : 'Search', id: 'mobile-nav-search', endAdornment: _jsx(InputAdornment, __assign({ position: 'end' }, { children: _jsx(IconButton, __assign({ "aria-label": 'Search', edge: 'end', onClick: handleSearch }, { children: _jsx(Search, {}) })) })), onKeyDown: handleSearch, value: searchValue, onChange: function (event) { var _a; return setSearchValue((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value); } })] })) })) })) }) })));
54
54
  }
@@ -3,18 +3,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { SwipeableDrawer, OutlinedInput, InputLabel } from '../../../index';
6
+ import { getNavigationContrastText, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { animated } from '@react-spring/web';
8
9
  export var StyledSwipeableSearch = styled(SwipeableDrawer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 5px 8px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 14px 0px rgba(0, 0, 0, 0.12);\n border: none;\n border-radius: 20px 20px 0 0;\n z-index: 1;\n }\n"], ["\n // Override the MUI default z-index of the Drawer component\n // to ensure that the drawer is always below the AppBar.\n z-index: ", ";\n\n .MuiPaper-root {\n box-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2),\n 0px 5px 8px 0px rgba(0, 0, 0, 0.14),\n 0px 1px 14px 0px rgba(0, 0, 0, 0.12);\n border: none;\n border-radius: 20px 20px 0 0;\n z-index: 1;\n }\n"])), function (props) { return props.theme.zIndex.appBar - 1; });
9
- export var StyledBox = styled(animated.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n background-image: ", ";\n padding: ", ";\n height: 100%;\n"], ["\n background-color: ", ";\n background-image: ", ";\n padding: ", ";\n height: 100%;\n"])), function (props) { return props.theme.palette.mode === 'dark'
10
- ? '#003366'
11
- : props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
12
- ? 'none'
13
- : 'radial-gradient( circle farthest-corner at 10% 20%, #fdfbfb 0.1%, #ebedee 99.8% )'; }, function (props) { return props.theme.spacing(3, 2.5, '80px', 2.5); });
14
- export var StyledOutlinedInputLabel = styled(InputLabel)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n &.Mui-focused {\n color: ", ";\n }\n"], ["\n &.Mui-focused {\n color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark' ? props.theme.palette.primary.contrastText : '#003366'; });
15
- export var StyledOutlinedInput = styled(OutlinedInput)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n\n &:hover .MuiOutlinedInput-notchedOutline,\n &.Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n"], ["\n background-color: ", ";\n color: ", ";\n\n &:hover .MuiOutlinedInput-notchedOutline,\n &.Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
16
- ? '#003366'
17
- : props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
18
- ? props.theme.palette.primary.contrastText
19
- : props.theme.palette.text.primary; }, function (props) { return props.theme.palette.mode === 'dark' ? props.theme.palette.primary.contrastText : '#003366'; });
10
+ export var StyledBox = styled(animated.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n padding: ", ";\n height: 100%;\n"], ["\n background-color: ", ";\n padding: ", ";\n height: 100%;\n"])), function (props) { return getOffsetNavigationBackground(props.theme); }, function (props) { return props.theme.spacing(3, 2.5, '80px', 2.5); });
11
+ export var StyledOutlinedInputLabel = styled(InputLabel)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n\n &.MuiInputLabel-root.Mui-focused {\n color: ", ";\n }\n"], ["\n color: ", ";\n\n &.MuiInputLabel-root.Mui-focused {\n color: ", ";\n }\n"])), function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); });
12
+ export var StyledOutlinedInput = styled(OutlinedInput)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n .MuiInputBase-input {\n color: ", ";\n }\n\n fieldset {\n border-color: ", " !important;\n transition: all 0.2s ease;\n }\n\n &.MuiOutlinedInput-root:hover fieldset,\n &.MuiOutlinedInput-root:focus fieldset {\n border-width: 2px;\n }\n\n .MuiIconButton-root {\n color: ", ";\n }\n"], ["\n .MuiInputBase-input {\n color: ", ";\n }\n\n fieldset {\n border-color: ", " !important;\n transition: all 0.2s ease;\n }\n\n &.MuiOutlinedInput-root:hover fieldset,\n &.MuiOutlinedInput-root:focus fieldset {\n border-width: 2px;\n }\n\n .MuiIconButton-root {\n color: ", ";\n }\n"])), function (props) { return getNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); });
20
13
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -149,3 +149,4 @@ export declare const StyledNotchShadowMask: import("@emotion/styled").StyledComp
149
149
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
150
150
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
151
151
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "ref" | "children" | "sx" | "component" | ("p" | "color" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint")> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
152
+ export declare const StyledAvatar: import("@emotion/styled").StyledComponent<any, {}, {}>;
@@ -3,39 +3,24 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import Drawer from '@mui/material/Drawer';
6
- import { Box, IconButton, BottomNavigation, BottomNavigationAction, Paper } from '../../../index';
6
+ import { Box, IconButton, BottomNavigation, BottomNavigationAction, Paper, Avatar } from '../../../index';
7
+ import { getNavigationBackground, getNavigationContrastText, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
7
8
  import { styled } from '@mui/material/styles';
8
9
  import { motion } from '../../../utils/theme';
9
10
  export var DRAWER_WIDTH = {
10
11
  Collapsed: 60,
11
12
  Expanded: 300
12
13
  };
13
- export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"], ["\n background-color: ", ";\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"])), function (props) { return props.theme.palette.mode === 'dark'
14
- ? props.theme.palette.primary.main
15
- : props.theme.palette.background.paper; }, function (props) { return props.theme.zIndex.appBar; });
14
+ export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"], ["\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"])), function (props) { return props.theme.zIndex.appBar; });
16
15
  export var StyledNotchSVG = styled('svg', {
17
16
  shouldForwardProp: function (prop) { return prop !== 'mobileNotchPosition'; }
18
- })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"], ["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
19
- ? props.theme.palette.primary.main
20
- : props.theme.palette.background.paper; });
21
- export var StyledBottomNavigation = styled(BottomNavigation)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n position: relative;\n"], ["\n background-color: ", ";\n position: relative;\n"])), function (props) { return props.theme.palette.mode === 'dark'
22
- ? props.theme.palette.primary.main
23
- : props.theme.palette.background.paper; });
24
- export var StyledBottomNavigationAction = styled(BottomNavigationAction)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n backgroundColor: ", ";\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"], ["\n backgroundColor: ", ";\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
25
- ? props.theme.palette.primary.main
26
- : props.theme.palette.background.paper; }, function (props) { return props.theme.palette.mode === 'dark'
27
- ? props.theme.palette.primary.contrastText
28
- : props.theme.palette.getContrastText(props.theme.palette.background.paper); }, function (props) { return props.theme.palette.mode === 'dark'
29
- ? props.theme.palette.primary.contrastText
30
- : props.theme.palette.text.primary; }, function (props) {
31
- return props.theme.palette.mode === 'dark'
32
- ? props.theme.palette.primary.contrastText
33
- : props.theme.palette.getContrastText(props.theme.palette.background.paper);
34
- }, function (props) {
17
+ })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"], ["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"])), function (props) { return getNavigationBackground(props.theme); });
18
+ export var StyledBottomNavigation = styled(BottomNavigation)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n position: relative;\n"], ["\n background-color: ", ";\n position: relative;\n"])), function (props) { return getNavigationBackground(props.theme); });
19
+ export var StyledBottomNavigationAction = styled(BottomNavigationAction)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"], ["\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"])), function (props) { return getNavigationContrastText(props.theme); }, function (props) { return getNavigationContrastText(props.theme); }, function (props) {
35
20
  return props.theme.palette.mode === 'dark'
36
21
  ? props.theme.palette.primary.contrastText
37
22
  : props.theme.palette.getContrastText(props.theme.palette.background.paper);
38
- });
23
+ }, function (props) { return getNavigationBackground(props.theme); });
39
24
  export var DrawerHeader = styled('div', {
40
25
  shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
41
26
  })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n"], ["\n"])));
@@ -76,15 +61,9 @@ export var DrawerShadow = styled(Box, {
76
61
  : "".concat(DRAWER_WIDTH.Collapsed - 33, "px");
77
62
  });
78
63
  export var NotchContainer = styled(Box)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"], ["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"])), function (props) { return props.theme.spacing(0.5); }, motion.easeInOut);
79
- export var NotchBackground = styled(Box)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"], ["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"])), function (props) { return props.theme.palette.mode === 'dark'
80
- ? props.theme.palette.primary.main
81
- : props.theme.palette.background.paper; });
82
- export var NotchBackgroundClip = styled(Box)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"], ["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"])), function (props) { return props.theme.palette.mode === 'dark'
83
- ? props.theme.palette.primary.main
84
- : props.theme.palette.background.paper; });
85
- export var NotchSeemMask = styled(Box)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"], ["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"])), function (props) { return props.theme.palette.mode === 'dark'
86
- ? props.theme.palette.primary.main
87
- : props.theme.palette.background.paper; });
64
+ export var NotchBackground = styled(Box)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"], ["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"])), function (props) { return getNavigationBackground(props.theme); });
65
+ export var NotchBackgroundClip = styled(Box)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"], ["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"])), function (props) { return getNavigationBackground(props.theme); });
66
+ export var NotchSeemMask = styled(Box)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"], ["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"])), function (props) { return getNavigationBackground(props.theme); });
88
67
  export var StyledDrawer = styled(Drawer, {
89
68
  shouldForwardProp: function (prop) { return prop !== 'open'; }
90
69
  })(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\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 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\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 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"])), motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
@@ -93,7 +72,6 @@ export var StyledDrawer = styled(Drawer, {
93
72
  : props.theme.palette.getContrastText(props.theme.palette.background.paper);
94
73
  }, motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
95
74
  export var StyledNotchShadow = styled(Box)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"], ["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"])));
96
- export var StyledNotchShadowMask = styled(Box)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
97
- ? props.theme.palette.primary.main
98
- : props.theme.palette.background.paper; });
99
- 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, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18;
75
+ export var StyledNotchShadowMask = styled(Box)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"])), function (props) { return getNavigationBackground(props.theme); });
76
+ export var StyledAvatar = styled(Avatar)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n font-weight: bold;\n"], ["\n background-color: ", ";\n color: ", ";\n font-weight: bold;\n"])), function (props) { return getOffsetNavigationBackground(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); });
77
+ 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, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19;
@@ -16,5 +16,5 @@ export var StyledBoxProfileEdit = styled(animated.div)(templateObject_5 || (temp
16
16
  export var StyledAvatarName = styled(Typography)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-size: 1.75rem;\n"], ["\n font-size: 1.75rem;\n"])));
17
17
  export var StyledButtonGroup = styled(ButtonGroup)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n /* Fix for RTL issue */\n .MuiButtonGroup-grouped:not(:first-of-type) {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n\n .MuiButtonGroup-grouped:not(:last-of-type) {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-style: solid;\n }\n"], ["\n /* Fix for RTL issue */\n .MuiButtonGroup-grouped:not(:first-of-type) {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n }\n\n .MuiButtonGroup-grouped:not(:last-of-type) {\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n border-style: solid;\n }\n"])), function (props) { return props.theme.direction === 'ltr' ? 0 : "".concat(props.theme.shape.borderRadius, "px"); }, function (props) { return props.theme.direction === 'ltr' ? "".concat(props.theme.shape.borderRadius, "px") : 0; }, function (props) { return props.theme.direction === 'ltr' ? 0 : "".concat(props.theme.shape.borderRadius, "px"); }, function (props) { return props.theme.direction === 'ltr' ? "".concat(props.theme.shape.borderRadius, "px") : 0; }, function (props) { return props.theme.direction === 'ltr' ? "".concat(props.theme.shape.borderRadius, "px") : 0; }, function (props) { return props.theme.direction === 'ltr' ? 0 : "".concat(props.theme.shape.borderRadius, "px"); }, function (props) { return props.theme.direction === 'ltr' ? "".concat(props.theme.shape.borderRadius, "px") : 0; }, function (props) { return props.theme.direction === 'ltr' ? 0 : "".concat(props.theme.shape.borderRadius, "px"); });
18
18
  export var StyledAvatar = styled(Avatar)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n"], ["\n background-color: ", ";\n color: ", ";\n font-size: 0.85rem;\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return getNavigationContrastText(props.theme); });
19
- export var StyledListItemButton = styled(ListItemButton)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n border-radius: 50px;\n white-space: normal;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n"], ["\n border-radius: 50px;\n white-space: normal;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n"])), function (props) { var _a; return ((_a = props.theme.palette.navigation) === null || _a === void 0 ? void 0 : _a.contrastText) || getOffsetNavigationContrastText(props.theme); });
19
+ export var StyledListItemButton = styled(ListItemButton)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n border-radius: 50px;\n white-space: normal;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n border-radius: 50px;\n white-space: normal;\n box-shadow: 0 0 0 0 transparent;\n transition: all 0.2s ease;\n\n & .MuiListItemIcon-root {\n color: ", ";\n }\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (props) { var _a; return ((_a = props.theme.palette.navigation) === null || _a === void 0 ? void 0 : _a.contrastText) || getOffsetNavigationContrastText(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); });
20
20
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
@@ -29,9 +29,9 @@ export var FlyoutMenuItem = styled(ListItem)(templateObject_5 || (templateObject
29
29
  export var FlyoutMenuItemText = styled(ListItemText)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n text-align: ", ";\n"], ["\n color: ", ";\n text-align: ", ";\n"])), function (props) { var _a; return ((_a = props.theme.palette.navigation) === null || _a === void 0 ? void 0 : _a.contrastText) || getOffsetNavigationContrastText(props.theme); }, function (props) { return props.theme.direction === 'ltr' ? 'left' : 'right'; });
30
30
  export var FlyoutMenuButton = styled(SSListItemButton, {
31
31
  shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen' && prop !== 'isExpanded'; }
32
- })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: flex-start;\n background-color: transparent;\n border-radius: 5px;\n display: flex;\n flex-wrap: wrap;\n text-decoration: none;\n text-transform: none;\n transition: all ", "ms ", ";\n padding: ", ";\n width: 100%;\n\n :hover {\n background-color: rgba(0, 0, 0, .05);\n }\n\n :focus {\n background-color: ", ";\n }\n"], ["\n align-items: flex-start;\n background-color: transparent;\n border-radius: 5px;\n display: flex;\n flex-wrap: wrap;\n text-decoration: none;\n text-transform: none;\n transition: all ", "ms ", ";\n padding: ", ";\n width: 100%;\n\n :hover {\n background-color: rgba(0, 0, 0, .05);\n }\n\n :focus {\n background-color: ", ";\n }\n"
32
+ })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: flex-start;\n background-color: transparent;\n border-radius: 5px;\n display: flex;\n flex-wrap: wrap;\n text-decoration: none;\n text-transform: none;\n transition: all ", "ms ", ";\n padding: ", ";\n width: 100%;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"], ["\n align-items: flex-start;\n background-color: transparent;\n border-radius: 5px;\n display: flex;\n flex-wrap: wrap;\n text-decoration: none;\n text-transform: none;\n transition: all ", "ms ", ";\n padding: ", ";\n width: 100%;\n\n :hover {\n color: ", ";\n background-color: ", ";\n }\n\n :focus-visible {\n background-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n }\n"
33
33
  // FullHeight
34
- ])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.spacing(1, 2); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.2); });
34
+ ])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.spacing(1, 2); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.15); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.133); }, function (props) { return getOffsetNavigationContrastText(props.theme, 0.133); });
35
35
  // FullHeight
36
36
  export var FullHeightFlyoutMenuPaper = styled(Paper, {
37
37
  shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen' && prop !== 'open'; }
@@ -1,5 +1,8 @@
1
1
  import { darken, lighten, getLuminance } from 'polished';
2
2
  var DEFAULT_COLOR_ADJUST_AMOUNT = 0.1;
3
+ // Luminance threshold for determining if we should lighten or darken the color
4
+ // .033 is the luminance value of #333333
5
+ var LUMINANCE_THRESHOLD = 0.033;
3
6
  /**
4
7
  * Return the background color for the navigation
5
8
  * @returns string
@@ -32,13 +35,13 @@ export var getOffsetNavigationBackground = function (theme, colorAdjustAmount) {
32
35
  var adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
33
36
  // Use background property if navigation property isnt set
34
37
  if (!((_a = palette.navigation) === null || _a === void 0 ? void 0 : _a.background)) {
35
- return getLuminance(palette.background.paper) > 0.5
36
- ? darken(adjustAmount, palette.background.paper)
37
- : lighten(adjustAmount, palette.background.paper);
38
+ return getLuminance(palette.background.paper) < LUMINANCE_THRESHOLD
39
+ ? lighten(adjustAmount, palette.background.paper)
40
+ : darken(adjustAmount, palette.background.paper);
38
41
  }
39
- return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) > 0.5
40
- ? darken(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background)
41
- : lighten(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background);
42
+ return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) < LUMINANCE_THRESHOLD
43
+ ? lighten(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background)
44
+ : darken(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background);
42
45
  };
43
46
  /**
44
47
  * Return a darkened or lightened contrast color for the navigation
@@ -51,11 +54,11 @@ export var getOffsetNavigationContrastText = function (theme, colorAdjustAmount)
51
54
  var adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
52
55
  // Use background property if navigation property isnt set
53
56
  if (!((_a = palette.navigation) === null || _a === void 0 ? void 0 : _a.background)) {
54
- return getLuminance(palette.background.paper) > 0.5
55
- ? palette.getContrastText(darken(adjustAmount, palette.background.paper))
56
- : palette.getContrastText(lighten(adjustAmount, palette.background.paper));
57
+ return getLuminance(palette.background.paper) < LUMINANCE_THRESHOLD
58
+ ? palette.getContrastText(lighten(adjustAmount, palette.background.paper))
59
+ : palette.getContrastText(darken(adjustAmount, palette.background.paper));
57
60
  }
58
- return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) > 0.5
59
- ? palette.getContrastText(darken(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background))
60
- : palette.getContrastText(lighten(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background));
61
+ return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) < LUMINANCE_THRESHOLD
62
+ ? palette.getContrastText(lighten(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background))
63
+ : palette.getContrastText(darken(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background));
61
64
  };
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "1.8.4",
12
+ "version": "1.8.5",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",