@argusoft/medplat-app-shell 1.0.6 → 1.0.8
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/package.json +139 -141
- package/src/GlobalErrorBoundary.jsx +31 -0
- package/src/SilentErrorFallback.jsx +68 -0
- package/src/TrackingProviderWrapper.jsx +40 -0
- package/src/_tests_/__mocks__/MockTranslationProvider.jsx +21 -0
- package/src/_tests_/__mocks__/ckeditor.js +45 -0
- package/src/_tests_/__mocks__/fileMock.js +1 -0
- package/src/_tests_/__mocks__/useranalytics.js +5 -0
- package/src/_tests_/views/components/Dashboard/DashboardUI.test.jsx +137 -0
- package/src/_tests_/views/components/Dashboard/DashboardUIMock.js +877 -0
- package/src/_tests_/views/components/ForgotPassword/ForgotPassword.test.jsx +314 -0
- package/src/_tests_/views/components/LocationDirective/LocationDirective.test.jsx.disable +229 -0
- package/src/_tests_/views/components/LocationDirective/mockLocationDirective.js +810 -0
- package/src/_tests_/views/components/LocationType/MockLocationType.js +42259 -0
- package/src/_tests_/views/components/LocationType/addlocationtype.test.jsx.disable +276 -0
- package/src/_tests_/views/components/LocationType/editlocationtype.test.jsx.disable +262 -0
- package/src/_tests_/views/components/LocationType/locationtype.test.jsx.disable +148 -0
- package/src/_tests_/views/components/Profile/UpdateProfileModalData.js +4396 -0
- package/src/_tests_/views/components/Profile/updateprofilemodal.test.jsx +282 -0
- package/src/_tests_/views/components/SideBar/MockSideBar.js +1379 -0
- package/src/_tests_/views/components/SideBar/SideBar.test.jsx +98 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/AddManageSystemConfig.test.jsx.disable +164 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/UpdateManageSystemConfig.test.jsx.disable +157 -0
- package/src/_tests_/views/components/SystemConfig/MockSystemConfig.js +1280 -0
- package/src/_tests_/views/components/SystemConfig/SystemConfig.test.jsx.disable +165 -0
- package/src/_tests_/views/components/login/Login.test.jsx +276 -0
- package/src/_tests_/views/components/login/MockAuthorise.js +2414 -0
- package/src/_tests_/views/components/login/ServiceResponse.js +595 -0
- package/src/_tests_/views/components/user/MockManageUser.js +7965 -0
- package/src/_tests_/views/components/user/manageuser.test.jsx.disable +989 -0
- package/src/_tests_/views/components/user/mockUsersData.js +582 -0
- package/src/assets/img/OASISLogin.png +0 -0
- package/src/assets/img/bahaarNew.png +0 -0
- package/src/assets/img/dnhdd4K.png +0 -0
- package/src/assets/img/govtofup.png +0 -0
- package/src/assets/img/sewarural4K.png +0 -0
- package/src/assets/img/techo4K.png +0 -0
- package/src/assets/img/up4K.png +0 -0
- package/src/common/HolidayList.jsx +573 -0
- package/src/common/MalaciaousInputUtil.js +23 -0
- package/src/common/SafeHtml.jsx +17 -0
- package/src/common/VersionManager.jsx +109 -0
- package/src/common/constants/PerformanceDashboard.js +514 -0
- package/src/common/constants/app.constant.js +781 -0
- package/src/common/constants/cccVerificationConstants.js +18 -0
- package/src/common/constants/fhsrConstant.js +33 -0
- package/src/common/constants/gvk-verification.constant.js +76 -0
- package/src/common/constants/search.constant.js +23 -0
- package/src/common/constants/teleconsulatationConstant.jsx +1339 -0
- package/src/common/directives/SearchTemplate.jsx +784 -0
- package/src/common/directives/SearchTemplate.scss +14 -0
- package/src/common/dynamicView/DynamicView.jsx +353 -0
- package/src/common/dynamicView/InputFieldComponent.jsx +1501 -0
- package/src/common/dynamicView/InputViewComponent.jsx +298 -0
- package/src/common/dynamicView/InputViewComponent.scss +15 -0
- package/src/common/env.js +5 -0
- package/src/common/filters/locationNameFilter.js +26 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIcons.jsx +27 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIconsNames.js +1968 -0
- package/src/common/fontPreferences/fontSizeProvider.jsx +34 -0
- package/src/common/fontPreferences/fontSizeSelector.jsx +116 -0
- package/src/common/getAssignedFeature/getAssignedFeature.js +32 -0
- package/src/common/interceptors/AxiosInterceptor.js +216 -0
- package/src/common/languageTranslator/TranslationContext.js +5 -0
- package/src/common/languageTranslator/TranslationProvider.jsx +24 -0
- package/src/common/languageTranslator/i18n.js +49 -0
- package/src/common/services/AuthenticateService.js +116 -0
- package/src/common/services/DownloadFile.js +35 -0
- package/src/common/services/ForgotPassword.js +18 -0
- package/src/common/services/FormConfiguratorService.js +195 -0
- package/src/common/services/GlobalApis.js +84 -0
- package/src/common/services/InterceptorNavigationService.js +17 -0
- package/src/common/services/LocationService.js +65 -0
- package/src/common/services/LocationType.js +11 -0
- package/src/common/services/QueryBuilder.js +36 -0
- package/src/common/services/Roles.js +28 -0
- package/src/common/services/SyncWithServer.js +15 -0
- package/src/common/services/SystemConfig.js +15 -0
- package/src/common/services/TranslationService.js +70 -0
- package/src/common/services/TwoFactorService.js +7 -0
- package/src/common/services/Users.js +91 -0
- package/src/common/services/Webtasks.js +27 -0
- package/src/common/services/util/Convert-pad-data-to-API-format.jsx +167 -0
- package/src/common/services/util/Convert-to-UI-format.jsx +82 -0
- package/src/common/services/util/EmptyPrescriptionPadData.jsx +11 -0
- package/src/common/services/util/GeneralUtil.js +456 -0
- package/src/common/services/util/Prescription-pad-util.js +339 -0
- package/src/common/services/util/PrescriptionPadData.js +67 -0
- package/src/common/services/util/PrescriptionpadCommonUtil.js +96 -0
- package/src/common/services/util/ReportFieldUtil.jsx +398 -0
- package/src/common/services/util/WebSocketContext.jsx +261 -0
- package/src/common/syncWithServer/SyncWithServerDialog.jsx +170 -0
- package/src/common/syncWithServer/SyncWithServerDialogSkeleton.jsx +67 -0
- package/src/common/tests/CustomWrapper.jsx +49 -0
- package/src/common/tests/TranslationWrapper.jsx +38 -0
- package/src/common/themeProvider/ColorInputs.jsx +97 -0
- package/src/common/themeProvider/EditableColorInput.jsx +128 -0
- package/src/common/themeProvider/ThemeEditor.jsx +319 -0
- package/src/common/themeProvider/ThemeProvider.jsx +210 -0
- package/src/common/themeProvider/themeConfig.js +558 -0
- package/src/common/toaster/toaster.jsx +30 -0
- package/src/firebaseConfig.js +24 -0
- package/src/global.scss +221 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/useAESEncryption.js +56 -0
- package/src/hooks/useCaching.js +43 -0
- package/src/hooks/useDebounce.js +34 -0
- package/src/hooks/useDebounceFn.js +50 -0
- package/src/hooks/useDownloadPdf.js +358 -0
- package/src/hooks/useDownloadXlsx.js +55 -0
- package/src/hooks/useListValueFieldValues.js +30 -0
- package/src/hooks/useLocationHierarchies.js +63 -0
- package/src/hooks/useLocationHierarchyTranslate.js +16 -0
- package/src/hooks/useOnline.js +27 -0
- package/src/hooks/usePagination.js +63 -0
- package/src/hooks/useRefreshToken.js +87 -0
- package/src/hooks/useScript.js +25 -0
- package/src/hooks/useStopwatch.js +75 -0
- package/src/hooks/useTrackEvent.js +22 -0
- package/src/hooks/useWebAudioRecorder.js +115 -0
- package/src/layout/LoaderComponet.jsx +22 -0
- package/src/layout/LoaderContext.jsx +29 -0
- package/src/layout/mainLayout/AdaptiveZoom.jsx +27 -0
- package/src/layout/mainLayout/Chatbot.jsx +243 -0
- package/src/layout/mainLayout/Layout.jsx +445 -0
- package/src/layout/mainLayout/Profile/UpdateProfileModal.jsx +684 -0
- package/src/layout/mainLayout/header/LogoutModal.jsx +131 -0
- package/src/layout/mainLayout/header/Navbar.jsx +1677 -0
- package/src/layout/mainLayout/header/Navbar.scss +4 -0
- package/src/layout/mainLayout/header/index.js +0 -0
- package/src/layout/mainLayout/sidebar/SideBar.jsx +1402 -0
- package/src/layout/mainLayout/sidebar/Sidebar.css +159 -0
- package/src/layout/mainLayout/sidebar/index.js +0 -0
- package/src/logo.svg +1 -0
- package/src/reportWebVitals.js +13 -0
- package/src/setupFirebaseMessaging.js +28 -0
- package/src/setupTests.js +8 -0
- package/src/store/actions/AuthenticationActions.js +0 -0
- package/src/store/actions/ReportsActions.js +0 -0
- package/src/store/actions/TranslationAction.js +0 -0
- package/src/store/index.js +8 -0
- package/src/store/reducer.js +46 -0
- package/src/store/reducers/AuthenticationReducer.js +50 -0
- package/src/store/reducers/CalendarEventReducer.js +41 -0
- package/src/store/reducers/ConditionClipboardReducer.js +45 -0
- package/src/store/reducers/FeatureReducer.js +27 -0
- package/src/store/reducers/FormConfiguratorReducer.js +38 -0
- package/src/store/reducers/LoadingReducer.js +20 -0
- package/src/store/reducers/MembersAuthenticationReducer.js +28 -0
- package/src/store/reducers/PrescriptionPadReducer.js +329 -0
- package/src/store/reducers/QuestionaireReducer.js +29 -0
- package/src/store/reducers/ReportsReducer.js +24 -0
- package/src/store/reducers/SkeletonReducer.js +20 -0
- package/src/store/reducers/ThemeReducer.js +106 -0
- package/src/store/reducers/TranslationReducer.js +126 -0
- package/src/store/reducers/dashboardEditorSlice.js +77 -0
- package/src/store/reducers/districtHealthDashboardSlice.js +58 -0
- package/src/store/reducers/immunizationSlice.js +234 -0
- package/src/store/slices/dashboardPagesSlice.js +51 -0
- package/src/store/slices/dashboardSlice.js +14 -0
- package/src/utils/.gitkeep +0 -0
- package/src/utils/FormConstants.js +2629 -0
- package/src/utils/GujaratTopoChart.jsx +483 -0
- package/src/utils/UUIDgenerator.js +8 -0
- package/src/utils/appointment-utils/appointment-utils.js +123 -0
- package/src/utils/feature.js +42 -0
- package/src/utils/getThemeColor.js +12 -0
- package/src/utils/localStorageHelper.js +11 -0
- package/src/utils/notifications/enable-push-notifications.js +27 -0
- package/src/utils/resolveAppliedStyle.js +11 -0
- package/src/utils/themeConfigs.js +1483 -0
- package/src/views/custom-components/.gitkeep +0 -0
- package/src/views/custom-components/AgIconButton/RIf.jsx +14 -0
- package/src/views/custom-components/AgIconButton/button.jsx +108 -0
- package/src/views/custom-components/AgIconButton/waterDrop.jsx +95 -0
- package/src/views/custom-components/AgIconButton/waterDrop.scss +37 -0
- package/src/views/custom-components/AlertPlaceholder.jsx +32 -0
- package/src/views/custom-components/AllFaIconsSelector.jsx +56 -0
- package/src/views/custom-components/CkEditor/CkEditor.js +102 -0
- package/src/views/custom-components/CustomAccordion.jsx +72 -0
- package/src/views/custom-components/CustomActionIcons.jsx +118 -0
- package/src/views/custom-components/CustomAutoComplete.jsx +188 -0
- package/src/views/custom-components/CustomCheckBox.jsx +60 -0
- package/src/views/custom-components/CustomConfirmationModal.jsx +118 -0
- package/src/views/custom-components/CustomCountrySelect.jsx +129 -0
- package/src/views/custom-components/CustomDatePicker.jsx +122 -0
- package/src/views/custom-components/CustomDropdown.jsx +191 -0
- package/src/views/custom-components/CustomFileUpload.jsx +387 -0
- package/src/views/custom-components/CustomFullCalendar.jsx +514 -0
- package/src/views/custom-components/CustomInfiniteScroll.jsx +126 -0
- package/src/views/custom-components/CustomRadioComponent.jsx +65 -0
- package/src/views/custom-components/CustomStatsComponent.jsx +114 -0
- package/src/views/custom-components/CustomSvgUpload.jsx +170 -0
- package/src/views/custom-components/CustomSwitch.jsx +37 -0
- package/src/views/custom-components/CustomTabPanel.jsx +19 -0
- package/src/views/custom-components/CustomTextArea.jsx +62 -0
- package/src/views/custom-components/CustomTextArea.scss +27 -0
- package/src/views/custom-components/CustomTextField.jsx +116 -0
- package/src/views/custom-components/CustomToggleSwitch.jsx +138 -0
- package/src/views/custom-components/CustomTooltip.jsx +51 -0
- package/src/views/custom-components/CustomZoomImage.jsx +134 -0
- package/src/views/custom-components/CustomizedTable/CustomizedTableV2.jsx +1407 -0
- package/src/views/custom-components/CustomizedTable/VirtualizeTableBody.jsx +295 -0
- package/src/views/custom-components/CustomizedTable/helper.jsx +159 -0
- package/src/views/custom-components/CustomizedTable.jsx +532 -0
- package/src/views/custom-components/EditInputField.jsx +174 -0
- package/src/views/custom-components/FieldDescription.jsx +22 -0
- package/src/views/custom-components/FileDisplayComponent.jsx +138 -0
- package/src/views/custom-components/FormItem.jsx +53 -0
- package/src/views/custom-components/GenericChart.jsx +80 -0
- package/src/views/custom-components/InfoBadge.jsx +60 -0
- package/src/views/custom-components/PostgresEditor.jsx +801 -0
- package/src/views/custom-components/ResizableEditAutocompleteField.jsx +249 -0
- package/src/views/custom-components/ResizableEditInputField.jsx +215 -0
- package/src/views/custom-components/ResizeableEditSelectField.jsx +197 -0
- package/src/views/custom-components/SideOverlay.jsx +113 -0
- package/src/views/custom-components/SideOverlay.scss +42 -0
- package/src/views/custom-components/calendar.scss +571 -0
- package/src/views/feature-components/.gitkeep +0 -0
- package/src/views/feature-components/Dashboard/DashboardUI.jsx +1043 -0
- package/src/views/feature-components/Dashboard/DhnddModal/AshaDataQualityVerificationModal.jsx +278 -0
- package/src/views/feature-components/Dashboard/PinFeatureModal.jsx +143 -0
- package/src/views/feature-components/Dashboard/QuickLinks.jsx +163 -0
- package/src/views/feature-components/Dashboard/Taskbar.jsx +56 -0
- package/src/views/feature-components/Dashboard/WebtasksFilterForm.jsx +109 -0
- package/src/views/feature-components/Dashboard/WidgetCard.jsx +161 -0
- package/src/views/feature-components/Dashboard/actionModal.jsx +263 -0
- package/src/views/feature-components/Dashboard/ekavachModal/HealthWorkerIncorrectDetailsModal.jsx +332 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoMaternalDeathVerifcationModal.jsx +275 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoVerficationForChildScreeningMoadal.jsx +566 -0
- package/src/views/feature-components/FeatureUsageAnalytics/FeatureUsageAnalytics.jsx +989 -0
- package/src/views/feature-components/Features/NewServerManagement.jsx +217 -0
- package/src/views/feature-components/Features/ServerManagement.scss +120 -0
- package/src/views/feature-components/ForgotPassword/ForgotPassword.jsx +226 -0
- package/src/views/feature-components/LocationDirective/LocationDirective.jsx +992 -0
- package/src/views/feature-components/LocationDirective/LocationDirectiveV2.jsx +909 -0
- package/src/views/feature-components/NotFound.jsx +66 -0
- package/src/views/feature-components/Onboarding/Onboarding.jsx +1400 -0
- package/src/views/feature-components/Skeletons.js +115 -0
- package/src/views/feature-components/Unauthorized.jsx +48 -0
- package/src/views/feature-components/VerifyRoute.jsx +88 -0
- package/src/views/feature-components/YearlyRecap/YearlyRecap.jsx +357 -0
- package/src/views/feature-components/YearlyRecap/components/RecapSlide.jsx +183 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationContext.js +5 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationProvider.jsx +26 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/i18n.js +46 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/translations.json +167 -0
- package/src/views/feature-components/YearlyRecap/slides/IntroSlide.jsx +233 -0
- package/src/views/feature-components/YearlyRecap/slides/MaternalHealthSlide.jsx +146 -0
- package/src/views/feature-components/YearlyRecap/slides/MetricSlide.jsx +227 -0
- package/src/views/feature-components/YearlyRecap/slides/OutroSlide.jsx +701 -0
- package/src/views/feature-components/YearlyRecap/slides/ReachSlide.jsx +273 -0
- package/src/views/feature-components/login/Login.jsx +840 -0
- package/src/views/feature-components/login/Login.scss +154 -0
- package/src/views/feature-components/login/LoginConfigurator.jsx +1149 -0
- package/src/views/feature-components/login/TwoFactorSetupModal.jsx +411 -0
- package/src/views/feature-components/login/simplifyMenu.js +45 -0
- package/src/views/feature-components/system-config/ManageSystemConfigs.jsx +284 -0
- package/src/views/feature-components/system-config/SystemConfig.jsx +299 -0
- package/src/views/feature-components/users/ChangePasswordModal.jsx +243 -0
- package/src/views/feature-components/users/PasswordField.jsx +56 -0
- package/dist/index.css +0 -1
- package/dist/index.js +0 -32001
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
// ─── Brand Palette (derived from medplat logo) ─────────────────────
|
|
2
|
+
// Logo features: emerald green blocks, sky-blue blocks, blue "MED" text
|
|
3
|
+
// Primary axis: blue | Accent axis: green | Neutral axis: slate
|
|
4
|
+
const brand = {
|
|
5
|
+
blue: '#1C6FB7',
|
|
6
|
+
blueBright: '#4DA8DA',
|
|
7
|
+
blueLight: '#7DD3FC',
|
|
8
|
+
green: '#27AE60',
|
|
9
|
+
red: '#EB5757',
|
|
10
|
+
amber: '#E2B93B',
|
|
11
|
+
info: '#2F80ED',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// ─── Shared tokens ─────────────────────────────────────────────────
|
|
15
|
+
const shape = {
|
|
16
|
+
borderRadius: 14,
|
|
17
|
+
cardRadius: 20,
|
|
18
|
+
dropdownRadius: 16,
|
|
19
|
+
chipRadius: 12,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const typography = {
|
|
23
|
+
fontFamily: '"Mulish", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
24
|
+
overline: {
|
|
25
|
+
fontSize: '0.75rem',
|
|
26
|
+
fontWeight: 700,
|
|
27
|
+
color: '#64748B',
|
|
28
|
+
textTransform: 'uppercase',
|
|
29
|
+
letterSpacing: '-0.02em',
|
|
30
|
+
},
|
|
31
|
+
h1: { fontSize: '56px', lineHeight: '70px', fontWeight: 700 },
|
|
32
|
+
h2: { fontSize: '48px', lineHeight: '60px', fontWeight: 700 },
|
|
33
|
+
h3: { fontSize: '40px', lineHeight: '50px', fontWeight: 700 },
|
|
34
|
+
h4: { fontSize: '32px', lineHeight: '40px', fontWeight: 700 },
|
|
35
|
+
h5: { fontSize: '24px', lineHeight: '30px', fontWeight: 600 },
|
|
36
|
+
h6: { fontSize: '20px', lineHeight: '25px', fontWeight: 600 },
|
|
37
|
+
body1: { fontSize: '0.875rem', lineHeight: '1.7857rem' },
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Shared component styles that are identical in both themes
|
|
41
|
+
const sharedComponents = {
|
|
42
|
+
MuiTextField: (bg, borderIdle, borderHover, borderFocus, textColor) => ({
|
|
43
|
+
styleOverrides: {
|
|
44
|
+
root: {
|
|
45
|
+
borderRadius: `${shape.borderRadius}px`,
|
|
46
|
+
margin: '8px 0',
|
|
47
|
+
'& .MuiOutlinedInput-root': {
|
|
48
|
+
borderRadius: `${shape.borderRadius}px`,
|
|
49
|
+
fontSize: '14px',
|
|
50
|
+
padding: '10px 14px',
|
|
51
|
+
margin: 0,
|
|
52
|
+
backgroundColor: bg,
|
|
53
|
+
color: textColor,
|
|
54
|
+
'& fieldset': { borderColor: borderIdle },
|
|
55
|
+
'&:hover fieldset': { borderColor: borderHover },
|
|
56
|
+
'&.Mui-focused fieldset': { borderColor: borderFocus },
|
|
57
|
+
'&.Mui-error .MuiOutlinedInput-notchedOutline': {
|
|
58
|
+
borderColor: brand.red,
|
|
59
|
+
},
|
|
60
|
+
'& input': { padding: 0, color: textColor },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
|
|
66
|
+
MuiSelect: () => ({
|
|
67
|
+
styleOverrides: {
|
|
68
|
+
root: {
|
|
69
|
+
margin: '8px 0',
|
|
70
|
+
borderRadius: `${shape.borderRadius}px`,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
|
|
75
|
+
MuiCard: (surfaceBg, borderColor, elevatedBg, elevatedShadow) => ({
|
|
76
|
+
styleOverrides: {
|
|
77
|
+
root: {
|
|
78
|
+
backgroundColor: surfaceBg,
|
|
79
|
+
backgroundImage: 'none',
|
|
80
|
+
borderRadius: `${shape.cardRadius}px`,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
variants: [
|
|
84
|
+
{
|
|
85
|
+
props: { variant: 'bordered' },
|
|
86
|
+
style: {
|
|
87
|
+
border: `1px solid ${borderColor}`,
|
|
88
|
+
boxShadow: 'none',
|
|
89
|
+
borderRadius: `${shape.cardRadius}px`,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
props: { variant: 'elevated' },
|
|
94
|
+
style: {
|
|
95
|
+
backgroundColor: elevatedBg,
|
|
96
|
+
boxShadow: elevatedShadow,
|
|
97
|
+
borderRadius: `${shape.cardRadius}px`,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
}),
|
|
102
|
+
|
|
103
|
+
MuiCardHeader: (textColor) => ({
|
|
104
|
+
styleOverrides: { root: { padding: '16px', color: textColor } },
|
|
105
|
+
}),
|
|
106
|
+
|
|
107
|
+
MuiCardContent: (textColor) => ({
|
|
108
|
+
styleOverrides: { root: { padding: '16px', flexGrow: 1, color: textColor } },
|
|
109
|
+
}),
|
|
110
|
+
|
|
111
|
+
MuiCardActions: (borderColor) => ({
|
|
112
|
+
styleOverrides: {
|
|
113
|
+
root: {
|
|
114
|
+
padding: '12px 16px',
|
|
115
|
+
justifyContent: 'flex-end',
|
|
116
|
+
borderTop: `1px solid ${borderColor}`,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
}),
|
|
120
|
+
|
|
121
|
+
MuiDropdown: (paperBg, borderColor, shadow, hoverBg, selectedBg, selectedText) => ({
|
|
122
|
+
MuiMenu: {
|
|
123
|
+
styleOverrides: {
|
|
124
|
+
paper: {
|
|
125
|
+
marginTop: '5px',
|
|
126
|
+
borderRadius: `${shape.dropdownRadius}px`,
|
|
127
|
+
border: `1px solid ${borderColor}`,
|
|
128
|
+
boxShadow: shadow,
|
|
129
|
+
backgroundColor: paperBg,
|
|
130
|
+
},
|
|
131
|
+
list: {
|
|
132
|
+
padding: '8px 14px',
|
|
133
|
+
'& .MuiMenuItem-root': {
|
|
134
|
+
marginBottom: '8px',
|
|
135
|
+
minHeight: '38px',
|
|
136
|
+
borderRadius: `${shape.chipRadius}px`,
|
|
137
|
+
transition: 'background-color 180ms ease, color 180ms ease',
|
|
138
|
+
'&:hover': { cursor: 'pointer', backgroundColor: hoverBg },
|
|
139
|
+
'&:last-child': { marginBottom: 0 },
|
|
140
|
+
'&[aria-selected="true"]': {
|
|
141
|
+
backgroundColor: selectedBg,
|
|
142
|
+
color: selectedText,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
MuiMenuItem: {
|
|
149
|
+
styleOverrides: {
|
|
150
|
+
root: {
|
|
151
|
+
marginBottom: '8px',
|
|
152
|
+
borderRadius: `${shape.chipRadius}px`,
|
|
153
|
+
transition: 'background-color 180ms ease, color 180ms ease',
|
|
154
|
+
'&:hover': { cursor: 'pointer', backgroundColor: hoverBg },
|
|
155
|
+
'&:last-child': { marginBottom: 0 },
|
|
156
|
+
'&[aria-selected="true"]': {
|
|
157
|
+
backgroundColor: selectedBg,
|
|
158
|
+
color: selectedText,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
}),
|
|
164
|
+
|
|
165
|
+
MuiAutocomplete: (paperBg, borderColor, shadow, hoverBg, selectedBg, selectedText) => ({
|
|
166
|
+
styleOverrides: {
|
|
167
|
+
paper: {
|
|
168
|
+
marginTop: '5px',
|
|
169
|
+
borderRadius: `${shape.dropdownRadius}px`,
|
|
170
|
+
border: `1px solid ${borderColor}`,
|
|
171
|
+
boxShadow: shadow,
|
|
172
|
+
backgroundColor: paperBg,
|
|
173
|
+
},
|
|
174
|
+
listbox: {
|
|
175
|
+
padding: '8px',
|
|
176
|
+
'& > *': {
|
|
177
|
+
marginBottom: '8px',
|
|
178
|
+
padding: '10px 16px',
|
|
179
|
+
borderRadius: `${shape.chipRadius}px`,
|
|
180
|
+
transition: 'background-color 180ms ease, color 180ms ease',
|
|
181
|
+
'&:hover': { cursor: 'pointer', backgroundColor: hoverBg },
|
|
182
|
+
'&:last-child': { marginBottom: 0 },
|
|
183
|
+
'&[aria-selected="true"]': {
|
|
184
|
+
backgroundColor: selectedBg,
|
|
185
|
+
color: selectedText,
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
}),
|
|
191
|
+
|
|
192
|
+
MuiAccordion: (bg, borderColor) => ({
|
|
193
|
+
styleOverrides: {
|
|
194
|
+
root: {
|
|
195
|
+
backgroundColor: bg,
|
|
196
|
+
backgroundImage: 'none',
|
|
197
|
+
// borderRadius: '12px !important',
|
|
198
|
+
'&:before': { display: 'none' },
|
|
199
|
+
border: `1px solid ${borderColor}`,
|
|
200
|
+
boxShadow: 'none',
|
|
201
|
+
'&.Mui-expanded': { margin: '0' },
|
|
202
|
+
overflow: 'hidden',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
}),
|
|
206
|
+
|
|
207
|
+
MuiAccordionSummary: (textColor) => ({
|
|
208
|
+
styleOverrides: {
|
|
209
|
+
root: {
|
|
210
|
+
color: textColor,
|
|
211
|
+
minHeight: '48px',
|
|
212
|
+
'&.Mui-expanded': { minHeight: '48px' },
|
|
213
|
+
},
|
|
214
|
+
content: {
|
|
215
|
+
margin: '12px 0',
|
|
216
|
+
'&.Mui-expanded': { margin: '12px 0' },
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
}),
|
|
220
|
+
|
|
221
|
+
MuiAccordionDetails: (bg, borderTopColor) => ({
|
|
222
|
+
styleOverrides: {
|
|
223
|
+
root: {
|
|
224
|
+
backgroundColor: bg,
|
|
225
|
+
borderTop: `1px solid ${borderTopColor}`,
|
|
226
|
+
padding: '16px',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
}),
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// ─── Light Theme ───────────────────────────────────────────────────
|
|
233
|
+
const lightThemeConfig = {
|
|
234
|
+
components: {
|
|
235
|
+
MuiButton: {
|
|
236
|
+
styleOverrides: {
|
|
237
|
+
root: {
|
|
238
|
+
borderRadius: `${shape.borderRadius}px`,
|
|
239
|
+
fontSize: '14px',
|
|
240
|
+
fontWeight: 700,
|
|
241
|
+
textTransform: 'none',
|
|
242
|
+
transition: 'all 180ms ease',
|
|
243
|
+
},
|
|
244
|
+
containedPrimary: {
|
|
245
|
+
padding: '8px 24px',
|
|
246
|
+
color: '#ffffff',
|
|
247
|
+
boxShadow: '0 4px 14px rgba(28, 111, 183, 0.22)',
|
|
248
|
+
'&:hover': {
|
|
249
|
+
boxShadow: '0 6px 20px rgba(28, 111, 183, 0.28)',
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
containedSecondary: {
|
|
253
|
+
padding: '8px 24px',
|
|
254
|
+
backgroundColor: 'rgba(255, 255, 255, 0.88)',
|
|
255
|
+
border: '1px solid rgba(148, 163, 184, 0.22)',
|
|
256
|
+
color: '#38506C',
|
|
257
|
+
boxShadow: 'none',
|
|
258
|
+
'&:hover': {
|
|
259
|
+
backgroundColor: '#F8FBFF',
|
|
260
|
+
border: '1px solid rgba(125, 211, 252, 0.3)',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
MuiTextField: sharedComponents.MuiTextField(
|
|
267
|
+
'rgba(255, 255, 255, 0.82)',
|
|
268
|
+
'rgba(148, 163, 184, 0.24)',
|
|
269
|
+
'rgba(28, 111, 183, 0.28)',
|
|
270
|
+
brand.blue,
|
|
271
|
+
undefined
|
|
272
|
+
),
|
|
273
|
+
|
|
274
|
+
MuiSelect: sharedComponents.MuiSelect(),
|
|
275
|
+
|
|
276
|
+
...sharedComponents.MuiDropdown(
|
|
277
|
+
'#ffffff',
|
|
278
|
+
'rgba(148, 163, 184, 0.18)',
|
|
279
|
+
'0 12px 32px rgba(15, 23, 42, 0.1)',
|
|
280
|
+
'rgba(28, 111, 183, 0.08)',
|
|
281
|
+
'rgba(28, 111, 183, 0.12)',
|
|
282
|
+
'#20354B'
|
|
283
|
+
),
|
|
284
|
+
|
|
285
|
+
MuiAutocomplete: sharedComponents.MuiAutocomplete(
|
|
286
|
+
'#ffffff',
|
|
287
|
+
'rgba(148, 163, 184, 0.18)',
|
|
288
|
+
'0 12px 32px rgba(15, 23, 42, 0.1)',
|
|
289
|
+
'rgba(28, 111, 183, 0.08)',
|
|
290
|
+
'rgba(28, 111, 183, 0.12)',
|
|
291
|
+
'#20354B'
|
|
292
|
+
),
|
|
293
|
+
|
|
294
|
+
MuiCard: sharedComponents.MuiCard(
|
|
295
|
+
'#ffffff',
|
|
296
|
+
'rgba(148, 163, 184, 0.2)',
|
|
297
|
+
'#ffffff',
|
|
298
|
+
'0 12px 32px rgba(148, 163, 184, 0.14)'
|
|
299
|
+
),
|
|
300
|
+
MuiCardHeader: sharedComponents.MuiCardHeader(undefined),
|
|
301
|
+
MuiCardContent: sharedComponents.MuiCardContent(undefined),
|
|
302
|
+
MuiCardActions: sharedComponents.MuiCardActions('rgba(148, 163, 184, 0.16)'),
|
|
303
|
+
|
|
304
|
+
MuiAccordion: sharedComponents.MuiAccordion('#FFFFFF', 'rgba(148, 163, 184, 0.18)'),
|
|
305
|
+
MuiAccordionSummary: sharedComponents.MuiAccordionSummary('#102033'),
|
|
306
|
+
MuiAccordionDetails: sharedComponents.MuiAccordionDetails('#F8FBFF', 'rgba(148, 163, 184, 0.12)'),
|
|
307
|
+
|
|
308
|
+
MuiPickersCalendarHeader: {
|
|
309
|
+
styleOverrides: {
|
|
310
|
+
label: { color: '#243A50', fontWeight: 600 },
|
|
311
|
+
switchViewButton: { color: '#243A50' },
|
|
312
|
+
root: { '& button': { color: '#243A50' } },
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
MuiDayCalendar: {
|
|
316
|
+
styleOverrides: {
|
|
317
|
+
weekDayLabel: { color: '#243A50', fontWeight: 600 },
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
|
|
321
|
+
MuiTableContainer: {
|
|
322
|
+
styleOverrides: { root: { backgroundColor: 'transparent' } },
|
|
323
|
+
},
|
|
324
|
+
MuiAppBar: {
|
|
325
|
+
styleOverrides: {
|
|
326
|
+
root: {
|
|
327
|
+
backgroundColor: 'rgba(255, 255, 255, 0.92)',
|
|
328
|
+
backgroundImage: 'none',
|
|
329
|
+
borderBottom: '1px solid rgba(148, 163, 184, 0.18)',
|
|
330
|
+
boxShadow: '0 4px 16px rgba(148, 163, 184, 0.1)',
|
|
331
|
+
},
|
|
332
|
+
colorInherit: { backgroundColor: 'rgba(255, 255, 255, 0.92)' },
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
MuiDrawer: {
|
|
336
|
+
styleOverrides: {
|
|
337
|
+
paper: {
|
|
338
|
+
backgroundColor: '#F7FBFF',
|
|
339
|
+
backgroundImage: 'none',
|
|
340
|
+
borderRight: '1px solid rgba(148, 163, 184, 0.18)',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
MuiFormLabel: {
|
|
345
|
+
styleOverrides: { asterisk: { color: brand.red, whiteSpace: 'nowrap' } },
|
|
346
|
+
},
|
|
347
|
+
MuiInputLabel: {
|
|
348
|
+
styleOverrides: { asterisk: { whiteSpace: 'nowrap' } },
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
palette: {
|
|
353
|
+
mode: 'light',
|
|
354
|
+
primary: { main: brand.blue, contrastText: '#FFFFFF' },
|
|
355
|
+
secondary: { main: brand.blueBright, contrastText: '#FFFFFF' },
|
|
356
|
+
error: { main: brand.red, contrastText: '#FFFFFF' },
|
|
357
|
+
warning: { main: brand.amber, contrastText: '#000000' },
|
|
358
|
+
info: { main: brand.info, contrastText: '#FFFFFF' },
|
|
359
|
+
success: { main: brand.green, contrastText: '#FFFFFF' },
|
|
360
|
+
background: { default: '#EDF4FB', paper: '#FFFFFF' },
|
|
361
|
+
text: { primary: '#102033', secondary: '#5D7188', disabled: '#97A6B8' },
|
|
362
|
+
custom: {
|
|
363
|
+
tableHeader: '#203A56',
|
|
364
|
+
featureList: '#3576BA',
|
|
365
|
+
black1: '#252525',
|
|
366
|
+
black2: '#1D1D1D',
|
|
367
|
+
gray1: '#4F4F4F',
|
|
368
|
+
gray2: '#808080',
|
|
369
|
+
gray3: '#BFBFBF',
|
|
370
|
+
gray4: '#F3F3F3',
|
|
371
|
+
customBlue: brand.blue,
|
|
372
|
+
customBackground: '#F7FBFF',
|
|
373
|
+
sidebarBg: '#1D3D61',
|
|
374
|
+
sidebarText: '#E7E8E9',
|
|
375
|
+
sidebarTextHover: '#FFFFFF',
|
|
376
|
+
sidebarIcon: '#B8CEE3',
|
|
377
|
+
sidebarIconHover: '#FFFFFF',
|
|
378
|
+
sidebarHoverBg: 'rgba(125, 211, 252, 0.16)',
|
|
379
|
+
sidebarBorder: 'rgba(148, 163, 184, 0.2)',
|
|
380
|
+
sidebarActiveBg: 'rgba(255, 255, 255, 0.08)',
|
|
381
|
+
shellBg: '#EDF4FB',
|
|
382
|
+
shellSurface: '#FFFFFF',
|
|
383
|
+
shellSurfaceAlt: '#F7FBFF',
|
|
384
|
+
shellMuted: '#647B92',
|
|
385
|
+
shellBorder: 'rgba(148, 163, 184, 0.2)',
|
|
386
|
+
shellAccent: brand.blue,
|
|
387
|
+
shellAccentSoft: 'rgba(28, 111, 183, 0.12)',
|
|
388
|
+
shellGlow: 'rgba(77, 168, 218, 0.14)',
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
typography,
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
// ─── Dark Theme ────────────────────────────────────────────────────
|
|
396
|
+
const darkThemeConfig = {
|
|
397
|
+
components: {
|
|
398
|
+
MuiButton: {
|
|
399
|
+
styleOverrides: {
|
|
400
|
+
root: {
|
|
401
|
+
borderRadius: `${shape.borderRadius}px`,
|
|
402
|
+
fontSize: '14px',
|
|
403
|
+
fontWeight: 700,
|
|
404
|
+
textTransform: 'none',
|
|
405
|
+
transition: 'all 180ms ease',
|
|
406
|
+
},
|
|
407
|
+
containedPrimary: {
|
|
408
|
+
padding: '8px 24px',
|
|
409
|
+
color: '#FFFFFF',
|
|
410
|
+
boxShadow: '0 4px 14px rgba(6, 182, 212, 0.22)',
|
|
411
|
+
'&:hover': {
|
|
412
|
+
boxShadow: '0 6px 20px rgba(6, 182, 212, 0.3)',
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
containedSecondary: {
|
|
416
|
+
padding: '8px 24px',
|
|
417
|
+
backgroundColor: 'rgba(255, 255, 255, 0.06)',
|
|
418
|
+
border: '1px solid rgba(148, 163, 184, 0.22)',
|
|
419
|
+
color: '#E6EDF3',
|
|
420
|
+
boxShadow: 'none',
|
|
421
|
+
'&:hover': {
|
|
422
|
+
backgroundColor: 'rgba(6, 182, 212, 0.14)',
|
|
423
|
+
border: '1px solid rgba(6, 182, 212, 0.32)',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
MuiTextField: sharedComponents.MuiTextField(
|
|
430
|
+
'#1A1A1A',
|
|
431
|
+
'rgba(148, 163, 184, 0.22)',
|
|
432
|
+
'#06B6D4',
|
|
433
|
+
'#06B6D4',
|
|
434
|
+
'#EDF2F7'
|
|
435
|
+
),
|
|
436
|
+
|
|
437
|
+
MuiSelect: sharedComponents.MuiSelect(),
|
|
438
|
+
|
|
439
|
+
...sharedComponents.MuiDropdown(
|
|
440
|
+
'#262626',
|
|
441
|
+
'#333333',
|
|
442
|
+
'0 12px 32px rgba(0, 0, 0, 0.42)',
|
|
443
|
+
'rgba(255, 255, 255, 0.07)',
|
|
444
|
+
'rgba(6, 182, 212, 0.22)',
|
|
445
|
+
'#FFFFFF'
|
|
446
|
+
),
|
|
447
|
+
|
|
448
|
+
MuiAutocomplete: sharedComponents.MuiAutocomplete(
|
|
449
|
+
'#262626',
|
|
450
|
+
'#333333',
|
|
451
|
+
'0 12px 32px rgba(0, 0, 0, 0.42)',
|
|
452
|
+
'rgba(255, 255, 255, 0.07)',
|
|
453
|
+
'rgba(6, 182, 212, 0.22)',
|
|
454
|
+
'#FFFFFF'
|
|
455
|
+
),
|
|
456
|
+
|
|
457
|
+
MuiCard: sharedComponents.MuiCard(
|
|
458
|
+
'#1E1E1E',
|
|
459
|
+
'rgba(255, 255, 255, 0.12)',
|
|
460
|
+
'#262626',
|
|
461
|
+
'0 12px 32px rgba(0, 0, 0, 0.34)'
|
|
462
|
+
),
|
|
463
|
+
MuiCardHeader: sharedComponents.MuiCardHeader('#EDF2F7'),
|
|
464
|
+
MuiCardContent: sharedComponents.MuiCardContent('#EDF2F7'),
|
|
465
|
+
MuiCardActions: sharedComponents.MuiCardActions('rgba(255, 255, 255, 0.1)'),
|
|
466
|
+
|
|
467
|
+
MuiAccordion: sharedComponents.MuiAccordion('#1E1E1E', 'rgba(255, 255, 255, 0.08)'),
|
|
468
|
+
MuiAccordionSummary: sharedComponents.MuiAccordionSummary('#EDF2F7'),
|
|
469
|
+
MuiAccordionDetails: sharedComponents.MuiAccordionDetails('#181818', 'rgba(255, 255, 255, 0.06)'),
|
|
470
|
+
|
|
471
|
+
MuiPickersCalendarHeader: {
|
|
472
|
+
styleOverrides: {
|
|
473
|
+
label: { color: '#EDF2F7', fontWeight: 600 },
|
|
474
|
+
switchViewButton: { color: '#EDF2F7' },
|
|
475
|
+
root: { '& button': { color: '#EDF2F7' } },
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
MuiDayCalendar: {
|
|
479
|
+
styleOverrides: {
|
|
480
|
+
weekDayLabel: { color: '#94A3B8', fontWeight: 600 },
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
MuiTableContainer: {
|
|
485
|
+
styleOverrides: { root: { backgroundColor: 'transparent' } },
|
|
486
|
+
},
|
|
487
|
+
MuiAppBar: {
|
|
488
|
+
styleOverrides: {
|
|
489
|
+
root: {
|
|
490
|
+
backgroundColor: '#121212',
|
|
491
|
+
backgroundImage: 'none',
|
|
492
|
+
borderBottom: '1px solid rgba(255, 255, 255, 0.08)',
|
|
493
|
+
boxShadow: '0 4px 16px rgba(0, 0, 0, 0.3)',
|
|
494
|
+
},
|
|
495
|
+
colorInherit: { backgroundColor: '#121212' },
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
MuiDrawer: {
|
|
499
|
+
styleOverrides: {
|
|
500
|
+
paper: {
|
|
501
|
+
backgroundColor: '#161616',
|
|
502
|
+
backgroundImage: 'none',
|
|
503
|
+
borderRight: '1px solid rgba(255, 255, 255, 0.08)',
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
MuiFormLabel: {
|
|
508
|
+
styleOverrides: { asterisk: { color: '#F44336', whiteSpace: 'nowrap' } },
|
|
509
|
+
},
|
|
510
|
+
MuiInputLabel: {
|
|
511
|
+
styleOverrides: { asterisk: { whiteSpace: 'nowrap' } },
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
|
|
515
|
+
palette: {
|
|
516
|
+
mode: 'dark',
|
|
517
|
+
primary: { main: '#11B666', contrastText: '#FFFFFF' },
|
|
518
|
+
secondary: { main: brand.blueLight, contrastText: '#FFFFFF' },
|
|
519
|
+
error: { main: '#F44336', contrastText: '#FFFFFF' },
|
|
520
|
+
warning: { main: '#E0A100', contrastText: '#000000' },
|
|
521
|
+
info: { main: brand.info, contrastText: '#FFFFFF' },
|
|
522
|
+
success: { main: brand.green, contrastText: '#FFFFFF' },
|
|
523
|
+
background: { default: '#121212', paper: '#1E1E1E' },
|
|
524
|
+
text: { primary: '#EDF2F7', secondary: '#94A3B8', disabled: '#4A5A72' },
|
|
525
|
+
custom: {
|
|
526
|
+
tableHeader: '#1E293B',
|
|
527
|
+
featureList: '#1e1e1e',
|
|
528
|
+
black1: '#CBD5E1',
|
|
529
|
+
black2: '#A4B8CC',
|
|
530
|
+
gray1: '#6B849E',
|
|
531
|
+
gray2: '#4A5A72',
|
|
532
|
+
gray3: '#2D3F55',
|
|
533
|
+
gray4: '#1e1e1e',
|
|
534
|
+
customBlue: '#06B6D4',
|
|
535
|
+
customBackground: '#1E1E1E',
|
|
536
|
+
sidebarBg: '#1E293B',
|
|
537
|
+
sidebarText: '#E2EBF4',
|
|
538
|
+
sidebarTextHover: '#FFFFFF',
|
|
539
|
+
sidebarIcon: '#8BB5D4',
|
|
540
|
+
sidebarIconHover: '#FFFFFF',
|
|
541
|
+
sidebarHoverBg: 'rgba(255, 255, 255, 0.04)',
|
|
542
|
+
sidebarBorder: 'rgba(255, 255, 255, 0.08)',
|
|
543
|
+
sidebarActiveBg: 'rgba(255, 255, 255, 0.1)',
|
|
544
|
+
shellBg: '#121212',
|
|
545
|
+
shellSurface: '#1E1E1E',
|
|
546
|
+
shellSurfaceAlt: '#262626',
|
|
547
|
+
shellMuted: '#94A3B8',
|
|
548
|
+
shellBorder: 'rgba(255, 255, 255, 0.1)',
|
|
549
|
+
shellAccent: '#06B6D4',
|
|
550
|
+
shellAccentSoft: 'rgba(6, 182, 212, 0.18)',
|
|
551
|
+
shellGlow: 'rgba(6, 182, 212, 0.2)',
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
|
|
555
|
+
typography,
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
export { lightThemeConfig, darkThemeConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { toast, ToastContainer } from 'react-toastify';
|
|
2
|
+
import 'react-toastify/dist/ReactToastify.css';
|
|
3
|
+
import { useTheme } from '@mui/material/styles';
|
|
4
|
+
|
|
5
|
+
export const showToast = ({ message, type }) => {
|
|
6
|
+
toast[type](message, {
|
|
7
|
+
position: 'top-right',
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const ToastProvider = () => {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
return (
|
|
14
|
+
<ToastContainer
|
|
15
|
+
position="top-right"
|
|
16
|
+
autoClose={2500}
|
|
17
|
+
hideProgressBar={false}
|
|
18
|
+
newestOnTop={true}
|
|
19
|
+
closeOnClick
|
|
20
|
+
rtl={false}
|
|
21
|
+
pauseOnFocusLoss
|
|
22
|
+
draggable
|
|
23
|
+
pauseOnHover
|
|
24
|
+
theme={theme.palette.mode}
|
|
25
|
+
style={{ zIndex: 99999 }}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default ToastProvider;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { firebaseConfig } from "@/common/constants/app.constant";
|
|
2
|
+
import { initializeApp } from "firebase/app";
|
|
3
|
+
import { getMessaging, isSupported } from "firebase/messaging";
|
|
4
|
+
|
|
5
|
+
const firebaseOptionsConfig = {
|
|
6
|
+
apiKey: firebaseConfig.apiKey,
|
|
7
|
+
authDomain: firebaseConfig.authDomain,
|
|
8
|
+
projectId: firebaseConfig.projectId,
|
|
9
|
+
storageBucket: firebaseConfig.storageBucket,
|
|
10
|
+
messagingSenderId: firebaseConfig.messagingSenderId,
|
|
11
|
+
appId: firebaseConfig.appId,
|
|
12
|
+
measurementId: firebaseConfig.measurementId,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const firebaseApp = initializeApp(firebaseOptionsConfig);
|
|
16
|
+
|
|
17
|
+
export const getMessagingInstance = async () => {
|
|
18
|
+
const supported = await isSupported();
|
|
19
|
+
if (!supported) {
|
|
20
|
+
console.warn("Firebase Messaging not supported in this browser or context.");
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return getMessaging(firebaseApp);
|
|
24
|
+
};
|