New border tokens for toggle switch

pull/5806/head
Cagatay Civici 2024-05-25 12:52:59 +03:00
parent d204f8d12a
commit 2b4936d7e4
4 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,9 @@ export default {
},
borderWidth: '1px',
borderColor: 'transparent',
hoverBorderColor: 'transparent',
checkedBorderColor: 'transparent',
checkedHoverBorderColor: 'transparent',
invalidBorderColor: '{form.field.invalid.border.color}',
transitionDuration: '{form.field.transition.duration}',
slideDuration: '0.2s'

View File

@ -14,6 +14,9 @@ export default {
},
borderWidth: '1px',
borderColor: 'transparent',
hoverBorderColor: 'transparent',
checkedBorderColor: 'transparent',
checkedHoverBorderColor: 'transparent',
invalidBorderColor: '{form.field.invalid.border.color}',
transitionDuration: '{form.field.transition.duration}',
slideDuration: '0.2s'

View File

@ -14,6 +14,9 @@ export default {
},
borderWidth: '1px',
borderColor: '{form.field.border.color}',
hoverBorderColor: '{form.field.border.color}',
checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.color}',
invalidBorderColor: '{form.field.invalid.border.color}',
background: '{form.field.background}',
hoverBackground: '{form.field.background}',

View File

@ -55,6 +55,7 @@ const theme = ({ dt }) => `
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
background: ${dt('toggleswitch.checked.background')};
border-color: ${dt('toggleswitch.checked.border.color')};
}
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider:before {
@ -64,6 +65,7 @@ const theme = ({ dt }) => `
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
background: ${dt('toggleswitch.hover.background')};
border-color: ${dt('toggleswitch.hover.border.color')};
}
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider:before {
@ -72,6 +74,7 @@ const theme = ({ dt }) => `
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
background: ${dt('toggleswitch.checked.hover.background')};
border-color: ${dt('toggleswitch.checked.hover.border.color')};
}
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider:before {
@ -79,7 +82,6 @@ const theme = ({ dt }) => `
}
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {
border-color: ${dt('toggleswitch.focus.border.color')};
box-shadow: ${dt('toggleswitch.focus.ring.shadow')};
outline: ${dt('toggleswitch.focus.ring.width')} ${dt('toggleswitch.focus.ring.style')} ${dt('toggleswitch.focus.ring.color')};
outline-offset: ${dt('toggleswitch.focus.ring.offset')};