@learningpool/ui 1.6.0-beta.2 → 1.6.0-beta.4

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 (59) hide show
  1. package/assets/Images.d.ts +9 -0
  2. package/assets/Images.js +4 -1
  3. package/components/navigation/MobileNavigation/MobileNavigation.d.ts +39 -0
  4. package/components/navigation/MobileNavigation/MobileNavigation.js +188 -0
  5. package/components/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +28 -0
  6. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +124 -0
  7. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +827 -0
  8. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +33 -0
  9. package/components/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +24 -0
  10. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +148 -0
  11. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +392 -0
  12. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +44 -0
  13. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +19 -0
  14. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +91 -0
  15. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +15 -0
  16. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +26 -0
  17. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +112 -0
  18. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +66 -0
  19. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +126 -0
  20. package/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +71 -0
  21. package/components/navigation/MobileNavigation/MobileNavigationMotion.d.ts +141 -0
  22. package/components/navigation/MobileNavigation/MobileNavigationMotion.js +109 -0
  23. package/components/navigation/MobileNavigation/MobileNavigationSearch.d.ts +10 -0
  24. package/components/navigation/MobileNavigation/MobileNavigationSearch.js +52 -0
  25. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +257 -0
  26. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.js +20 -0
  27. package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +405 -0
  28. package/components/navigation/MobileNavigation/MobileNavigationStyles.js +104 -0
  29. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +2 -0
  30. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +32 -0
  31. package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +2 -0
  32. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +26 -0
  33. package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.d.ts +36 -0
  34. package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.js +10 -0
  35. package/components/navigation/VerticalNavigation/AvatarPanel.d.ts +8 -0
  36. package/components/navigation/VerticalNavigation/AvatarPanel.js +97 -0
  37. package/components/navigation/VerticalNavigation/VerticalNavigation.d.ts +8 -10
  38. package/components/navigation/VerticalNavigation/VerticalNavigation.js +156 -93
  39. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +18 -0
  40. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +91 -0
  41. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +15 -0
  42. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +29 -0
  43. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +112 -0
  44. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +66 -0
  45. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +126 -0
  46. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +71 -0
  47. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +31 -90
  48. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +71 -258
  49. package/index.d.ts +1 -0
  50. package/index.js +1 -0
  51. package/package.json +3 -2
  52. package/utils/constants.d.ts +5 -0
  53. package/utils/constants.js +5 -0
  54. package/utils/helpers.d.ts +6 -0
  55. package/utils/helpers.js +17 -0
  56. package/utils/hooks.d.ts +1 -0
  57. package/utils/hooks.js +29 -0
  58. package/utils/theme.d.ts +4 -0
  59. package/utils/theme.js +4 -0
@@ -7,3 +7,12 @@ export declare const LearningPoolLogo: import("@mui/material/OverridableComponen
7
7
  export declare const NotchSVG: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
8
8
  muiName: string;
9
9
  };
