@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.
Files changed (86) hide show
  1. package/assets/Images.js +7 -18
  2. package/components/atoms/Autocomplete/Autocomplete.js +3 -14
  3. package/components/atoms/Button/Button.js +2 -13
  4. package/components/atoms/Checkbox/Checkbox.js +3 -26
  5. package/components/atoms/IconButton/IconButton.js +2 -13
  6. package/components/atoms/Radio/Radio.js +3 -26
  7. package/components/atoms/Select/Select.js +3 -26
  8. package/components/atoms/Slider/Slider.js +3 -26
  9. package/components/atoms/Switch/Switch.js +3 -26
  10. package/components/atoms/TextField/TextField.js +2 -13
  11. package/components/atoms/ToggleButton/ToggleButton.js +3 -26
  12. package/components/datadisplay/Avatar/Avatar.js +13 -28
  13. package/components/datadisplay/Chip/Chip.js +3 -26
  14. package/components/datadisplay/List/List.js +2 -13
  15. package/components/feedback/Alert/Alert.js +3 -26
  16. package/components/landmarks/Header/Header.js +15 -41
  17. package/components/landmarks/Header/HeaderActionButtons.d.ts +1 -2
  18. package/components/landmarks/Header/HeaderActionButtons.js +22 -33
  19. package/components/landmarks/Header/HeaderStyles.js +54 -11
  20. package/components/navigation/Drawer/Drawer.js +5 -31
  21. package/components/navigation/MobileNavigation/MobileNavigation.js +70 -82
  22. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +75 -83
  23. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +102 -52
  24. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +71 -13
  25. package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +1 -1
  26. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +41 -68
  27. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +34 -18
  28. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +133 -20
  29. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +22 -45
  30. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +8 -19
  31. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +151 -52
  32. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +171 -50
  33. package/components/navigation/MobileNavigation/MobileNavigationMotion.js +11 -11
  34. package/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +11 -15
  35. package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +1 -2
  36. package/components/navigation/MobileNavigation/MobileNavigationSearch.js +25 -34
  37. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +34 -18
  38. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +47 -9
  39. package/components/navigation/MobileNavigation/MobileNavigationStyles.js +262 -66
  40. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +21 -20
  41. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +21 -20
  42. package/components/navigation/VerticalNavigation/VerticalNavigation.js +150 -185
  43. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +50 -61
  44. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +102 -52
  45. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +86 -14
  46. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +27 -51
  47. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +15 -28
  48. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +135 -39
  49. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +167 -29
  50. package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +11 -11
  51. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +34 -18
  52. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +236 -42
  53. package/components/navigation/helpers.d.ts +1 -2
  54. package/components/navigation/helpers.js +28 -32
  55. package/components/pages/ErrorPage/ErrorPage.js +6 -17
  56. package/components/pages/ErrorPage/ErrorPageStyles.js +13 -18
  57. package/components/pages/SideInSide/SideInSide.js +12 -23
  58. package/components/pages/SideInSide/SideInSideStyles.js +6 -6
  59. package/components/stream/AppHub/AppHub.js +13 -42
  60. package/components/stream/AppHub/AppHubAdvertStyles.js +24 -8
  61. package/components/stream/AppHub/AppHubBannerAdvert.d.ts +1 -2
  62. package/components/stream/AppHub/AppHubBannerAdvert.js +10 -20
  63. package/components/stream/AppHub/AppHubCustom.js +8 -19
  64. package/components/stream/AppHub/AppHubCustomStyles.d.ts +1 -1
  65. package/components/stream/AppHub/AppHubCustomStyles.js +78 -18
  66. package/components/stream/AppHub/AppHubProduct.js +26 -48
  67. package/components/stream/AppHub/AppHubProductStyles.js +104 -19
  68. package/components/stream/AppHub/AppHubStyles.js +31 -11
  69. package/components/stream/AppHub/constants.d.ts +1 -2
  70. package/components/stream/AppHub/constants.js +14 -14
  71. package/components/stream/AppSwitcher/AppSwitcher.js +225 -316
  72. package/components/stream/AppSwitcher/AppSwitcherItem.js +11 -22
  73. package/components/stream/AppSwitcher/AppSwitcherStyles.js +337 -42
  74. package/components/stream/AppSwitcher/AppSwitcherStylesStandalone.js +255 -21
  75. package/components/stream/AppSwitcher/PromotionalCampaignItem.js +7 -19
  76. package/components/stream/AppSwitcher/constants.d.ts +1 -0
  77. package/components/stream/AppSwitcher/constants.js +6 -5
  78. package/lang/en-us.d.ts +1 -0
  79. package/lang/en-us.js +2 -1
  80. package/package.json +7 -2
  81. package/utils/constants.d.ts +7 -0
  82. package/utils/constants.js +11 -4
  83. package/utils/dataAttributes.js +1 -1
  84. package/utils/helpers.js +33 -40
  85. package/utils/hooks.js +10 -11
  86. package/utils/theme.js +26 -19
@@ -1,24 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
22
2
  import * as React from 'react';
23
3
  import { useTheme } from '@mui/material/styles';
24
4
  import { List, ListItemText } from '../../../index';
@@ -29,29 +9,28 @@ import { useFadeIn } from '../../../utils/helpers';
29
9
  import { getDefaultSupportLinks, getOffsetNavigationContrastText } from '../helpers';
30
10
  import { defaultAttributes } from '../../../utils/dataAttributes';
31
11
  import { defaultMessages } from '../../../lang/en-us';
