@ebubekirylmaz/link-test 1.0.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.
- package/.babelrc +3 -0
- package/.browserslistrc +1 -0
- package/.env +2 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +58 -0
- package/.gitattributes +1 -0
- package/.github/workflows/publish.yml +66 -0
- package/.prettierignore +1 -0
- package/.prettierrc +10 -0
- package/.storybook/main.js +15 -0
- package/.storybook/preview.js +17 -0
- package/.storybook/vitest.setup.js +6 -0
- package/README.md +1 -0
- package/cypress.config.js +11 -0
- package/index.js +1 -0
- package/package.json +111 -0
- package/project/.eslintrc.cjs +22 -0
- package/project/config.js +18 -0
- package/project/config.menu.js +39 -0
- package/project/config.template.js +31 -0
- package/project/cypress/e2e/layouts.cy.js +170 -0
- package/project/cypress/e2e/login.cy.js +35 -0
- package/project/cypress/e2e/selectbar.cy.js +80 -0
- package/project/cypress/fixtures/CONFIG/MENU_CONFIG.js +39 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_GET.json +51 -0
- package/project/cypress/fixtures/EMPEROR/EMPERORS_POST.json +9 -0
- package/project/cypress/fixtures/OAUTH/GITHUB/user.json +46 -0
- package/project/cypress/fixtures/example.json +5 -0
- package/project/cypress/support/commands.js +104 -0
- package/project/cypress/support/e2e.js +1 -0
- package/project/cypress.config.js +10 -0
- package/project/index.html +12 -0
- package/project/media/ProjectIcons/3d.png +0 -0
- package/project/media/ProjectIcons/box.png +0 -0
- package/project/media/ProjectIcons/cafe.png +0 -0
- package/project/media/ProjectIcons/cargo.png +0 -0
- package/project/media/ProjectIcons/cloud.png +0 -0
- package/project/media/ProjectIcons/code.png +0 -0
- package/project/media/ProjectIcons/company.png +0 -0
- package/project/media/ProjectIcons/conversation.png +0 -0
- package/project/media/ProjectIcons/distributed.png +0 -0
- package/project/media/ProjectIcons/fingerprint.png +0 -0
- package/project/media/ProjectIcons/forest.png +0 -0
- package/project/media/ProjectIcons/headphones.png +0 -0
- package/project/media/ProjectIcons/office.png +0 -0
- package/project/media/ProjectIcons/path.png +0 -0
- package/project/media/ProjectIcons/printer.png +0 -0
- package/project/media/ProjectIcons/project.png +0 -0
- package/project/media/ProjectIcons/resume.png +0 -0
- package/project/media/ProjectIcons/rocket.png +0 -0
- package/project/media/ProjectIcons/rtruck.png +0 -0
- package/project/media/ProjectIcons/sign.png +0 -0
- package/project/media/ProjectIcons/site.png +0 -0
- package/project/media/ProjectIcons/truck.png +0 -0
- package/project/media/logo.png +0 -0
- package/project/package-lock.json +22434 -0
- package/project/package.json +42 -0
- package/project/public/assets/background/overlay_2.jpg +0 -0
- package/project/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/project/public/media/largeLogo.png +0 -0
- package/project/public/media/logo.png +0 -0
- package/project/public/vite.svg +1 -0
- package/project/routes.jsx +47 -0
- package/project/server/mock.json +110 -0
- package/project/server/oauthMock.js +27 -0
- package/project/server/package-lock.json +1505 -0
- package/project/server/package.json +20 -0
- package/project/server/server.js +127 -0
- package/project/src/Container.jsx +7 -0
- package/project/src/components/ActionButton.jsx +18 -0
- package/project/src/hooks/useEmperor.jsx +21 -0
- package/project/src/http/index.js +39 -0
- package/project/src/main.jsx +10 -0
- package/project/src/pages/Battles.jsx +16 -0
- package/project/src/pages/Emperor.jsx +50 -0
- package/project/src/pages/index.jsx +33 -0
- package/project/src/theme.js +151 -0
- package/project/src/widgets/ActionButton.jsx +68 -0
- package/project/src/widgets/AddNewEmperor.jsx +120 -0
- package/project/src/widgets/ProjectContainer.jsx +27 -0
- package/project/vite.config.js +6 -0
- package/project/vite.config.js.timestamp-1709564450418-45fdd27900806.mjs +341 -0
- package/public/assets/background/overlay_2.jpg +0 -0
- package/public/assets/illustrations/illustration_dashboard.png +0 -0
- package/public/vite.svg +1 -0
- package/src/ContextProvider/ContextProvider.jsx +19 -0
- package/src/GlobalSnackMessage/GlobalSnackMessage.jsx +45 -0
- package/src/GlobalSnackMessage/index.js +1 -0
- package/src/GlobalSnackMessage/styles.js +3 -0
- package/src/Platform.jsx +76 -0
- package/src/RouteManager/RouteManager.jsx +56 -0
- package/src/RouteManager/index.js +1 -0
- package/src/assets/illustrations/avatar-shape.jsx +31 -0
- package/src/assets/illustrations/background-shape.jsx +37 -0
- package/src/assets/illustrations/booking-illustration.jsx +335 -0
- package/src/assets/illustrations/check-in-illustration.jsx +96 -0
- package/src/assets/illustrations/check-out-illustration.jsx +69 -0
- package/src/assets/illustrations/coming-soon-illustration.jsx +125 -0
- package/src/assets/illustrations/forbidden-illustration.jsx +95 -0
- package/src/assets/illustrations/index.js +2 -0
- package/src/assets/illustrations/maintenance-illustration.jsx +228 -0
- package/src/assets/illustrations/motivation-illustration.jsx +74 -0
- package/src/assets/illustrations/order-complete-illustration.jsx +126 -0
- package/src/assets/illustrations/page-not-found-illustration.jsx +81 -0
- package/src/assets/illustrations/seo-illustration.jsx +244 -0
- package/src/assets/illustrations/sever-error-illustration.jsx +152 -0
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +161 -0
- package/src/assets/illustrations/upload-illustration.jsx +622 -0
- package/src/components/Iconify/Iconify.jsx +18 -0
- package/src/components/Iconify/index.js +1 -0
- package/src/components/MiniTopBar/MiniTopBar.jsx +25 -0
- package/src/components/MiniTopBar/index.js +1 -0
- package/src/components/MiniTopBar/styles.js +6 -0
- package/src/components/NucleoidLoginForm/NucleoidLoginForm.jsx +69 -0
- package/src/components/NucleoidLoginForm/index.js +1 -0
- package/src/components/NucleoidLoginForm/styles.js +3 -0
- package/src/components/Sidebar/Sidebar.jsx +76 -0
- package/src/components/Sidebar/index.js +1 -0
- package/src/components/Sidebar/styles.js +25 -0
- package/src/components/SocialLoginButtons/SocialLoginButtons.jsx +55 -0
- package/src/components/SocialLoginButtons/index.js +1 -0
- package/src/components/SocialLoginButtons/styles.js +3 -0
- package/src/components/TopNavBar/TopNavBar.jsx +186 -0
- package/src/components/TopNavBar/index.js +1 -0
- package/src/components/TopNavBar/styles.js +7 -0
- package/src/components/animate/index.js +4 -0
- package/src/components/animate/motion-container.jsx +38 -0
- package/src/components/animate/motion-lazy.jsx +11 -0
- package/src/components/animate/motion-viewport.jsx +30 -0
- package/src/components/animate/variants/actions.js +4 -0
- package/src/components/animate/variants/background.js +97 -0
- package/src/components/animate/variants/bounce.js +107 -0
- package/src/components/animate/variants/container.js +20 -0
- package/src/components/animate/variants/fade.js +127 -0
- package/src/components/animate/variants/flip.js +54 -0
- package/src/components/animate/variants/index.js +12 -0
- package/src/components/animate/variants/path.js +12 -0
- package/src/components/animate/variants/rotate.js +33 -0
- package/src/components/animate/variants/scale.js +54 -0
- package/src/components/animate/variants/slide.js +65 -0
- package/src/components/animate/variants/transition.js +20 -0
- package/src/components/animate/variants/zoom.js +130 -0
- package/src/components/chart/chart.js +69 -0
- package/src/components/chart/index.js +5 -0
- package/src/components/chart/use-chart.js +215 -0
- package/src/components/custom-popover/custom-popover.jsx +46 -0
- package/src/components/custom-popover/index.js +3 -0
- package/src/components/custom-popover/styles.js +84 -0
- package/src/components/custom-popover/use-popover.js +22 -0
- package/src/components/custom-popover/utils.js +100 -0
- package/src/components/file-thumbnail/download-button.jsx +39 -0
- package/src/components/file-thumbnail/file-thumbnail.jsx +72 -0
- package/src/components/file-thumbnail/index.js +5 -0
- package/src/components/file-thumbnail/utils.js +148 -0
- package/src/components/image/image.jsx +119 -0
- package/src/components/image/index.js +1 -0
- package/src/components/image/utils.js +15 -0
- package/src/components/label/index.js +1 -0
- package/src/components/label/label.jsx +51 -0
- package/src/components/label/styles.js +78 -0
- package/src/components/loading-screen/index.js +2 -0
- package/src/components/loading-screen/loading-screen.jsx +23 -0
- package/src/components/loading-screen/splash-screen.jsx +95 -0
- package/src/components/logo/index.js +1 -0
- package/src/components/logo/logo.jsx +61 -0
- package/src/components/logo/styles.js +17 -0
- package/src/components/nav-section/horizontal/index.js +1 -0
- package/src/components/nav-section/horizontal/nav-item.jsx +224 -0
- package/src/components/nav-section/horizontal/nav-list.jsx +113 -0
- package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +41 -0
- package/src/components/nav-section/index.js +3 -0
- package/src/components/nav-section/mini/index.js +1 -0
- package/src/components/nav-section/mini/nav-item.jsx +242 -0
- package/src/components/nav-section/mini/nav-list.jsx +107 -0
- package/src/components/nav-section/mini/nav-section-mini.jsx +35 -0
- package/src/components/nav-section/vertical/index.js +1 -0
- package/src/components/nav-section/vertical/nav-item.jsx +294 -0
- package/src/components/nav-section/vertical/nav-list.jsx +66 -0
- package/src/components/nav-section/vertical/nav-section-vertical.jsx +74 -0
- package/src/components/scrollbar/index.js +1 -0
- package/src/components/scrollbar/scrollbar.jsx +39 -0
- package/src/components/scrollbar/styles.js +27 -0
- package/src/components/search-not-found/index.js +1 -0
- package/src/components/search-not-found/search-not-found.jsx +29 -0
- package/src/components/settings/context/index.js +2 -0
- package/src/components/settings/context/settings-context.js +14 -0
- package/src/components/settings/context/settings-provider.jsx +46 -0
- package/src/components/settings/drawer/base-option.jsx +52 -0
- package/src/components/settings/drawer/fullscreen-option.jsx +58 -0
- package/src/components/settings/drawer/index.js +1 -0
- package/src/components/settings/drawer/layout-options.jsx +144 -0
- package/src/components/settings/drawer/presets-options.jsx +53 -0
- package/src/components/settings/drawer/settings-drawer.jsx +189 -0
- package/src/components/settings/drawer/stretch-options.jsx +67 -0
- package/src/components/settings/index.js +3 -0
- package/src/components/svg-color/index.js +1 -0
- package/src/components/svg-color/svg-color.jsx +23 -0
- package/src/config/config.js +48 -0
- package/src/config/schemas.js +148 -0
- package/src/context/reducer.js +52 -0
- package/src/global.css +2 -0
- package/src/hooks/index.js +2 -0
- package/src/hooks/use-boolean.js +27 -0
- package/src/hooks/use-event-listener.js +34 -0
- package/src/hooks/use-local-storage.js +89 -0
- package/src/hooks/use-off-set-top.js +37 -0
- package/src/hooks/use-responsive.js +47 -0
- package/src/hooks/use-scroll-to-top.js +14 -0
- package/src/hooks/use-user.js +58 -0
- package/src/hooks/useApi.js +25 -0
- package/src/hooks/useItemsState.js +23 -0
- package/src/hooks/useProjects.js +24 -0
- package/src/hooks/useSettings.jsx +51 -0
- package/src/http/index.js +155 -0
- package/src/http/oauth.js +27 -0
- package/src/http/user.js +110 -0
- package/src/layouts/AppLayout.jsx +113 -0
- package/src/layouts/CompactLayout/CompactLayout.jsx +32 -0
- package/src/layouts/CompactLayout/index.js +1 -0
- package/src/layouts/DashboardLayout/DashboardLayout.jsx +87 -0
- package/src/layouts/DashboardLayout/config-navigation.jsx +0 -0
- package/src/layouts/DashboardLayout/header.jsx +104 -0
- package/src/layouts/DashboardLayout/index.js +2 -0
- package/src/layouts/DashboardLayout/main.jsx +64 -0
- package/src/layouts/DashboardLayout/nav-horizontal.jsx +62 -0
- package/src/layouts/DashboardLayout/nav-mini.jsx +99 -0
- package/src/layouts/DashboardLayout/nav-vertical.jsx +201 -0
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +101 -0
- package/src/layouts/FullScreenLayout/index.js +1 -0
- package/src/layouts/FullScreenLayout/nav-horizontal.jsx +50 -0
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +136 -0
- package/src/layouts/MainLayout/MainLayout.jsx +21 -0
- package/src/layouts/MainLayout/footer.jsx +153 -0
- package/src/layouts/MainLayout/header.jsx +81 -0
- package/src/layouts/MainLayout/index.js +1 -0
- package/src/layouts/MainLayout/nav/desktop/index.jsx +20 -0
- package/src/layouts/MainLayout/nav/desktop/nav-item.jsx +186 -0
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +145 -0
- package/src/layouts/MainLayout/nav/mobile/index.jsx +60 -0
- package/src/layouts/MainLayout/nav/mobile/nav-item.jsx +90 -0
- package/src/layouts/MainLayout/nav/mobile/nav-list.jsx +72 -0
- package/src/layouts/Page.jsx +16 -0
- package/src/layouts/SimpleLayout/SimpleLayout.jsx +8 -0
- package/src/layouts/SimpleLayout/index.js +1 -0
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +31 -0
- package/src/layouts/TwoSideLayout/index.js +1 -0
- package/src/layouts/auth/classic.jsx +95 -0
- package/src/layouts/auth/modern-compact.jsx +51 -0
- package/src/layouts/auth/modern.jsx +94 -0
- package/src/layouts/common/ProjectBar/index.jsx +325 -0
- package/src/layouts/common/ProjectBar/result-item.jsx +90 -0
- package/src/layouts/common/ProjectBar/utils.js +86 -0
- package/src/layouts/common/account-popover.jsx +116 -0
- package/src/layouts/common/header-shadow.jsx +26 -0
- package/src/layouts/common/header-sim.jsx +52 -0
- package/src/layouts/common/header-simple.jsx +76 -0
- package/src/layouts/common/nav-toggle-button.jsx +57 -0
- package/src/layouts/common/notifications-popover/index.jsx +177 -0
- package/src/layouts/common/notifications-popover/notification-item.jsx +252 -0
- package/src/layouts/common/settings-button.jsx +48 -0
- package/src/layouts/config-layout.js +12 -0
- package/src/layouts/index.js +7 -0
- package/src/lib/AddItemWizard/AddItemWizard.jsx +211 -0
- package/src/lib/AddItemWizard/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +88 -0
- package/src/lib/CustomBreadcrumbs/index.js +1 -0
- package/src/lib/CustomBreadcrumbs/link-item.jsx +58 -0
- package/src/lib/CustomPopover/CustomPopover.jsx +46 -0
- package/src/lib/CustomPopover/index.js +3 -0
- package/src/lib/CustomPopover/styles.js +82 -0
- package/src/lib/CustomPopover/usePopover.js +20 -0
- package/src/lib/CustomPopover/utils.js +100 -0
- package/src/lib/Flow/connectors/DynamicConnector.jsx +247 -0
- package/src/lib/Flow/core/Flow.jsx +79 -0
- package/src/lib/Flow/core/FlowNode.jsx +68 -0
- package/src/lib/Flow/core/FlowViewport.jsx +259 -0
- package/src/lib/Flow/graph/FloatingGraph.jsx +44 -0
- package/src/lib/Flow/hooks/useGraphOperations.js +362 -0
- package/src/lib/Flow/hooks/useNodeStyle.js +56 -0
- package/src/lib/Flow/index.js +1 -0
- package/src/lib/Flow/layouts/ActionNode.jsx +78 -0
- package/src/lib/Flow/layouts/AnimatedNode.jsx +22 -0
- package/src/lib/Flow/layouts/CardLayout.jsx +397 -0
- package/src/lib/Flow/layouts/InfoNode.jsx +255 -0
- package/src/lib/Flow/layouts/LoadingNode.jsx +37 -0
- package/src/lib/Flow/nodes/DefaultCard.jsx +107 -0
- package/src/lib/Flow/nodes/DraggableNode.jsx +162 -0
- package/src/lib/Flow/nodes/FlowNodeView.jsx +214 -0
- package/src/lib/Flow/selection/SelectionContext.jsx +259 -0
- package/src/lib/Flow/selection/SelectionOverlay.jsx +31 -0
- package/src/lib/Flow/styles.js +154 -0
- package/src/lib/Flow/utils/flowUtils.js +268 -0
- package/src/lib/FormProvider/FormProvider.jsx +16 -0
- package/src/lib/FormProvider/index.js +1 -0
- package/src/lib/IconSelector/IconSelector.jsx +89 -0
- package/src/lib/Iconify/Iconify.jsx +17 -0
- package/src/lib/Iconify/index.js +1 -0
- package/src/lib/Image/Image.jsx +116 -0
- package/src/lib/Image/index.js +1 -0
- package/src/lib/Image/utils.js +15 -0
- package/src/lib/ItemSummary/ItemSummary.jsx +77 -0
- package/src/lib/ItemSummary/ItemsSummary.jsx +163 -0
- package/src/lib/Label/Label.jsx +51 -0
- package/src/lib/Label/index.js +1 -0
- package/src/lib/Label/styles.js +76 -0
- package/src/lib/ProjectWizard.jsx +137 -0
- package/src/lib/RHFTextfield/RHFTextfield.jsx +39 -0
- package/src/lib/RHFTextfield/index.js +1 -0
- package/src/lib/Scrollbar/Scrollbar.jsx +39 -0
- package/src/lib/Scrollbar/index.js +1 -0
- package/src/lib/Scrollbar/styles.js +27 -0
- package/src/lib/SearchNotFound/SearchNotFound.jsx +29 -0
- package/src/lib/SearchNotFound/index.js +1 -0
- package/src/lib/SparkleInput/SparkleInput.jsx +51 -0
- package/src/lib/StepComponent/StepComponent.jsx +98 -0
- package/src/lib/SvgColor/SvgColor.jsx +28 -0
- package/src/lib/SvgColor/index.js +1 -0
- package/src/lib/TableHeadCustom/TableHeadCustom.jsx +87 -0
- package/src/lib/TableHeadCustom/index.js +1 -0
- package/src/lib/TableSelectedAction/TableSelectedAction.jsx +72 -0
- package/src/lib/TableSelectedAction/index.js +1 -0
- package/src/lib/index.js +36 -0
- package/src/lib/lib/Icons.js +40 -0
- package/src/lib/lib/context.json +272 -0
- package/src/lib/useChart/useChart.js +179 -0
- package/src/lib/useTable/useTable.js +121 -0
- package/src/pages/404.jsx +17 -0
- package/src/pages/Callback.jsx +126 -0
- package/src/pages/ConfigError.jsx +49 -0
- package/src/pages/LoginPage.jsx +43 -0
- package/src/routes/components/index.js +1 -0
- package/src/routes/components/router-link.jsx +11 -0
- package/src/routes/hooks/index.js +4 -0
- package/src/routes/hooks/use-active-link.js +15 -0
- package/src/routes/hooks/use-pathname.js +10 -0
- package/src/routes/hooks/use-router.js +21 -0
- package/src/stories/FlowChart.stories.jsx +333 -0
- package/src/stories/Iconify.stories.jsx +183 -0
- package/src/stories/Label.stories.jsx +447 -0
- package/src/stories/Navbar.stories.jsx +588 -0
- package/src/theme/css.js +152 -0
- package/src/theme/custom-shadows.js +47 -0
- package/src/theme/index.jsx +100 -0
- package/src/theme/options/contrast.js +34 -0
- package/src/theme/options/presets.js +89 -0
- package/src/theme/options/right-to-left.jsx +26 -0
- package/src/theme/overrides/components/accordion.js +43 -0
- package/src/theme/overrides/components/alert.js +69 -0
- package/src/theme/overrides/components/appbar.js +13 -0
- package/src/theme/overrides/components/autocomplete.js +44 -0
- package/src/theme/overrides/components/avatar.js +111 -0
- package/src/theme/overrides/components/backdrop.js +18 -0
- package/src/theme/overrides/components/badge.js +90 -0
- package/src/theme/overrides/components/breadcrumbs.js +21 -0
- package/src/theme/overrides/components/button-group.js +90 -0
- package/src/theme/overrides/components/button.js +145 -0
- package/src/theme/overrides/components/card.js +30 -0
- package/src/theme/overrides/components/checkbox.js +13 -0
- package/src/theme/overrides/components/chip.js +129 -0
- package/src/theme/overrides/components/css-baseline.js +48 -0
- package/src/theme/overrides/components/data-grid.js +94 -0
- package/src/theme/overrides/components/date-picker.jsx +94 -0
- package/src/theme/overrides/components/dialog.js +49 -0
- package/src/theme/overrides/components/drawer.js +39 -0
- package/src/theme/overrides/components/fab.js +165 -0
- package/src/theme/overrides/components/list.js +33 -0
- package/src/theme/overrides/components/loading-button.js +30 -0
- package/src/theme/overrides/components/menu.js +15 -0
- package/src/theme/overrides/components/pagination.js +81 -0
- package/src/theme/overrides/components/paper.js +18 -0
- package/src/theme/overrides/components/popover.js +20 -0
- package/src/theme/overrides/components/progress.js +40 -0
- package/src/theme/overrides/components/radio.js +22 -0
- package/src/theme/overrides/components/rating.js +40 -0
- package/src/theme/overrides/components/select.js +26 -0
- package/src/theme/overrides/components/skeleton.js +16 -0
- package/src/theme/overrides/components/slider.js +30 -0
- package/src/theme/overrides/components/stepper.js +13 -0
- package/src/theme/overrides/components/svg-icon.js +15 -0
- package/src/theme/overrides/components/switch.js +66 -0
- package/src/theme/overrides/components/table.js +79 -0
- package/src/theme/overrides/components/tabs.js +39 -0
- package/src/theme/overrides/components/textfield.js +146 -0
- package/src/theme/overrides/components/timeline.js +20 -0
- package/src/theme/overrides/components/toggle-button.js +70 -0
- package/src/theme/overrides/components/tooltip.js +18 -0
- package/src/theme/overrides/components/tree-view.js +16 -0
- package/src/theme/overrides/components/typography.js +16 -0
- package/src/theme/overrides/default-props.jsx +238 -0
- package/src/theme/overrides/index.js +100 -0
- package/src/theme/palette.js +144 -0
- package/src/theme/shadows.js +41 -0
- package/src/theme/typography.js +107 -0
- package/src/utils/flatten-array.js +16 -0
- package/src/utils/format-number.js +37 -0
- package/src/utils/format-time.js +27 -0
- package/src/utils/storage-available.js +24 -0
- package/src/widgets/Login/CognitoLogin.jsx +43 -0
- package/src/widgets/Login/Login.jsx +58 -0
- package/src/widgets/Login/cognitoAuth.jsx +26 -0
- package/src/widgets/LoginForm/LoginForm.jsx +87 -0
- package/src/widgets/LoginForm/LoginFormStyles.js +43 -0
- package/src/widgets/LoginForm/index.js +1 -0
- package/src/widgets/SettingsDialog.jsx +308 -0
- package/src/widgets/error/index.js +1 -0
- package/src/widgets/error/not-found-view.jsx +42 -0
- package/vite/vite.js +77 -0
- package/vite.config.js +7 -0
- package/vitest.config.js +32 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import Container from "@mui/material/Container";
|
|
3
|
+
import Divider from "@mui/material/Divider";
|
|
4
|
+
import Grid from "@mui/material/Unstable_Grid2";
|
|
5
|
+
import Link from "@mui/material/Link";
|
|
6
|
+
import Logo from "../../components/logo";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { RouterLink } from "../../routes/components";
|
|
9
|
+
import Stack from "@mui/material/Stack";
|
|
10
|
+
import Typography from "@mui/material/Typography";
|
|
11
|
+
import { usePathname } from "../../routes/hooks";
|
|
12
|
+
|
|
13
|
+
// ----------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
const LINKS = [
|
|
16
|
+
{
|
|
17
|
+
headline: "Minimal",
|
|
18
|
+
children: [
|
|
19
|
+
{ name: "About us", href: "/" },
|
|
20
|
+
{ name: "Contact us", href: "/" },
|
|
21
|
+
{ name: "FAQs", href: "/" },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
headline: "Legal",
|
|
26
|
+
children: [
|
|
27
|
+
{ name: "Terms and Condition", href: "#" },
|
|
28
|
+
{ name: "Privacy Policy", href: "#" },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
headline: "Contact",
|
|
33
|
+
children: [{ name: "support@minimals.cc", href: "#" }],
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
// ----------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
export default function Footer() {
|
|
40
|
+
const pathname = usePathname();
|
|
41
|
+
|
|
42
|
+
const homePage = pathname === "/";
|
|
43
|
+
|
|
44
|
+
const simpleFooter = (
|
|
45
|
+
<Box
|
|
46
|
+
component="footer"
|
|
47
|
+
sx={{
|
|
48
|
+
py: 5,
|
|
49
|
+
textAlign: "center",
|
|
50
|
+
position: "relative",
|
|
51
|
+
bgcolor: "background.default",
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
<Container>
|
|
55
|
+
<Logo sx={{ mb: 1, mx: "auto" }} />
|
|
56
|
+
|
|
57
|
+
<Typography variant="caption" component="div">
|
|
58
|
+
© All rights reserved
|
|
59
|
+
<br /> made by
|
|
60
|
+
<Link href="https://minimals.cc/"> minimals.cc </Link>
|
|
61
|
+
</Typography>
|
|
62
|
+
</Container>
|
|
63
|
+
</Box>
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
const mainFooter = (
|
|
67
|
+
<Box
|
|
68
|
+
component="footer"
|
|
69
|
+
sx={{
|
|
70
|
+
position: "relative",
|
|
71
|
+
bgcolor: "background.default",
|
|
72
|
+
}}
|
|
73
|
+
>
|
|
74
|
+
<Divider />
|
|
75
|
+
|
|
76
|
+
<Container
|
|
77
|
+
sx={{
|
|
78
|
+
pt: 10,
|
|
79
|
+
pb: 5,
|
|
80
|
+
textAlign: { xs: "center", md: "unset" },
|
|
81
|
+
}}
|
|
82
|
+
>
|
|
83
|
+
<Logo sx={{ mb: 3 }} />
|
|
84
|
+
|
|
85
|
+
<Grid
|
|
86
|
+
container
|
|
87
|
+
justifyContent={{
|
|
88
|
+
xs: "center",
|
|
89
|
+
md: "space-between",
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
<Grid xs={8} md={3}>
|
|
93
|
+
<Typography
|
|
94
|
+
variant="body2"
|
|
95
|
+
sx={{
|
|
96
|
+
maxWidth: 270,
|
|
97
|
+
mx: { xs: "auto", md: "unset" },
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
The starting point for your next project with Minimal UI Kit,
|
|
101
|
+
built on the newest version of Material-UI ©, ready to be
|
|
102
|
+
customized to your style.
|
|
103
|
+
</Typography>
|
|
104
|
+
|
|
105
|
+
<Stack
|
|
106
|
+
direction="row"
|
|
107
|
+
justifyContent={{ xs: "center", md: "flex-start" }}
|
|
108
|
+
sx={{
|
|
109
|
+
mt: 3,
|
|
110
|
+
mb: { xs: 5, md: 0 },
|
|
111
|
+
}}
|
|
112
|
+
></Stack>
|
|
113
|
+
</Grid>
|
|
114
|
+
|
|
115
|
+
<Grid xs={12} md={6}>
|
|
116
|
+
<Stack spacing={5} direction={{ xs: "column", md: "row" }}>
|
|
117
|
+
{LINKS.map((list) => (
|
|
118
|
+
<Stack
|
|
119
|
+
key={list.headline}
|
|
120
|
+
spacing={2}
|
|
121
|
+
alignItems={{ xs: "center", md: "flex-start" }}
|
|
122
|
+
sx={{ width: 1 }}
|
|
123
|
+
>
|
|
124
|
+
<Typography component="div" variant="overline">
|
|
125
|
+
{list.headline}
|
|
126
|
+
</Typography>
|
|
127
|
+
|
|
128
|
+
{list.children.map((link) => (
|
|
129
|
+
<Link
|
|
130
|
+
key={link.name}
|
|
131
|
+
component={RouterLink}
|
|
132
|
+
href={link.href}
|
|
133
|
+
color="inherit"
|
|
134
|
+
variant="body2"
|
|
135
|
+
>
|
|
136
|
+
{link.name}
|
|
137
|
+
</Link>
|
|
138
|
+
))}
|
|
139
|
+
</Stack>
|
|
140
|
+
))}
|
|
141
|
+
</Stack>
|
|
142
|
+
</Grid>
|
|
143
|
+
</Grid>
|
|
144
|
+
|
|
145
|
+
<Typography variant="body2" sx={{ mt: 10 }}>
|
|
146
|
+
© 2021. All rights reserved
|
|
147
|
+
</Typography>
|
|
148
|
+
</Container>
|
|
149
|
+
</Box>
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
return homePage ? simpleFooter : mainFooter;
|
|
153
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import AccountPopover from "../common/account-popover";
|
|
2
|
+
import AppBar from "@mui/material/AppBar";
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
import Container from "@mui/material/Container";
|
|
5
|
+
import { HEADER } from "../config-layout";
|
|
6
|
+
import HeaderShadow from "../common/header-shadow";
|
|
7
|
+
import Logo from "../../components/logo";
|
|
8
|
+
import NavDesktop from "./nav/desktop";
|
|
9
|
+
import NavMobile from "./nav/mobile";
|
|
10
|
+
import NotificationsPopover from "../common/notifications-popover";
|
|
11
|
+
import ProjectBar from "../common/ProjectBar";
|
|
12
|
+
import React from "react";
|
|
13
|
+
import SettingsButton from "../common/settings-button";
|
|
14
|
+
import Stack from "@mui/material/Stack";
|
|
15
|
+
import Toolbar from "@mui/material/Toolbar";
|
|
16
|
+
import { bgBlur } from "../../theme/css";
|
|
17
|
+
import config from "../../config/config";
|
|
18
|
+
import { useOffSetTop } from "../../hooks/use-off-set-top";
|
|
19
|
+
import { useResponsive } from "../../hooks/use-responsive";
|
|
20
|
+
import { useTheme } from "@mui/material/styles";
|
|
21
|
+
|
|
22
|
+
// ----------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
export default function Header() {
|
|
25
|
+
const { topMenu } = config().menu;
|
|
26
|
+
const projectBar = config().template?.projectBar;
|
|
27
|
+
const isLoginConfigured = config().project && config().template?.login;
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
|
|
30
|
+
const mdUp = useResponsive("up", "md");
|
|
31
|
+
const offsetTop = useOffSetTop(HEADER.H_DESKTOP);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<AppBar>
|
|
35
|
+
<Toolbar
|
|
36
|
+
disableGutters
|
|
37
|
+
sx={{
|
|
38
|
+
height: {
|
|
39
|
+
xs: HEADER.H_MOBILE,
|
|
40
|
+
md: HEADER.H_DESKTOP,
|
|
41
|
+
},
|
|
42
|
+
transition: theme.transitions.create(["height"], {
|
|
43
|
+
easing: theme.transitions.easing.easeInOut,
|
|
44
|
+
duration: theme.transitions.duration.shorter,
|
|
45
|
+
}),
|
|
46
|
+
...(offsetTop && {
|
|
47
|
+
...bgBlur({
|
|
48
|
+
color: theme.palette.background.default,
|
|
49
|
+
}),
|
|
50
|
+
height: {
|
|
51
|
+
md: HEADER.H_DESKTOP_OFFSET,
|
|
52
|
+
},
|
|
53
|
+
}),
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<Container sx={{ height: 1, display: "flex", alignItems: "center" }}>
|
|
57
|
+
<Logo sx={{ marginRight: 10 }} />
|
|
58
|
+
{projectBar && <ProjectBar />}
|
|
59
|
+
<Box sx={{ flexGrow: 1 }} />
|
|
60
|
+
|
|
61
|
+
{mdUp && <NavDesktop data={topMenu} />}
|
|
62
|
+
|
|
63
|
+
<Stack
|
|
64
|
+
alignItems="center"
|
|
65
|
+
direction={{ xs: "row", md: "row-reverse" }}
|
|
66
|
+
>
|
|
67
|
+
<NotificationsPopover />
|
|
68
|
+
|
|
69
|
+
<SettingsButton />
|
|
70
|
+
|
|
71
|
+
{isLoginConfigured && <AccountPopover />}
|
|
72
|
+
|
|
73
|
+
{!mdUp && <NavMobile data={topMenu} />}
|
|
74
|
+
</Stack>
|
|
75
|
+
</Container>
|
|
76
|
+
</Toolbar>
|
|
77
|
+
|
|
78
|
+
{offsetTop && <HeaderShadow />}
|
|
79
|
+
</AppBar>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./MainLayout";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import NavList from "./nav-list";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Stack from "@mui/material/Stack";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
export default function NavDesktop({ data }) {
|
|
8
|
+
return (
|
|
9
|
+
<Stack
|
|
10
|
+
component="nav"
|
|
11
|
+
direction="row"
|
|
12
|
+
spacing={5}
|
|
13
|
+
sx={{ mr: 2.5, height: 1 }}
|
|
14
|
+
>
|
|
15
|
+
{data.map((list) => (
|
|
16
|
+
<NavList key={list.title} data={list} />
|
|
17
|
+
))}
|
|
18
|
+
</Stack>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import CardActionArea from "@mui/material/CardActionArea";
|
|
3
|
+
import Iconify from "../../../../components/Iconify";
|
|
4
|
+
import Link from "@mui/material/Link";
|
|
5
|
+
import ListItemButton from "@mui/material/ListItemButton";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { RouterLink } from "../../../../routes/components";
|
|
8
|
+
import { forwardRef } from "react";
|
|
9
|
+
import { motion } from "framer-motion";
|
|
10
|
+
import { styled } from "@mui/material/styles";
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
export const NavItem = forwardRef(
|
|
15
|
+
(
|
|
16
|
+
{ title, path, open, active, hasChild, externalLink, subItem, ...other },
|
|
17
|
+
ref
|
|
18
|
+
) => {
|
|
19
|
+
const renderContent = (
|
|
20
|
+
<StyledNavItem
|
|
21
|
+
disableRipple
|
|
22
|
+
disableTouchRipple
|
|
23
|
+
ref={ref}
|
|
24
|
+
open={open}
|
|
25
|
+
active={active}
|
|
26
|
+
subItem={subItem}
|
|
27
|
+
{...other}
|
|
28
|
+
>
|
|
29
|
+
{title}
|
|
30
|
+
|
|
31
|
+
{hasChild && (
|
|
32
|
+
<Iconify
|
|
33
|
+
width={16}
|
|
34
|
+
icon="eva:arrow-ios-downward-fill"
|
|
35
|
+
sx={{ ml: 1 }}
|
|
36
|
+
/>
|
|
37
|
+
)}
|
|
38
|
+
</StyledNavItem>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
if (hasChild) {
|
|
42
|
+
return renderContent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (externalLink) {
|
|
46
|
+
return (
|
|
47
|
+
<Link
|
|
48
|
+
href={path}
|
|
49
|
+
target="_blank"
|
|
50
|
+
rel="noopener"
|
|
51
|
+
color="inherit"
|
|
52
|
+
underline="none"
|
|
53
|
+
>
|
|
54
|
+
{renderContent}
|
|
55
|
+
</Link>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Link component={RouterLink} href={path} color="inherit" underline="none">
|
|
61
|
+
{renderContent}
|
|
62
|
+
</Link>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
// ----------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
const StyledNavItem = styled(ListItemButton, {
|
|
70
|
+
shouldForwardProp: (prop) => prop !== "active" && prop !== "subItem",
|
|
71
|
+
})(({ open, active, subItem, theme }) => {
|
|
72
|
+
const opened = open && !active;
|
|
73
|
+
|
|
74
|
+
const dotStyles = {
|
|
75
|
+
width: 6,
|
|
76
|
+
height: 6,
|
|
77
|
+
left: -12,
|
|
78
|
+
opacity: 0.64,
|
|
79
|
+
content: '""',
|
|
80
|
+
borderRadius: "50%",
|
|
81
|
+
position: "absolute",
|
|
82
|
+
backgroundColor: "currentColor",
|
|
83
|
+
...(active && {
|
|
84
|
+
color: theme.palette.primary.main,
|
|
85
|
+
}),
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
// Root item
|
|
90
|
+
...(!subItem && {
|
|
91
|
+
...theme.typography.body2,
|
|
92
|
+
padding: 0,
|
|
93
|
+
height: "100%",
|
|
94
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
95
|
+
transition: theme.transitions.create(["all"], {
|
|
96
|
+
duration: theme.transitions.duration.shorter,
|
|
97
|
+
}),
|
|
98
|
+
"&:hover": {
|
|
99
|
+
opacity: 0.64,
|
|
100
|
+
backgroundColor: "transparent",
|
|
101
|
+
"&:before": {
|
|
102
|
+
...dotStyles,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
...(active && {
|
|
106
|
+
color: theme.palette.primary.main,
|
|
107
|
+
fontWeight: theme.typography.fontWeightSemiBold,
|
|
108
|
+
"&:before": {
|
|
109
|
+
...dotStyles,
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
...(opened && {
|
|
113
|
+
opacity: 0.64,
|
|
114
|
+
"&:before": {
|
|
115
|
+
...dotStyles,
|
|
116
|
+
},
|
|
117
|
+
}),
|
|
118
|
+
}),
|
|
119
|
+
|
|
120
|
+
// Sub item
|
|
121
|
+
...(subItem && {
|
|
122
|
+
...theme.typography.body2,
|
|
123
|
+
padding: 0,
|
|
124
|
+
fontSize: 13,
|
|
125
|
+
color: theme.palette.text.secondary,
|
|
126
|
+
fontWeight: theme.typography.fontWeightMedium,
|
|
127
|
+
transition: theme.transitions.create(["all"], {
|
|
128
|
+
duration: theme.transitions.duration.shorter,
|
|
129
|
+
}),
|
|
130
|
+
"&:hover": {
|
|
131
|
+
backgroundColor: "transparent",
|
|
132
|
+
color: theme.palette.text.primary,
|
|
133
|
+
"&:before": {
|
|
134
|
+
...dotStyles,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
...(active && {
|
|
138
|
+
color: theme.palette.text.primary,
|
|
139
|
+
fontWeight: theme.typography.fontWeightSemiBold,
|
|
140
|
+
"&:before": {
|
|
141
|
+
...dotStyles,
|
|
142
|
+
},
|
|
143
|
+
}),
|
|
144
|
+
}),
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ----------------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
export function NavItemDashboard({ path, sx, ...other }) {
|
|
151
|
+
return (
|
|
152
|
+
<Link
|
|
153
|
+
component={RouterLink}
|
|
154
|
+
href={path}
|
|
155
|
+
sx={{ width: 1, height: 1 }}
|
|
156
|
+
{...other}
|
|
157
|
+
>
|
|
158
|
+
<CardActionArea
|
|
159
|
+
sx={{
|
|
160
|
+
height: 1,
|
|
161
|
+
minHeight: 320,
|
|
162
|
+
borderRadius: 1.5,
|
|
163
|
+
color: "text.disabled",
|
|
164
|
+
bgcolor: "background.neutral",
|
|
165
|
+
px: { md: 3, lg: 10 },
|
|
166
|
+
...sx,
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
<motion.div
|
|
170
|
+
whileTap="tap"
|
|
171
|
+
whileHover="hover"
|
|
172
|
+
variants={{
|
|
173
|
+
hover: { scale: 1.02 },
|
|
174
|
+
tap: { scale: 0.98 },
|
|
175
|
+
}}
|
|
176
|
+
>
|
|
177
|
+
<Box
|
|
178
|
+
component="img"
|
|
179
|
+
alt="illustration_dashboard"
|
|
180
|
+
src="/assets/illustrations/illustration_dashboard.png"
|
|
181
|
+
/>
|
|
182
|
+
</motion.div>
|
|
183
|
+
</CardActionArea>
|
|
184
|
+
</Link>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import Fade from "@mui/material/Fade";
|
|
2
|
+
import { HEADER } from "../../../config-layout";
|
|
3
|
+
import ListSubheader from "@mui/material/ListSubheader";
|
|
4
|
+
import Paper from "@mui/material/Paper";
|
|
5
|
+
import Portal from "@mui/material/Portal";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import Stack from "@mui/material/Stack";
|
|
8
|
+
import { paper } from "../../../../theme/css";
|
|
9
|
+
import { useActiveLink } from "../../../../routes/hooks/use-active-link";
|
|
10
|
+
import { usePathname } from "../../../../routes/hooks";
|
|
11
|
+
import { useTheme } from "@mui/material/styles";
|
|
12
|
+
|
|
13
|
+
import { NavItem, NavItemDashboard } from "./nav-item";
|
|
14
|
+
import { useCallback, useEffect, useState } from "react";
|
|
15
|
+
|
|
16
|
+
// ----------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
export default function NavList({ data }) {
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
|
|
21
|
+
const pathname = usePathname();
|
|
22
|
+
|
|
23
|
+
const active = useActiveLink(data.path, !!data.children);
|
|
24
|
+
|
|
25
|
+
const [openMenu, setOpenMenu] = useState(false);
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (openMenu) {
|
|
29
|
+
handleCloseMenu();
|
|
30
|
+
}
|
|
31
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32
|
+
}, [pathname]);
|
|
33
|
+
|
|
34
|
+
const handleOpenMenu = useCallback(() => {
|
|
35
|
+
if (data.children) {
|
|
36
|
+
setOpenMenu(true);
|
|
37
|
+
}
|
|
38
|
+
}, [data.children]);
|
|
39
|
+
|
|
40
|
+
const handleCloseMenu = useCallback(() => {
|
|
41
|
+
setOpenMenu(false);
|
|
42
|
+
}, []);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<NavItem
|
|
47
|
+
open={openMenu}
|
|
48
|
+
onMouseEnter={handleOpenMenu}
|
|
49
|
+
onMouseLeave={handleCloseMenu}
|
|
50
|
+
//
|
|
51
|
+
title={data.title}
|
|
52
|
+
path={data.path}
|
|
53
|
+
//
|
|
54
|
+
hasChild={!!data.children}
|
|
55
|
+
externalLink={data.path?.includes("http")}
|
|
56
|
+
//
|
|
57
|
+
active={active}
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
{!!data.children && openMenu && (
|
|
61
|
+
<Portal>
|
|
62
|
+
<Fade in={openMenu}>
|
|
63
|
+
<Paper
|
|
64
|
+
onMouseEnter={handleOpenMenu}
|
|
65
|
+
onMouseLeave={handleCloseMenu}
|
|
66
|
+
sx={{
|
|
67
|
+
...paper({ theme }),
|
|
68
|
+
left: 0,
|
|
69
|
+
right: 0,
|
|
70
|
+
m: "auto",
|
|
71
|
+
display: "flex",
|
|
72
|
+
borderRadius: 2,
|
|
73
|
+
position: "fixed",
|
|
74
|
+
zIndex: theme.zIndex.modal,
|
|
75
|
+
p: theme.spacing(5, 1, 1, 3),
|
|
76
|
+
top: HEADER.H_DESKTOP_OFFSET,
|
|
77
|
+
maxWidth: theme.breakpoints.values.lg,
|
|
78
|
+
boxShadow: theme.customShadows.dropdown,
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
{data.children.map((list) => (
|
|
82
|
+
<NavSubList
|
|
83
|
+
key={list.subheader}
|
|
84
|
+
subheader={list.subheader}
|
|
85
|
+
data={list.items}
|
|
86
|
+
/>
|
|
87
|
+
))}
|
|
88
|
+
</Paper>
|
|
89
|
+
</Fade>
|
|
90
|
+
</Portal>
|
|
91
|
+
)}
|
|
92
|
+
</>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// ----------------------------------------------------------------------
|
|
97
|
+
|
|
98
|
+
function NavSubList({ data, subheader, sx, ...other }) {
|
|
99
|
+
const pathname = usePathname();
|
|
100
|
+
|
|
101
|
+
const dashboard = subheader === "Dashboard";
|
|
102
|
+
|
|
103
|
+
return (
|
|
104
|
+
<Stack
|
|
105
|
+
spacing={2}
|
|
106
|
+
flexGrow={1}
|
|
107
|
+
alignItems="flex-start"
|
|
108
|
+
sx={{
|
|
109
|
+
pb: 2,
|
|
110
|
+
...(dashboard && {
|
|
111
|
+
pb: 0,
|
|
112
|
+
maxWidth: { md: 1 / 3, lg: 540 },
|
|
113
|
+
}),
|
|
114
|
+
...sx,
|
|
115
|
+
}}
|
|
116
|
+
{...other}
|
|
117
|
+
>
|
|
118
|
+
<ListSubheader
|
|
119
|
+
disableSticky
|
|
120
|
+
sx={{
|
|
121
|
+
p: 0,
|
|
122
|
+
typography: "overline",
|
|
123
|
+
fontSize: 11,
|
|
124
|
+
color: "text.primary",
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
{subheader}
|
|
128
|
+
</ListSubheader>
|
|
129
|
+
|
|
130
|
+
{data.map((item) =>
|
|
131
|
+
dashboard ? (
|
|
132
|
+
<NavItemDashboard key={item.title} path={item.path} />
|
|
133
|
+
) : (
|
|
134
|
+
<NavItem
|
|
135
|
+
key={item.title}
|
|
136
|
+
title={item.title}
|
|
137
|
+
path={item.path}
|
|
138
|
+
active={pathname === item.path || pathname === `${item.path}/`}
|
|
139
|
+
subItem
|
|
140
|
+
/>
|
|
141
|
+
)
|
|
142
|
+
)}
|
|
143
|
+
</Stack>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Drawer from "@mui/material/Drawer";
|
|
2
|
+
import IconButton from "@mui/material/IconButton";
|
|
3
|
+
import Logo from "../../../../components/logo";
|
|
4
|
+
import NavList from "./nav-list";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import Scrollbar from "../../../../components/scrollbar";
|
|
7
|
+
import SvgColor from "../../../../components/svg-color";
|
|
8
|
+
import { usePathname } from "../../../../routes/hooks";
|
|
9
|
+
|
|
10
|
+
import { useCallback, useEffect, useState } from "react";
|
|
11
|
+
|
|
12
|
+
// ----------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
export default function NavMobile({ data }) {
|
|
15
|
+
const pathname = usePathname();
|
|
16
|
+
|
|
17
|
+
const [openMenu, setOpenMenu] = useState(false);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (openMenu) {
|
|
21
|
+
handleCloseMenu();
|
|
22
|
+
}
|
|
23
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
|
+
}, [pathname]);
|
|
25
|
+
|
|
26
|
+
const handleOpenMenu = useCallback(() => {
|
|
27
|
+
setOpenMenu(true);
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
const handleCloseMenu = useCallback(() => {
|
|
31
|
+
setOpenMenu(false);
|
|
32
|
+
}, []);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<IconButton onClick={handleOpenMenu} sx={{ ml: 1 }}>
|
|
37
|
+
<SvgColor src="/assets/icons/navbar/ic_menu_item.svg" />
|
|
38
|
+
</IconButton>
|
|
39
|
+
|
|
40
|
+
<Drawer
|
|
41
|
+
open={openMenu}
|
|
42
|
+
onClose={handleCloseMenu}
|
|
43
|
+
PaperProps={{
|
|
44
|
+
sx: {
|
|
45
|
+
pb: 5,
|
|
46
|
+
width: 260,
|
|
47
|
+
},
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<Scrollbar>
|
|
51
|
+
<Logo sx={{ mx: 2.5, my: 3 }} />
|
|
52
|
+
|
|
53
|
+
{data.map((list) => (
|
|
54
|
+
<NavList key={list.title} data={list} />
|
|
55
|
+
))}
|
|
56
|
+
</Scrollbar>
|
|
57
|
+
</Drawer>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|