10
+ export declare const NotchMiniSVG: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
11
+ muiName: string;
12
+ };
13
+ export declare const NotchExtendSVG: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
14
+ muiName: string;
15
+ };
16
+ export declare const NotchBackgroundSVG: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
17
+ muiName: string;
18
+ };
package/assets/Images.js CHANGED
@@ -9,8 +9,11 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { createSvgIcon } from '@mui/material/utils';
14
14
  export var StreamSuiteLogo = createSvgIcon(_jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", "data-name": "Layer 1", viewBox: "0 0 447.9 484.8" }, { children: _jsx("path", { d: "M447.9 304.4V321l-1 5.2c-3 21.8-12.5 40.5-27.4 56.4a102.6 102.6 0 0 1-34.1 24A98 98 0 0 1 325 413c-2.2-.5-3.2 0-4 2.1a100.5 100.5 0 0 1-32.4 47.2 101.3 101.3 0 0 1-48 21l-11 1.4h-11.7a6.8 6.8 0 0 0-1.5-.4A102.5 102.5 0 0 1 172 471a96.6 96.6 0 0 1-30.8-27.6 103.7 103.7 0 0 1-14.6-28.7c-.5-1.4-.8-2.5-2.8-2a98.5 98.5 0 0 1-32.5 1.5 101 101 0 0 1-35.8-10.8 97.8 97.8 0 0 1-29.7-23A102 102 0 0 1 7 350a105.4 105.4 0 0 1-5.5-55.2 100.7 100.7 0 0 1 13-35.3c2.7-4.7 6.3-5.1 10.2-1.3l4.8 4.3a102 102 0 0 0 37.7 20.6c5.1 1.6 6.5 5 3.7 9.6a35.7 35.7 0 0 0 7.9 48.3 36.3 36.3 0 0 0 22.4 9c15.2.5 26.3-6.9 33.8-19.3 10.5-17.2 20.3-34.8 30.3-52.2.6-1 1-2 1.7-3.5l-4-.2c-22.2 0-44.5 0-66.7-.3a103 103 0 0 1-76.3-41A95.8 95.8 0 0 1 .8 161a106 106 0 0 1 33.9-66A90 90 0 0 1 54 81.4c20.6-11 42.5-13.6 65.4-10.3 7.5 1.2 5.5 2.5 8.2-4.7a99 99 0 0 1 32-44.8A102.2 102.2 0 0 1 222.4 0a106 106 0 0 1 32.2 4.5A98.4 98.4 0 0 1 293 25.8a100.2 100.2 0 0 1 28 43.5c.8 2.2 1.6 2.9 4 2.4a102 102 0 0 1 28-1.9 92.8 92.8 0 0 1 37.9 10.6q46 24.9 55.6 76.4c.6 3 1 6 1.4 9.1v14.4a23.2 23.2 0 0 0-.6 2.6 100.8 100.8 0 0 1-14.6 43c-2.3 3.6-6 4-9.1 1-2.1-2-4.1-4-6.3-5.8a97.4 97.4 0 0 0-35.4-19.1c-7-2-8-5.7-4.3-11.5a32.5 32.5 0 0 0 5.1-22.2 37.6 37.6 0 0 0-15-25.7 36.4 36.4 0 0 0-52.8 8c-3.6 4.7-6.2 10-9.2 15l-24 41.6a17 17 0 0 0-.9 2.4l3.7.2 64.2.3a86.7 86.7 0 0 1 24.3 3.4 102.6 102.6 0 0 1 50 32.1 100.7 100.7 0 0 1 23 48l1.9 10.8ZM261.5 102.9a37.2 37.2 0 0 0-4-17c-7-13.4-17.8-21.3-33.2-21.4-13.3 0-24 5.8-31.5 16.7a34.9 34.9 0 0 0-2.3 38.2c7.6 14.2 16 28 24.2 42a9.8 9.8 0 0 1 1 8.7l-12.4 37.7a9.1 9.1 0 0 0 0 2.9 9.3 9.3 0 0 0 2.2-2c2.5-4 4.8-8.2 7.2-12.4l42-72.5c3.9-6.5 7-13.2 6.8-21Zm-.2 278.7a30.6 30.6 0 0 0-4-16c-8.3-14.8-16.9-29.5-25.4-44.2a6 6 0 0 1-.5-5.5l13.1-39.5a6.6 6.6 0 0 0-.2-2.5c-.6.5-1.5.9-1.9 1.5l-20 34.5-29.6 51.2a42.3 42.3 0 0 0-6.5 19.7 35 35 0 0 0 13 29.8 37.3 37.3 0 0 0 62-29Zm-94.2-172-1.4-2.9-27.7-48a54 54 0 0 0-11.5-15.4c-20.4-17-48.8-7-58.2 13.3-12 25.8 9.4 53.5 34 53.2 20.4-.2 41 0 61.4 0l3.4-.3ZM280.7 275a22.1 22.1 0 0 0 .9 2.2c10.4 18 20.7 36 31.3 54a35.5 35.5 0 0 0 29.4 18.6 37.7 37.7 0 0 0 39.9-43.7 37.9 37.9 0 0 0-36-31.2h-65.5Z" }) })), 'StreamSuite');
15
15
  export var LearningPoolLogo = createSvgIcon(_jsx("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 804 174" }, { children: _jsx("path", { fill: "#0069B4", d: "M155.5 0A44 44 0 0 0 121 16.5l-1 1.2-1.2-1a72.5 72.5 0 1 0-46.4 128.1 72.8 72.8 0 0 0 70.7-56.6l.4-1.5 1.5.4a44.2 44.2 0 0 0 44.8-15 44.2 44.2 0 0 0 5.6-47 44.2 44.2 0 0 0-40-25.1zM113 115.2H72.4a42.9 42.9 0 1 1 29.2-11.5l11.4 11.5zm42.5-47.8h-22l6.1-6.2a23.2 23.2 0 1 1 15.9 6.2zm56.2-8.5h14v84h-14zm76 54.3a31.1 31.1 0 0 0-7.5-21.1 29.2 29.2 0 0 0-40.7.2 31.8 31.8 0 0 0-7.8 22 31.2 31.2 0 0 0 7.9 22.2 27.8 27.8 0 0 0 20.9 8.3c2.8 0 5.6-.3 8.4-1a24 24 0 0 0 7.3-3 28.4 28.4 0 0 0 6.3-5.1c1.7-2 3.3-4 4.7-6.2l-12.7-7a28 28 0 0 1-6 6.9 12.3 12.3 0 0 1-7.4 2.1 13 13 0 0 1-9.6-3.7 15.6 15.6 0 0 1-4-9.1v-.4h40.1v-5.1zm-41.7-5.3.3-1.1a16.8 16.8 0 0 1 2-4.6 14 14 0 0 1 3-3.5 13.3 13.3 0 0 1 4.1-2.2 14.5 14.5 0 0 1 4.8-.8c6.8-.4 12.8 4.4 14 11l.3 1.2H246zm90.4-22.4V91a24.2 24.2 0 0 0-16.9-7.2 24.9 24.9 0 0 0-19.2 8.6 30.7 30.7 0 0 0-7.7 21.2 31.7 31.7 0 0 0 7.7 21.6 25.4 25.4 0 0 0 19.6 8.5 25 25 0 0 0 16.5-6.7v5.1h14.2V85.5h-14.2zm-3.6 41a14.3 14.3 0 0 1-11.1 4.7 13.5 13.5 0 0 1-10.6-4.9 18.9 18.9 0 0 1-4.1-12.6 18 18 0 0 1 4.1-12.2 13.8 13.8 0 0 1 10.9-4.8 14 14 0 0 1 10.8 4.8A18.3 18.3 0 0 1 337 114a18.5 18.5 0 0 1-4.3 12.5zm61.7-38.9-6.3 13-.6-.4a11.3 11.3 0 0 0-6.6-2.5c-6.5 0-9.7 5-9.7 15.4v29.7h-13.7V85.5h13.7v4a23.9 23.9 0 0 1 5.3-4.1 14.6 14.6 0 0 1 6.7-1.5 20.7 20.7 0 0 1 10.7 3.4l.5.3zm53 20.2v35H433v-32a19.7 19.7 0 0 0-2.2-11 8.8 8.8 0 0 0-7.8-3 9.4 9.4 0 0 0-8.7 4 28.9 28.9 0 0 0-2.6 14.3v27.7h-14.3V85.5h14.3v4.4a21.8 21.8 0 0 1 14.9-6 20.3 20.3 0 0 1 15.8 6.4c3.3 3.6 5 9.5 5 17.5m22.9-40a8.7 8.7 0 0 1-2.7 6.4 8.5 8.5 0 0 1-6.3 2.7 9 9 0 0 1-6.4-2.6 9 9 0 0 1-2.6-6.4 8.5 8.5 0 0 1 2.7-6.3 8.6 8.6 0 0 1 6.3-2.7 8.7 8.7 0 0 1 6.3 2.7 8.5 8.5 0 0 1 2.7 6.3m-16 18h14v57h-14zm71 22v35H511v-32a19.7 19.7 0 0 0-2.2-11.1 8.8 8.8 0 0 0-7.8-3 9.4 9.4 0 0 0-8.7 4 28.9 28.9 0 0 0-2.5 14.3v27.7h-14.4V85.5h14.4v4.4a21.8 21.8 0 0 1 14.8-6 20.2 20.2 0 0 1 15.8 6.4c3.3 3.6 5 9.5 5 17.5M574 85.4v5.4a23 23 0 0 0-16.9-6.9 24.4 24.4 0 0 0-19.9 9.3 32.9 32.9 0 0 0-7 21 31.2 31.2 0 0 0 7.6 21.3 25.1 25.1 0 0 0 17.8 8.5 25.2 25.2 0 0 0 18.4-7v6.3c0 11.2-4.4 16.7-13.5 16.7a13.4 13.4 0 0 1-11.2-5 14.2 14.2 0 0 1-2.4-6v-.6h-14.2v.7a25.2 25.2 0 0 0 8.8 17.5 28.4 28.4 0 0 0 19 6.2 26.9 26.9 0 0 0 21.3-9 24.1 24.1 0 0 0 5.4-11 51.2 51.2 0 0 0 .7-5.4c.2-2 .3-4.4.3-7v-55H574zm-3.3 40.6a13.6 13.6 0 0 1-11.2 5 13.6 13.6 0 0 1-11.1-5 18.9 18.9 0 0 1-3.7-12 19.1 19.1 0 0 1 3.7-12.3 13.3 13.3 0 0 1 11-5.1 13.9 13.9 0 0 1 11 4.7 18 18 0 0 1 4.1 12.6 18.6 18.6 0 0 1-3.8 12zm73.7-33.4a24.8 24.8 0 0 0-19.5-8.7 24.4 24.4 0 0 0-16.7 6.8v-5.2h-14v87.3h14V137a24.4 24.4 0 0 0 17 7 24.9 24.9 0 0 0 19.2-8.5 30.9 30.9 0 0 0 7.7-21.3 31.3 31.3 0 0 0-7.7-21.6m-32.5 8.8a14.3 14.3 0 0 1 11-4.7 13.5 13.5 0 0 1 10.7 5 18.6 18.6 0 0 1 4.1 12.5 17.8 17.8 0 0 1-4.3 12.3 13.5 13.5 0 0 1-10.6 4.8 14 14 0 0 1-11-4.8 18.4 18.4 0 0 1-4.2-12.5 18.2 18.2 0 0 1 4.2-12.6m97.4-7.9a31.3 31.3 0 0 0-43.2 0 28.3 28.3 0 0 0-9 21 29.4 29.4 0 0 0 9 21.5 29.3 29.3 0 0 0 21.5 8.8 30.4 30.4 0 0 0 21.9-8.6A28.8 28.8 0 0 0 718 115a29 29 0 0 0-8.8-21.4m-10 34a16.9 16.9 0 0 1-23.3 0 18.1 18.1 0 0 1-4.4-12.8 17.2 17.2 0 0 1 4.5-12.3 15.1 15.1 0 0 1 11.5-4.7c4.4-.1 8.7 1.6 11.7 4.7a17.7 17.7 0 0 1 4.4 12.6 17.7 17.7 0 0 1-4.4 12.5m75-35a31.3 31.3 0 0 0-43.3 0 28.2 28.2 0 0 0-8.9 21 29.4 29.4 0 0 0 8.7 21.5 29.3 29.3 0 0 0 21.5 8.8 30.4 30.4 0 0 0 21.9-8.6 28.8 28.8 0 0 0 8.8-21.4 29 29 0 0 0-8.8-21.3m-10 34a16.8 16.8 0 0 1-23.3 0 18.2 18.2 0 0 1-4.3-12.8 17.2 17.2 0 0 1 4.5-12.3 15.1 15.1 0 0 1 11.6-4.7 15.3 15.3 0 0 1 11.6 4.7 17.7 17.7 0 0 1 4.4 12.6 17.7 17.7 0 0 1-4.4 12.5M790 59h14v84h-14z" }) })), 'LearningPool');