12
+ import { EVENT_KEYS } from '../../../utils/constants';
32
13
  export default function SwipeableTemporaryDrawer(props) {
33
- var isDrawerOpen = props.isDrawerOpen, setIsDrawerOpen = props.setIsDrawerOpen, items = props.items, secondaryItems = props.secondaryItems, logo = props.logo, logoText = props.logoText, logoOnClick = props.logoOnClick, dataAttributes = props.dataAttributes, localization = props.localization, showSupportLinks = props.showSupportLinks, avatarPanelShowHelpLinks = props.avatarPanelShowHelpLinks;
34
- var theme = useTheme();
35
- var _a = React.useState(isDrawerOpen !== null && isDrawerOpen !== void 0 ? isDrawerOpen : false), isOpen = _a[0], setIsOpen = _a[1];
36
- var messages = __assign(__assign({}, defaultMessages), localization);
37
- var dataIds = __assign(__assign({}, defaultAttributes), dataAttributes);
38
- React.useEffect(function () { return handleOpenState(isDrawerOpen); }, [isDrawerOpen]);
39
- var handleOpenState = function (open) {
14
+ const { isDrawerOpen, setIsDrawerOpen, items, secondaryItems, logo, logoText, logoOnClick, dataAttributes, localization, showSupportLinks, avatarPanelShowHelpLinks } = props;
15
+ const theme = useTheme();
16
+ const [isOpen, setIsOpen] = React.useState(isDrawerOpen ?? false);
17
+ const messages = { ...defaultMessages, ...localization };
18
+ const dataIds = { ...defaultAttributes, ...dataAttributes };
19
+ React.useEffect(() => handleOpenState(isDrawerOpen), [isDrawerOpen]);
20
+ const handleOpenState = (open) => {
40
21
  setIsOpen(open);
41
22
  setIsDrawerOpen(open);
42
23
  };
43
- var toggleDrawer = function (open) {
44
- return function (event) {
45
- if (event && event.type === 'keydown' &&
46
- (event.key === 'Tab' ||
47
- event.key === 'Shift')) {
48
- return;
49
- }
50
- handleOpenState(open);
51
- };
24
+ const toggleDrawer = (open) => (event) => {
25
+ if (event && event.type === EVENT_KEYS.Keydown &&
26
+ (event.key === EVENT_KEYS.Tab ||
27
+ event.key === EVENT_KEYS.Shift)) {
28
+ return;
29
+ }
30
+ handleOpenState(open);
52
31
  };
53
32
  // Default support links, these can be toggled on/off via the showSupportLinks
54
- var defaultSupportLinks = getDefaultSupportLinks(messages);
33
+ const defaultSupportLinks = getDefaultSupportLinks(messages);
55
34
  // Workaround to handle the react-spring calls without
56
35
  // adding additional hook calls on prop or state changes
57
36
  // --
@@ -59,35 +38,29 @@ export default function SwipeableTemporaryDrawer(props) {
59
38
  // this way the number of hook calls never changes
60
39
  // --
61
40
  // First item starts at 70ms, see STAGGER_ITEMS_DELAY in helpers.js
62
- var additionalItems = ['logo', 'divider'];
63
- var totalItems = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], items !== null && items !== void 0 ? items : [], true), defaultSupportLinks !== null && defaultSupportLinks !== void 0 ? defaultSupportLinks : [], true), secondaryItems !== null && secondaryItems !== void 0 ? secondaryItems : [], true), additionalItems, true);
64
- var animationRefs = React.useRef(totalItems && totalItems.map(function (item, index) { return useFadeIn(index, !isOpen); }));
65
- var list = function () {
66
- var _a;
67
- return (_jsxs(StyledBox, __assign({ onClick: toggleDrawer(false), onKeyDown: toggleDrawer(false) }, { children: [_jsxs(StyledDrawerLogo, __assign({ "data-id": dataIds.MobileNavDrawerBrand, onClick: logoOnClick !== null && logoOnClick !== void 0 ? logoOnClick : null, style: animationRefs.current[0] }, { children: [logo
68
- ? typeof logo === 'string'
69
- ? (_jsx("img", { height: 38, width: 38, src: logo, alt: logoText !== null && logoText !== void 0 ? logoText : 'Site Logo' }))
70
- : logo
71
- : (_jsx(StreamSuiteLogo, { style: {
72
- fill: getOffsetNavigationContrastText(theme)
73
- } })), _jsx(StyledDrawerLogoText, __assign({ variant: 'body1' }, { children: logoText !== null && logoText !== void 0 ? logoText : 'Site Logo' }))] })), _jsxs(List, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryList }, { children: [items && items.length > 0 && items.map(function (item, index) {
74
- var label = item.label, children = item.children, onClick = item.onClick;
75
- return (_jsxs(StyledListItem, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryItem, disablePadding: true,
76
- // @ts-expect-error
77
- component: animated.li, style: animationRefs.current[index] }, { children: [_jsx(StyledListItemButton, __assign({ onClick: onClick }, { children: _jsx(StyledListItemText, { primary: label }) })), children && children.length > 0 && (_jsx(StyledChildList, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryChildList, "aria-label": label }, { children: children.map(function (childItem) { return (_jsx(StyledChildListItem, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryChildItem }, { children: _jsx(StyledChildListItemButton, __assign({ onClick: childItem === null || childItem === void 0 ? void 0 : childItem.onClick }, { children: _jsx(StyledChildListItemText, { primary: childItem === null || childItem === void 0 ? void 0 : childItem.label }, childItem === null || childItem === void 0 ? void 0 : childItem.label) })) }), childItem === null || childItem === void 0 ? void 0 : childItem.label)); }) })))] }), label));
78
- }), (showSupportLinks || avatarPanelShowHelpLinks) && defaultSupportLinks && defaultSupportLinks.length > 0 && defaultSupportLinks.map(function (item, index) {
79
- var label = item.label, children = item.children, onClick = item.onClick;
80
- return (_jsxs(StyledListItem, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryItem, disablePadding: true,
81
- // @ts-expect-error
82
- component: animated.li, style: animationRefs.current[index] }, { children: [_jsx(StyledListItemButton, __assign({ onClick: onClick }, { children: _jsx(StyledListItemText, { primary: label }) })), children && children.length > 0 && (_jsx(StyledChildList, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryChildList, "aria-label": label }, { children: children.map(function (childItem) { return (_jsx(StyledChildListItem, __assign({ "data-id": dataIds.MobileNavDrawerPrimaryChildItem }, { children: _jsx(StyledChildListItemButton, __assign({ onClick: childItem === null || childItem === void 0 ? void 0 : childItem.onClick }, { children: _jsx(StyledChildListItemText, { primary: childItem === null || childItem === void 0 ? void 0 : childItem.label }, childItem === null || childItem === void 0 ? void 0 : childItem.label) })) }), childItem === null || childItem === void 0 ? void 0 : childItem.label)); }) })))] }), label));
83
- })] })), secondaryItems && secondaryItems.length > 0 && (_jsxs(_Fragment, { children: [_jsx(animated.div, __assign({ style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + 1] }, { children: _jsx(StyledDivider, {}) })), _jsx(StyledListSecondaryList, __assign({ "data-id": dataIds.MobileNavDrawerSecondaryList }, { children: secondaryItems && secondaryItems.length > 0 && secondaryItems.map(function (item, index) {
84
- var _a;
85
- return (_jsx(StyledListSecondaryItem, __assign({ "data-id": dataIds.MobileNavDrawerSecondaryItem, disablePadding: true,
86
- // @ts-expect-error
87
- component: animated.li, style: animationRefs.current[((_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0) + index + 2] }, { children: _jsx(StyledListSecondaryButton, __assign({ onClick: item === null || item === void 0 ? void 0 : item.onClick }, { children: _jsx(ListItemText, { primary: item.label }) })) }), item.label));
88
- }) }))] }))] })));
89
- };
90
- return (_jsx("aside", { children: _jsx(StyledSwipeableDrawer, __assign({ "data-id": dataIds.MobileNavDrawerPanel, anchor: 'bottom', open: isOpen, onClose: toggleDrawer(false), hideBackdrop: true, ModalProps: {
41
+ const additionalItems = ['logo', 'divider'];
42
+ const totalItems = [...items ?? [], ...defaultSupportLinks ?? [], ...secondaryItems ?? [], ...additionalItems];
43
+ const animationRefs = React.useRef(totalItems && totalItems.map((item, index) => useFadeIn(index, !isOpen)));
44
+ const list = () => (_jsxs(StyledBox, { onClick: toggleDrawer(false), onKeyDown: toggleDrawer(false), children: [_jsxs(StyledDrawerLogo, { "data-id": dataIds.MobileNavDrawerBrand, onClick: logoOnClick ?? null, style: animationRefs.current[0], children: [logo
45
+ ? typeof logo === 'string'
46
+ ? (_jsx("img", { height: 38, width: 38, src: logo, alt: logoText ?? 'Site Logo' }))
47
+ : logo
48
+ : (_jsx(StreamSuiteLogo, { style: {
49
+ fill: getOffsetNavigationContrastText(theme)
50
+ } })), _jsx(StyledDrawerLogoText, { variant: 'body1', children: logoText ?? 'Site Logo' })] }), _jsxs(List, { "data-id": dataIds.MobileNavDrawerPrimaryList, children: [items && items.length > 0 && items.map((item, index) => {
51
+ const { label, children, onClick } = item;
52
+ return (_jsxs(StyledListItem, { "data-id": dataIds.MobileNavDrawerPrimaryItem, disablePadding: true,
53
+ // @ts-expect-error
54
+ component: animated.li, style: animationRefs.current[index], children: [_jsx(StyledListItemButton, { onClick: onClick, children: _jsx(StyledListItemText, { primary: label }) }), children && children.length > 0 && (_jsx(StyledChildList, { "data-id": dataIds.MobileNavDrawerPrimaryChildList, "aria-label": label, children: children.map(childItem => (_jsx(StyledChildListItem, { "data-id": dataIds.MobileNavDrawerPrimaryChildItem, children: _jsx(StyledChildListItemButton, { onClick: childItem?.onClick, children: _jsx(StyledChildListItemText, { primary: childItem?.label }, childItem?.label) }) }, childItem?.label))) }))] }, label));
55
+ }), (showSupportLinks || avatarPanelShowHelpLinks) && defaultSupportLinks && defaultSupportLinks.length > 0 && defaultSupportLinks.map((item, index) => {
56
+ const { label, children, onClick } = item;
57
+ return (_jsxs(StyledListItem, { "data-id": dataIds.MobileNavDrawerPrimaryItem, disablePadding: true,
58
+ // @ts-expect-error
59
+ component: animated.li, style: animationRefs.current[index], children: [_jsx(StyledListItemButton, { onClick: onClick, children: _jsx(StyledListItemText, { primary: label }) }), children && children.length > 0 && (_jsx(StyledChildList, { "data-id": dataIds.MobileNavDrawerPrimaryChildList, "aria-label": label, children: children.map(childItem => (_jsx(StyledChildListItem, { "data-id": dataIds.MobileNavDrawerPrimaryChildItem, children: _jsx(StyledChildListItemButton, { onClick: childItem?.onClick, children: _jsx(StyledChildListItemText, { primary: childItem?.label }, childItem?.label) }) }, childItem?.label))) }))] }, label));
60
+ })] }), secondaryItems && secondaryItems.length > 0 && (_jsxs(_Fragment, { children: [_jsx(animated.div, { style: animationRefs.current[(items?.length ?? 0) + 1], children: _jsx(StyledDivider, {}) }), _jsx(StyledListSecondaryList, { "data-id": dataIds.MobileNavDrawerSecondaryList, children: secondaryItems && secondaryItems.length > 0 && secondaryItems.map((item, index) => (_jsx(StyledListSecondaryItem, { "data-id": dataIds.MobileNavDrawerSecondaryItem, disablePadding: true,
61
+ // @ts-expect-error
62
+ component: animated.li, style: animationRefs.current[(items?.length ?? 0) + index + 2], children: _jsx(StyledListSecondaryButton, { onClick: item?.onClick, children: _jsx(ListItemText, { primary: item.label }) }) }, item.label))) })] }))] }));
63
+ return (_jsx("aside", { children: _jsx(StyledSwipeableDrawer, { "data-id": dataIds.MobileNavDrawerPanel, anchor: 'bottom', open: isOpen, onClose: toggleDrawer(false), hideBackdrop: true, ModalProps: {
91
64
  keepMounted: true
92
- } }, { children: list() })) }));
65
+ }, children: list() }) }));
93
66
  }
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react" />
3
- /// <reference types="trusted-types" />
4
3
  export declare const StyledSwipeableDrawer: import("@emotion/styled").StyledComponent<import("@mui/material/Drawer").DrawerProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
