@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,16 @@
|
|
|
1
|
+
import { FormProvider as Form } from "react-hook-form";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
|
|
4
|
+
export default function FormProvider({ children, onSubmit, methods }) {
|
|
5
|
+
return (
|
|
6
|
+
<Form {...methods}>
|
|
7
|
+
<form onSubmit={onSubmit}>{children}</form>
|
|
8
|
+
</Form>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
FormProvider.propTypes = {
|
|
13
|
+
children: PropTypes.node,
|
|
14
|
+
methods: PropTypes.object,
|
|
15
|
+
onSubmit: PropTypes.func,
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./FormProvider";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Dialog, Stack } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
import Avatar from "@mui/material/Avatar";
|
|
4
|
+
import IconButton from "@mui/material/IconButton";
|
|
5
|
+
import Iconify from "../Iconify";
|
|
6
|
+
import Icons from "../lib/Icons";
|
|
7
|
+
import Picker from "@emoji-mart/react";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import SvgColor from "../SvgColor";
|
|
10
|
+
|
|
11
|
+
export default function IconSelector({
|
|
12
|
+
handleEmojiSelect,
|
|
13
|
+
avatar,
|
|
14
|
+
iconCategories,
|
|
15
|
+
}) {
|
|
16
|
+
const [emojiDialogOpen, setEmojiDialogOpen] = React.useState(false);
|
|
17
|
+
const handleEmojiButtonClick = () => {
|
|
18
|
+
setEmojiDialogOpen(true);
|
|
19
|
+
};
|
|
20
|
+
return (
|
|
21
|
+
<Stack alignContent={"center"} justifyContent={"center"}>
|
|
22
|
+
<Stack>
|
|
23
|
+
<IconButton
|
|
24
|
+
data-cy="avatar-select-button"
|
|
25
|
+
onClick={handleEmojiButtonClick}
|
|
26
|
+
sx={{
|
|
27
|
+
borderStyle: `dashed`,
|
|
28
|
+
borderColor: "gray",
|
|
29
|
+
borderWidth: "2px",
|
|
30
|
+
mx: "auto",
|
|
31
|
+
width: { xs: 77, md: 140 },
|
|
32
|
+
height: { xs: 77, md: 140 },
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<Avatar
|
|
36
|
+
sx={{
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignSelf: "center",
|
|
39
|
+
mx: "auto",
|
|
40
|
+
width: { xs: 64, md: 128 },
|
|
41
|
+
height: { xs: 64, md: 128 },
|
|
42
|
+
border: `solid 2px ${(theme) => theme.palette.common.white}`,
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<Stack
|
|
46
|
+
sx={{
|
|
47
|
+
"& .svg-color": {
|
|
48
|
+
background: (theme) =>
|
|
49
|
+
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.primary.main} 100%)`,
|
|
50
|
+
},
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{avatar ? (
|
|
54
|
+
<SvgColor
|
|
55
|
+
src={`https://api.iconify.design/${avatar}.svg`}
|
|
56
|
+
variant="square"
|
|
57
|
+
sx={{ width: 82, height: 82 }}
|
|
58
|
+
/>
|
|
59
|
+
) : (
|
|
60
|
+
<Iconify icon={"ic:baseline-plus"} width={82} height={82} />
|
|
61
|
+
)}
|
|
62
|
+
</Stack>
|
|
63
|
+
</Avatar>
|
|
64
|
+
</IconButton>
|
|
65
|
+
</Stack>
|
|
66
|
+
<Dialog
|
|
67
|
+
data-cy="avatar-selection"
|
|
68
|
+
open={emojiDialogOpen}
|
|
69
|
+
onClose={() => setEmojiDialogOpen(false)}
|
|
70
|
+
>
|
|
71
|
+
<Picker
|
|
72
|
+
onEmojiSelect={(emoji) => {
|
|
73
|
+
handleEmojiSelect(emoji), setEmojiDialogOpen(false);
|
|
74
|
+
}}
|
|
75
|
+
custom={Icons}
|
|
76
|
+
categories={iconCategories}
|
|
77
|
+
searchPosition={"none"}
|
|
78
|
+
navPosition="none"
|
|
79
|
+
emojiButtonSize={90}
|
|
80
|
+
emojiSize={75}
|
|
81
|
+
perLine={4}
|
|
82
|
+
autoFocus="true"
|
|
83
|
+
previewPosition={"none"}
|
|
84
|
+
theme={"dark"}
|
|
85
|
+
/>
|
|
86
|
+
</Dialog>
|
|
87
|
+
</Stack>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import { Icon } from "@iconify/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
|
|
6
|
+
const Iconify = forwardRef(({ icon, width = 20, sx, ...other }, ref) => (
|
|
7
|
+
<Box
|
|
8
|
+
ref={ref}
|
|
9
|
+
component={Icon}
|
|
10
|
+
className="component-iconify"
|
|
11
|
+
icon={icon}
|
|
12
|
+
sx={{ width, height: width, ...sx }}
|
|
13
|
+
{...other}
|
|
14
|
+
/>
|
|
15
|
+
));
|
|
16
|
+
|
|
17
|
+
export default Iconify;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Iconify";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { alpha, useTheme } from "@mui/material/styles";
|
|
2
|
+
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
import { LazyLoadImage } from "react-lazy-load-image-component";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { forwardRef } from "react";
|
|
7
|
+
import { getRatio } from "./utils";
|
|
8
|
+
|
|
9
|
+
const Image = forwardRef(
|
|
10
|
+
(
|
|
11
|
+
{
|
|
12
|
+
ratio,
|
|
13
|
+
overlay,
|
|
14
|
+
disabledEffect = false,
|
|
15
|
+
alt,
|
|
16
|
+
src,
|
|
17
|
+
afterLoad,
|
|
18
|
+
delayTime,
|
|
19
|
+
threshold,
|
|
20
|
+
beforeLoad,
|
|
21
|
+
delayMethod,
|
|
22
|
+
placeholder,
|
|
23
|
+
wrapperProps,
|
|
24
|
+
scrollPosition,
|
|
25
|
+
effect = "blur",
|
|
26
|
+
visibleByDefault,
|
|
27
|
+
wrapperClassName,
|
|
28
|
+
useIntersectionObserver,
|
|
29
|
+
sx,
|
|
30
|
+
...other
|
|
31
|
+
},
|
|
32
|
+
ref
|
|
33
|
+
) => {
|
|
34
|
+
const theme = useTheme();
|
|
35
|
+
|
|
36
|
+
const overlayStyles = !!overlay && {
|
|
37
|
+
"&:before": {
|
|
38
|
+
content: "''",
|
|
39
|
+
top: 0,
|
|
40
|
+
left: 0,
|
|
41
|
+
width: 1,
|
|
42
|
+
height: 1,
|
|
43
|
+
zIndex: 1,
|
|
44
|
+
position: "absolute",
|
|
45
|
+
background: overlay || alpha(theme.palette.grey[900], 0.48),
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const content = (
|
|
50
|
+
<Box
|
|
51
|
+
component={LazyLoadImage}
|
|
52
|
+
alt={alt}
|
|
53
|
+
src={src}
|
|
54
|
+
afterLoad={afterLoad}
|
|
55
|
+
delayTime={delayTime}
|
|
56
|
+
threshold={threshold}
|
|
57
|
+
beforeLoad={beforeLoad}
|
|
58
|
+
delayMethod={delayMethod}
|
|
59
|
+
placeholder={placeholder}
|
|
60
|
+
wrapperProps={wrapperProps}
|
|
61
|
+
scrollPosition={scrollPosition}
|
|
62
|
+
visibleByDefault={visibleByDefault}
|
|
63
|
+
effect={disabledEffect ? undefined : effect}
|
|
64
|
+
useIntersectionObserver={useIntersectionObserver}
|
|
65
|
+
wrapperClassName={wrapperClassName || "component-image-wrapper"}
|
|
66
|
+
placeholderSrc={
|
|
67
|
+
disabledEffect ? "/assets/transparent.png" : "/assets/placeholder.svg"
|
|
68
|
+
}
|
|
69
|
+
sx={{
|
|
70
|
+
width: 1,
|
|
71
|
+
height: 1,
|
|
72
|
+
objectFit: "cover",
|
|
73
|
+
verticalAlign: "bottom",
|
|
74
|
+
...(!!ratio && {
|
|
75
|
+
top: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
position: "absolute",
|
|
78
|
+
}),
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<Box
|
|
85
|
+
ref={ref}
|
|
86
|
+
component="span"
|
|
87
|
+
className="component-image"
|
|
88
|
+
sx={{
|
|
89
|
+
overflow: "hidden",
|
|
90
|
+
position: "relative",
|
|
91
|
+
verticalAlign: "bottom",
|
|
92
|
+
display: "inline-block",
|
|
93
|
+
...(!!ratio && {
|
|
94
|
+
width: 1,
|
|
95
|
+
}),
|
|
96
|
+
"& span.component-image-wrapper": {
|
|
97
|
+
width: 1,
|
|
98
|
+
height: 1,
|
|
99
|
+
verticalAlign: "bottom",
|
|
100
|
+
backgroundSize: "cover !important",
|
|
101
|
+
...(!!ratio && {
|
|
102
|
+
pt: getRatio(ratio),
|
|
103
|
+
}),
|
|
104
|
+
},
|
|
105
|
+
...overlayStyles,
|
|
106
|
+
...sx,
|
|
107
|
+
}}
|
|
108
|
+
{...other}
|
|
109
|
+
>
|
|
110
|
+
{content}
|
|
111
|
+
</Box>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
export default Image;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Image";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// ----------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
export function getRatio(ratio = "1/1") {
|
|
4
|
+
return {
|
|
5
|
+
"4/3": "calc(100% / 4 * 3)",
|
|
6
|
+
"3/4": "calc(100% / 3 * 4)",
|
|
7
|
+
"6/4": "calc(100% / 6 * 4)",
|
|
8
|
+
"4/6": "calc(100% / 4 * 6)",
|
|
9
|
+
"16/9": "calc(100% / 16 * 9)",
|
|
10
|
+
"9/16": "calc(100% / 9 * 16)",
|
|
11
|
+
"21/9": "calc(100% / 21 * 9)",
|
|
12
|
+
"9/21": "calc(100% / 9 * 21)",
|
|
13
|
+
"1/1": "100%",
|
|
14
|
+
}[ratio];
|
|
15
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import DialogContentText from "@mui/material/DialogContentText";
|
|
2
|
+
import Grid from "@mui/material/Grid";
|
|
3
|
+
import SvgColor from "../SvgColor";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Card,
|
|
7
|
+
CardContent,
|
|
8
|
+
CardHeader,
|
|
9
|
+
Stack,
|
|
10
|
+
Typography,
|
|
11
|
+
} from "@mui/material";
|
|
12
|
+
|
|
13
|
+
export default function ItemSummary({ newItem }) {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<DialogContentText sx={{ textAlign: "center", mb: 2 }}>
|
|
17
|
+
Summary
|
|
18
|
+
</DialogContentText>
|
|
19
|
+
<Grid container spacing={1} mb={4}>
|
|
20
|
+
<Grid
|
|
21
|
+
item
|
|
22
|
+
xs={newItem.description ? 4 : 12}
|
|
23
|
+
sx={{
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
display: "flex",
|
|
26
|
+
}}
|
|
27
|
+
>
|
|
28
|
+
<Card
|
|
29
|
+
sx={{
|
|
30
|
+
bgcolor: (theme) => theme.palette.background.paper,
|
|
31
|
+
boxShadow: (theme) => theme.customShadows.card,
|
|
32
|
+
alignContent: "center",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
<CardContent
|
|
37
|
+
children={
|
|
38
|
+
<>
|
|
39
|
+
<Typography variant="h6" textAlign={"center"} mb={2}>
|
|
40
|
+
{newItem.name}
|
|
41
|
+
</Typography>
|
|
42
|
+
<Stack
|
|
43
|
+
sx={{
|
|
44
|
+
"& .svg-color": {
|
|
45
|
+
background: (theme) =>
|
|
46
|
+
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.primary.main} 100%)`,
|
|
47
|
+
},
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
<SvgColor
|
|
51
|
+
src={`https://api.iconify.design/${newItem.icon?.slice(
|
|
52
|
+
1,
|
|
53
|
+
-1
|
|
54
|
+
)}.svg`}
|
|
55
|
+
variant="square"
|
|
56
|
+
sx={{ width: 82, height: 82 }}
|
|
57
|
+
/>
|
|
58
|
+
</Stack>
|
|
59
|
+
</>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
</Card>
|
|
63
|
+
</Grid>
|
|
64
|
+
{newItem.description && (
|
|
65
|
+
<Grid item xs={8}>
|
|
66
|
+
<Card sx={{ minHeight: "100%" }}>
|
|
67
|
+
<CardHeader title="Description" />
|
|
68
|
+
<CardContent>
|
|
69
|
+
<Typography>{newItem.description}</Typography>
|
|
70
|
+
</CardContent>
|
|
71
|
+
</Card>
|
|
72
|
+
</Grid>
|
|
73
|
+
)}
|
|
74
|
+
</Grid>
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import SvgColor from "../SvgColor";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Card,
|
|
5
|
+
CardContent,
|
|
6
|
+
CardHeader,
|
|
7
|
+
DialogContentText,
|
|
8
|
+
Divider,
|
|
9
|
+
Grid,
|
|
10
|
+
Stack,
|
|
11
|
+
TextField,
|
|
12
|
+
Typography,
|
|
13
|
+
} from "@mui/material";
|
|
14
|
+
|
|
15
|
+
export default function ItemsSummary({ newItems }) {
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<DialogContentText sx={{ textAlign: "center", mb: 2 }}>
|
|
19
|
+
Summary
|
|
20
|
+
</DialogContentText>
|
|
21
|
+
<Grid container mb={4}>
|
|
22
|
+
<Grid
|
|
23
|
+
item
|
|
24
|
+
xs={5}
|
|
25
|
+
sx={{
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
display: "flex",
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
<Stack
|
|
31
|
+
sx={{
|
|
32
|
+
height: "100%",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
alignContent: "center",
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<Card
|
|
38
|
+
sx={{
|
|
39
|
+
bgcolor: (theme) => theme.palette.background.paper,
|
|
40
|
+
boxShadow: (theme) => theme.customShadows.card,
|
|
41
|
+
alignContent: "center",
|
|
42
|
+
justifyContent: "center",
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
<CardHeader
|
|
46
|
+
title={"Project Summary"}
|
|
47
|
+
titleTypographyProps={{
|
|
48
|
+
variant: "subtitle1",
|
|
49
|
+
textAlign: "center",
|
|
50
|
+
color: "text.secondary",
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
<CardContent
|
|
54
|
+
children={
|
|
55
|
+
<>
|
|
56
|
+
<Typography variant="h6" textAlign={"center"} mb={2}>
|
|
57
|
+
{newItems[0].details.name}
|
|
58
|
+
</Typography>
|
|
59
|
+
<Stack
|
|
60
|
+
padding={1}
|
|
61
|
+
sx={{
|
|
62
|
+
"& .svg-color": {
|
|
63
|
+
background: (theme) =>
|
|
64
|
+
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.primary.main} 100%)`,
|
|
65
|
+
},
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
<SvgColor
|
|
69
|
+
src={`https://api.iconify.design/${newItems[0].details.icon?.slice(
|
|
70
|
+
1,
|
|
71
|
+
-1
|
|
72
|
+
)}.svg`}
|
|
73
|
+
variant="square"
|
|
74
|
+
sx={{
|
|
75
|
+
width: 82,
|
|
76
|
+
height: 82,
|
|
77
|
+
alignSelf: "center",
|
|
78
|
+
justifySelf: "center",
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
</Stack>
|
|
82
|
+
</>
|
|
83
|
+
}
|
|
84
|
+
/>
|
|
85
|
+
</Card>
|
|
86
|
+
</Stack>
|
|
87
|
+
</Grid>
|
|
88
|
+
<Grid
|
|
89
|
+
item
|
|
90
|
+
xs={2}
|
|
91
|
+
sx={{
|
|
92
|
+
display: "flex",
|
|
93
|
+
alignContent: "center",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
<Divider orientation="vertical" sx={{ borderStyle: "dashed" }} />
|
|
98
|
+
</Grid>
|
|
99
|
+
<Grid item xs={5}>
|
|
100
|
+
<Stack
|
|
101
|
+
sx={{
|
|
102
|
+
height: "100%",
|
|
103
|
+
justifyContent: "center",
|
|
104
|
+
alignContent: "center",
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
<Card>
|
|
108
|
+
<CardHeader
|
|
109
|
+
title={"Service Summary"}
|
|
110
|
+
titleTypographyProps={{
|
|
111
|
+
variant: "subtitle1",
|
|
112
|
+
textAlign: "center",
|
|
113
|
+
color: "text.secondary",
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
<CardContent
|
|
117
|
+
children={
|
|
118
|
+
<>
|
|
119
|
+
<Typography variant="h6" textAlign={"center"} mb={2}>
|
|
120
|
+
{newItems[1].details.name}
|
|
121
|
+
</Typography>
|
|
122
|
+
<Stack
|
|
123
|
+
padding={1}
|
|
124
|
+
sx={{
|
|
125
|
+
"& .svg-color": {
|
|
126
|
+
background: (theme) =>
|
|
127
|
+
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.primary.main} 100%)`,
|
|
128
|
+
},
|
|
129
|
+
}}
|
|
130
|
+
>
|
|
131
|
+
<SvgColor
|
|
132
|
+
src={`https://api.iconify.design/${newItems[1].details.icon?.slice(
|
|
133
|
+
1,
|
|
134
|
+
-1
|
|
135
|
+
)}.svg`}
|
|
136
|
+
variant="square"
|
|
137
|
+
sx={{
|
|
138
|
+
width: 82,
|
|
139
|
+
height: 82,
|
|
140
|
+
alignSelf: "center",
|
|
141
|
+
justifySelf: "center",
|
|
142
|
+
mb: 2,
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
<TextField
|
|
146
|
+
value={newItems[1].details.description}
|
|
147
|
+
variant="outlined"
|
|
148
|
+
label="Description"
|
|
149
|
+
fullWidth={true}
|
|
150
|
+
multiline
|
|
151
|
+
rows={3}
|
|
152
|
+
/>
|
|
153
|
+
</Stack>
|
|
154
|
+
</>
|
|
155
|
+
}
|
|
156
|
+
/>
|
|
157
|
+
</Card>
|
|
158
|
+
</Stack>
|
|
159
|
+
</Grid>
|
|
160
|
+
</Grid>
|
|
161
|
+
</>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import Box from "@mui/material/Box";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { StyledLabel } from "./styles";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { useTheme } from "@mui/material/styles";
|
|
6
|
+
|
|
7
|
+
const Label = forwardRef(
|
|
8
|
+
(
|
|
9
|
+
{
|
|
10
|
+
children,
|
|
11
|
+
color = "default",
|
|
12
|
+
variant = "soft",
|
|
13
|
+
startIcon,
|
|
14
|
+
endIcon,
|
|
15
|
+
sx,
|
|
16
|
+
...other
|
|
17
|
+
},
|
|
18
|
+
ref
|
|
19
|
+
) => {
|
|
20
|
+
const theme = useTheme();
|
|
21
|
+
|
|
22
|
+
const iconStyles = {
|
|
23
|
+
width: 16,
|
|
24
|
+
height: 16,
|
|
25
|
+
"& svg, img": { width: 1, height: 1, objectFit: "cover" },
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<StyledLabel
|
|
30
|
+
ref={ref}
|
|
31
|
+
component="span"
|
|
32
|
+
ownerState={{ color, variant }}
|
|
33
|
+
sx={{
|
|
34
|
+
...(startIcon && { pl: 0.75 }),
|
|
35
|
+
...(endIcon && { pr: 0.75 }),
|
|
36
|
+
...sx,
|
|
37
|
+
}}
|
|
38
|
+
theme={theme}
|
|
39
|
+
{...other}
|
|
40
|
+
>
|
|
41
|
+
{startIcon && <Box sx={{ mr: 0.75, ...iconStyles }}> {startIcon} </Box>}
|
|
42
|
+
|
|
43
|
+
{children}
|
|
44
|
+
|
|
45
|
+
{endIcon && <Box sx={{ ml: 0.75, ...iconStyles }}> {endIcon} </Box>}
|
|
46
|
+
</StyledLabel>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./label";
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { alpha, styled } from "@mui/material/styles";
|
|
2
|
+
|
|
3
|
+
import Box from "@mui/material/Box";
|
|
4
|
+
|
|
5
|
+
export const StyledLabel = styled(Box)(({ theme, ownerState }) => {
|
|
6
|
+
const lightMode = theme.palette.mode === "light";
|
|
7
|
+
|
|
8
|
+
const filledVariant = ownerState.variant === "filled";
|
|
9
|
+
|
|
10
|
+
const outlinedVariant = ownerState.variant === "outlined";
|
|
11
|
+
|
|
12
|
+
const softVariant = ownerState.variant === "soft";
|
|
13
|
+
|
|
14
|
+
const defaultStyle = {
|
|
15
|
+
...(ownerState.color === "default" && {
|
|
16
|
+
// FILLED
|
|
17
|
+
...(filledVariant && {
|
|
18
|
+
color: lightMode ? theme.palette.common.white : theme.palette.grey[800],
|
|
19
|
+
backgroundColor: theme.palette.text.primary,
|
|
20
|
+
}),
|
|
21
|
+
// OUTLINED
|
|
22
|
+
...(outlinedVariant && {
|
|
23
|
+
backgroundColor: "transparent",
|
|
24
|
+
color: theme.palette.text.primary,
|
|
25
|
+
border: `2px solid ${theme.palette.text.primary}`,
|
|
26
|
+
}),
|
|
27
|
+
// SOFT
|
|
28
|
+
...(softVariant && {
|
|
29
|
+
color: theme.palette.text.secondary,
|
|
30
|
+
backgroundColor: alpha(theme.palette.grey[500], 0.16),
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const colorStyle = {
|
|
36
|
+
...(ownerState.color !== "default" && {
|
|
37
|
+
// FILLED
|
|
38
|
+
...(filledVariant && {
|
|
39
|
+
color: theme.palette[ownerState.color].contrastText,
|
|
40
|
+
backgroundColor: theme.palette[ownerState.color].main,
|
|
41
|
+
}),
|
|
42
|
+
// OUTLINED
|
|
43
|
+
...(outlinedVariant && {
|
|
44
|
+
backgroundColor: "transparent",
|
|
45
|
+
color: theme.palette[ownerState.color].main,
|
|
46
|
+
border: `2px solid ${theme.palette[ownerState.color].main}`,
|
|
47
|
+
}),
|
|
48
|
+
// SOFT
|
|
49
|
+
...(softVariant && {
|
|
50
|
+
color: theme.palette[ownerState.color][lightMode ? "dark" : "light"],
|
|
51
|
+
backgroundColor: alpha(theme.palette[ownerState.color].main, 0.16),
|
|
52
|
+
}),
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
height: 24,
|
|
58
|
+
minWidth: 24,
|
|
59
|
+
lineHeight: 0,
|
|
60
|
+
borderRadius: 6,
|
|
61
|
+
cursor: "default",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
whiteSpace: "nowrap",
|
|
64
|
+
display: "inline-flex",
|
|
65
|
+
justifyContent: "center",
|
|
66
|
+
textTransform: "capitalize",
|
|
67
|
+
padding: theme.spacing(0, 0.75),
|
|
68
|
+
fontSize: theme.typography.pxToRem(12),
|
|
69
|
+
fontWeight: theme.typography.fontWeightBold,
|
|
70
|
+
transition: theme.transitions.create("all", {
|
|
71
|
+
duration: theme.transitions.duration.shorter,
|
|
72
|
+
}),
|
|
73
|
+
...defaultStyle,
|
|
74
|
+
...colorStyle,
|
|
75
|
+
};
|
|
76
|
+
});
|