16
16
  export var NotchSVG = createSvgIcon(_jsx("svg", __assign({ className: 'notch-svg' }, { children: _jsx("clipPath", __assign({ id: 'notch', clipPathUnits: 'objectBoundingBox' }, { children: _jsx("path", { d: 'M1,0 H0 v1 h1 v-0.105 c-0.017,-0.074,-0.109,-0.132,-0.168,-0.146 l-0.008,-0.002 a0.5,0.265,0,0,1,0.006,-0.493 c0.062,-0.015,0.16,-0.079,0.169,-0.158 V0' }) })) })), 'Notch');
17
+ export var NotchMiniSVG = createSvgIcon(_jsxs("svg", __assign({ className: 'notch-mini-svg', width: "100%", height: "100%", viewBox: "0 0 15 26" }, { children: [_jsx("path", { d: "M15 13.09c0 4.456-3.358 8.069-7.5 8.069-4.142 0-7.5-3.613-7.5-8.07 0-4.456 3.358-8.068 7.5-8.068 4.142 0 7.5 3.612 7.5 8.069Z" }), _jsx("path", { d: "M7.333 26c.167-2.869-1.666-5.2-2.666-5.559H10L7.333 26ZM7.333 0C7.5 2.869 5.667 5.2 4.667 5.559H10L7.333 0Z" })] })), 'NotchMini');
18
+ export var NotchExtendSVG = createSvgIcon(_jsx("svg", __assign({ className: 'notch-extend-svg', viewBox: "0 0 22 85", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0 0V85V76.0381C0.774 69.7533 4.9101 64.7829 7.5488 63.5975C7.668 63.5518 7.7867 63.5052 7.9049 63.4576C16.1679 60.1279 22 52.035 22 42.5799C22 33.1612 16.2126 25.0941 8 21.7408C7.8723 21.6887 7.7441 21.6377 7.6153 21.5879C4.8325 20.3142 0.4173 14.8748 0 8.13255V0Z" }) })), 'NotchExtend');
19
+ export var NotchBackgroundSVG = createSvgIcon(_jsx("svg", __assign({ className: 'notch-background-svg', viewBox: "0 0 25 865", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { fill: "#fff", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M25 0H0V865H25V468.5V466.451C24.6432 460.704 21.3624 455.984 18.6792 453.948C9.58731 451.059 3 442.549 3 432.5C3 422.927 8.97844 414.75 17.4054 411.5H17C19.7393 410.587 24.563 405.088 25 398.049V396V0Z" }) })), 'NotchBackground');
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { IMobileNavigationItemProps } from './MobileNavigationItem/MobileNavigationItem';
3
+ import { IAvatarMenuItemProps } from './MobileNavigationAvatar';
4
+ interface MobileNavigationProps {
5
+ logo?: string;
6
+ logoText?: string;
7
+ logoOnClick?: any;
8
+ items?: IMobileNavigationItemProps[];
9
+ secondaryItems?: IMobileNavigationItemProps[];
10
+ hasStreamHome?: boolean;
11
+ streamHomeAccessToken?: string;
12
+ streamHomeBaseUrl?: string;
13
+ streamHomeApiKey?: string;
14
+ avatarName?: string;
15
+ isDrawerOpen?: boolean;
16
+ isSearchOpen?: boolean;
17
+ isAvatarOpen?: boolean;
18
+ isPersistent?: boolean;
19
+ setIsPersistent?: any;
20
+ hideAvatarInitials?: boolean;
21
+ showNotchIndicator?: boolean;
22
+ hasSearch?: boolean;
23
+ searchPanelPlaceholder?: string;
24
+ searchPanelDefaultValue?: string;
25
+ searchPanelOnClickSearch?: any;
26
+ hasAvatar?: boolean;
27
+ avatarPanelOnClickSwitchDirection?: any;
28
+ avatarPanelOnClickLogout?: any;
29
+ avatarPanelOnClickViewProfile?: any;
30
+ avatarPanelViewProfileString?: string;
31
+ avatarPanelOnClickEditProfile?: any;
32
+ avatarPanelEditProfileString?: string;
33
+ avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
34
+ avatarPanelOnClickMainAction?: any;
35
+ avatarPanelMainActionString?: string;
36
+ avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
37
+ }
38
+ declare const MobileNavigation: (props: MobileNavigationProps) => React.ReactElement;
39
+ export default MobileNavigation;
@@ -0,0 +1,188 @@
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, Fragment as _Fragment } from "react/jsx-runtime";
24
+ import React, { useEffect } from 'react';
25
+ import { Person, PersonOutline } from '@mui/icons-material';
26
+ import { StyledBottomNavigationAction, StyledPaper, StyledBottomNavigation, StyledNotchSVG, StyledNotchShadow, StyledNotchShadowMask } from './MobileNavigationStyles';
27
+ import { StyledAvatar } from './MobileNavigationAvatarStyles';
28
+ import SwipeableTemporaryDrawer from './MobileNavigationDrawer';
29
+ import SwipeableTemporarySearch from './MobileNavigationSearch';
30
+ import SwipeableTemporaryAvatar from './MobileNavigationAvatar';
31
+ import { ToggleX } from './MobileNavigationToggleX';
32
+ import { ToggleSearchX } from './MobileNavigationToggleSearchX';
33
+ import { useCurrentWidth } from '../../../utils/hooks';
34
+ import { slice } from 'lodash';
35
+ import { motion } from 'framer-motion';
36
+ import { MOBILE_NAV_PANEL_TYPES } from '../../../utils/constants';
37
+ var MobileNavigation = function (props) {
38
+ var _a, _b;
39
+ var items = props.items, secondaryItems = props.secondaryItems, hideAvatarInitials = props.hideAvatarInitials, hasSearch = props.hasSearch, hasAvatar = props.hasAvatar, showNotchIndicator = props.showNotchIndicator, rest = __rest(props, ["items", "secondaryItems", "hideAvatarInitials", "hasSearch", "hasAvatar", "showNotchIndicator"]);
40
+ var propIsDrawerOpen = typeof (props === null || props === void 0 ? void 0 : props.isDrawerOpen) === 'boolean' ? props.isDrawerOpen : undefined;
41
+ var propIsSearchOpen = typeof (props === null || props === void 0 ? void 0 : props.isSearchOpen) === 'boolean' ? props.isSearchOpen : undefined;
42
+ var propIsAvatarOpen = typeof (props === null || props === void 0 ? void 0 : props.isAvatarOpen) === 'boolean' ? props.isAvatarOpen : undefined;
43
+ var avatarName = (_a = props === null || props === void 0 ? void 0 : props.avatarName) !== null && _a !== void 0 ? _a : 'Avatar name';
44
+ var _c = React.useState(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false), isDrawerOpen = _c[0], setIsDrawerOpen = _c[1];
45
+ var _d = React.useState(propIsSearchOpen !== null && propIsSearchOpen !== void 0 ? propIsSearchOpen : false), isSearchOpen = _d[0], setIsSearchOpen = _d[1];
46
+ var _e = React.useState(propIsAvatarOpen !== null && propIsAvatarOpen !== void 0 ? propIsAvatarOpen : false), isAvatarOpen = _e[0], setIsAvatarOpen = _e[1];
47
+ var maxMobilePrimaryItems = 3;
48
+ var priorityItems = slice(items, 0, maxMobilePrimaryItems);
49
+ var _f = React.useState(0), value = _f[0], setValue = _f[1];
50
+ var _g = React.useState(0), mobileNotchPosition = _g[0], setMobileNotchPosition = _g[1];
51
+ var windowWidth = useCurrentWidth();
52
+ var currentDirection = window.localStorage.getItem('@learningpool/ui/store/mobile-navigation-direction');
53
+ var _h = React.useState(currentDirection !== null && currentDirection !== void 0 ? currentDirection : 'ltr'), mobileNavDirection = _h[0], setMobileNavDirection = _h[1];
54
+ useEffect(function () {
55
+ window.localStorage.setItem('@learningpool/ui/store/mobile-navigation-direction', mobileNavDirection);
56
+ positionMobileNotch();
57
+ }, [mobileNavDirection]);
58
+ useEffect(function () { return setIsDrawerOpen(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false); }, [propIsDrawerOpen]);
59
+ useEffect(function () { return setIsSearchOpen(propIsSearchOpen !== null && propIsSearchOpen !== void 0 ? propIsSearchOpen : false); }, [propIsSearchOpen]);
60
+ useEffect(function () { return setIsAvatarOpen(propIsAvatarOpen !== null && propIsAvatarOpen !== void 0 ? propIsAvatarOpen : false); }, [propIsAvatarOpen]);
61
+ useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [avatarName]);
62
+ useEffect(function () {
63
+ function hideNotch() {
64
+ var HIDE_NOTCH = -1;
65
+ if (!isDrawerOpen && !isSearchOpen && !isAvatarOpen) {
66
+ setValue(HIDE_NOTCH);
67
+ }
68
+ }
69
+ hideNotch();
70
+ }, [isDrawerOpen, isSearchOpen, isAvatarOpen]);
71
+ var handleAvatarInitials = function (avatarName) {
72
+ var _a, _b;
73
+ var firstInitial = avatarName.split('')[0] || '';
74
+ var secondInitial = '';
75
+ if (((_a = avatarName.split(' ')) === null || _a === void 0 ? void 0 : _a.length) > 1) {
76
+ firstInitial = avatarName.split(' ')[0][0];
77
+ if (((_b = avatarName.split(' ')[1]) === null || _b === void 0 ? void 0 : _b.length) > 0) {
78
+ secondInitial = avatarName === null || avatarName === void 0 ? void 0 : avatarName.split(' ')[1][0];
79
+ }
80
+ }
81
+ return "".concat(firstInitial).concat(secondInitial);
82
+ };
83
+ var _j = React.useState((_b = handleAvatarInitials(avatarName)) !== null && _b !== void 0 ? _b : 'AN'), avatarInitials = _j[0], setAvatarInitials = _j[1];
84
+ var toggleDrawer = function (open, action) { return function (event) {
85
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
86
+ if (event.type === 'keydown') {
87
+ if (event.key === 'Tab' || event.key === 'Shift') {
88
+ return;
89
+ }
90
+ }
91
+ // Close any open drawers
92
+ setIsDrawerOpen(false);
93
+ setIsSearchOpen(false);
94
+ setIsAvatarOpen(false);
95
+ // Handle drawer toggling based on 'action' or default to 'drawer'
96
+ switch (action) {
97
+ case MOBILE_NAV_PANEL_TYPES.SEARCH: {
98
+ setIsSearchOpen(open !== null && open !== void 0 ? open : !isSearchOpen);
99
+ setValue(1);
100
+ break;
101
+ }
102
+ case MOBILE_NAV_PANEL_TYPES.AVATAR: {
103
+ setIsAvatarOpen(open !== null && open !== void 0 ? open : !isAvatarOpen);
104
+ break;
105
+ }
106
+ default: {
107
+ setIsDrawerOpen(open !== null && open !== void 0 ? open : !isDrawerOpen);
108
+ setValue(0);
109
+ break;
110
+ }
111
+ }
112
+ }; };
113
+ var NOTCH = {
114
+ Height: 50,
115
+ Width: 50
116
+ };
117
+ var positionMobileNotch = function () {
118
+ var _a;
119
+ var selectedDOMRect = (_a = document.querySelectorAll('.MuiBottomNavigationAction-root, .bottom-navigation-item')[value]) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
120
+ setMobileNotchPosition(selectedDOMRect ? selectedDOMRect.left + (selectedDOMRect.width / 2) - (NOTCH.Width / 2) : mobileNotchPosition);
121
+ };
122
+ React.useEffect(function () { return positionMobileNotch(); }, [value, windowWidth]);
123
+ var variantsPaper = {
124
+ open: {
125
+ opacity: 1
126
+ }
127
+ };
128
+ var variantsContainer = {
129
+ open: {
130
+ transition: { staggerChildren: 0.07, delayChildren: 0.25 }
131
+ }
132
+ };
133
+ var variantsButtons = {
134
+ open: {
135
+ y: 0,
136
+ opacity: 1,
137
+ transition: {
138
+ y: { stiffness: 500, velocity: -100 }
139
+ }
140
+ }
141
+ };
142
+ return (_jsxs(_Fragment, { children: [_jsx(SwipeableTemporaryDrawer, __assign({ isDrawerOpen: isDrawerOpen, setIsDrawerOpen: setIsDrawerOpen, items: items, secondaryItems: secondaryItems, label: 'Primary' }, rest)), hasSearch && (_jsx(SwipeableTemporarySearch, __assign({}, rest, { isSearchOpen: isSearchOpen, setIsSearchOpen: setIsSearchOpen }))), hasAvatar && (_jsx(SwipeableTemporaryAvatar, __assign({}, rest, { isAvatarOpen: isAvatarOpen, setIsAvatarOpen: setIsAvatarOpen, avatarName: avatarName, mobileNavDirection: mobileNavDirection, setMobileNavDirection: setMobileNavDirection }))), _jsxs(StyledPaper, __assign({ elevation: 3,
143
+ // @ts-expect-error
144
+ component: motion.div, animate: 'open', variants: variantsPaper, initial: { opacity: 0 }, transition: {
145
+ // when: 'beforeChildren'
146
+ } }, { children: [showNotchIndicator &&
147
+ _jsxs(motion.div, __assign({ style: { zIndex: '-1' }, initial: {
148
+ opacity: 0,
149
+ x: -75,
150
+ y: 100
151
+ }, animate: {
152
+ opacity: 1,
153
+ x: mobileNotchPosition,
154
+ y: value < 0 ? 100 : -2
155
+ }, transition: {
156
+ x: {
157
+ // duration: 0.5,
158
+ type: 'spring',
159
+ // mass: 0.5,
160
+ bounce: 0.25
161
+ // stiffness: 50
162
+ },
163
+ y: {
164
+ delay: 0.25,
165
+ // duration: 0.5,
166
+ type: 'spring',
167
+ // mass: 0.5,
168
+ bounce: 0
169
+ }
170
+ // duration: 0.5
171
+ } }, { children: [_jsx(StyledNotchShadow, {}), _jsx(StyledNotchSVG, __assign({ viewBox: "0 0 22 85", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx(motion.path, { d: "M0 0V85V76.0381C0.774 69.7533 4.9101 64.7829 7.5488 63.5975C7.668 63.5518 7.7867 63.5052 7.9049 63.4576C16.1679 60.1279 22 52.035 22 42.5799C22 33.1612 16.2126 25.0941 8 21.7408C7.8723 21.6887 7.7441 21.6377 7.6153 21.5879C4.8325 20.3142 0.4173 14.8748 0 8.13255V0Z" }) })), _jsx(StyledNotchShadowMask, {})] })), _jsxs(StyledBottomNavigation, __assign({ value: value, onChange: function (event, newValue) { return setValue(newValue); },
172
+ // @ts-expect-error
173
+ component: motion.div, animate: 'open', variants: variantsContainer, style: {
174
+ flexDirection: mobileNavDirection && mobileNavDirection === 'rtl' ? 'row-reverse' : 'row'
175
+ } }, { children: [_jsx(StyledBottomNavigationAction, { icon: _jsx(ToggleX, {}), onClick: toggleDrawer(!isDrawerOpen, MOBILE_NAV_PANEL_TYPES.DRAWER),
176
+ // @ts-expect-error
177
+ component: motion.div, animate: isDrawerOpen ? 'open' : 'closed', variants: variantsButtons, "aria-label": isDrawerOpen ? 'Close drawer panel' : 'Open drawer panel', "aria-expanded": isDrawerOpen ? 'true' : 'false', "aria-controls": 'mobile-nav-menu', style: {
178
+ marginInlineStart: (hasSearch || hasAvatar) && (mobileNavDirection && mobileNavDirection === 'rtl') ? 'auto' : 'initial',
179
+ marginInlineEnd: (hasSearch || hasAvatar) && (mobileNavDirection && mobileNavDirection === 'rtl') ? 'initial' : 'auto'
180
+ } }), hasSearch && (_jsx(StyledBottomNavigationAction, { icon: _jsx(ToggleSearchX, {}), onClick: toggleDrawer(!isSearchOpen, MOBILE_NAV_PANEL_TYPES.SEARCH),
181
+ // @ts-expect-error
182
+ component: motion.div, animate: isSearchOpen ? 'open' : 'closed', variants: variantsButtons, "aria-label": isSearchOpen ? 'Close search panel' : 'Open search panel', "aria-expanded": isSearchOpen ? 'true' : 'false', "aria-controls": 'mobile-nav-menu' })), hasAvatar && (_jsx(StyledBottomNavigationAction, { onClick: toggleDrawer(!isAvatarOpen, MOBILE_NAV_PANEL_TYPES.AVATAR), icon: !hideAvatarInitials
183
+ ? _jsx(StyledAvatar, { children: avatarInitials })
184
+ : value === (priorityItems ? priorityItems.length + 1 : 1) ? _jsx(Person, {}) : _jsx(PersonOutline, {}),
185
+ // @ts-expect-error
186
+ component: motion.button, variants: variantsButtons, "aria-label": isAvatarOpen ? 'Close Profile Menu' : 'Open Profile Menu', "aria-expanded": isAvatarOpen ? 'true' : 'false', "aria-controls": 'mobile-nav-menu' }))] }))] }))] }));
187
+ };
188
+ export default MobileNavigation;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export interface IAvatarMenuItemProps {
3
+ label: string;
4
+ icon: any;
5
+ onClick: any;
6
+ }
7
+ export interface ISwipeableTemporaryAvatarProps {
8
+ avatarName: string;
9
+ editProfileText?: string;
10
+ logoutText?: string;
11
+ isAvatarOpen: boolean;
12
+ setIsAvatarOpen?: any;
13
+ mobileNavDirection?: string;
14
+ setMobileNavDirection?: any;
15
+ avatarPanelOnClickSwitchDirection?: any;
16
+ avatarPanelOnClickLogout?: any;
17
+ avatarPanelOnClickViewProfile?: any;
18
+ avatarPanelViewProfileString?: string;
19
+ avatarPanelOnClickEditProfile?: any;
20
+ avatarPanelEditProfileString?: string;
21
+ avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
22
+ avatarPanelOnClickMainAction?: any;
23
+ avatarPanelMainActionString?: string;
24
+ avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
25
+ avatarPanelInvertNavString?: string;
26
+ }
27
+ declare const SwipeableTemporaryAvatar: (props: ISwipeableTemporaryAvatarProps) => React.ReactElement;
28
+ export default SwipeableTemporaryAvatar;
@@ -0,0 +1,124 @@
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";
13
+ import React, { useEffect } from 'react';
14
+ import { Box, ButtonGroup, IconButton, Button, Link, List, ListItem, ListItemIcon, ListItemText } from '../../../index';
15
+ import { StyledSwipeableAvatar, StyledBox, StyledBoxProfile, StyledAvatarName, StyledAvatar, StyledOutlineButton, StyledBoxProfileEdit, StyledListItemButton } from './MobileNavigationAvatarStyles';
16
+ import { useTheme } from '@mui/material/styles';
17
+ import EditIcon from '@mui/icons-material/Edit';
18
+ import LogoutIcon from '@mui/icons-material/Logout';
19
+ import { motion } from 'framer-motion';
20
+ import { motionParent, motionFadeIn, motionFadeInUp, motionWhileHover, motionWhileTap } from './MobileNavigationMotion';
21
+ import ToggleOffIcon from '@mui/icons-material/ToggleOff';
22
+ import ToggleOnIcon from '@mui/icons-material/ToggleOn';
23
+ import { handleAvatarInitials } from '../../../utils/helpers';
24
+ var SwipeableTemporaryAvatar = function (props) {
25
+ var _a;
26
+ var theme = useTheme();
27
+ var avatarName = props.avatarName, mobileNavDirection = props.mobileNavDirection, isAvatarOpen = props.isAvatarOpen, setIsAvatarOpen = props.setIsAvatarOpen, setMobileNavDirection = props.setMobileNavDirection, avatarPanelOnClickSwitchDirection = props.avatarPanelOnClickSwitchDirection, avatarPanelOnClickLogout = props.avatarPanelOnClickLogout, avatarPanelOnClickViewProfile = props.avatarPanelOnClickViewProfile, avatarPanelViewProfileString = props.avatarPanelViewProfileString, avatarPanelOnClickEditProfile = props.avatarPanelOnClickEditProfile, avatarPanelEditProfileString = props.avatarPanelEditProfileString, avatarPanelMenuItems = props.avatarPanelMenuItems, avatarPanelOnClickMainAction = props.avatarPanelOnClickMainAction, avatarPanelMainActionString = props.avatarPanelMainActionString, avatarPanelSettingItems = props.avatarPanelSettingItems, avatarPanelInvertNavString = props.avatarPanelInvertNavString;
28
+ var _b = React.useState(isAvatarOpen !== null && isAvatarOpen !== void 0 ? isAvatarOpen : false), isOpen = _b[0], setIsOpen = _b[1];
29
+ React.useEffect(function () { return handleOpenState(isAvatarOpen); }, [isAvatarOpen]);
30
+ var handleOpenState = function (open) {
31
+ setIsOpen(open);
32
+ setIsAvatarOpen(open);
33
+ };
34
+ var toggleAvatar = function (open) {
35
+ return function (event) {
36
+ if (event && event.type === 'keydown' &&
37
+ (event.key === 'Tab' ||
38
+ event.key === 'Shift')) {
39
+ return;
40
+ }
41
+ handleOpenState(open);
42
+ };
43
+ };
44
+ useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [
45
+ avatarName
46
+ ]);
47
+ var _c = React.useState((_a = handleAvatarInitials(avatarName)) !== null && _a !== void 0 ? _a : 'AN'), avatarInitials = _c[0], setAvatarInitials = _c[1];
48
+ var handleOnClickSwitchDirection = function () {
49
+ setMobileNavDirection(mobileNavDirection === 'rtl' ? 'ltr' : 'rtl');
50
+ avatarPanelOnClickSwitchDirection && avatarPanelOnClickSwitchDirection();
51
+ };
52
+ return (_jsx(StyledSwipeableAvatar, __assign({ anchor: 'bottom', open: isOpen, onClose: toggleAvatar(false), hideBackdrop: true, ModalProps: {
53
+ keepMounted: true
54
+ } }, { children: _jsxs(StyledBox, __assign({ animate: isAvatarOpen ? 'open' : 'closed', variants: motionParent }, { children: [avatarPanelOnClickLogout && (_jsx(IconButton
55
+ // @ts-expect-error
56
+ , __assign({
57
+ // @ts-expect-error
58
+ component: motion.button, variants: motionFadeIn, style: {
59
+ left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto',
60
+ position: 'absolute',
61
+ right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
62
+ top: theme.spacing(1)
63
+ }, onClick: avatarPanelOnClickLogout }, { children: _jsx(LogoutIcon, {}) }))), _jsxs(Box, __assign({ style: {
64
+ alignItems: 'center',
65
+ display: 'flex',
66
+ flexDirection: 'column'
67
+ } }, { children: [_jsxs(StyledBoxProfile, __assign({ variants: motionFadeInUp }, { children: [_jsx(StyledAvatar, __assign({ style: { marginRight: '0.5rem' } }, { children: avatarInitials })), _jsxs(StyledAvatarName, { children: [_jsx("span", __assign({ style: { fontWeight: 300 } }, { children: "Hi," })), " ", _jsx("strong", { children: avatarName.split(' ')[0] })] })] })), avatarPanelOnClickViewProfile && (_jsx(StyledBoxProfileEdit, __assign({ variants: motionFadeInUp, style: {
68
+ flexDirection: 'row',
69
+ marginBottom: theme.spacing(1)
70
+ } }, { children: _jsxs(ButtonGroup, __assign({ variant: "contained", "aria-label": "split button" }, { children: [_jsx(Button, __assign({ variant: 'contained', color: 'primary', size: 'medium', onClick: avatarPanelOnClickViewProfile }, { children: avatarPanelViewProfileString !== null && avatarPanelViewProfileString !== void 0 ? avatarPanelViewProfileString : 'View Profile' })), avatarPanelOnClickEditProfile && (_jsx(Button, __assign({ size: 'medium', "aria-label": avatarPanelEditProfileString !== null && avatarPanelEditProfileString !== void 0 ? avatarPanelEditProfileString : 'Edit Profile', onClick: avatarPanelOnClickEditProfile }, { children: _jsx(EditIcon, {}) })))] })) })))] })), _jsxs(Box, __assign({ style: {
71
+ alignItems: 'center',
72
+ display: 'flex',
73
+ flexDirection: 'column'
74
+ } }, { children: [avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (_jsx(List, __assign({ style: {
75
+ marginInlineStart: '3rem',
76
+ marginBottom: theme.spacing(2),
77
+ maxWidth: '18rem'
78
+ } }, { children: avatarPanelMenuItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
79
+ // TODO: figure out if these are links or buttons
80
+ // @ts-expect-error
81
+ , __assign({
82
+ // TODO: figure out if these are links or buttons
83
+ // @ts-expect-error
84
+ component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
85
+ minWidth: theme.spacing(5)
86
+ } }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))), avatarPanelOnClickMainAction && _jsx(StyledOutlineButton
87
+ // @ts-expect-error
88
+ , __assign({
89
+ // @ts-expect-error
90
+ component: motion.button, variants: motionFadeInUp, disablePadding: true, variant: 'outlined', color: 'primary', size: 'medium', onClick: avatarPanelOnClickMainAction }, { children: avatarPanelMainActionString })), _jsxs(List, __assign({ style: { marginBottom: theme.spacing(2) } }, { children: [avatarPanelSettingItems &&
91
+ avatarPanelSettingItems.length > 0 &&
92
+ avatarPanelSettingItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
93
+ // TODO: figure out if these are links or buttons
94
+ // @ts-expect-error
95
+ , __assign({
96
+ // TODO: figure out if these are links or buttons
97
+ // @ts-expect-error
98
+ component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
99
+ minWidth: theme.spacing(5)
100
+ } }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }), avatarPanelOnClickSwitchDirection && (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
101
+ // TODO: figure out if these are links or buttons
102
+ // @ts-expect-error
103
+ , __assign({
104
+ // TODO: figure out if these are links or buttons
105
+ // @ts-expect-error
106
+ component: Link, role: 'link', onClick: handleOnClickSwitchDirection }, { children: [_jsx(ListItemText, { primary: avatarPanelInvertNavString !== null && avatarPanelInvertNavString !== void 0 ? avatarPanelInvertNavString : 'Invert navigation bar' }), _jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
107
+ minWidth: theme.spacing(5),
108
+ marginInlineStart: '0.5rem'
109
+ } }, { children: mobileNavDirection === 'ltr'
110
+ ? (_jsx(ToggleOffIcon, { style: {
111
+ boxSizing: 'border-box',
112
+ height: '2em',
113
+ padding: '0.15em',
114
+ width: '2em'
115
+ } }))
116
+ : (_jsx(ToggleOnIcon, { style: {
117
+ boxSizing: 'border-box',
118
+ color: 'green',
119
+ height: '2em',
120
+ padding: '0.15em',
121
+ width: '2em'
122
+ } })) }))] })) })))] }))] }))] })) })));
123
+ };
124
+ export default SwipeableTemporaryAvatar;