4
  export declare const StyledBox: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
6
5
  children?: import("react").ReactNode;
@@ -26,6 +25,8 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
26
25
  animationIterationCount?: import("csstype").Property.AnimationIterationCount | undefined;
27
26
  animationName?: import("csstype").Property.AnimationName | undefined;
28
27
  animationPlayState?: import("csstype").Property.AnimationPlayState | undefined;
28
+ animationRangeEnd?: import("csstype").Property.AnimationRangeEnd<string | number> | undefined;
29
+ animationRangeStart?: import("csstype").Property.AnimationRangeStart<string | number> | undefined;
29
30
  animationTimeline?: import("csstype").Property.AnimationTimeline | undefined;
30
31
  animationTimingFunction?: import("csstype").Property.AnimationTimingFunction | undefined;
31
32
  appearance?: import("csstype").Property.Appearance | undefined;
@@ -147,6 +148,10 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
147
148
  fontStretch?: import("csstype").Property.FontStretch | undefined;
148
149
  fontStyle?: import("csstype").Property.FontStyle | undefined;
149
150
  fontSynthesis?: import("csstype").Property.FontSynthesis | undefined;
151
+ fontSynthesisPosition?: import("csstype").Property.FontSynthesisPosition | undefined;
152
+ fontSynthesisSmallCaps?: import("csstype").Property.FontSynthesisSmallCaps | undefined;
153
+ fontSynthesisStyle?: import("csstype").Property.FontSynthesisStyle | undefined;
154
+ fontSynthesisWeight?: import("csstype").Property.FontSynthesisWeight | undefined;
150
155
  fontVariant?: import("csstype").Property.FontVariant | undefined;
