Merge pull request #2222 from bluewave-labs/fix/disabled-colors
fix: disabled field colors
This commit is contained in:
3 files changed
+24
-20
No files matched your search
@@ -6,18 +6,6 @@ import PropTypes from "prop-types";
|
|||||||
const getSx = (theme, type, maxWidth) => {
|
const getSx = (theme, type, maxWidth) => {
|
||||||
const sx = {
|
const sx = {
|
||||||
maxWidth: maxWidth,
|
maxWidth: maxWidth,
|
||||||
"& .MuiOutlinedInput-root ": {
|
|
||||||
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
||||||
borderColor: theme.palette.primary.contrastText, // Adjust hover border color
|
|
||||||
},
|
|
||||||
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
||||||
borderColor: theme.palette.accent.main, // Adjust focus border color
|
|
||||||
},
|
|
||||||
"&.Mui-disabled .MuiOutlinedInput-notchedOutline": {
|
|
||||||
borderColor: theme.palette.primary.contrastText, // CAIO_REVIEW
|
|
||||||
opacity: 0.5,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
"& .MuiFormHelperText-root": {
|
"& .MuiFormHelperText-root": {
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ const paletteColors = {
|
|||||||
orange500: "#E88C30",
|
orange500: "#E88C30",
|
||||||
orange600: "#DC6803",
|
orange600: "#DC6803",
|
||||||
orange800: "#624711",
|
orange800: "#624711",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const semanticColors = {
|
const semanticColors = {
|
||||||
@@ -155,7 +154,6 @@ const newSemanticColors = {
|
|||||||
light: newColors.blueGray600,
|
light: newColors.blueGray600,
|
||||||
dark: newColors.gray200,
|
dark: newColors.gray200,
|
||||||
},
|
},
|
||||||
// CAIO_REVIEW, need a brighter color for dark bg
|
|
||||||
contrastTextSecondaryDarkBg: {
|
contrastTextSecondaryDarkBg: {
|
||||||
light: newColors.gray200,
|
light: newColors.gray200,
|
||||||
dark: newColors.gray200,
|
dark: newColors.gray200,
|
||||||
@@ -164,6 +162,14 @@ const newSemanticColors = {
|
|||||||
light: newColors.blueGray500,
|
light: newColors.blueGray500,
|
||||||
dark: newColors.gray500,
|
dark: newColors.gray500,
|
||||||
},
|
},
|
||||||
|
contrastBorder: {
|
||||||
|
light: newColors.gray500,
|
||||||
|
dark: newColors.blueGray600,
|
||||||
|
},
|
||||||
|
contrastBorderDisabled: {
|
||||||
|
light: newColors.gray100,
|
||||||
|
dark: newColors.blueGray800,
|
||||||
|
},
|
||||||
lowContrast: {
|
lowContrast: {
|
||||||
light: newColors.gray200,
|
light: newColors.gray200,
|
||||||
dark: newColors.blueGray600,
|
dark: newColors.blueGray600,
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { typographyLevels } from "./constants";
|
import { typographyLevels } from "./constants";
|
||||||
|
|
||||||
const fontFamilyPrimary = '"Inter" , sans-serif';
|
const fontFamilyPrimary = '"Inter" , sans-serif';
|
||||||
// const fontFamilySecondary = '"Avenir", sans-serif';
|
// const fontFamilySecondary = '"Avenir", sans-serif';
|
||||||
|
|
||||||
@@ -300,13 +299,15 @@ const baseTheme = (palette) => ({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
MuiTextField: {
|
MuiTextField: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
"& fieldset": {
|
"& fieldset": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.primary.contrastBorder,
|
||||||
borderRadius: theme.shape.borderRadius,
|
borderRadius: theme.shape.borderRadius,
|
||||||
},
|
},
|
||||||
|
|
||||||
"& .MuiInputBase-input": {
|
"& .MuiInputBase-input": {
|
||||||
padding: ".75em",
|
padding: ".75em",
|
||||||
minHeight: "var(--env-var-height-2)",
|
minHeight: "var(--env-var-height-2)",
|
||||||
@@ -356,10 +357,19 @@ const baseTheme = (palette) => ({
|
|||||||
MuiOutlinedInput: {
|
MuiOutlinedInput: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
color: palette.primary.contrastTextTertiary,
|
"&.Mui-disabled .MuiOutlinedInput-notchedOutline": {
|
||||||
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
borderColor: palette.primary.contrastBorderDisabled,
|
||||||
borderColor: palette.primary.contrastTextTertiary,
|
|
||||||
},
|
},
|
||||||
|
"&.Mui-disabled:hover .MuiOutlinedInput-notchedOutline": {
|
||||||
|
borderColor: palette.primary.contrastBorderDisabled,
|
||||||
|
},
|
||||||
|
"&:hover .MuiOutlinedInput-notchedOutline": {
|
||||||
|
borderColor: palette.primary.contrastText, // Adjust hover border color
|
||||||
|
},
|
||||||
|
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
||||||
|
borderColor: palette.accent.main, // Adjust focus border color
|
||||||
|
},
|
||||||
|
color: palette.primary.contrastTextTertiary,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -486,7 +496,7 @@ const baseTheme = (palette) => ({
|
|||||||
root: ({ theme }) => ({
|
root: ({ theme }) => ({
|
||||||
ml: "auto",
|
ml: "auto",
|
||||||
"& .MuiButtonBase-root, & .MuiButtonBase-root:hover": {
|
"& .MuiButtonBase-root, & .MuiButtonBase-root:hover": {
|
||||||
borderColor: theme.palette.primary.lowContrast,
|
borderColor: theme.palette.primary.contrastBorder,
|
||||||
width: "auto",
|
width: "auto",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user