@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,77 +1,273 @@
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 Drawer from '@mui/material/Drawer';
6
2
  import { Box, IconButton, BottomNavigation, BottomNavigationAction, Paper, Avatar } from '../../../index';
7
3
  import { getNavigationBackground, getNavigationContrastText, getOffsetNavigationBackground, getOffsetNavigationContrastText } from '../helpers';
8
4
  import { styled } from '@mui/material/styles';
9
5
  import { motion } from '../../../utils/theme';
10
- export var DRAWER_WIDTH = {
6
+ export const DRAWER_WIDTH = {
11
7
  Collapsed: 60,
12
8
  Expanded: 300
13
9
  };
14
- export var StyledPaper = styled(Paper)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"], ["\n background-image: none;\n border-radius: 0;\n bottom: 0;\n left: 0;\n position: fixed;\n right: 0;\n z-index: ", ";\n"])), function (props) { return props.theme.zIndex.appBar; });
15
- export var StyledNotchSVG = styled('svg', {
16
- shouldForwardProp: function (prop) { return prop !== 'mobileNotchPosition'; }
17
- })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"], ["\n display: block;\n fill: ", ";\n height: 50px;\n left: 0;\n padding: 0;\n position: absolute;\n stroke: transparent;\n top: -29px;\n transform: rotate(270deg);\n width: 50px;\n z-index: -1;\n"])), function (props) { return getNavigationBackground(props.theme); });
18
- export var StyledBottomNavigation = styled(BottomNavigation)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n position: relative;\n"], ["\n background-color: ", ";\n position: relative;\n"])), function (props) { return getNavigationBackground(props.theme); });
19
- export var StyledBottomNavigationAction = styled(BottomNavigationAction)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"], ["\n color: ", ";\n flex: none;\n height: 56px;\n max-width: 168px;\n min-width: 80px;\n overflow: hidden;\n padding: 0;\n stroke: ", ";\n\n .MuiBottomNavigationAction-label {\n color: inherit;\n font-size: 0.65rem;\n\n // Handle long text string overflow\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%;\n\n &.Mui-selected {\n color: ", ";\n font-size: 0.75rem;\n }\n }\n\n .MuiSvgIcon-root {\n fill: ", ";\n }\n"])), function (props) { return getNavigationContrastText(props.theme); }, function (props) { return getNavigationContrastText(props.theme); }, function (props) {
20
- return props.theme.palette.mode === 'dark'
21
- ? props.theme.palette.primary.contrastText
22
- : props.theme.palette.getContrastText(props.theme.palette.background.paper);
23
- }, function (props) { return getNavigationBackground(props.theme); });
24
- export var DrawerHeader = styled('div', {
25
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
26
- })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n"], ["\n"])));
27
- export var DrawerToggle = styled(IconButton)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transform: translate(22px, calc(50% - 5.5px));\n transition: all 225ms ", " 0ms !important;\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 transform: translate(22px, calc(50% - 5.5px));\n transition: all 225ms ", " 0ms !important;\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); }, motion.easeInOut, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.spacing(2.5); });
28
- export var DrawerToggleHitboxContent = styled('span')(templateObject_7 || (templateObject_7 = __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 props.theme.palette.mode === 'dark'
10
+ export const StyledPaper = styled(Paper) `
11
+ background-image: none;
12
+ border-radius: 0;
13
+ bottom: 0;
14
+ left: 0;
15
+ position: fixed;
16
+ right: 0;
17
+ z-index: ${props => props.theme.zIndex.appBar};
18
+ `;
19
+ export const StyledNotchSVG = styled('svg', {
20
+ shouldForwardProp: (prop) => prop !== 'mobileNotchPosition'
21
+ }) `
22
+ display: block;
23
+ fill: ${props => getNavigationBackground(props.theme)};
24
+ height: 50px;
25
+ left: 0;
26
+ padding: 0;
27
+ position: absolute;
28
+ stroke: transparent;
29
+ top: -29px;
30
+ transform: rotate(270deg);
31
+ width: 50px;
32
+ z-index: -1;
33
+ `;
34
+ export const StyledBottomNavigation = styled(BottomNavigation) `
35
+ background-color: ${props => getNavigationBackground(props.theme)};
36
+ position: relative;
37
+ `;
38
+ export const StyledBottomNavigationAction = styled(BottomNavigationAction) `
39
+ color: ${props => getNavigationContrastText(props.theme)};
40
+ flex: none;
41
+ height: 56px;
42
+ max-width: 168px;
43
+ min-width: 80px;
44
+ overflow: hidden;
45
+ padding: 0;
46
+ stroke: ${props => getNavigationContrastText(props.theme)};
47
+
48
+ .MuiBottomNavigationAction-label {
49
+ color: inherit;
50
+ font-size: 0.65rem;
51
+
52
+ // Handle long text string overflow
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
55
+ white-space: nowrap;
56
+ width: 100%;
57
+
58
+ &.Mui-selected {
59
+ color: ${props => props.theme.palette.mode === 'dark'
60
+ ? props.theme.palette.primary.contrastText
61
+ : props.theme.palette.getContrastText(props.theme.palette.background.paper)};
62
+ font-size: 0.75rem;
63
+ }
64
+ }
65
+
66
+ .MuiSvgIcon-root {
67
+ fill: ${props => getNavigationBackground(props.theme)};
68
+ }
69
+ `;
70
+ export const DrawerHeader = styled('div', {
71
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
72
+ }) `
73
+ `;
74
+ export const DrawerToggle = styled(IconButton) `
75
+ background: transparent;
76
+ height: 44px;
77
+ padding: 0 ${props => props.theme.spacing(2)} !important;
78
+ position: absolute;
79
+ transform: translate(22px, calc(50% - 5.5px));
80
+ transition: all 225ms ${motion.easeInOut} 0ms !important;
81
+ width: 44px;
82
+ z-index: 10;
83
+
84
+ @media (min-width: ${props => props.theme.breakpoints.values.sm}) {
85
+ padding: 0 ${props => props.theme.spacing(2.5)} !important;
86
+ }
87
+ `;
88
+ export const DrawerToggleHitboxContent = styled('span') `
89
+ background-color: ${props => props.theme.palette.mode === 'dark'
29
90
  ? props.theme.palette.primary.main
30
- : props.theme.palette.background.paper; }, function (props) { return props.theme.spacing(0.5); });
31
- export var StyledAside = styled('aside')(templateObject_8 || (templateObject_8 = __makeTemplateObject([""], [""])));
32
- export var StyledNav = styled('nav')(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n flex-direction: column;\n justify-content: flex-start;\n margin-top: -1px;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: backgroundColor 225ms ", ";\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 225ms ", ";\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 margin-top: -1px;\n overflow-x: hidden;\n overflow-y: auto;\n\n // Firefox and future scrollbars\n * & {\n scrollbar-width: thin;\n scrollbar-color: ", ";\n transition: backgroundColor 225ms ", ";\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 225ms ", ";\n }\n\n ::-webkit-scrollbar-thumb:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
91
+ : props.theme.palette.background.paper};
92
+ border-radius: 50%;
93
+ box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);
94
+ box-sizing: content-box;
95
+ height: 1.75rem;
96
+ padding: ${props => props.theme.spacing(0.5)};
97
+ width: 1.75rem;
98
+ `;
99
+ export const StyledAside = styled('aside') ``;
100
+ export const StyledNav = styled('nav') `
101
+ background-color: ${props => props.theme.palette.mode === 'dark'
33
102
  ? props.theme.palette.primary.main
34
- : props.theme.palette.background.paper; }, function (props) {
35
- return props.theme.palette.mode === 'dark'
36
- ? 'rgba(255, 255, 255, 0.12) transparent'
37
- : 'rgba(0, 0, 0, 0.12) transparent';
38
- }, motion.easeIn, function (props) {
39
- return props.theme.palette.mode === 'dark'
40
- ? 'rgba(255, 255, 255, 0.24) transparent'
41
- : 'rgba(0, 0, 0, 0.24) transparent';
42
- }, function (props) {
43
- return props.theme.palette.mode === 'dark'
44
- ? 'rgba(255, 255, 255, 0.12)'
45
- : 'rgba(0, 0, 0, 0.12)';
46
- }, motion.easeIn, function (props) {
47
- return props.theme.palette.mode === 'dark'
48
- ? 'rgba(255, 255, 255, 0.24)'
49
- : 'rgba(0, 0, 0, 0.24)';
50
- });
51
- export var StyledNavSecondary = styled('nav')(templateObject_10 || (templateObject_10 = __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 props.theme.palette.mode === 'dark'
103
+ : props.theme.palette.background.paper};
104
+ display: flex;
105
+ flex: 1 auto;
106
+ flex-direction: column;
107
+ justify-content: flex-start;
108
+ margin-top: -1px;
109
+ overflow-x: hidden;
110
+ overflow-y: auto;
111
+
112
+ // Firefox and future scrollbars
113
+ * & {
114
+ scrollbar-width: thin;
115
+ scrollbar-color: ${props => props.theme.palette.mode === 'dark'
116
+ ? 'rgba(255, 255, 255, 0.12) transparent'
117
+ : 'rgba(0, 0, 0, 0.12) transparent'};
118
+ transition: backgroundColor 225ms ${motion.easeIn};
119
+ }
120
+
121
+ * &:hover {
122
+ scrollbar-color: ${props => props.theme.palette.mode === 'dark'
123
+ ? 'rgba(255, 255, 255, 0.24) transparent'
124
+ : 'rgba(0, 0, 0, 0.24) transparent'};
125
+ }
126
+
127
+ // Webkit and fall back scrollbars
128
+ ::-webkit-scrollbar {
129
+ width: 8px;
130
+ }
131
+
132
+ ::-webkit-scrollbar-track {
133
+ background-color: transparent;
134
+ }
135
+
136
+ ::-webkit-scrollbar-thumb {
137
+ background-color: ${props => props.theme.palette.mode === 'dark'
138
+ ? 'rgba(255, 255, 255, 0.12)'
139
+ : 'rgba(0, 0, 0, 0.12)'};
140
+ border-radius: 55px;
141
+ transition: background-color 225ms ${motion.easeIn};
142
+ }
143
+
144
+ ::-webkit-scrollbar-thumb:hover {
145
+ background-color: ${props => props.theme.palette.mode === 'dark'
146
+ ? 'rgba(255, 255, 255, 0.24)'
147
+ : 'rgba(0, 0, 0, 0.24)'};
148
+ }
149
+ `;
150
+ export const StyledNavSecondary = styled('nav') `
151
+ background-color: ${props => props.theme.palette.mode === 'dark'
52
152
  ? props.theme.palette.primary.main
53
- : props.theme.palette.background.paper; });
54
- export var DrawerShadow = styled(Box, {
55
- shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
56
- })(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: rgba(0,0,0,0.125);\n content: '';\n display: block;\n filter: blur(13px);\n height: 100%;\n left: ", ";\n position: fixed;\n top: 0;\n transition: left 225ms ", " 0ms;\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\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 position: fixed;\n top: 0;\n transition: left 225ms ", " 0ms;\n visibility: visible;\n width: 40px;\n\n @media (min-width: ", ") {\n left: ", ";\n }\n"])), function (props) { return props.isDrawerOpen
57
- ? "".concat(DRAWER_WIDTH.Expanded - 38, "px")
58
- : "".concat(DRAWER_WIDTH.Collapsed - 41, "px"); }, motion.easeInOut, function (props) { return props.theme.breakpoints.values.sm; }, function (props) {
59
- return props.isDrawerOpen
60
- ? "".concat(DRAWER_WIDTH.Expanded - 38, "px")
61
- : "".concat(DRAWER_WIDTH.Collapsed - 33, "px");
62
- });
63
- export var NotchContainer = styled(Box)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"], ["\n display: flex;\n justify-content: flex-end;\n height: auto;\n margin-top: -", ";\n position: relative;\n transition: width 225ms ", " 0ms !important;\n width: 100%;\n z-index: 9;\n"])), function (props) { return props.theme.spacing(0.5); }, motion.easeInOut);
64
- export var NotchBackground = styled(Box)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"], ["\n background-color: ", ";\n flex: 1;\n height: auto;\n width: auto;\n"])), function (props) { return getNavigationBackground(props.theme); });
65
- export var NotchBackgroundClip = styled(Box)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"], ["\n background-color: ", ";\n clip-path: url(\"#notch\");\n display: flex;\n height: 85px;\n width: 45px;\n"])), function (props) { return getNavigationBackground(props.theme); });
66
- export var NotchSeemMask = styled(Box)(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"], ["\n background-color: ", ";\n height: 90px;\n position: absolute;\n right: 25px;\n top: -2px;\n width: calc(100% - 25px);\n"])), function (props) { return getNavigationBackground(props.theme); });
67
- export var StyledDrawer = styled(Drawer, {
68
- shouldForwardProp: function (prop) { return prop !== 'open'; }
69
- })(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width 225ms ", " 0ms !important;\n white-space: nowrap;\n width: ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width 225ms ", " 0ms !important;\n visibility: visible;\n width: ", ";\n\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"])), motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
70
- return props.theme.palette.mode === 'dark'
71
- ? props.theme.palette.primary.contrastText
72
- : props.theme.palette.getContrastText(props.theme.palette.background.paper);
73
- }, motion.easeInOut, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
74
- export var StyledNotchShadow = styled(Box)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"], ["\n border-radius: 50%;\n box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);\n height: 13px;\n left: 13px;\n position: absolute;\n top: -7px;\n width: 25px;\n z-index: -2;\n"])));
75
- export var StyledNotchShadowMask = styled(Box)(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n height: 13px;\n left: 13px;\n position: absolute;\n top: -1px;\n width: 25px;\n z-index: -1;\n"])), function (props) { return getNavigationBackground(props.theme); });
76
- export var StyledAvatar = styled(Avatar)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n font-weight: bold;\n"], ["\n background-color: ", ";\n color: ", ";\n font-weight: bold;\n"])), function (props) { return getOffsetNavigationBackground(props.theme); }, function (props) { return getOffsetNavigationContrastText(props.theme); });
77
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19;
153
+ : props.theme.palette.background.paper};
154
+ display: flex;
155
+ flex: 1 auto;
156
+ flex-direction: column;
157
+ justify-content: flex-end;
158
+ margin-top: auto;
159
+ overflow: hidden;
160
+ `;
161
+ export const DrawerShadow = styled(Box, {
162
+ shouldForwardProp: (prop) => prop !== 'isDrawerOpen'
163
+ }) `
164
+ background: rgba(0,0,0,0.125);
165
+ content: '';
166
+ display: block;
167
+ filter: blur(13px);
168
+ height: 100%;
169
+ left: ${props => props.isDrawerOpen
170
+ ? `${DRAWER_WIDTH.Expanded - 38}px`
171
+ : `${DRAWER_WIDTH.Collapsed - 41}px`};
172
+ position: fixed;
173
+ top: 0;
174
+ transition: left 225ms ${motion.easeInOut} 0ms;
175
+ visibility: visible;
176
+ width: 40px;
177
+
178
+ @media (min-width: ${props => props.theme.breakpoints.values.sm}) {
179
+ left: ${props => props.isDrawerOpen
180
+ ? `${DRAWER_WIDTH.Expanded - 38}px`
181
+ : `${DRAWER_WIDTH.Collapsed - 33}px`};
182
+ }
183
+ `;
184
+ export const NotchContainer = styled(Box) `
185
+ display: flex;
186
+ justify-content: flex-end;
187
+ height: auto;
188
+ margin-top: -${props => props.theme.spacing(0.5)};
189
+ position: relative;
190
+ transition: width 225ms ${motion.easeInOut} 0ms !important;
191
+ width: 100%;
192
+ z-index: 9;
193
+ `;
194
+ export const NotchBackground = styled(Box) `
195
+ background-color: ${props => getNavigationBackground(props.theme)};
196
+ flex: 1;
197
+ height: auto;
198
+ width: auto;
199
+ `;
200
+ export const NotchBackgroundClip = styled(Box) `
201
+ background-color: ${props => getNavigationBackground(props.theme)};
202
+ clip-path: url("#notch");
203
+ display: flex;
204
+ height: 85px;
205
+ width: 45px;
206
+ `;
207
+ export const NotchSeemMask = styled(Box) `
208
+ background-color: ${props => getNavigationBackground(props.theme)};
209
+ height: 90px;
210
+ position: absolute;
211
+ right: 25px;
212
+ top: -2px;
213
+ width: calc(100% - 25px);
214
+ `;
215
+ export const StyledDrawer = styled(Drawer, {
216
+ shouldForwardProp: (prop) => prop !== 'open'
217
+ }) `
218
+ box-shadow: none;
219
+ box-sizing: border-box;
220
+ flexshrink: 0;
221
+ overflow-x: visible;
222
+ transition: width 225ms ${motion.easeInOut} 0ms !important;
223
+ white-space: nowrap;
224
+ width: ${props => !props.open ? `calc(${props.theme.spacing(7)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
225
+
226
+ @media (min-width: ${props => props.theme.breakpoints.values.sm}) {
227
+ width: ${props => !props.open ? `calc(${props.theme.spacing(8)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
228
+ }
229
+
230
+ .MuiDrawer-paper {
231
+ background: transparent none;
232
+ border: 0;
233
+ box-shadow: none;
234
+ color: ${props => props.theme.palette.mode === 'dark'
235
+ ? props.theme.palette.primary.contrastText
236
+ : props.theme.palette.getContrastText(props.theme.palette.background.paper)};
237
+ overflow: visible !important;
238
+ overflow-x: visible;
239
+ transform: translateX(0) !important;
240
+ transition: width 225ms ${motion.easeInOut} 0ms !important;
241
+ visibility: visible;
242
+ width: ${props => !props.open ? `calc(${props.theme.spacing(7)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
243
+
244
+ [theme.breakpoints.up('sm')] {
245
+ width: ${props => !props.open ? `calc(${props.theme.spacing(8)} + 1px)` : `${DRAWER_WIDTH.Expanded}px`};
246
+ }
247
+ }
248
+ `;
249
+ export const StyledNotchShadow = styled(Box) `
250
+ border-radius: 50%;
251
+ box-shadow: 0px -7px 10px -5px rgb(0 0 0 / 20%), 0px 2px 10px 0px rgb(0 0 0 / 14%), 0px 0px 8px 0px rgb(0 0 0 / 12%);
252
+ height: 13px;
253
+ left: 13px;
254
+ position: absolute;
255
+ top: -7px;
256
+ width: 25px;
257
+ z-index: -2;
258
+ `;
259
+ export const StyledNotchShadowMask = styled(Box) `
260
+ background-color: ${props => getNavigationBackground(props.theme)};
261
+ border-radius: 50%;
262
+ height: 13px;
263
+ left: 13px;
264
+ position: absolute;
265
+ top: -1px;
266
+ width: 25px;
267
+ z-index: -1;
268
+ `;
269
+ export const StyledAvatar = styled(Avatar) `
270
+ background-color: ${props => getOffsetNavigationBackground(props.theme)};
271
+ color: ${props => getOffsetNavigationContrastText(props.theme)};
272
+ font-weight: bold;
273
+ `;
@@ -1,28 +1,29 @@
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 { useSpring, animated, easings } from '@react-spring/web';
14
- var Path = function (props) { return (_jsx(animated.path, __assign({ fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round' }, props))); };
15
- var ToggleSearchX = function (props) {
16
- var animationDefaults = {
17
- reverse: props === null || props === void 0 ? void 0 : props.isOpen,
3
+ const Path = (props) => (_jsx(animated.path, { fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round', ...props }));
4
+ const ToggleSearchX = (props) => {
5
+ const animationDefaults = {
6
+ reverse: props?.isOpen,
18
7
  config: {
19
8
  duration: 150,
20
9
  easing: easings.easeInOutQuad
21
10
  }
22
11
  };
23
- var handle = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 15 L 35 35' }, to: { d: 'M 26 26 L 35 35' } }));
24
- var closeBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 35 L 35 15', opacity: 1, scale: 1 }, to: { d: 'M 26 26 L 35 35', opacity: 0, scale: 0 } }));
25
- var circle = useSpring(__assign(__assign({}, animationDefaults), { from: { opacity: 0, scale: 0 }, to: { opacity: 1, scale: 1 } }));
26
- return (_jsxs("svg", __assign({ width: '40', height: '40', viewBox: '0 0 50 50', stroke: 'inherit' }, { children: [_jsx(Path, __assign({}, handle)), _jsx(Path, __assign({}, closeBar)), _jsx(animated.circle, __assign({}, circle, { cx: '20', cy: '20', r: '8', fill: 'transparent', strokeWidth: '3', stroke: 'inherit' }))] })));
12
+ const handle = useSpring({
13
+ ...animationDefaults,
14
+ from: { d: 'M 15 15 L 35 35' },
15
+ to: { d: 'M 26 26 L 35 35' }
16
+ });
17
+ const closeBar = useSpring({
18
+ ...animationDefaults,
19
+ from: { d: 'M 15 35 L 35 15', opacity: 1, scale: 1 },
20
+ to: { d: 'M 26 26 L 35 35', opacity: 0, scale: 0 }
21
+ });
22
+ const circle = useSpring({
23
+ ...animationDefaults,
24
+ from: { opacity: 0, scale: 0 },
25
+ to: { opacity: 1, scale: 1 }
26
+ });
27
+ return (_jsxs("svg", { width: '40', height: '40', viewBox: '0 0 50 50', stroke: 'inherit', children: [_jsx(Path, { ...handle }), _jsx(Path, { ...closeBar }), _jsx(animated.circle, { ...circle, cx: '20', cy: '20', r: '8', fill: 'transparent', strokeWidth: '3', stroke: 'inherit' })] }));
27
28
  };
28
29
  export default ToggleSearchX;
@@ -1,28 +1,29 @@
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 { useSpring, animated, easings } from '@react-spring/web';
14
- var Path = function (props) { return (_jsx(animated.path, __assign({ fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round' }, props))); };
15
- var ToggleX = function (props) {
16
- var animationDefaults = {
17
- reverse: props === null || props === void 0 ? void 0 : props.isOpen,
3
+ const Path = (props) => (_jsx(animated.path, { fill: 'transparent', strokeWidth: '3', stroke: 'inherit', strokeLinecap: 'round', ...props }));
4
+ const ToggleX = (props) => {
5
+ const animationDefaults = {
6
+ reverse: props?.isOpen,
18
7
  config: {
19
8
  duration: 150,
20
9
  easing: easings.easeInOutQuad
21
10
  }
22
11
  };
23
- var topBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 15 L 35 35' }, to: { d: 'M 10 15 L 40 15' } }));
24
- var middleBar = useSpring(__assign(__assign({}, animationDefaults), { from: { opacity: 0, scale: 0 }, to: { opacity: 1, scale: 1 } }));
25
- var bottomBar = useSpring(__assign(__assign({}, animationDefaults), { from: { d: 'M 15 35 L 35 15' }, to: { d: 'M 10 35 L 40 35' } }));
26
- return (_jsxs("svg", __assign({ width: "40", height: "40", viewBox: "0 0 50 50" }, { children: [_jsx(Path, __assign({}, topBar)), _jsx(Path, __assign({ d: 'M 10 25 L 40 25' }, middleBar)), _jsx(Path, __assign({}, bottomBar))] })));
12
+ const topBar = useSpring({
13
+ ...animationDefaults,
14
+ from: { d: 'M 15 15 L 35 35' },
15
+ to: { d: 'M 10 15 L 40 15' }
16
+ });
17
+ const middleBar = useSpring({
18
+ ...animationDefaults,
19
+ from: { opacity: 0, scale: 0 },
20
+ to: { opacity: 1, scale: 1 }
21
+ });
22
+ const bottomBar = useSpring({
23
+ ...animationDefaults,
24
+ from: { d: 'M 15 35 L 35 15' },
25
+ to: { d: 'M 10 35 L 40 35' }
26
+ });
27
+ return (_jsxs("svg", { width: "40", height: "40", viewBox: "0 0 50 50", children: [_jsx(Path, { ...topBar }), _jsx(Path, { d: 'M 10 25 L 40 25', ...middleBar }), _jsx(Path, { ...bottomBar })] }));
27
28
  };
28
29
  export default ToggleX;