151
156
  fontVariantAlternates?: import("csstype").Property.FontVariantAlternates | undefined;
152
157
  fontVariantCaps?: import("csstype").Property.FontVariantCaps | undefined;
@@ -220,6 +225,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
220
225
  maskRepeat?: import("csstype").Property.MaskRepeat | undefined;
221
226
  maskSize?: import("csstype").Property.MaskSize<string | number> | undefined;
222
227
  maskType?: import("csstype").Property.MaskType | undefined;
228
+ masonryAutoFlow?: import("csstype").Property.MasonryAutoFlow | undefined;
223
229
  mathDepth?: import("csstype").Property.MathDepth | undefined;
224
230
  mathShift?: import("csstype").Property.MathShift | undefined;
225
231
  mathStyle?: import("csstype").Property.MathStyle | undefined;
@@ -259,6 +265,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
259
265
  overflowWrap?: import("csstype").Property.OverflowWrap | undefined;
260
266
  overflowX?: import("csstype").Property.OverflowX | undefined;
261
267
  overflowY?: import("csstype").Property.OverflowY | undefined;
268
+ overlay?: import("csstype").Property.Overlay | undefined;
262
269
  overscrollBehaviorBlock?: import("csstype").Property.OverscrollBehaviorBlock | undefined;
263
270
  overscrollBehaviorInline?: import("csstype").Property.OverscrollBehaviorInline | undefined;
264
271
  overscrollBehaviorX?: import("csstype").Property.OverscrollBehaviorX | undefined;
@@ -346,12 +353,15 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
346
353
  textTransform?: import("csstype").Property.TextTransform | undefined;
347
354
  textUnderlineOffset?: import("csstype").Property.TextUnderlineOffset<string | number> | undefined;
348
355
  textUnderlinePosition?: import("csstype").Property.TextUnderlinePosition | undefined;
356
+ textWrap?: import("csstype").Property.TextWrap | undefined;
357
+ timelineScope?: import("csstype").Property.TimelineScope | undefined;
349
358
  top?: import("csstype").Property.Top<string | number> | undefined;
350
359
  touchAction?: import("csstype").Property.TouchAction | undefined;
351
360
  transform?: string | undefined;
352
361
  transformBox?: import("csstype").Property.TransformBox | undefined;
353
362
  transformOrigin?: import("csstype").Property.TransformOrigin<string | number> | undefined;
354
363
  transformStyle?: import("csstype").Property.TransformStyle | undefined;
364
+ transitionBehavior?: import("csstype").Property.TransitionBehavior | undefined;
355
365
  transitionDelay?: import("csstype").Property.TransitionDelay<string & {}> | undefined;
356
366
  transitionDuration?: import("csstype").Property.TransitionDuration<string & {}> | undefined;
357
367
  transitionProperty?: import("csstype").Property.TransitionProperty | undefined;
@@ -360,9 +370,14 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
360
370
  unicodeBidi?: import("csstype").Property.UnicodeBidi | undefined;
361
371
  userSelect?: import("csstype").Property.UserSelect | undefined;
362
372
  verticalAlign?: import("csstype").Property.VerticalAlign<string | number> | undefined;
373
+ viewTimelineAxis?: import("csstype").Property.ViewTimelineAxis | undefined;
374
+ viewTimelineInset?: import("csstype").Property.ViewTimelineInset<string | number> | undefined;
375
+ viewTimelineName?: import("csstype").Property.ViewTimelineName | undefined;
363
376
  viewTransitionName?: import("csstype").Property.ViewTransitionName | undefined;
364
377
  visibility?: import("csstype").Property.Visibility | undefined;
365
378
  whiteSpace?: import("csstype").Property.WhiteSpace | undefined;
379
+ whiteSpaceCollapse?: import("csstype").Property.WhiteSpaceCollapse | undefined;
380
+ whiteSpaceTrim?: import("csstype").Property.WhiteSpaceTrim | undefined;
366
381
  widows?: import("csstype").Property.Widows | undefined;
367
382
  width?: import("csstype").Property.Width<string | number> | undefined;
368
383
  willChange?: import("csstype").Property.WillChange | undefined;
@@ -374,6 +389,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
374
389
  zoom?: import("csstype").Property.Zoom | undefined;
375
390
  all?: import("csstype").Globals | undefined;
