@learningpool/ui 1.15.5 → 1.16.1

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 (84) 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 +9 -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.js +3 -3
  77. package/lang/en-us.js +1 -1
  78. package/package.json +7 -2
  79. package/utils/constants.d.ts +7 -0
  80. package/utils/constants.js +11 -4
  81. package/utils/dataAttributes.js +1 -1
  82. package/utils/helpers.js +33 -40
  83. package/utils/hooks.js +10 -11
  84. package/utils/theme.js +26 -19
@@ -1,57 +1,251 @@
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
  /* eslint-disable indent */
6
2
  import Drawer from '@mui/material/Drawer';
7
3
  import { Box, IconButton } from '../../../index';
8
4
  import { styled } from '@mui/material/styles';
9
5
  import { animated } from '@react-spring/web';
10
6
  import { getNavigationBackground, getNavigationContrastText, getOffsetNavigationBackground } from '../helpers';
11
- export var DRAWER_WIDTH = {
7
+ export const DRAWER_WIDTH = {
12
8
  Collapsed: 60,
13
9
  Expanded: 300
14
10
  };
15
- var ICON = {
11
+ const ICON = {
16
12
  Height: 40,
17
13
  Width: 57
18
14
  };
19
- export var NOTCH = {
15
+ export const NOTCH = {
20
16
  Width: 25
21
17
  };
22
- export var DrawerHeader = styled(animated.div, {
23
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
24
- })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n justify-content: flex-start;\n overflow: hidden;\n min-height: 56px !important;\n padding: ", " 10px 0;\n transition: ", " 250ms;\n width: ", ";\n\n @media (min-width: ", ") {\n min-height: 64px !important;\n width: ", ";\n }\n\n .MuiListItemIcon-root {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root {\n align-items: center !important;\n color: ", ";\n display: flex;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-dransform: none;\n transition: max-height ", "ms ", ";\n padding: 0;\n width: 100%;\n\n [theme.breakpoints.up('sm')] {\n max-height: ", ";\n }\n }\n\n .MuiListItemText-root .MuiTypography-root {\n white-space: normal;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n justify-content: flex-start;\n overflow: hidden;\n min-height: 56px !important;\n padding: ", " 10px 0;\n transition: ", " 250ms;\n width: ", ";\n\n @media (min-width: ", ") {\n min-height: 64px !important;\n width: ", ";\n }\n\n .MuiListItemIcon-root {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root {\n align-items: center !important;\n color: ", ";\n display: flex;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-dransform: none;\n transition: max-height ", "ms ", ";\n padding: 0;\n width: 100%;\n\n [theme.breakpoints.up('sm')] {\n max-height: ", ";\n }\n }\n\n .MuiListItemText-root .MuiTypography-root {\n white-space: normal;\n }\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return props.theme.spacing(1); }, function (props) { return props.isDrawerOpen
25
- ? "width ".concat(props.theme.transitions.duration.enteringScreen, "ms ").concat(props.theme.transitions.easing.easeOut, " 0")
26
- : "width ".concat(props.theme.transitions.duration.leavingScreen, "ms ").concat(props.theme.transitions.easing.easeIn); }, function (props) { return props.isDrawerOpen
18
+ export const DrawerHeader = styled(animated.div, {
19
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
20
+ }) `
21
+ align-items: center;
22
+ background-color: ${props => getNavigationBackground(props.theme)};
23
+ display: flex;
24
+ flex: 1 auto;
25
+ justify-content: flex-start;
26
+ overflow: hidden;
27
+ min-height: 56px !important;
28
+ padding: ${(props) => props.theme.spacing(1)} 10px 0;
29
+ transition: ${(props) => props.isDrawerOpen
30
+ ? `width ${props.theme.transitions.duration.enteringScreen}ms ${props.theme.transitions.easing.easeOut} 0`
31
+ : `width ${props.theme.transitions.duration.leavingScreen}ms ${props.theme.transitions.easing.easeIn}`} 250ms;
32
+ width: ${(props) => props.isDrawerOpen
27
33
  ? DRAWER_WIDTH.Expanded
28
- : "calc(".concat(props.theme.spacing(7), " + 1px)"); }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.isDrawerOpen ? DRAWER_WIDTH.Expanded : "calc(".concat(props.theme.spacing(8), " + 1px)"); }, function (props) { return props.theme.spacing(0.5); }, function (props) { return getNavigationContrastText(props.theme); }, ICON.Height + 8, function (props) { return props.isDrawerOpen ? '200px' : "".concat(ICON.Height + 8, "px"); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.isDrawerOpen ? '200px' : "".concat(ICON.Height + 8, "px"); });
29
- export var DrawerToggle = styled(IconButton, {
30
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
31
- })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n left: ", ";\n right: ", ";\n transform: translate(0, calc(50% - 4.5px)) rotate(", ");\n transition: all ", "ms ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"], ["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n left: ", ";\n right: ", ";\n transform: translate(0, calc(50% - 4.5px)) rotate(", ");\n transition: all ", "ms ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"])), function (props) { return props.theme.spacing(2); }, function (props) { return props.theme.direction === 'ltr' ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 22, "px !important") : '35px !important' : 'auto !important'; }, function (props) { return props.theme.direction === 'rtl' ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 22, "px !important") : '35px !important' : 'auto !important'; }, function (props) { return props.theme.direction === 'rtl' ? '180deg' : 0; }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.spacing(2.5); });
32
- export var DrawerToggleHitboxContent = styled('span')(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return props.theme.spacing(0.5); });
33
- export var StyledAside = styled('aside')(templateObject_4 || (templateObject_4 = __makeTemplateObject([""], [""])));
34
- export var StyledNav = styled('nav')(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: background-color ", "ms ", ";\n }\n\n * &:hover {\n scrollbar-color: ", ";\n }\n\n // Webkit and fall back scrollbars\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 55px;\n transition: background-color ", "ms ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n"], ["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: background-color ", "ms ", ";\n }\n\n * &:hover {\n scrollbar-color: ", ";\n }\n\n // Webkit and fall back scrollbars\n ::-webkit-scrollbar {\n width: 8px;\n }\n\n ::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 55px;\n transition: background-color ", "ms ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.2); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return getOffsetNavigationBackground(props.theme, 0.3); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.2); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return getOffsetNavigationBackground(props.theme, 0.3); });
35
- export var StyledNavSecondary = styled('nav')(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-end;\n margin-top: auto;\n overflow: hidden;\n"], ["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-end;\n margin-top: auto;\n overflow: hidden;\n"])), function (props) { return getNavigationBackground(props.theme); });
36
- export var StyledDivider = styled('div', {
37
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
38
- })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n\n :before {\n background-color: ", ";\n border-radius: 55px;\n content: \"\";\n display: block;\n height: 2px;\n margin: auto;\n transition: all ", "ms ", ";\n width: 66%;\n }\n"], ["\n background-color: ", ";\n\n :before {\n background-color: ", ";\n border-radius: 55px;\n content: \"\";\n display: block;\n height: 2px;\n margin: auto;\n transition: all ", "ms ", ";\n width: 66%;\n }\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return getOffsetNavigationBackground(props.theme, 0.05); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; });
39
- export var DrawerShadow = styled(Box, {
40
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
41
- })(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background: rgba(0, 0, 0, 0.125);\n content: \"\";\n display: block;\n filter: blur(13px);\n height: 100%;\n left: ", ";\n right: ", ";\n position: fixed;\n top: 0;\n transition-duration: ", "ms;\n transition-property: left right;\n transition-timing-function: ", ";\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\n right: ", ";\n }\n"], ["\n background: rgba(0, 0, 0, 0.125);\n content: \"\";\n display: block;\n filter: blur(13px);\n height: 100%;\n left: ", ";\n right: ", ";\n position: fixed;\n top: 0;\n transition-duration: ", "ms;\n transition-property: left right;\n transition-timing-function: ", ";\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\n right: ", ";\n }\n"])), function (props) { return props.theme.direction === 'ltr'
42
- ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 38, "px") : "".concat(DRAWER_WIDTH.Collapsed - 41, "px")
43
- : 0; }, function (props) { return props.theme.direction === 'rtl'
44
- ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 38, "px") : "".concat(DRAWER_WIDTH.Collapsed - 41, "px")
45
- : 0; }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.direction === 'ltr'
46
- ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 38, "px") : "".concat(DRAWER_WIDTH.Collapsed - 33, "px")
47
- : 0; }, function (props) { return props.theme.direction === 'rtl'
48
- ? props.isDrawerOpen ? "".concat(DRAWER_WIDTH.Expanded - 38, "px") : "".concat(DRAWER_WIDTH.Collapsed - 33, "px")
49
- : 0; });
50
- export var NotchContainer = styled(Box)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -3px;\n position: relative;\n transition: width ", "ms ", ";\n width: 100%;\n z-index: 9;\n"], ["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -3px;\n position: relative;\n transition: width ", "ms ", ";\n width: 100%;\n z-index: 9;\n"])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; });
51
- export var NotchBackground = styled(Box)(templateObject_10 || (templateObject_10 = __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); });
52
- export var NotchBackgroundClip = styled(Box)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n transform: rotate(", ");\n width: 45px;\n"], ["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n transform: rotate(", ");\n width: 45px;\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return (props.theme.direction === 'rtl' ? '180deg' : 0); });
53
- export var NotchSeemMask = styled(Box)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background-color: ", ";\n height: 90px;\n position: absolute;\n left: ", ";\n right: ", ";\n top: -2px;\n width: calc(100% - ", "px);\n"], ["\n background-color: ", ";\n height: 90px;\n position: absolute;\n left: ", ";\n right: ", ";\n top: -2px;\n width: calc(100% - ", "px);\n"])), function (props) { return getNavigationBackground(props.theme); }, function (props) { return props.theme.direction === 'rtl' ? "".concat(NOTCH.Width, "px") : 'auto'; }, function (props) { return props.theme.direction === 'ltr' ? "".concat(NOTCH.Width, "px") : 'auto'; }, NOTCH.Width);
54
- export var StyledDrawer = styled(Drawer, {
55
- shouldForwardProp: function (prop) { return prop !== 'open'; }
56
- })(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width ", "ms ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n left: ", ";\n right: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width ", "ms ", ";\n visibility: visible !important;\n width: ", ";\n }\n\n .MuiTypography-root {\n color: inherit;\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width ", "ms ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n left: ", ";\n right: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width ", "ms ", ";\n visibility: visible !important;\n width: ", ";\n }\n\n .MuiTypography-root {\n color: inherit;\n }\n"])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return getNavigationContrastText(props.theme); }, function (props) { return (props.theme.direction === 'ltr' ? 0 : 'auto'); }, function (props) { return (props.theme.direction === 'rtl' ? 0 : 'auto'); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
57
- 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;
34
+ : `calc(${props.theme.spacing(7)} + 1px)`};
35
+
36
+ @media (min-width: ${(props) => props.theme.breakpoints.values.sm}) {
37
+ min-height: 64px !important;
38
+ width: ${(props) => props.isDrawerOpen ? DRAWER_WIDTH.Expanded : `calc(${props.theme.spacing(8)} + 1px)`};
39
+ }
40
+
41
+ .MuiListItemIcon-root {
42
+ margin: ${(props) => props.theme.spacing(0.5)} 0 0;
43
+ }
44
+
45
+ .MuiListItemText-root {
46
+ align-items: center !important;
47
+ color: ${props => getNavigationContrastText(props.theme)};
48
+ display: flex;
49
+ min-height: ${ICON.Height + 8}px;
50
+ max-height: ${(props) => props.isDrawerOpen ? '200px' : `${ICON.Height + 8}px`};
51
+ text-decoration: none;
52
+ text-dransform: none;
53
+ transition: max-height ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
54
+ padding: 0;
55
+ width: 100%;
56
+
57
+ [theme.breakpoints.up('sm')] {
58
+ max-height: ${(props) => props.isDrawerOpen ? '200px' : `${ICON.Height + 8}px`};
59
+ }
60
+ }
61
+
62
+ .MuiListItemText-root .MuiTypography-root {
63
+ white-space: normal;
64
+ }
65
+ `;
66
+ export const DrawerToggle = styled(IconButton, {
67
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
68
+ }) `
69
+ background: transparent;
70
+ height: 44px;
71
+ padding: 0 ${(props) => props.theme.spacing(2)} !important;
72
+ position: absolute;
73
+ left: ${props => props.theme.direction === 'ltr' ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 22}px !important` : '35px !important' : 'auto !important'};
74
+ right: ${props => props.theme.direction === 'rtl' ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 22}px !important` : '35px !important' : 'auto !important'};
75
+ transform: translate(0, calc(50% - 4.5px)) rotate(${props => props.theme.direction === 'rtl' ? '180deg' : 0});
76
+ transition: all ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
77
+ width: 44px;
78
+ z-index: 10;
79
+
80
+ @media (min-width: ${(props) => props.theme.breakpoints.values.sm}) {
81
+ padding: 0 ${(props) => props.theme.spacing(2.5)} !important;
82
+ }
83
+ `;
84
+ export const DrawerToggleHitboxContent = styled('span') `
85
+ background-color: ${props => getNavigationBackground(props.theme)};
86
+ border-radius: 50%;
87
+ box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);
88
+ box-sizing: content-box;
89
+ height: 1.75rem;
90
+ padding: ${(props) => props.theme.spacing(0.5)};
91
+ width: 1.75rem;
92
+ `;
93
+ export const StyledAside = styled('aside') ``;
94
+ export const StyledNav = styled('nav') `
95
+ background-color: ${props => getNavigationBackground(props.theme)};
96
+ display: flex;
97
+ flex: 1 auto;
98
+ flex-direction: column;
99
+ justify-content: flex-start;
100
+ overflow-x: hidden;
101
+ overflow-y: auto;
102
+
103
+ // Firefox and future scrollbars
104
+ * & {
105
+ scrollbar-width: thin;
106
+ scrollbar-color: ${props => getOffsetNavigationBackground(props.theme, 0.2)};
107
+ transition: background-color ${props => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
108
+ }
109
+
110
+ * &:hover {
111
+ scrollbar-color: ${props => getOffsetNavigationBackground(props.theme, 0.3)};
112
+ }
113
+
114
+ // Webkit and fall back scrollbars
115
+ ::-webkit-scrollbar {
116
+ width: 8px;
117
+ }
118
+
119
+ ::-webkit-scrollbar-track {
120
+ background-color: transparent;
121
+ }
122
+
123
+ ::-webkit-scrollbar-thumb {
124
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.2)};
125
+ border-radius: 55px;
126
+ transition: background-color ${props => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
127
+ }
128
+
129
+ ::-webkit-scrollbar-thumb:hover {
130
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.3)};
131
+ }
132
+ `;
133
+ export const StyledNavSecondary = styled('nav') `
134
+ background-color: ${props => getNavigationBackground(props.theme)};
135
+ display: flex;
136
+ flex: 1 auto;
137
+ flex-direction: column;
138
+ justify-content: flex-end;
139
+ margin-top: auto;
140
+ overflow: hidden;
141
+ `;
142
+ export const StyledDivider = styled('div', {
143
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
144
+ }) `
145
+ background-color: ${props => getNavigationBackground(props.theme)};
146
+
147
+ :before {
148
+ background-color: ${props => getOffsetNavigationBackground(props.theme, 0.05)};
149
+ border-radius: 55px;
150
+ content: "";
151
+ display: block;
152
+ height: 2px;
153
+ margin: auto;
154
+ transition: all ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
155
+ width: 66%;
156
+ }
157
+ `;
158
+ export const DrawerShadow = styled(Box, {
159
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
160
+ }) `
161
+ background: rgba(0, 0, 0, 0.125);
162
+ content: "";
163
+ display: block;
164
+ filter: blur(13px);
165
+ height: 100%;
166
+ left: ${(props) => props.theme.direction === 'ltr'
167
+ ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 38}px` : `${DRAWER_WIDTH.Collapsed - 41}px`
168
+ : 0};
169
+ right: ${(props) => props.theme.direction === 'rtl'
170
+ ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 38}px` : `${DRAWER_WIDTH.Collapsed - 41}px`
171
+ : 0};
172
+ position: fixed;
173
+ top: 0;
174
+ transition-duration: ${(props) => props.theme.transitions.duration.enteringScreen}ms;
175
+ transition-property: left right;
176
+ transition-timing-function: ${(props) => props.theme.transitions.easing.easeOut};
177
+ visibility: visible;
178
+ width: 40px;
179
+
180
+ @media (min-width: ${(props) => props.theme.breakpoints.values.sm}) {
181
+ left: ${(props) => props.theme.direction === 'ltr'
182
+ ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 38}px` : `${DRAWER_WIDTH.Collapsed - 33}px`
183
+ : 0};
184
+ right: ${(props) => props.theme.direction === 'rtl'
185
+ ? props.isDrawerOpen ? `${DRAWER_WIDTH.Expanded - 38}px` : `${DRAWER_WIDTH.Collapsed - 33}px`
186
+ : 0};
187
+ }
188
+ `;
189
+ export const NotchContainer = styled(Box) `
190
+ display: flex;
191
+ justify-content: flex-end;
192
+ height: auto;
193
+ margin-top: -3px;
194
+ position: relative;
195
+ transition: width ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
196
+ width: 100%;
197
+ z-index: 9;
198
+ `;
199
+ export const NotchBackground = styled(Box) `
200
+ background-color: ${props => getNavigationBackground(props.theme)};
201
+ flex: 1;
202
+ height: auto;
203
+ width: auto;
204
+ `;
205
+ export const NotchBackgroundClip = styled(Box) `
206
+ background-color: ${props => getNavigationBackground(props.theme)};
207
+ clip-path: url("#notch");
208
+ display: flex;
209
+ height: 85px;
210
+ transform: rotate(${(props) => (props.theme.direction === 'rtl' ? '180deg' : 0)});
211
+ width: 45px;
212
+ `;
213
+ export const NotchSeemMask = styled(Box) `
214
+ background-color: ${props => getNavigationBackground(props.theme)};
215
+ height: 90px;
216
+ position: absolute;
217
+ left: ${(props) => props.theme.direction === 'rtl' ? `${NOTCH.Width}px` : 'auto'};
218
+ right: ${(props) => props.theme.direction === 'ltr' ? `${NOTCH.Width}px` : 'auto'};
219
+ top: -2px;
220
+ width: calc(100% - ${NOTCH.Width}px);
221
+ `;
222
+ export const StyledDrawer = styled(Drawer, {
223
+ shouldForwardProp: (prop) => prop !== 'open'
224
+ }) `
225
+ box-shadow: none;
226
+ box-sizing: border-box;
227
+ flexshrink: 0;
228
+ overflow-x: visible;
229
+ transition: width ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
230
+ white-space: nowrap;
231
+ width: ${(props) => !props.open ? `calc(${props.theme.spacing(7)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
232
+
233
+ .MuiDrawer-paper {
234
+ background: transparent none;
235
+ border: 0;
236
+ box-shadow: none;
237
+ color: ${props => getNavigationContrastText(props.theme)};
238
+ left: ${(props) => (props.theme.direction === 'ltr' ? 0 : 'auto')};
239
+ right: ${(props) => (props.theme.direction === 'rtl' ? 0 : 'auto')};
240
+ overflow: visible !important;
241
+ overflow-x: visible;
242
+ transform: translateX(0) !important;
243
+ transition: width ${(props) => props.theme.transitions.duration.enteringScreen}ms ${(props) => props.theme.transitions.easing.easeOut};
244
+ visibility: visible !important;
245
+ width: ${(props) => !props.open ? `calc(${props.theme.spacing(7)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
246
+ }
247
+
248
+ .MuiTypography-root {
249
+ color: inherit;
250
+ }
251
+ `;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Return the background color for the navigation
4
3
  * @returns string
@@ -23,7 +22,7 @@ export declare const getOffsetNavigationBackground: (theme: any, colorAdjustAmou
23
22
  export declare const getOffsetNavigationContrastText: (theme: any, colorAdjustAmount?: number) => any;
24
23
  export declare const getDefaultSupportLinks: (messages: Record<string, string>) => {
25
24
  label: string;
26
- icon: JSX.Element;
25
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
27
26
  onClick: () => null;
28
27
  children: {
29
28
  label: string;
@@ -1,79 +1,75 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
2
2
  import { darken, lighten, getLuminance } from 'polished';
3
3
  import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
4
- var DEFAULT_COLOR_ADJUST_AMOUNT = 0.1;
4
+ const DEFAULT_COLOR_ADJUST_AMOUNT = 0.1;
5
5
  // Luminance threshold for determining if we should lighten or darken the color
6
6
  // .033 is the luminance value of #333333
7
- var LUMINANCE_THRESHOLD = 0.033;
7
+ const LUMINANCE_THRESHOLD = 0.033;
8
8
  /**
9
9
  * Return the background color for the navigation
10
10
  * @returns string
11
11
  */
12
- export var getNavigationBackground = function (theme) {
13
- var _a, _b;
14
- return (_b = (_a = theme.palette.navigation) === null || _a === void 0 ? void 0 : _a.background) !== null && _b !== void 0 ? _b : theme.palette.background.paper;
12
+ export const getNavigationBackground = (theme) => {
13
+ return theme.palette.navigation?.background ?? theme.palette.background.paper;
15
14
  };
16
15
  /**
17
16
  * Returns the contrast color for the navigation
18
17
  * @returns string
19
18
  */
20
- export var getNavigationContrastText = function (theme) {
21
- var _a, _b, _c, _d, _e;
22
- var palette = theme.palette;
19
+ export const getNavigationContrastText = (theme) => {
20
+ const palette = theme.palette;
23
21
  // Use background property if navigation properties arent set
24
- if (!((_a = palette.navigation) === null || _a === void 0 ? void 0 : _a.contrastText) && !((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background)) {
22
+ if (!palette.navigation?.contrastText && !palette.navigation?.background) {
25
23
  return palette.getContrastText(palette.background.paper);
26
24
  }
27
- return (_d = (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.contrastText) !== null && _d !== void 0 ? _d : palette.getContrastText((_e = palette.navigation) === null || _e === void 0 ? void 0 : _e.background);
25
+ return palette.navigation?.contrastText ?? palette.getContrastText(palette.navigation?.background);
28
26
  };
29
27
  /**
30
28
  * Return a darkened or lightened background color for the navigation
31
29
  * @param [colorAdjustAmount] number - Amount to lighten or darken the color
32
30
  * @returns string
33
31
  */
34
- export var getOffsetNavigationBackground = function (theme, colorAdjustAmount) {
35
- var _a, _b, _c, _d;
36
- var palette = theme.palette;
37
- var adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
32
+ export const getOffsetNavigationBackground = (theme, colorAdjustAmount) => {
33
+ const palette = theme.palette;
34
+ const adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
38
35
  // Use background property if navigation property isnt set
39
- if (!((_a = palette.navigation) === null || _a === void 0 ? void 0 : _a.background)) {
36
+ if (!palette.navigation?.background) {
40
37
  return getLuminance(palette.background.paper) < LUMINANCE_THRESHOLD
41
38
  ? lighten(adjustAmount, palette.background.paper)
42
39
  : darken(adjustAmount, palette.background.paper);
43
40
  }
44
- return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) < LUMINANCE_THRESHOLD
45
- ? lighten(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background)
46
- : darken(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background);
41
+ return getLuminance(palette.navigation?.background) < LUMINANCE_THRESHOLD
42
+ ? lighten(adjustAmount, palette.navigation?.background)
43
+ : darken(adjustAmount, palette.navigation?.background);
47
44
  };
48
45
  /**
49
46
  * Return a darkened or lightened contrast color for the navigation
50
47
  * @param [colorAdjustAmount] number - Amount to lighten or darken the color
51
48
  * @returns string
52
49
  */
53
- export var getOffsetNavigationContrastText = function (theme, colorAdjustAmount) {
54
- var _a, _b, _c, _d;
55
- var palette = theme.palette;
56
- var adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
50
+ export const getOffsetNavigationContrastText = (theme, colorAdjustAmount) => {
51
+ const palette = theme.palette;
52
+ const adjustAmount = colorAdjustAmount || DEFAULT_COLOR_ADJUST_AMOUNT;
57
53
  // Use background property if navigation property isnt set
58
- if (!((_a = palette.navigation) === null || _a === void 0 ? void 0 : _a.background)) {
54
+ if (!palette.navigation?.background) {
59
55
  return getLuminance(palette.background.paper) < LUMINANCE_THRESHOLD
60
56
  ? palette.getContrastText(lighten(adjustAmount, palette.background.paper))
61
57
  : palette.getContrastText(darken(adjustAmount, palette.background.paper));
62
58
  }
63
- return getLuminance((_b = palette.navigation) === null || _b === void 0 ? void 0 : _b.background) < LUMINANCE_THRESHOLD
64
- ? palette.getContrastText(lighten(adjustAmount, (_c = palette.navigation) === null || _c === void 0 ? void 0 : _c.background))
65
- : palette.getContrastText(darken(adjustAmount, (_d = palette.navigation) === null || _d === void 0 ? void 0 : _d.background));
59
+ return getLuminance(palette.navigation?.background) < LUMINANCE_THRESHOLD
60
+ ? palette.getContrastText(lighten(adjustAmount, palette.navigation?.background))
61
+ : palette.getContrastText(darken(adjustAmount, palette.navigation?.background));
66
62
  };
67
- export var getDefaultSupportLinks = function (messages) {
63
+ export const getDefaultSupportLinks = (messages) => {
68
64
  return [
69
65
  {
70
66
  label: messages.support,
71
67
  icon: _jsx(HelpOutlineIcon, {}),
72
- onClick: function () { return null; },
68
+ onClick: () => null,
73
69
  children: [
74
- { label: messages['help-center'], onClick: function () { return window.open('https://learningpool.zendesk.com/', '_blank'); } },
75
- { label: messages['submit-feedback'], onClick: function () { return window.open('https://learningpool.com/feature-request/', '_blank'); } },
76
- { label: messages['contact-us'], onClick: function () { return window.open('https://learningpool.com/support/', '_blank'); } }
70
+ { label: messages['help-center'], onClick: () => window.open('https://learningpool.zendesk.com/', '_blank') },
71
+ { label: messages['submit-feedback'], onClick: () => window.open('https://learningpool.com/feature-request/', '_blank') },
72
+ { label: messages['contact-us'], onClick: () => window.open('https://learningpool.com/support/', '_blank') }
77
73
  ]
78
74
  }
79
75
  ];
@@ -1,27 +1,16 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
13
2
  import { LearningPoolLogo } from '../../../assets/Images';
14
3
  import CssBaseline from '@mui/material/CssBaseline';
15
4
  import Typography from '@mui/material/Typography';
16
5
  import { createTheme, ThemeProvider } from '@mui/material/styles';
17
6
  import { StyledContainer, StyledBox, StyledLogoBox } from './ErrorPageStyles';
18
7
  export default function ErrorPage(props) {
19
- var errorCode = props.errorCode, errorTitle = props.errorTitle, errorMessage = props.errorMessage;
20
- var theme = createTheme();
21
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(StyledContainer, __assign({ component: 'main' }, { children: [_jsx(CssBaseline, {}), _jsxs(StyledBox, { children: [_jsxs(Typography, __assign({ component: 'h1', variant: 'h4', sx: {
8
+ const { errorCode, errorTitle, errorMessage } = props;
9
+ const theme = createTheme();
10
+ return (_jsx(ThemeProvider, { theme: theme, children: _jsxs(StyledContainer, { component: 'main', children: [_jsx(CssBaseline, {}), _jsxs(StyledBox, { children: [_jsxs(Typography, { component: 'h1', variant: 'h4', sx: {
22
11
  mb: 2
23
- } }, { children: [errorCode ? (_jsxs("span", { children: [errorCode, " | "] })) : '', _jsx("span", { children: errorTitle })] })), _jsx(Typography, __assign({ variant: 'body1', sx: {
12
+ }, children: [errorCode ? (_jsxs("span", { children: [errorCode, " | "] })) : '', _jsx("span", { children: errorTitle })] }), _jsx(Typography, { variant: 'body1', sx: {
24
13
  color: 'text.secondary',
25
14
  mb: 3
26
- } }, { children: errorMessage }))] }), _jsx(StyledLogoBox, { children: _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '200px', height: '45px' } }) })] })) })));
15
+ }, children: errorMessage })] }), _jsx(StyledLogoBox, { children: _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '200px', height: '45px' } }) })] }) }));
27
16
  }
@@ -1,13 +1,13 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import Container from '@mui/material/Container';
3
3
  import { styled } from '@mui/material/styles';
4
- export var StyledContainer = styled(Container)(function () { return ({
4
+ export const StyledContainer = styled(Container)(() => ({
5
5
  display: 'flex',
6
6
  flexDirection: 'column',
7
7
  height: '100vh',
8
8
  textAlign: 'center'
9
- }); });
10
- export var StyledBox = styled(Box)(function () { return ({
9
+ }));
10
+ export const StyledBox = styled(Box)(() => ({
11
11
  alignItems: 'center',
12
12
  display: 'flex',
13
13
  flex: '1',
@@ -15,18 +15,13 @@ export var StyledBox = styled(Box)(function () { return ({
15
15
  height: '100%',
16
16
  justifyContent: 'center',
17
17
  overflow: 'hidden'
18
- }); });
19
- export var StyledLogoBox = styled(Box)(function (_a) {
20
- var _b;
21
- var theme = _a.theme;
22
- return (_b = {
23
- alignSelf: 'center',
24
- marginRight: 0,
25
- marginBottom: theme.spacing(5)
26
- },
27
- _b[theme.breakpoints.up('md')] = {
28
- alignSelf: 'flex-end',
29
- marginRight: theme.spacing(5)
30
- },
31
- _b);
32
- });
18
+ }));
19
+ export const StyledLogoBox = styled(Box)(({ theme }) => ({
20
+ alignSelf: 'center',
21
+ marginRight: 0,
22
+ marginBottom: theme.spacing(5),
23
+ [theme.breakpoints.up('md')]: {
24
+ alignSelf: 'flex-end',
25
+ marginRight: theme.spacing(5)
26
+ }
27
+ }));
@@ -1,15 +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
- 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";
13
2
  import { Button } from '../../../index';
14
3
  import CssBaseline from '@mui/material/CssBaseline';
15
4
  import Paper from '@mui/material/Paper';
@@ -22,18 +11,18 @@ import { SideInSideStyles } from './SideInSideStyles';
22
11
  import { LearningPoolLogo, StreamSuiteLogo } from '../../../assets/Images';
23
12
  import Link from '@mui/material/Link';
24
13
  function Copyright(props) {
25
- return (_jsxs(Typography, __assign({ variant: "body2", color: "text.secondary", align: "center" }, props, { children: ['Copyright © ', _jsx(Link, __assign({ color: "inherit", href: "https://learningpool.com/" }, { children: "Learning Pool" })), ' ', new Date().getFullYear(), '.'] })));
14
+ return (_jsxs(Typography, { variant: "body2", color: "text.secondary", align: "center", ...props, children: ['Copyright © ', _jsx(Link, { color: "inherit", href: "https://learningpool.com/", children: "Learning Pool" }), ' ', new Date().getFullYear(), '.'] }));
26
15
  }
27
- var theme = createTheme();
16
+ const theme = createTheme();
28
17
  export default function SideInSide(props) {
29
- var classes = SideInSideStyles(props).classes;
30
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(Grid, __assign({ container: true, component: "main", className: classes.root, style: props === null || props === void 0 ? void 0 : props.style }, { children: [_jsx(CssBaseline, {}), _jsx(Grid, __assign({ item: true, xs: false, sm: false, md: 6, lg: 7, xl: 8, className: classes.pageBackgroundContainer }, { children: _jsx(Box, __assign({ className: classes.pageBackgroundLogoContainer }, { children: (props === null || props === void 0 ? void 0 : props.pageBackgroundLogo)
31
- ? (_jsx("img", { src: "".concat(String(props.pageBackgroundLogo)), alt: "".concat(String(props.pageBackgroundLogoAlt)), className: classes.pageBackgroundLogo }))
32
- : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '200px', width: '200px' } }) })) })), _jsx(Grid, __assign({ item: true, xs: 12, sm: 12, md: 6, lg: 5, xl: 4, component: Paper, elevation: 6, square: true }, { children: _jsxs(Box, __assign({ className: classes.contentPanel }, { children: [_jsx(Box, __assign({ className: classes.contentPanelImageContainer }, { children: (props === null || props === void 0 ? void 0 : props.formLogo)
33
- ? (_jsx("img", { src: "".concat(String(props.formLogo)), alt: "".concat(String(props.formLogoAlt)), className: classes.contentPanelImage }))
34
- : _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '250px', height: '60px' } }) })), _jsx(Typography, __assign({ component: "h1", variant: "h6" }, { children: props.welcomeMessage })), (props === null || props === void 0 ? void 0 : props.children) ? props.children : null, (props === null || props === void 0 ? void 0 : props.isStreamHomeEnabled)
35
- ? (_jsxs(_Fragment, { children: [_jsx(Divider, __assign({ sx: { mt: 1 } }, { children: "Or" })), _jsx(Button, __assign({ type: "submit", onClick: props === null || props === void 0 ? void 0 : props.handleStreamHomeLogin, fullWidth: true, className: classes.streamHomeButton, startIcon: (props === null || props === void 0 ? void 0 : props.startIcon)
18
+ const classes = SideInSideStyles(props).classes;
19
+ return (_jsx(ThemeProvider, { theme: theme, children: _jsxs(Grid, { container: true, component: "main", className: classes.root, style: props?.style, children: [_jsx(CssBaseline, {}), _jsx(Grid, { item: true, xs: false, sm: false, md: 6, lg: 7, xl: 8, className: classes.pageBackgroundContainer, children: _jsx(Box, { className: classes.pageBackgroundLogoContainer, children: props?.pageBackgroundLogo
20
+ ? (_jsx("img", { src: `${String(props.pageBackgroundLogo)}`, alt: `${String(props.pageBackgroundLogoAlt)}`, className: classes.pageBackgroundLogo }))
21
+ : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '200px', width: '200px' } }) }) }), _jsx(Grid, { item: true, xs: 12, sm: 12, md: 6, lg: 5, xl: 4, component: Paper, elevation: 6, square: true, children: _jsxs(Box, { className: classes.contentPanel, children: [_jsx(Box, { className: classes.contentPanelImageContainer, children: props?.formLogo
22
+ ? (_jsx("img", { src: `${String(props.formLogo)}`, alt: `${String(props.formLogoAlt)}`, className: classes.contentPanelImage }))
23
+ : _jsx(LearningPoolLogo, { inheritViewBox: true, style: { width: '250px', height: '60px' } }) }), _jsx(Typography, { component: "h1", variant: "h6", children: props.welcomeMessage }), props?.children ? props.children : null, props?.isStreamHomeEnabled
24
+ ? (_jsxs(_Fragment, { children: [_jsx(Divider, { sx: { mt: 1 }, children: "Or" }), _jsx(Button, { type: "submit", onClick: props?.handleStreamHomeLogin, fullWidth: true, className: classes.streamHomeButton, startIcon: props?.startIcon
36
25
  ? props.startIcon
37
- : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '25px', width: '25px' } }) }, { children: "Log in with Stream Home" }))] }))
38
- : null, _jsx(Box, __assign({ className: classes.footerContent }, { children: (props === null || props === void 0 ? void 0 : props.footerContent) ? props.footerContent : _jsx(Copyright, {}) }))] })) }))] })) })));
26
+ : _jsx(StreamSuiteLogo, { style: { fill: '#fff', height: '25px', width: '25px' } }), children: "Log in with Stream Home" })] }))
27
+ : null, _jsx(Box, { className: classes.footerContent, children: props?.footerContent ? props.footerContent : _jsx(Copyright, {}) })] }) })] }) }));
39
28
  }
@@ -1,12 +1,12 @@
1
1
  import { makeStyles } from 'tss-react/mui';
2
- export var SideInSideStyles = makeStyles()(function (theme, props) { return ({
2
+ export const SideInSideStyles = makeStyles()((theme, props) => ({
3
3
  root: {
4
4
  height: '100vh',
5
5
  width: '100%'
6
6
  },
7
7
  pageBackgroundContainer: {
8
- backgroundImage: (props === null || props === void 0 ? void 0 : props.pageBackgroundImage)
9
- ? "url(".concat(String(props.pageBackgroundImage), ")")
8
+ backgroundImage: props?.pageBackgroundImage
9
+ ? `url(${String(props.pageBackgroundImage)})`
10
10
  : 'url(https://source.unsplash.com/YWIOwHvRBvU)',
11
11
  backgroundRepeat: 'no-repeat',
12
12
  backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[50] : theme.palette.grey[900],
@@ -50,11 +50,11 @@ export var SideInSideStyles = makeStyles()(function (theme, props) { return ({
50
50
  marginTop: theme.spacing(3)
51
51
  },
52
52
  streamHomeButton: {
53
- marginBottom: "".concat(theme.spacing(5), " !important"),
54
- marginTop: "".concat(theme.spacing(3), " !important")
53
+ marginBottom: `${theme.spacing(5)} !important`,
54
+ marginTop: `${theme.spacing(3)} !important`
55
55
  },
56
56
  footerContent: {
57
57
  marginTop: 'auto',
58
58
  width: '100%'
59
59
  }
60
- }); });
60
+ }));