Fixed #6583 - Disabled ToggleSwitch in dark mode is same as non-disabled

pull/6596/head
Cagatay Civici 2024-10-16 10:36:06 +03:00
parent 21565482d3
commit 42b24c1ab9
3 changed files with 18 additions and 12 deletions

View File

@ -19,24 +19,24 @@ export default {
checkedHoverBorderColor: 'transparent', checkedHoverBorderColor: 'transparent',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
transitionDuration: '{form.field.transition.duration}', transitionDuration: '{form.field.transition.duration}',
slideDuration: '0.2s', slideDuration: '0.2s'
disabledBackground: '{form.field.disabled.background}'
}, },
handle: { handle: {
borderRadius: '50%', borderRadius: '50%',
size: '1rem', size: '1rem'
disabledBackground: '{form.field.disabled.color}'
}, },
colorScheme: { colorScheme: {
light: { light: {
root: { root: {
background: '{surface.300}', background: '{surface.300}',
disabledBackground: '{form.field.disabled.background}',
hoverBackground: '{surface.400}', hoverBackground: '{surface.400}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.hover.color}' checkedHoverBackground: '{primary.hover.color}'
}, },
handle: { handle: {
background: '{surface.0}', background: '{surface.0}',
disabledBackground: '{form.field.disabled.color}',
hoverBackground: '{surface.0}', hoverBackground: '{surface.0}',
checkedBackground: '{surface.0}', checkedBackground: '{surface.0}',
checkedHoverBackground: '{surface.0}', checkedHoverBackground: '{surface.0}',
@ -49,12 +49,14 @@ export default {
dark: { dark: {
root: { root: {
background: '{surface.700}', background: '{surface.700}',
disabledBackground: '{surface.600}',
hoverBackground: '{surface.600}', hoverBackground: '{surface.600}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.hover.color}' checkedHoverBackground: '{primary.hover.color}'
}, },
handle: { handle: {
background: '{surface.400}', background: '{surface.400}',
disabledBackground: '{surface.900}',
hoverBackground: '{surface.300}', hoverBackground: '{surface.300}',
checkedBackground: '{surface.900}', checkedBackground: '{surface.900}',
checkedHoverBackground: '{surface.900}', checkedHoverBackground: '{surface.900}',

View File

@ -19,24 +19,24 @@ export default {
checkedHoverBorderColor: 'transparent', checkedHoverBorderColor: 'transparent',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
transitionDuration: '{form.field.transition.duration}', transitionDuration: '{form.field.transition.duration}',
slideDuration: '0.2s', slideDuration: '0.2s'
disabledBackground: '{form.field.disabled.background}'
}, },
handle: { handle: {
borderRadius: '50%', borderRadius: '50%',
size: '1.25rem', size: '1.25rem'
disabledBackground: '{form.field.disabled.color}'
}, },
colorScheme: { colorScheme: {
light: { light: {
root: { root: {
background: '{surface.300}', background: '{surface.300}',
disabledBackground: '{form.field.disabled.background}',
hoverBackground: '{surface.400}', hoverBackground: '{surface.400}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.hover.color}' checkedHoverBackground: '{primary.hover.color}'
}, },
handle: { handle: {
background: '{surface.0}', background: '{surface.0}',
disabledBackground: '{form.field.disabled.color}',
hoverBackground: '{surface.0}', hoverBackground: '{surface.0}',
checkedBackground: '{surface.0}', checkedBackground: '{surface.0}',
checkedHoverBackground: '{surface.0}', checkedHoverBackground: '{surface.0}',
@ -49,12 +49,14 @@ export default {
dark: { dark: {
root: { root: {
background: '{surface.700}', background: '{surface.700}',
disabledBackground: '{surface.600}',
hoverBackground: '{surface.600}', hoverBackground: '{surface.600}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.hover.color}' checkedHoverBackground: '{primary.hover.color}'
}, },
handle: { handle: {
background: '{surface.400}', background: '{surface.400}',
disabledBackground: '{surface.900}',
hoverBackground: '{surface.300}', hoverBackground: '{surface.300}',
checkedBackground: '{surface.900}', checkedBackground: '{surface.900}',
checkedHoverBackground: '{surface.900}', checkedHoverBackground: '{surface.900}',

View File

@ -19,24 +19,24 @@ export default {
checkedHoverBorderColor: 'transparent', checkedHoverBorderColor: 'transparent',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
transitionDuration: '{form.field.transition.duration}', transitionDuration: '{form.field.transition.duration}',
slideDuration: '0.2s', slideDuration: '0.2s'
disabledBackground: '{form.field.disabled.background}'
}, },
handle: { handle: {
borderRadius: '50%', borderRadius: '50%',
size: '1.5rem', size: '1.5rem'
disabledBackground: '{form.field.disabled.color}'
}, },
colorScheme: { colorScheme: {
light: { light: {
root: { root: {
background: '{surface.300}', background: '{surface.300}',
disabledBackground: '{surface.400}',
hoverBackground: '{surface.300}', hoverBackground: '{surface.300}',
checkedBackground: '{primary.200}', checkedBackground: '{primary.200}',
checkedHoverBackground: '{primary.200}' checkedHoverBackground: '{primary.200}'
}, },
handle: { handle: {
background: '{surface.0}', background: '{surface.0}',
disabledBackground: '{surface.200}',
hoverBackground: '{surface.0}', hoverBackground: '{surface.0}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.color}', checkedHoverBackground: '{primary.color}',
@ -49,12 +49,14 @@ export default {
dark: { dark: {
root: { root: {
background: '{surface.700}', background: '{surface.700}',
disabledBackground: '{surface.600}',
hoverBackground: '{surface.700}', hoverBackground: '{surface.700}',
checkedBackground: '{primary.color}', checkedBackground: '{primary.color}',
checkedHoverBackground: '{primary.color}' checkedHoverBackground: '{primary.color}'
}, },
handle: { handle: {
background: '{surface.400}', background: '{surface.400}',
disabledBackground: '{surface.500}',
hoverBackground: '{surface.300}', hoverBackground: '{surface.300}',
checkedBackground: '{primary.200}', checkedBackground: '{primary.200}',
checkedHoverBackground: '{primary.200}', checkedHoverBackground: '{primary.200}',