376
391
  animation?: import("csstype").Property.Animation<string & {}> | undefined;
392
+ animationRange?: import("csstype").Property.AnimationRange<string | number> | undefined;
377
393
  background?: import("csstype").Property.Background<string | number> | undefined;
378
394
  backgroundPosition?: import("csstype").Property.BackgroundPosition<string | number> | undefined;
379
395
  border?: import("csstype").Property.Border<string | number> | undefined;
@@ -438,6 +454,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
438
454
  textDecoration?: import("csstype").Property.TextDecoration<string | number> | undefined;
439
455
  textEmphasis?: import("csstype").Property.TextEmphasis | undefined;
440
456
  transition?: import("csstype").Property.Transition<string & {}> | undefined;
457
+ viewTimeline?: import("csstype").Property.ViewTimeline | undefined;
441
458
  MozAnimationDelay?: import("csstype").Property.AnimationDelay<string & {}> | undefined;
442
459
  MozAnimationDirection?: import("csstype").Property.AnimationDirection | undefined;
443
460
  MozAnimationDuration?: import("csstype").Property.AnimationDuration<string & {}> | undefined;
@@ -447,7 +464,6 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
447
464
  MozAnimationPlayState?: import("csstype").Property.AnimationPlayState | undefined;
448
465
  MozAnimationTimingFunction?: import("csstype").Property.AnimationTimingFunction | undefined;
449
466
  MozAppearance?: import("csstype").Property.MozAppearance | undefined;
450
- MozBackfaceVisibility?: import("csstype").Property.BackfaceVisibility | undefined;
451
467
  MozBinding?: import("csstype").Property.MozBinding | undefined;
452
468
  MozBorderBottomColors?: import("csstype").Property.MozBorderBottomColors | undefined;
453
469
  MozBorderEndColor?: import("csstype").Property.BorderInlineEndColor | undefined;
@@ -474,20 +490,16 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
474
490
  MozMarginStart?: import("csstype").Property.MarginInlineStart<string | number> | undefined;
475
491
  MozOrient?: import("csstype").Property.MozOrient | undefined;
476
492
  MozOsxFontSmoothing?: import("csstype").Property.FontSmooth<string | number> | undefined;
493
+ MozOutlineRadiusBottomleft?: import("csstype").Property.MozOutlineRadiusBottomleft<string | number> | undefined;
494
+ MozOutlineRadiusBottomright?: import("csstype").Property.MozOutlineRadiusBottomright<string | number> | undefined;
495
+ MozOutlineRadiusTopleft?: import("csstype").Property.MozOutlineRadiusTopleft<string | number> | undefined;
496
+ MozOutlineRadiusTopright?: import("csstype").Property.MozOutlineRadiusTopright<string | number> | undefined;
477
497
  MozPaddingEnd?: import("csstype").Property.PaddingInlineEnd<string | number> | undefined;
478
498
  MozPaddingStart?: import("csstype").Property.PaddingInlineStart<string | number> | undefined;
479
- MozPerspective?: import("csstype").Property.Perspective<string | number> | undefined;
480
- MozPerspectiveOrigin?: import("csstype").Property.PerspectiveOrigin<string | number> | undefined;
481
499
  MozStackSizing?: import("csstype").Property.MozStackSizing | undefined;
482
500
  MozTabSize?: import("csstype").Property.TabSize<string | number> | undefined;
483
501
  MozTextBlink?: import("csstype").Property.MozTextBlink | undefined;
484
502
  MozTextSizeAdjust?: import("csstype").Property.TextSizeAdjust | undefined;
485
- MozTransformOrigin?: import("csstype").Property.TransformOrigin<string | number> | undefined;
486
- MozTransformStyle?: import("csstype").Property.TransformStyle | undefined;
487
- MozTransitionDelay?: import("csstype").Property.TransitionDelay<string & {}> | undefined;
488
- MozTransitionDuration?: import("csstype").Property.TransitionDuration<string & {}> | undefined;
489
- MozTransitionProperty?: import("csstype").Property.TransitionProperty | undefined;
490
- MozTransitionTimingFunction?: import("csstype").Property.TransitionTimingFunction | undefined;
491
503
  MozUserFocus?: import("csstype").Property.MozUserFocus | undefined;
492
504
  MozUserModify?: import("csstype").Property.MozUserModify | undefined;
493
505
  MozUserSelect?: import("csstype").Property.UserSelect | undefined;
@@ -667,7 +679,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
667
679
  MozBorderImage?: import("csstype").Property.BorderImage | undefined;
668
680
  MozColumnRule?: import("csstype").Property.ColumnRule<string | number> | undefined;
669
681
  MozColumns?: import("csstype").Property.Columns<string | number> | undefined;
670
- MozTransition?: import("csstype").Property.Transition<string & {}> | undefined;
682
+ MozOutlineRadius?: import("csstype").Property.MozOutlineRadius<string | number> | undefined;
671
683
  msContentZoomLimit?: import("csstype").Property.MsContentZoomLimit | undefined;
672
684
  msContentZoomSnap?: import("csstype").Property.MsContentZoomSnap | undefined;
673
685
  msFlex?: import("csstype").Property.Flex<string | number> | undefined;
@@ -725,6 +737,7 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
725
737
  KhtmlLineBreak?: import("csstype").Property.LineBreak | undefined;
726
738
  KhtmlOpacity?: import("csstype").Property.Opacity | undefined;
727
739
  KhtmlUserSelect?: import("csstype").Property.UserSelect | undefined;
740
+ MozBackfaceVisibility?: import("csstype").Property.BackfaceVisibility | undefined;
728
741
  MozBackgroundClip?: import("csstype").Property.BackgroundClip | undefined;
729
742
  MozBackgroundInlinePolicy?: import("csstype").Property.BoxDecorationBreak | undefined;
730
743
  MozBackgroundOrigin?: import("csstype").Property.BackgroundOrigin | undefined;
@@ -746,17 +759,22 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
746
759
  MozOpacity?: import("csstype").Property.Opacity | undefined;
747
760
  MozOutline?: import("csstype").Property.Outline<string | number> | undefined;
