From a0401ffd2fe76e78df0d69772b61b9ab567b6756 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Wed, 5 Mar 2025 00:32:04 +0530 Subject: [PATCH 1/6] Maitenance start time style fixes. --- src/Utils/Theme/globalTheme.js | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index 66631edec..f2136b125 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -382,6 +382,90 @@ const baseTheme = (palette) => ({ }), }, }, + + // This code is added for clock in maintenance page + // code starts from here. + MuiClockPicker: { + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.primary.main, + "& .MuiTypography-root": { + color: theme.palette.primary.lowContrast, + }, + "& .MuiClock-clock": { + backgroundColor: theme.palette.primary.dark, + borderColor: theme.palette.primary.lowContrast, + }, + }), + }, + }, + // The clock pointer ( pointer to number like hour/minute hand) + MuiClockPointer: { + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.accent.main, + "& .MuiClock-pointer": { + backgroundColor: theme.palette.accent.main, + }, + }), + }, + }, + // This is for numbers in the clock (circular one's) + MuiClockNumber: { + styleOverrides: { + root: ({ theme }) => ({ + color: theme.palette.primary.contrastText, + "&.Mui-selected": { + color: theme.palette.accent.contrastText, + backgroundColor: theme.palette.accent.main, + }, + }), + }, + }, + // This is for 00:00 am and pm (top bar) + MuiTimePickerToolbar: { + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.secondary.main, + "& .MuiTypography-root": { + color: theme.palette.secondary.contrastText, + }, + }), + }, + }, + // left and right direction style + MuiPickersArrowSwitcher: { + styleOverrides: { + root: ({ theme }) => ({ + "& .MuiIconButton-root": { + color: theme.palette.primary.contrastText, + }, + }), + }, + }, + // cancel and okay actions style + MuiDialogActions: { + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.primary.main, + "& .MuiButton-root": { + color: theme.palette.primary.contrastText, + }, + }), + }, + }, + // code ends here. + + // For labels of input fields + MuiInputLabel: { + styleOverrides: { + root: ({ theme }) => ({ + "&.Mui-focused": { + color: theme.palette.accent.main, + }, + }), + }, + }, }, shape: { borderRadius: 2, From 6983b3a5f556667f3314f7a5daf85d480959d31a Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Fri, 7 Mar 2025 01:10:06 +0530 Subject: [PATCH 2/6] have added the accent in order to make sure that the number choosen is identified. --- src/Utils/Theme/globalTheme.js | 38 +++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index fa0dad9ef..4ffe8e377 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -397,16 +397,28 @@ const baseTheme = (palette) => ({ // This code is added for clock in maintenance page // code starts from here. + MuiClock: { + // Directly target the clock component + styleOverrides: { + root: ({ theme }) => ({ + backgroundColor: theme.palette.primary.main, // Alternative target + "& .MuiClock-clock": { + // Inner clock face + backgroundColor: theme.palette.secondary.main, + }, + }), + }, + }, MuiClockPicker: { styleOverrides: { root: ({ theme }) => ({ - backgroundColor: theme.palette.primary.main, - "& .MuiTypography-root": { + backgroundColor: theme.palette.secondary.main, // Outer container background + "& .MuiClock-root": { color: theme.palette.primary.lowContrast, }, "& .MuiClock-clock": { - backgroundColor: theme.palette.primary.dark, - borderColor: theme.palette.primary.lowContrast, + backgroundColor: theme.palette.background.default, // Clock face background + borderColor: theme.palette.secondary.lowContrast, }, }), }, @@ -415,9 +427,10 @@ const baseTheme = (palette) => ({ MuiClockPointer: { styleOverrides: { root: ({ theme }) => ({ + // Main pointer line color backgroundColor: theme.palette.accent.main, - "& .MuiClock-pointer": { - backgroundColor: theme.palette.accent.main, + "& .MuiClockPointer-thumb": { + backgroundColor: theme.palette.grey[500], // Use your desired grey }, }), }, @@ -439,8 +452,19 @@ const baseTheme = (palette) => ({ styleOverrides: { root: ({ theme }) => ({ backgroundColor: theme.palette.secondary.main, + // General text color "& .MuiTypography-root": { - color: theme.palette.secondary.contrastText, + color: theme.palette.secondary.darker, + }, + // Selected time (hour/minute) color + "& .Mui-selected": { + color: `${theme.palette.accent.main} !important`, // Use your accent color + }, + // AM/PM buttons color + "& .MuiButtonBase-root": { + "&.Mui-selected": { + backgroundColor: theme.palette.accent.main, + }, }, }), }, From ef954af10655d9138e20984811410e20aa997fc0 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Sun, 9 Mar 2025 07:20:05 +0530 Subject: [PATCH 3/6] Made major ui changes in clock. --- src/Utils/Theme/globalTheme.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index 4ffe8e377..98854e160 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -451,14 +451,14 @@ const baseTheme = (palette) => ({ MuiTimePickerToolbar: { styleOverrides: { root: ({ theme }) => ({ - backgroundColor: theme.palette.secondary.main, + backgroundColor: theme.palette.secondary.lowContrast, // General text color "& .MuiTypography-root": { - color: theme.palette.secondary.darker, + color: theme.palette.gradient.color6, }, // Selected time (hour/minute) color "& .Mui-selected": { - color: `${theme.palette.accent.main} !important`, // Use your accent color + color: `${theme.palette.accent.main} !important`, }, // AM/PM buttons color "& .MuiButtonBase-root": { From 5ffc822bd496ff8afa0b07258bc281db28a6bd29 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Sun, 9 Mar 2025 07:21:26 +0530 Subject: [PATCH 4/6] Theme constant changes. --- src/Utils/Theme/constants.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Utils/Theme/constants.js b/src/Utils/Theme/constants.js index 915acedc5..7d20143a5 100644 --- a/src/Utils/Theme/constants.js +++ b/src/Utils/Theme/constants.js @@ -270,6 +270,10 @@ const newSemanticColors = { light: paletteColors.gray50, dark: paletteColors.gray850, }, + color6: { + light: paletteColors.gray300, + dark: paletteColors.gray600, + }, }, map: { From 9e33a0a24f6f4cabecfb7bbb57b8ca883e444273 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Mon, 10 Mar 2025 00:14:24 +0530 Subject: [PATCH 5/6] FIX for style of clock colors when not active. --- src/Utils/Theme/constants.js | 10 ++++++---- src/Utils/Theme/globalTheme.js | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Utils/Theme/constants.js b/src/Utils/Theme/constants.js index 7d20143a5..58e99bade 100644 --- a/src/Utils/Theme/constants.js +++ b/src/Utils/Theme/constants.js @@ -270,10 +270,6 @@ const newSemanticColors = { light: paletteColors.gray50, dark: paletteColors.gray850, }, - color6: { - light: paletteColors.gray300, - dark: paletteColors.gray600, - }, }, map: { @@ -310,6 +306,12 @@ const newSemanticColors = { dark: newColors.blueGray900, }, }, + text: { + timePicker: { + light: paletteColors.gray300, + dark: paletteColors.gray600, + }, + }, }; export { typographyLevels, semanticColors as colors, newSemanticColors }; diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index 98854e160..456cae68f 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -454,7 +454,7 @@ const baseTheme = (palette) => ({ backgroundColor: theme.palette.secondary.lowContrast, // General text color "& .MuiTypography-root": { - color: theme.palette.gradient.color6, + color: theme.palette.text.timePicker, }, // Selected time (hour/minute) color "& .Mui-selected": { From 28c44d628d6bf6ad49ebefcd7607f8f9073491f4 Mon Sep 17 00:00:00 2001 From: Owaise Imdad Date: Mon, 10 Mar 2025 05:40:12 +0530 Subject: [PATCH 6/6] Removed the text component from mui themes. --- src/Utils/Theme/constants.js | 6 ------ src/Utils/Theme/globalTheme.js | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Utils/Theme/constants.js b/src/Utils/Theme/constants.js index 58e99bade..915acedc5 100644 --- a/src/Utils/Theme/constants.js +++ b/src/Utils/Theme/constants.js @@ -306,12 +306,6 @@ const newSemanticColors = { dark: newColors.blueGray900, }, }, - text: { - timePicker: { - light: paletteColors.gray300, - dark: paletteColors.gray600, - }, - }, }; export { typographyLevels, semanticColors as colors, newSemanticColors }; diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index 456cae68f..8d225e895 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -454,7 +454,7 @@ const baseTheme = (palette) => ({ backgroundColor: theme.palette.secondary.lowContrast, // General text color "& .MuiTypography-root": { - color: theme.palette.text.timePicker, + color: theme.palette.primary.contrastTextTertiary, }, // Selected time (hour/minute) color "& .Mui-selected": {