@learningpool/ui 1.5.0 → 1.6.0-beta.10

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 (81) 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 +183 -0
  5. package/components/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +28 -0
  6. package/components/navigation/MobileNavigation/MobileNavigationAvatar.js +122 -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/VerticalNavigation.d.ts +25 -10
  36. package/components/navigation/VerticalNavigation/VerticalNavigation.js +179 -92
  37. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +4 -0
  38. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +84 -0
  39. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +827 -0
  40. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +31 -0
  41. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +4 -0
  42. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +91 -0
  43. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +15 -0
  44. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +29 -0
  45. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +112 -0
  46. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +69 -0
  47. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +126 -0
  48. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +70 -0
  49. package/components/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +141 -0
  50. package/components/navigation/VerticalNavigation/VerticalNavigationMotion.js +109 -0
  51. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +31 -90
  52. package/components/navigation/VerticalNavigation/VerticalNavigationStyles.js +73 -259
  53. package/components/stream/AppSwitcher/AppSwitcher.d.ts +36 -0
  54. package/components/stream/AppSwitcher/AppSwitcher.js +307 -0
  55. package/components/stream/AppSwitcher/AppSwitcherItem.d.ts +16 -0
  56. package/components/stream/AppSwitcher/AppSwitcherItem.js +51 -0
  57. package/components/stream/AppSwitcher/AppSwitcherStyles.d.ts +17 -0
  58. package/components/stream/AppSwitcher/AppSwitcherStyles.js +48 -0
  59. package/components/stream/AppSwitcher/constants.d.ts +34 -0
  60. package/components/stream/AppSwitcher/constants.js +27 -0
  61. package/index.d.ts +1 -0
  62. package/index.js +1 -0
  63. package/lang/en-us.d.ts +6 -0
  64. package/lang/en-us.js +6 -0
  65. package/package.json +6 -2
  66. package/types/components/navigation/VerticalNavigation.d.ts +48 -0
  67. package/types/components/navigation/VerticalNavigation.js +1 -0
  68. package/types/components/navigation/VerticalNavigationAvatar.d.ts +22 -0
  69. package/types/components/navigation/VerticalNavigationAvatar.js +1 -0
  70. package/types/components/stream/AppSwitcher.d.ts +9 -0
  71. package/types/components/stream/AppSwitcher.js +1 -0
  72. package/types/index.d.ts +3 -0
  73. package/types/index.js +3 -0
  74. package/utils/constants.d.ts +6 -0
  75. package/utils/constants.js +6 -0
  76. package/utils/helpers.d.ts +6 -0
  77. package/utils/helpers.js +17 -0
  78. package/utils/hooks.d.ts +1 -0
  79. package/utils/hooks.js +29 -0
  80. package/utils/theme.d.ts +4 -0
  81. 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,183 @@
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
+ import { handleAvatarInitials } from '../../../utils/helpers';
38
+ var MobileNavigation = function (props) {
39
+ var _a, _b, _c;
40
+ 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"]);
41
+ var propIsDrawerOpen = typeof (props === null || props === void 0 ? void 0 : props.isDrawerOpen) === 'boolean' ? props.isDrawerOpen : undefined;
42
+ var propIsSearchOpen = typeof (props === null || props === void 0 ? void 0 : props.isSearchOpen) === 'boolean' ? props.isSearchOpen : undefined;
43
+ var propIsAvatarOpen = typeof (props === null || props === void 0 ? void 0 : props.isAvatarOpen) === 'boolean' ? props.isAvatarOpen : undefined;
44
+ var avatarName = (_a = props === null || props === void 0 ? void 0 : props.avatarName) !== null && _a !== void 0 ? _a : 'Avatar name';
45
+ var _d = React.useState(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false), isDrawerOpen = _d[0], setIsDrawerOpen = _d[1];
46
+ var _e = React.useState(propIsSearchOpen !== null && propIsSearchOpen !== void 0 ? propIsSearchOpen : false), isSearchOpen = _e[0], setIsSearchOpen = _e[1];
47
+ var _f = React.useState(propIsAvatarOpen !== null && propIsAvatarOpen !== void 0 ? propIsAvatarOpen : false), isAvatarOpen = _f[0], setIsAvatarOpen = _f[1];
48
+ var maxMobilePrimaryItems = 3;
49
+ var priorityItems = slice(items, 0, maxMobilePrimaryItems);
50
+ var _g = React.useState(0), value = _g[0], setValue = _g[1];
51
+ var _h = React.useState(0), mobileNotchPosition = _h[0], setMobileNotchPosition = _h[1];
52
+ var windowWidth = useCurrentWidth();
53
+ var currentDirection = window.localStorage.getItem('@learningpool/ui/store/mobile-navigation-direction');
54
+ var _j = React.useState(currentDirection !== null && currentDirection !== void 0 ? currentDirection : 'ltr'), mobileNavDirection = _j[0], setMobileNavDirection = _j[1];
55
+ useEffect(function () {
56
+ window.localStorage.setItem('@learningpool/ui/store/mobile-navigation-direction', mobileNavDirection);
57
+ positionMobileNotch();
58
+ }, [mobileNavDirection]);
59
+ useEffect(function () { return setIsDrawerOpen(propIsDrawerOpen !== null && propIsDrawerOpen !== void 0 ? propIsDrawerOpen : false); }, [propIsDrawerOpen]);
60
+ useEffect(function () { return setIsSearchOpen(propIsSearchOpen !== null && propIsSearchOpen !== void 0 ? propIsSearchOpen : false); }, [propIsSearchOpen]);
61
+ useEffect(function () { return setIsAvatarOpen(propIsAvatarOpen !== null && propIsAvatarOpen !== void 0 ? propIsAvatarOpen : false); }, [propIsAvatarOpen]);
62
+ useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [avatarName]);
63
+ useEffect(function () {
64
+ function hideNotch() {
65
+ var HIDE_NOTCH = -1;
66
+ if (!isDrawerOpen && !isSearchOpen && !isAvatarOpen) {
67
+ setValue(HIDE_NOTCH);
68
+ }
69
+ }
70
+ hideNotch();
71
+ }, [isDrawerOpen, isSearchOpen, isAvatarOpen]);
72
+ var _k = React.useState((_b = handleAvatarInitials(avatarName)) !== null && _b !== void 0 ? _b : 'AN'), avatarInitials = _k[0], setAvatarInitials = _k[1];
73
+ var toggleDrawer = function (open, action) { return function (event) {
74
+ event === null || event === void 0 ? void 0 : event.stopPropagation();
75
+ if (event.type === 'keydown') {
76
+ if (event.key === 'Tab' || event.key === 'Shift') {
77
+ return;
78
+ }
79
+ }
80
+ // Close any open drawers
81
+ setIsDrawerOpen(false);
82
+ setIsSearchOpen(false);
83
+ setIsAvatarOpen(false);
84
+ // Handle drawer toggling based on 'action' or default to 'drawer'
85
+ switch (action) {
86
+ case MOBILE_NAV_PANEL_TYPES.SEARCH: {
87
+ setIsSearchOpen(open !== null && open !== void 0 ? open : !isSearchOpen);
88
+ setValue(1);
89
+ break;
90
+ }
91
+ case MOBILE_NAV_PANEL_TYPES.AVATAR: {
92
+ setIsAvatarOpen(open !== null && open !== void 0 ? open : !isAvatarOpen);
93
+ break;
94
+ }
95
+ default: {
96
+ setIsDrawerOpen(open !== null && open !== void 0 ? open : !isDrawerOpen);
97
+ setValue(0);
98
+ break;
99
+ }
100
+ }
101
+ }; };
102
+ var NOTCH = {
103
+ Height: 50,
104
+ Width: 50
105
+ };
106
+ var BOTTOM_NAVIGATION_ITEM_DOM_ELEMENTS = document.querySelectorAll('.MuiBottomNavigationAction-root, .bottom-navigation-item');
107
+ var positionMobileNotch = function () {
108
+ var _a;
109
+ var selectedDOMRect = (_a = BOTTOM_NAVIGATION_ITEM_DOM_ELEMENTS[value]) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
110
+ setMobileNotchPosition(selectedDOMRect ? selectedDOMRect.left + (selectedDOMRect.width / 2) - (NOTCH.Width / 2) : mobileNotchPosition);
111
+ };
112
+ useEffect(function () { return positionMobileNotch(); }, [
113
+ value,
114
+ windowWidth,
115
+ // Fix notch position if scrollbar is hidden/shown
116
+ (_c = BOTTOM_NAVIGATION_ITEM_DOM_ELEMENTS[value]) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()
117
+ ]);
118
+ var variantsPaper = {
119
+ open: {
120
+ opacity: 1
121
+ }
122
+ };
123
+ var variantsContainer = {
124
+ open: {
125
+ transition: { staggerChildren: 0.07, delayChildren: 0.25 }
126
+ }
127
+ };
128
+ var variantsButtons = {
129
+ open: {
130
+ y: 0,
131
+ opacity: 1,
132
+ transition: {
133
+ y: { stiffness: 500, velocity: -100 }
134
+ }
135
+ }
136
+ };
137
+ 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,
138
+ // @ts-expect-error
139
+ component: motion.div, animate: 'open', variants: variantsPaper, initial: { opacity: 0 }, transition: {
140
+ // when: 'beforeChildren'
141
+ } }, { children: [showNotchIndicator &&
142
+ _jsxs(motion.div, __assign({ style: { zIndex: '-1' }, initial: {
143
+ opacity: 0,
144
+ x: -75,
145
+ y: 100
146
+ }, animate: {
147
+ opacity: 1,
148
+ x: mobileNotchPosition,
149
+ y: value < 0 ? 100 : -2
150
+ }, transition: {
151
+ x: {
152
+ // duration: 0.5,
153
+ type: 'spring',
154
+ // mass: 0.5,
155
+ bounce: 0.25
156
+ // stiffness: 50
157
+ },
158
+ y: {
159
+ delay: 0.25,
160
+ // duration: 0.5,
161
+ type: 'spring',
162
+ // mass: 0.5,
163
+ bounce: 0
164
+ }
165
+ // duration: 0.5
166
+ } }, { 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); },
167
+ // @ts-expect-error
168
+ component: motion.div, animate: 'open', variants: variantsContainer, style: {
169
+ flexDirection: mobileNavDirection && mobileNavDirection === 'rtl' ? 'row-reverse' : 'row'
170
+ } }, { children: [_jsx(StyledBottomNavigationAction, { icon: _jsx(ToggleX, {}), onClick: toggleDrawer(!isDrawerOpen, MOBILE_NAV_PANEL_TYPES.DRAWER),
171
+ // @ts-expect-error
172
+ 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: {
173
+ marginInlineStart: (hasSearch || hasAvatar) && (mobileNavDirection && mobileNavDirection === 'rtl') ? 'auto' : 'initial',
174
+ marginInlineEnd: (hasSearch || hasAvatar) && (mobileNavDirection && mobileNavDirection === 'rtl') ? 'initial' : 'auto'
175
+ } }), hasSearch && (_jsx(StyledBottomNavigationAction, { icon: _jsx(ToggleSearchX, {}), onClick: toggleDrawer(!isSearchOpen, MOBILE_NAV_PANEL_TYPES.SEARCH),
176
+ // @ts-expect-error
177
+ 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
178
+ ? _jsx(StyledAvatar, { children: avatarInitials })
179
+ : value === (priorityItems ? priorityItems.length + 1 : 1) ? _jsx(Person, {}) : _jsx(PersonOutline, {}),
180
+ // @ts-expect-error
181
+ component: motion.button, variants: variantsButtons, "aria-label": isAvatarOpen ? 'Close Profile Menu' : 'Open Profile Menu', "aria-expanded": isAvatarOpen ? 'true' : 'false', "aria-controls": 'mobile-nav-menu' }))] }))] }))] }));
182
+ };
183
+ 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,122 @@
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
+ var _c = React.useState((_a = handleAvatarInitials(avatarName)) !== null && _a !== void 0 ? _a : 'AN'), avatarInitials = _c[0], setAvatarInitials = _c[1];
45
+ useEffect(function () { return setAvatarInitials(handleAvatarInitials(avatarName)); }, [avatarName]);
46
+ var handleOnClickSwitchDirection = function () {
47
+ setMobileNavDirection(mobileNavDirection === 'rtl' ? 'ltr' : 'rtl');
48
+ avatarPanelOnClickSwitchDirection && avatarPanelOnClickSwitchDirection();
49
+ };
50
+ return (_jsx(StyledSwipeableAvatar, __assign({ anchor: 'bottom', open: isOpen, onClose: toggleAvatar(false), hideBackdrop: true, ModalProps: {
51
+ keepMounted: true
52
+ } }, { children: _jsxs(StyledBox, __assign({ animate: isAvatarOpen ? 'open' : 'closed', variants: motionParent }, { children: [avatarPanelOnClickLogout && (_jsx(IconButton
53
+ // @ts-expect-error
54
+ , __assign({
55
+ // @ts-expect-error
56
+ component: motion.button, variants: motionFadeIn, style: {
57
+ left: theme.direction === 'rtl' ? theme.spacing(1) : 'auto',
58
+ position: 'absolute',
59
+ right: theme.direction === 'rtl' ? 'auto' : theme.spacing(1),
60
+ top: theme.spacing(1)
61
+ }, onClick: avatarPanelOnClickLogout }, { children: _jsx(LogoutIcon, {}) }))), _jsxs(Box, __assign({ style: {
62
+ alignItems: 'center',
63
+ display: 'flex',
64
+ flexDirection: 'column'
65
+ } }, { 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: {
66
+ flexDirection: 'row',
67
+ marginBottom: theme.spacing(1)
68
+ } }, { 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: {
69
+ alignItems: 'center',
70
+ display: 'flex',
71
+ flexDirection: 'column'
72
+ } }, { children: [avatarPanelMenuItems && avatarPanelMenuItems.length > 0 && (_jsx(List, __assign({ style: {
73
+ marginInlineStart: '3rem',
74
+ marginBottom: theme.spacing(2),
75
+ maxWidth: '18rem'
76
+ } }, { children: avatarPanelMenuItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
77
+ // TODO: figure out if these are links or buttons
78
+ // @ts-expect-error
79
+ , __assign({
80
+ // TODO: figure out if these are links or buttons
81
+ // @ts-expect-error
82
+ component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
83
+ minWidth: theme.spacing(5)
84
+ } }, { children: avatarMenuItem.icon })), _jsx(ListItemText, { primary: avatarMenuItem.label })] })) }))); }) }))), avatarPanelOnClickMainAction && _jsx(StyledOutlineButton
85
+ // @ts-expect-error
86
+ , __assign({
87
+ // @ts-expect-error
88
+ 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 &&
89
+ avatarPanelSettingItems.length > 0 &&
90
+ avatarPanelSettingItems.map(function (avatarMenuItem) { return (_jsx(ListItem, __assign({ component: motion.div, variants: motionFadeInUp, whileHover: motionWhileHover, whileTap: motionWhileTap, disablePadding: true }, { children: _jsxs(StyledListItemButton
91
+ // TODO: figure out if these are links or buttons
92
+ // @ts-expect-error
93
+ , __assign({
94
+ // TODO: figure out if these are links or buttons
95
+ // @ts-expect-error
96
+ component: Link, role: 'link', onClick: avatarMenuItem.onClick }, { children: [_jsx(ListItemIcon, __assign({ "aria-hidden": true, style: {
97
+ minWidth: theme.spacing(5)
98
+ } }, { 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
99
+ // TODO: figure out if these are links or buttons
100
+ // @ts-expect-error
101
+ , __assign({
102
+ // TODO: figure out if these are links or buttons
103
+ // @ts-expect-error
104
+ 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: {
105
+ minWidth: theme.spacing(5),
106
+ marginInlineStart: '0.5rem'
107
+ } }, { children: mobileNavDirection === 'ltr'
108
+ ? (_jsx(ToggleOffIcon, { style: {
109
+ boxSizing: 'border-box',
110
+ height: '2em',
111
+ padding: '0.15em',
112
+ width: '2em'
113
+ } }))
114
+ : (_jsx(ToggleOnIcon, { style: {
115
+ boxSizing: 'border-box',
116
+ color: 'green',
117
+ height: '2em',
118
+ padding: '0.15em',
119
+ width: '2em'
120
+ } })) }))] })) })))] }))] }))] })) })));
121
+ };
122
+ export default SwipeableTemporaryAvatar;