748
761
  MozOutlineColor?: import("csstype").Property.OutlineColor | undefined;
749
- MozOutlineRadius?: import("csstype").Property.MozOutlineRadius<string | number> | undefined;
750
- MozOutlineRadiusBottomleft?: import("csstype").Property.MozOutlineRadiusBottomleft<string | number> | undefined;
751
- MozOutlineRadiusBottomright?: import("csstype").Property.MozOutlineRadiusBottomright<string | number> | undefined;
752
- MozOutlineRadiusTopleft?: import("csstype").Property.MozOutlineRadiusTopleft<string | number> | undefined;
753
- MozOutlineRadiusTopright?: import("csstype").Property.MozOutlineRadiusTopright<string | number> | undefined;
754
762
  MozOutlineStyle?: import("csstype").Property.OutlineStyle | undefined;
755
763
  MozOutlineWidth?: import("csstype").Property.OutlineWidth<string | number> | undefined;
764
+ MozPerspective?: import("csstype").Property.Perspective<string | number> | undefined;
765
+ MozPerspectiveOrigin?: import("csstype").Property.PerspectiveOrigin<string | number> | undefined;
756
766
  MozTextAlignLast?: import("csstype").Property.TextAlignLast | undefined;
757
767
  MozTextDecorationColor?: import("csstype").Property.TextDecorationColor | undefined;
758
768
  MozTextDecorationLine?: import("csstype").Property.TextDecorationLine | undefined;
759
769
  MozTextDecorationStyle?: import("csstype").Property.TextDecorationStyle | undefined;
770
+ MozTransform?: import("csstype").Property.Transform | undefined;
771
+ MozTransformOrigin?: import("csstype").Property.TransformOrigin<string | number> | undefined;
772
+ MozTransformStyle?: import("csstype").Property.TransformStyle | undefined;
773
+ MozTransition?: import("csstype").Property.Transition<string & {}> | undefined;
774
+ MozTransitionDelay?: import("csstype").Property.TransitionDelay<string & {}> | undefined;
775
+ MozTransitionDuration?: import("csstype").Property.TransitionDuration<string & {}> | undefined;
776
+ MozTransitionProperty?: import("csstype").Property.TransitionProperty | undefined;
777
+ MozTransitionTimingFunction?: import("csstype").Property.TransitionTimingFunction | undefined;
760
778
  MozUserInput?: import("csstype").Property.MozUserInput | undefined;
761
779
  msImeMode?: import("csstype").Property.ImeMode | undefined;
762
780
  OAnimation?: import("csstype").Property.Animation<string & {}> | undefined;
@@ -789,8 +807,6 @@ export declare const StyledDrawerLogo: import("@emotion/styled").StyledComponent
789
807
  WebkitBoxOrdinalGroup?: import("csstype").Property.BoxOrdinalGroup | undefined;
790
808
  WebkitBoxOrient?: import("csstype").Property.BoxOrient | undefined;
791
809
  WebkitBoxPack?: import("csstype").Property.BoxPack | undefined;
792
- WebkitScrollSnapPointsX?: import("csstype").Property.ScrollSnapPointsX | undefined;
793
- WebkitScrollSnapPointsY?: import("csstype").Property.ScrollSnapPointsY | undefined;
794
810
  alignmentBaseline?: import("csstype").Property.AlignmentBaseline | undefined;
795
811
  baselineShift?: import("csstype").Property.BaselineShift<string | number> | undefined;
796
812
  clipRule?: import("csstype").Property.ClipRule | undefined;
