@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
package/src/theme/css.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { alpha } from "@mui/material/styles";
|
|
2
|
+
import { autocompleteClasses } from "@mui/material/Autocomplete";
|
|
3
|
+
import { checkboxClasses } from "@mui/material/Checkbox";
|
|
4
|
+
import { dividerClasses } from "@mui/material/Divider";
|
|
5
|
+
import { menuItemClasses } from "@mui/material/MenuItem";
|
|
6
|
+
|
|
7
|
+
// ----------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export const paper = ({ theme, bgcolor, dropdown }) => ({
|
|
10
|
+
...bgBlur({
|
|
11
|
+
blur: 20,
|
|
12
|
+
opacity: 0.9,
|
|
13
|
+
color: theme.palette.background.paper,
|
|
14
|
+
...(!!bgcolor && {
|
|
15
|
+
color: bgcolor,
|
|
16
|
+
}),
|
|
17
|
+
}),
|
|
18
|
+
backgroundImage: "url(/assets/cyan-blur.png), url(/assets/red-blur.png)",
|
|
19
|
+
backgroundRepeat: "no-repeat, no-repeat",
|
|
20
|
+
backgroundPosition: "top right, left bottom",
|
|
21
|
+
backgroundSize: "50%, 50%",
|
|
22
|
+
...(theme.direction === "rtl" && {
|
|
23
|
+
backgroundPosition: "top left, right bottom",
|
|
24
|
+
}),
|
|
25
|
+
...(dropdown && {
|
|
26
|
+
padding: theme.spacing(0.5),
|
|
27
|
+
boxShadow: theme.customShadows.dropdown,
|
|
28
|
+
borderRadius: theme.shape.borderRadius * 1.25,
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// ----------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
export const menuItem = (theme) => ({
|
|
35
|
+
...theme.typography.body2,
|
|
36
|
+
padding: theme.spacing(0.75, 1),
|
|
37
|
+
borderRadius: theme.shape.borderRadius * 0.75,
|
|
38
|
+
"&:not(:last-of-type)": {
|
|
39
|
+
marginBottom: 4,
|
|
40
|
+
},
|
|
41
|
+
[`&.${menuItemClasses.selected}`]: {
|
|
42
|
+
fontWeight: theme.typography.fontWeightSemiBold,
|
|
43
|
+
backgroundColor: theme.palette.action.selected,
|
|
44
|
+
"&:hover": {
|
|
45
|
+
backgroundColor: theme.palette.action.hover,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
[`& .${checkboxClasses.root}`]: {
|
|
49
|
+
padding: theme.spacing(0.5),
|
|
50
|
+
marginLeft: theme.spacing(-0.5),
|
|
51
|
+
marginRight: theme.spacing(0.5),
|
|
52
|
+
},
|
|
53
|
+
[`&.${autocompleteClasses.option}[aria-selected="true"]`]: {
|
|
54
|
+
backgroundColor: theme.palette.action.selected,
|
|
55
|
+
"&:hover": {
|
|
56
|
+
backgroundColor: theme.palette.action.hover,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
[`&+.${dividerClasses.root}`]: {
|
|
60
|
+
margin: theme.spacing(0.5, 0),
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// ----------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
export function bgBlur(props) {
|
|
67
|
+
const color = props?.color || "#000000";
|
|
68
|
+
const blur = props?.blur || 6;
|
|
69
|
+
const opacity = props?.opacity || 0.8;
|
|
70
|
+
const imgUrl = props?.imgUrl;
|
|
71
|
+
|
|
72
|
+
if (imgUrl) {
|
|
73
|
+
return {
|
|
74
|
+
position: "relative",
|
|
75
|
+
backgroundImage: `url(${imgUrl})`,
|
|
76
|
+
"&:before": {
|
|
77
|
+
position: "absolute",
|
|
78
|
+
top: 0,
|
|
79
|
+
left: 0,
|
|
80
|
+
zIndex: 9,
|
|
81
|
+
content: '""',
|
|
82
|
+
width: "100%",
|
|
83
|
+
height: "100%",
|
|
84
|
+
backdropFilter: `blur(${blur}px)`,
|
|
85
|
+
WebkitBackdropFilter: `blur(${blur}px)`,
|
|
86
|
+
backgroundColor: alpha(color, opacity),
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
backdropFilter: `blur(${blur}px)`,
|
|
93
|
+
WebkitBackdropFilter: `blur(${blur}px)`,
|
|
94
|
+
backgroundColor: alpha(color, opacity),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// ----------------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
export function bgGradient(props) {
|
|
101
|
+
const direction = props?.direction || "to bottom";
|
|
102
|
+
const startColor = props?.startColor;
|
|
103
|
+
const endColor = props?.endColor;
|
|
104
|
+
const imgUrl = props?.imgUrl;
|
|
105
|
+
const color = props?.color;
|
|
106
|
+
|
|
107
|
+
if (imgUrl) {
|
|
108
|
+
return {
|
|
109
|
+
background: `linear-gradient(${direction}, ${startColor || color}, ${
|
|
110
|
+
endColor || color
|
|
111
|
+
}), url(${imgUrl})`,
|
|
112
|
+
backgroundSize: "cover",
|
|
113
|
+
backgroundRepeat: "no-repeat",
|
|
114
|
+
backgroundPosition: "center center",
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
background: `linear-gradient(${direction}, ${startColor}, ${endColor})`,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ----------------------------------------------------------------------
|
|
124
|
+
|
|
125
|
+
export function textGradient(value) {
|
|
126
|
+
return {
|
|
127
|
+
background: `-webkit-linear-gradient(${value})`,
|
|
128
|
+
WebkitBackgroundClip: "text",
|
|
129
|
+
WebkitTextFillColor: "transparent",
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ----------------------------------------------------------------------
|
|
134
|
+
|
|
135
|
+
export const hideScroll = {
|
|
136
|
+
x: {
|
|
137
|
+
msOverflowStyle: "none",
|
|
138
|
+
scrollbarWidth: "none",
|
|
139
|
+
overflowX: "scroll",
|
|
140
|
+
"&::-webkit-scrollbar": {
|
|
141
|
+
display: "none",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
y: {
|
|
145
|
+
msOverflowStyle: "none",
|
|
146
|
+
scrollbarWidth: "none",
|
|
147
|
+
overflowY: "scroll",
|
|
148
|
+
"&::-webkit-scrollbar": {
|
|
149
|
+
display: "none",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { alpha } from "@mui/material/styles";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
common,
|
|
5
|
+
error,
|
|
6
|
+
grey,
|
|
7
|
+
info,
|
|
8
|
+
primary,
|
|
9
|
+
secondary,
|
|
10
|
+
success,
|
|
11
|
+
warning,
|
|
12
|
+
} from "./palette";
|
|
13
|
+
|
|
14
|
+
// ----------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
export function customShadows(mode) {
|
|
17
|
+
const color = mode === "light" ? grey[500] : common.black;
|
|
18
|
+
|
|
19
|
+
const transparent = alpha(color, 0.16);
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
z1: `0 1px 2px 0 ${transparent}`,
|
|
23
|
+
z4: `0 4px 8px 0 ${transparent}`,
|
|
24
|
+
z8: `0 8px 16px 0 ${transparent}`,
|
|
25
|
+
z12: `0 12px 24px -4px ${transparent}`,
|
|
26
|
+
z16: `0 16px 32px -4px ${transparent}`,
|
|
27
|
+
z20: `0 20px 40px -4px ${transparent}`,
|
|
28
|
+
z24: `0 24px 48px 0 ${transparent}`,
|
|
29
|
+
//
|
|
30
|
+
card: `0 0 2px 0 ${alpha(color, 0.2)}, 0 12px 24px -4px ${alpha(
|
|
31
|
+
color,
|
|
32
|
+
0.12
|
|
33
|
+
)}`,
|
|
34
|
+
dropdown: `0 0 2px 0 ${alpha(color, 0.24)}, -20px 20px 40px -4px ${alpha(
|
|
35
|
+
color,
|
|
36
|
+
0.24
|
|
37
|
+
)}`,
|
|
38
|
+
dialog: `-40px 40px 80px -8px ${alpha(common.black, 0.24)}`,
|
|
39
|
+
//
|
|
40
|
+
primary: `0 8px 16px 0 ${alpha(primary.main, 0.24)}`,
|
|
41
|
+
info: `0 8px 16px 0 ${alpha(info.main, 0.24)}`,
|
|
42
|
+
secondary: `0 8px 16px 0 ${alpha(secondary.main, 0.24)}`,
|
|
43
|
+
success: `0 8px 16px 0 ${alpha(success.main, 0.24)}`,
|
|
44
|
+
warning: `0 8px 16px 0 ${alpha(warning.main, 0.24)}`,
|
|
45
|
+
error: `0 8px 16px 0 ${alpha(error.main, 0.24)}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import CssBaseline from "@mui/material/CssBaseline";
|
|
4
|
+
import RTL from "./options/right-to-left";
|
|
5
|
+
import { componentsOverrides } from "./overrides";
|
|
6
|
+
import { createContrast } from "./options/contrast";
|
|
7
|
+
import { createPresets } from "./options/presets";
|
|
8
|
+
import { customShadows } from "./custom-shadows";
|
|
9
|
+
import merge from "lodash/merge";
|
|
10
|
+
import { palette } from "./palette";
|
|
11
|
+
import { shadows } from "./shadows";
|
|
12
|
+
import { typography } from "./typography";
|
|
13
|
+
import { useSettingsContext } from "../components/settings";
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
ThemeProvider as MuiThemeProvider,
|
|
17
|
+
createTheme,
|
|
18
|
+
} from "@mui/material/styles";
|
|
19
|
+
import React, { useMemo } from "react";
|
|
20
|
+
|
|
21
|
+
export default function ThemeProvider({ children }) {
|
|
22
|
+
const settings = useSettingsContext();
|
|
23
|
+
const contrast = createContrast(settings.themeContrast, settings.themeMode);
|
|
24
|
+
const presets = createPresets(settings.themeColorPresets);
|
|
25
|
+
|
|
26
|
+
const memoizedValue = useMemo(
|
|
27
|
+
() => ({
|
|
28
|
+
palette: {
|
|
29
|
+
...palette(settings.themeMode),
|
|
30
|
+
...presets.palette,
|
|
31
|
+
...contrast.palette,
|
|
32
|
+
},
|
|
33
|
+
customShadows: {
|
|
34
|
+
...customShadows(settings.themeMode),
|
|
35
|
+
...presets.customShadows,
|
|
36
|
+
},
|
|
37
|
+
direction: settings.themeDirection,
|
|
38
|
+
shadows: shadows(settings.themeMode),
|
|
39
|
+
shape: { borderRadius: 8 },
|
|
40
|
+
typography,
|
|
41
|
+
}),
|
|
42
|
+
[
|
|
43
|
+
settings.themeMode,
|
|
44
|
+
settings.themeDirection,
|
|
45
|
+
presets.palette,
|
|
46
|
+
presets.customShadows,
|
|
47
|
+
contrast.palette,
|
|
48
|
+
]
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
const theme = createTheme(memoizedValue);
|
|
52
|
+
|
|
53
|
+
theme.components = merge(componentsOverrides(theme), contrast.components, {
|
|
54
|
+
MuiCssBaseline: {
|
|
55
|
+
styleOverrides: {
|
|
56
|
+
body: {
|
|
57
|
+
scrollbarColor:
|
|
58
|
+
theme.palette.mode === "dark"
|
|
59
|
+
? `${theme.palette.grey[700]} ${theme.palette.background.default}`
|
|
60
|
+
: `${theme.palette.grey[500]} ${theme.palette.background.default}`,
|
|
61
|
+
scrollbarWidth: "thin",
|
|
62
|
+
|
|
63
|
+
"&::-webkit-scrollbar": {
|
|
64
|
+
width: 10,
|
|
65
|
+
height: 10,
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
"&::-webkit-scrollbar-track": {
|
|
69
|
+
backgroundColor: theme.palette.background.default,
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"&::-webkit-scrollbar-thumb": {
|
|
73
|
+
backgroundColor:
|
|
74
|
+
theme.palette.mode === "dark"
|
|
75
|
+
? theme.palette.grey[700]
|
|
76
|
+
: theme.palette.grey[500],
|
|
77
|
+
borderRadius: 8,
|
|
78
|
+
border: `2px solid ${theme.palette.background.default}`,
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
82
|
+
backgroundColor:
|
|
83
|
+
theme.palette.mode === "dark"
|
|
84
|
+
? theme.palette.grey[600]
|
|
85
|
+
: theme.palette.grey[700],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<MuiThemeProvider theme={theme}>
|
|
94
|
+
<RTL themeDirection={settings.themeDirection}>
|
|
95
|
+
<CssBaseline />
|
|
96
|
+
{children}
|
|
97
|
+
</RTL>
|
|
98
|
+
</MuiThemeProvider>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { customShadows } from "../custom-shadows";
|
|
2
|
+
import { grey } from "../palette";
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
export function createContrast(contrast, mode) {
|
|
7
|
+
const theme = {
|
|
8
|
+
...(contrast === "bold" &&
|
|
9
|
+
mode === "light" && {
|
|
10
|
+
palette: {
|
|
11
|
+
background: {
|
|
12
|
+
default: grey[200],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const components = {
|
|
19
|
+
...(contrast === "bold" && {
|
|
20
|
+
MuiCard: {
|
|
21
|
+
styleOverrides: {
|
|
22
|
+
root: {
|
|
23
|
+
boxShadow: customShadows(mode).z1,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
...theme,
|
|
32
|
+
components,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { alpha } from "@mui/material/styles";
|
|
2
|
+
|
|
3
|
+
import { grey, primary } from "../palette";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
export function createPresets(preset) {
|
|
8
|
+
const primaryColor = getPrimary(preset);
|
|
9
|
+
|
|
10
|
+
const theme = {
|
|
11
|
+
palette: {
|
|
12
|
+
primary: primaryColor,
|
|
13
|
+
},
|
|
14
|
+
customShadows: {
|
|
15
|
+
primary: `0 8px 16px 0 ${alpha(`${primaryColor?.main}`, 0.24)}`,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
...theme,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ----------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
const cyan = {
|
|
27
|
+
lighter: "#CCF4FE",
|
|
28
|
+
light: "#68CDF9",
|
|
29
|
+
main: "#078DEE",
|
|
30
|
+
dark: "#0351AB",
|
|
31
|
+
darker: "#012972",
|
|
32
|
+
contrastText: "#FFFFFF",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const purple = {
|
|
36
|
+
lighter: "#EBD6FD",
|
|
37
|
+
light: "#B985F4",
|
|
38
|
+
main: "#7635dc",
|
|
39
|
+
dark: "#431A9E",
|
|
40
|
+
darker: "#200A69",
|
|
41
|
+
contrastText: "#FFFFFF",
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const blue = {
|
|
45
|
+
lighter: "#D1E9FC",
|
|
46
|
+
light: "#76B0F1",
|
|
47
|
+
main: "#2065D1",
|
|
48
|
+
dark: "#103996",
|
|
49
|
+
darker: "#061B64",
|
|
50
|
+
contrastText: "#FFFFFF",
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const orange = {
|
|
54
|
+
lighter: "#FEF4D4",
|
|
55
|
+
light: "#FED680",
|
|
56
|
+
main: "#fda92d",
|
|
57
|
+
dark: "#B66816",
|
|
58
|
+
darker: "#793908",
|
|
59
|
+
contrastText: grey[800],
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const red = {
|
|
63
|
+
lighter: "#FFE3D5",
|
|
64
|
+
light: "#FFC1AC",
|
|
65
|
+
main: "#FF3030",
|
|
66
|
+
dark: "#B71833",
|
|
67
|
+
darker: "#7A0930",
|
|
68
|
+
contrastText: "#FFFFFF",
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const presetOptions = [
|
|
72
|
+
{ name: "default", value: primary.main },
|
|
73
|
+
{ name: "cyan", value: cyan.main },
|
|
74
|
+
{ name: "purple", value: purple.main },
|
|
75
|
+
{ name: "blue", value: blue.main },
|
|
76
|
+
{ name: "orange", value: orange.main },
|
|
77
|
+
{ name: "red", value: red.main },
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
export function getPrimary(preset) {
|
|
81
|
+
return {
|
|
82
|
+
default: primary,
|
|
83
|
+
cyan,
|
|
84
|
+
purple,
|
|
85
|
+
blue,
|
|
86
|
+
orange,
|
|
87
|
+
red,
|
|
88
|
+
}[preset];
|
|
89
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CacheProvider } from "@emotion/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import createCache from "@emotion/cache";
|
|
4
|
+
import rtlPlugin from "stylis-plugin-rtl";
|
|
5
|
+
import { useEffect } from "react";
|
|
6
|
+
|
|
7
|
+
// ----------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export default function RTL({ children, themeDirection }) {
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
document.dir = themeDirection;
|
|
12
|
+
}, [themeDirection]);
|
|
13
|
+
|
|
14
|
+
const cacheRtl = createCache({
|
|
15
|
+
key: "rtl",
|
|
16
|
+
prepend: true,
|
|
17
|
+
// https://github.com/styled-components/stylis-plugin-rtl/issues/35
|
|
18
|
+
stylisPlugins: [rtlPlugin],
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
if (themeDirection === "rtl") {
|
|
22
|
+
return <CacheProvider value={cacheRtl}>{children}</CacheProvider>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return <>{children}</>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { accordionClasses } from "@mui/material/Accordion";
|
|
2
|
+
import { accordionSummaryClasses } from "@mui/material/AccordionSummary";
|
|
3
|
+
import { typographyClasses } from "@mui/material/Typography";
|
|
4
|
+
|
|
5
|
+
// ----------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
export function accordion(theme) {
|
|
8
|
+
return {
|
|
9
|
+
MuiAccordion: {
|
|
10
|
+
styleOverrides: {
|
|
11
|
+
root: {
|
|
12
|
+
backgroundColor: "transparent",
|
|
13
|
+
[`&.${accordionClasses.expanded}`]: {
|
|
14
|
+
boxShadow: theme.customShadows.z8,
|
|
15
|
+
borderRadius: theme.shape.borderRadius,
|
|
16
|
+
backgroundColor: theme.palette.background.paper,
|
|
17
|
+
},
|
|
18
|
+
[`&.${accordionClasses.disabled}`]: {
|
|
19
|
+
backgroundColor: "transparent",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
MuiAccordionSummary: {
|
|
25
|
+
styleOverrides: {
|
|
26
|
+
root: {
|
|
27
|
+
paddingLeft: theme.spacing(2),
|
|
28
|
+
paddingRight: theme.spacing(1),
|
|
29
|
+
[`&.${accordionSummaryClasses.disabled}`]: {
|
|
30
|
+
opacity: 1,
|
|
31
|
+
color: theme.palette.action.disabled,
|
|
32
|
+
[`& .${typographyClasses.root}`]: {
|
|
33
|
+
color: "inherit",
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
expandIconWrapper: {
|
|
38
|
+
color: "inherit",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { alertClasses } from "@mui/material/Alert";
|
|
2
|
+
import { alpha } from "@mui/material/styles";
|
|
3
|
+
|
|
4
|
+
// ----------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
const COLORS = ["info", "success", "warning", "error"];
|
|
7
|
+
|
|
8
|
+
// ----------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
export function alert(theme) {
|
|
11
|
+
const lightMode = theme.palette.mode === "light";
|
|
12
|
+
|
|
13
|
+
const rootStyles = (ownerState) => {
|
|
14
|
+
const standardVariant = ownerState.variant === "standard";
|
|
15
|
+
|
|
16
|
+
const filledVariant = ownerState.variant === "filled";
|
|
17
|
+
|
|
18
|
+
const outlinedVariant = ownerState.variant === "outlined";
|
|
19
|
+
|
|
20
|
+
const colorStyle = COLORS.map((color) => ({
|
|
21
|
+
...(ownerState.severity === color && {
|
|
22
|
+
// STANDARD
|
|
23
|
+
...(standardVariant && {
|
|
24
|
+
color: theme.palette[color][lightMode ? "darker" : "lighter"],
|
|
25
|
+
backgroundColor:
|
|
26
|
+
theme.palette[color][lightMode ? "lighter" : "darker"],
|
|
27
|
+
[`& .${alertClasses.icon}`]: {
|
|
28
|
+
color: theme.palette[color][lightMode ? "main" : "light"],
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
// FILLED
|
|
32
|
+
...(filledVariant && {
|
|
33
|
+
color: theme.palette[color].contrastText,
|
|
34
|
+
backgroundColor: theme.palette[color].main,
|
|
35
|
+
}),
|
|
36
|
+
// OUTLINED
|
|
37
|
+
...(outlinedVariant && {
|
|
38
|
+
backgroundColor: alpha(theme.palette[color].main, 0.08),
|
|
39
|
+
color: theme.palette[color][lightMode ? "dark" : "light"],
|
|
40
|
+
border: `solid 1px ${alpha(theme.palette[color].main, 0.16)}`,
|
|
41
|
+
[`& .${alertClasses.icon}`]: {
|
|
42
|
+
color: theme.palette[color].main,
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
return [...colorStyle];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
MuiAlert: {
|
|
53
|
+
styleOverrides: {
|
|
54
|
+
root: ({ ownerState }) => rootStyles(ownerState),
|
|
55
|
+
icon: {
|
|
56
|
+
opacity: 1,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
MuiAlertTitle: {
|
|
61
|
+
styleOverrides: {
|
|
62
|
+
root: {
|
|
63
|
+
marginBottom: theme.spacing(0.5),
|
|
64
|
+
fontWeight: theme.typography.fontWeightSemiBold,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { alpha } from "@mui/material/styles";
|
|
2
|
+
import { autocompleteClasses } from "@mui/material/Autocomplete";
|
|
3
|
+
import { svgIconClasses } from "@mui/material/SvgIcon";
|
|
4
|
+
|
|
5
|
+
import { menuItem, paper } from "../../css";
|
|
6
|
+
|
|
7
|
+
// ----------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export function autocomplete(theme) {
|
|
10
|
+
return {
|
|
11
|
+
MuiAutocomplete: {
|
|
12
|
+
styleOverrides: {
|
|
13
|
+
root: {
|
|
14
|
+
[`& span.${autocompleteClasses.tag}`]: {
|
|
15
|
+
...theme.typography.subtitle2,
|
|
16
|
+
height: 24,
|
|
17
|
+
minWidth: 24,
|
|
18
|
+
lineHeight: "24px",
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
padding: theme.spacing(0, 0.75),
|
|
21
|
+
color: theme.palette.text.secondary,
|
|
22
|
+
borderRadius: theme.shape.borderRadius,
|
|
23
|
+
backgroundColor: alpha(theme.palette.grey[500], 0.16),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
paper: {
|
|
27
|
+
...paper({ theme, dropdown: true }),
|
|
28
|
+
},
|
|
29
|
+
listbox: {
|
|
30
|
+
padding: 0,
|
|
31
|
+
[`& .${autocompleteClasses.option}`]: {
|
|
32
|
+
...menuItem(theme),
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
endAdornment: {
|
|
36
|
+
[`& .${svgIconClasses.root}`]: {
|
|
37
|
+
width: 18,
|
|
38
|
+
height: 18,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|