@@ -1,25 +1,138 @@
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 { Box, List, ListItem, ListItemText, ListItemButton, Typography } from '../../../index';
6
2
  import { getNavigationBackground, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
7
3
  import Drawer from '@mui/material/Drawer';
8
4
  import { styled } from '@mui/material/styles';
9
5
  import { animated } from '@react-spring/web';
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); });
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"])));
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"])));
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); });
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"])));
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"])));
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"])));
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"])));
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"])));
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"])));
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); });
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;
6
+ export const StyledSwipeableDrawer = styled(Drawer) `
7
+ /* Override the MUI default z-index of the Drawer component
8
+ to ensure that the drawer is always below the AppBar. */
9
+ z-index: ${props => props.theme.zIndex.appBar - 1};
10
+
11
+ .MuiPaper-root {
12
+ background-color: ${props => getOffsetNavigationBackground(props.theme)};
13
+ height: 100vh;
14
+ border: none;
15
+ z-index: 1;
16
+ }
17
+ `;
18
+ export const StyledBox = styled(Box) `
19
+ height: 100%;
20
+ overflow: auto;
21
+ padding-bottom: 6rem;
22
+ `;
23
+ export const StyledDrawerLogo = styled(animated.div) `
24
+ background-color: transparent;
25
+ display: flex;
26
+ align-items: center;
27
+ margin: 1.5rem 0 2.5rem 1.5rem;
28
+
29
+ .MuiSvgIcon-root {
30
+ width: 2rem;
31
+ height: 2rem;
32
+ }
33
+ `;
34
+ export const StyledDrawerLogoText = styled(Typography) `
35
+ font-size: 1.2rem;
36
+ margin-left: .5rem;
37
+ color: ${props => getOffsetNavigationContrastText(props.theme)};
38
+ `;
39
+ export const StyledListItem = styled(ListItem) `
40
+ flex-direction: column;
41
+ align-items: flex-start;
42
+ margin: 0 1rem;
43
+ max-width: calc(100% - 2rem);
44
+
45
+ > .MuiListItemButton-root {
46
+ padding: .5rem 1.5rem;
47
+ }
48
+ `;
49
+ export const StyledListItemButton = styled(ListItemButton) `
50
+ border-radius: 50px;
51
+ color: ${props => getOffsetNavigationContrastText(props.theme)};
52
+ box-shadow: 0 0 0 0 transparent;
53
+ transition: all 0.2s ease;
54
+
55
+ :hover {
56
+ color: ${props => getOffsetNavigationContrastText(props.theme, 0.15)};
57
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.15)};
58
+ }
59
+
60
+ :focus-visible {
61
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.133)};
62
+ box-shadow: 0 0 0 3px ${props => getOffsetNavigationContrastText(props.theme, 0.133)};
63
+ }
64
+ `;
65
+ export const StyledListItemText = styled(ListItemText) `
66
+ > .MuiTypography-root {
67
+ font-size: 1.5rem;
68
+ font-weight: bold;
69
+ }
70
+ `;
71
+ export const StyledChildList = styled(List) `
72
+ display: flex;
73
+ flex-wrap: wrap;
74
+ margin: -.25rem 1rem 0 1.5rem;
75
+ padding: 0;
76
+ `;
77
+ export const StyledChildListItem = styled(ListItem) `
78
+ display: flex;
79
+ align-items: center;
80
+ padding: 0;
81
+ `;
82
+ export const StyledChildListItemButton = styled(ListItemButton) `
83
+ border-radius: 50px;
84
+ flex-grow: 0;
85
+ color: ${props => getOffsetNavigationContrastText(props.theme)};
86
+ box-shadow: 0 0 0 0 transparent;
87
+ transition: all 0.2s ease;
88
+
89
+ :hover {
90
+ color: ${props => getOffsetNavigationContrastText(props.theme, 0.15)};
91
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.15)};
92
+ }
93
+
94
+ :focus-visible {
95
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.133)};
96
+ box-shadow: 0 0 0 3px ${props => getOffsetNavigationContrastText(props.theme, 0.133)};
97
+ }
98
+ `;
99
+ export const StyledChildListItemText = styled(ListItemText) `
100
+ font-size: .9rem;
101
+ `;
102
+ export const StyledListSecondaryList = styled(List) `
103
+ display: flex;
104
+ flex-wrap: wrap;
105
+ margin: 0 1rem;
106
+ `;
107
+ export const StyledListSecondaryItem = styled(ListItem) `
108
+ flex: 1 0 50%;
109
+ display: flex;
110
+ align-items: center;
111
+ `;
112
+ export const StyledListSecondaryButton = styled(ListItemButton) `
113
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.15)};
114
+ color: ${props => getOffsetNavigationContrastText(props.theme, 0.15)};
115
+ margin: 0.25rem 0.25rem 0.5rem;
116
+ padding: 0.3rem 1rem;
117
+ border-radius: 50px;
118
+ box-shadow: 0 0 0 0 transparent;
119
+ transition: all 0.2s ease;
120
+
121
+ :hover {
122
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.185)};
123
+ color: ${props => getOffsetNavigationContrastText(props.theme, 0.185)};
124
+ }
125
+
126
+ :focus-visible {
127
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.185)};
128
+ box-shadow: 0 0 0 3px ${props => getOffsetNavigationContrastText(props.theme, 0.185)};
129
+ }
130
+ `;
131
+ export const StyledDivider = styled('div') `
132
+ background-color: ${props => getNavigationBackground(props.theme)};
133
+ width: 75%;
134
+ height: 2px;
135
+ border: none;
136
+ border-radius: 3px;
137
+ margin: 2rem auto;
138
+ `;
@@ -1,26 +1,4 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
24
2
  import React from 'react';
25
3
  import { useTheme } from '@mui/material/styles';
26
4
  import { Link, List, Tooltip, Collapse } from '../../../../index';
@@ -28,24 +6,23 @@ import MailIcon from '@mui/icons-material/Mail';
28
6
  import { ListItem, ListItemButton, ListItemButtonChild, ListItemIcon, ListItemText } from './MobileNavigationItemStyles';
29
7
  import { tooltipDelay } from '../../../../utils/theme';
30
8
  import MobileNavigationItemFlyoutMenu from './MobileNavigationItemFlyoutMenu';
31
- var MobileNavigationItem = function (props) {
32
- var _a, _b, _c;
33
- var theme = useTheme();
34
- var label = props.label, icon = props.icon, onClick = props.onClick, isActive = props.isActive, children = props.children, isDrawerOpen = props.isDrawerOpen, index = props.index, hasFlyout = props.hasFlyout, fullHeightFlyout = props.fullHeightFlyout, isSecondary = props.isSecondary, content = props.content, style = props.style, rest = __rest(props, ["label", "icon", "onClick", "isActive", "children", "isDrawerOpen", "index", "hasFlyout", "fullHeightFlyout", "isSecondary", "content", "style"]);
35
- var _d = React.useState(false), isExpanded = _d[0], setIsExpanded = _d[1];
36
- var _e = React.useState(null), anchorEl = _e[0], setAnchorEl = _e[1];
37
- var open = Boolean(anchorEl);
38
- var handlePopoverOpen = function (event) {
9
+ const MobileNavigationItem = (props) => {
10
+ const theme = useTheme();
11
+ const { label, icon, onClick, isActive, children, isDrawerOpen, index, hasFlyout, fullHeightFlyout, isSecondary, content, style, ...rest } = props;
12
+ const [isExpanded, setIsExpanded] = React.useState(false);
13
+ const [anchorEl, setAnchorEl] = React.useState(null);
14
+ const open = Boolean(anchorEl);
15
+ const handlePopoverOpen = (event) => {
39
16
  if (open) {
40
17
  handlePopoverClose();
41
18
  return;
42
19
  }
43
- setAnchorEl(event === null || event === void 0 ? void 0 : event.currentTarget);
20
+ setAnchorEl(event?.currentTarget);
44
21
  };
45
- var handlePopoverClose = function () {
22
+ const handlePopoverClose = () => {
46
23
  setAnchorEl(null);
47
24
  };
48
- var handleClick = function (event) {
25
+ const handleClick = (event) => {
49
26
  if (fullHeightFlyout) {
50
27
  handlePopoverOpen(event);
51
28
  return;
@@ -59,33 +36,33 @@ var MobileNavigationItem = function (props) {
59
36
  }
60
37
  setAnchorEl(null);
61
38
  };
62
- return (_jsxs(ListItem, __assign({ disablePadding: true, style: style }, rest, { isDrawerOpen: isDrawerOpen }, { children: [_jsxs(ListItemButton
39
+ return (_jsxs(ListItem, { disablePadding: true, style: style, ...rest, isDrawerOpen: isDrawerOpen, children: [_jsxs(ListItemButton
63
40
  // @ts-expect-error
64
- , __assign({
41
+ , {
65
42
  // @ts-expect-error
66
- component: Link, onClick: handleClick, isDrawerOpen: isDrawerOpen, isExpanded: isExpanded, open: open, onMouseEnter: function (event) { return fullHeightFlyout
43
+ component: Link, onClick: handleClick, isDrawerOpen: isDrawerOpen, isExpanded: isExpanded, open: open, onMouseEnter: event => fullHeightFlyout
67
44
  ? null
68
- : handlePopoverOpen(event); }, onMouseLeave: function () { return fullHeightFlyout
45
+ : handlePopoverOpen(event), onMouseLeave: () => fullHeightFlyout
69
46
  ? null
70
- : handlePopoverClose(); }, onFocus: function (event) { return fullHeightFlyout
47
+ : handlePopoverClose(), onFocus: event => fullHeightFlyout
71
48
  ? null
72
- : handlePopoverOpen(event); }, onBlur: function () { return fullHeightFlyout
49
+ : handlePopoverOpen(event), onBlur: () => fullHeightFlyout
73
50
  ? null
74
- : handlePopoverClose(); }, "aria-expanded": (children && children.length > 0) ? open : null, "aria-haspopup": (children && children.length > 0) ? 'true' : null, "aria-current": isActive ? 'page' : null, role: (children && children.length > 0) ? 'button' : 'link' }, { children: [_jsx(Tooltip, __assign({ disableHoverListener: (_a = (children && children.length > 0)) !== null && _a !== void 0 ? _a : isDrawerOpen, disableFocusListener: (_b = (children && children.length > 0)) !== null && _b !== void 0 ? _b : isDrawerOpen, disableTouchListener: (_c = (children && children.length > 0)) !== null && _c !== void 0 ? _c : isDrawerOpen, title: label, placement: theme.direction === 'rtl' ? 'left' : 'right', enterDelay: tooltipDelay.start, leaveDelay: tooltipDelay.end }, { children: _jsx(ListItemIcon, __assign({ "aria-hidden": true }, { children: icon !== null && icon !== void 0 ? icon : _jsx(MailIcon, {}) })) })), _jsx(ListItemText, { primary: label, isDrawerOpen: isDrawerOpen, index: index, sx: {
51
+ : handlePopoverClose(), "aria-expanded": (children && children.length > 0) ? open : null, "aria-haspopup": (children && children.length > 0) ? 'true' : null, "aria-current": isActive ? 'page' : null, role: (children && children.length > 0) ? 'button' : 'link', children: [_jsx(Tooltip, { disableHoverListener: (children && children.length > 0) ?? isDrawerOpen, disableFocusListener: (children && children.length > 0) ?? isDrawerOpen, disableTouchListener: (children && children.length > 0) ?? isDrawerOpen, title: label, placement: theme.direction === 'rtl' ? 'left' : 'right', enterDelay: tooltipDelay.start, leaveDelay: tooltipDelay.end, children: _jsx(ListItemIcon, { "aria-hidden": true, children: icon ?? _jsx(MailIcon, {}) }) }), _jsx(ListItemText, { primary: label, isDrawerOpen: isDrawerOpen, index: index, sx: {
75
52
  '& .MuiTypography-root': {
76
53
  fontSize: isSecondary ? '14px' : 'inherit'
77
54
  }
78
- } }), children && children.length > 0 && (_jsx(Collapse, __assign({ component: 'div', in: isDrawerOpen ? isExpanded : false, timeout: "auto" }, { children: _jsx(List, __assign({ "aria-label": label, disablePadding: true }, { children: children.map(function (childItem, index) { return (_jsx(ListItem, __assign({ disablePadding: true, isDrawerOpen: isDrawerOpen }, { children: _jsxs(ListItemButtonChild
55
+ } }), children && children.length > 0 && (_jsx(Collapse, { component: 'div', in: isDrawerOpen ? isExpanded : false, timeout: "auto", children: _jsx(List, { "aria-label": label, disablePadding: true, children: children.map((childItem, index) => (_jsx(ListItem, { disablePadding: true, isDrawerOpen: isDrawerOpen, children: _jsxs(ListItemButtonChild
79
56
  // @ts-expect-error
80
- , __assign({
57
+ , {
81
58
  // @ts-expect-error
82
- component: Link, index: index, isDrawerOpen: isDrawerOpen }, { children: [_jsx(ListItemIcon, { children: childItem.icon }), _jsx(ListItemText, { primary: childItem.label, isDrawerOpen: isDrawerOpen, sx: {
59
+ component: Link, index: index, isDrawerOpen: isDrawerOpen, children: [_jsx(ListItemIcon, { children: childItem.icon }), _jsx(ListItemText, { primary: childItem.label, isDrawerOpen: isDrawerOpen, sx: {
83
60
  '& .MuiTypography-root': {
84
61
  fontSize: '14px !important',
85
62
  color: theme.palette.mode === 'dark'
86
63
  ? theme.palette.primary.contrastText
87
64
  : theme.palette.getContrastText(theme.palette.background.paper)
88
65
  }
89
- } })] }), label) }))); }) })) })))] }), label), !fullHeightFlyout && children && children.length > 0 && (!isExpanded || !isDrawerOpen) && (_jsx(MobileNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, anchorEl: anchorEl, open: open, children: children, label: label })), fullHeightFlyout && content && (_jsx(MobileNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, fullHeightFlyout: true, anchorEl: anchorEl, open: open, content: content }))] })));
66
+ } })] }, label) }))) }) }))] }, label), !fullHeightFlyout && children && children.length > 0 && (!isExpanded || !isDrawerOpen) && (_jsx(MobileNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, anchorEl: anchorEl, open: open, children: children, label: label })), fullHeightFlyout && content && (_jsx(MobileNavigationItemFlyoutMenu, { isDrawerOpen: isDrawerOpen, fullHeightFlyout: true, anchorEl: anchorEl, open: open, content: content }))] }));
90
67
  };
91
68
  export default MobileNavigationItem;