New border tokens for toggle switch
parent
d204f8d12a
commit
2b4936d7e4
|
@ -14,6 +14,9 @@ export default {
|
||||||
},
|
},
|
||||||
borderWidth: '1px',
|
borderWidth: '1px',
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
|
hoverBorderColor: 'transparent',
|
||||||
|
checkedBorderColor: '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'
|
||||||
|
|
|
@ -14,6 +14,9 @@ export default {
|
||||||
},
|
},
|
||||||
borderWidth: '1px',
|
borderWidth: '1px',
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
|
hoverBorderColor: 'transparent',
|
||||||
|
checkedBorderColor: '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'
|
||||||
|
|
|
@ -14,6 +14,9 @@ export default {
|
||||||
},
|
},
|
||||||
borderWidth: '1px',
|
borderWidth: '1px',
|
||||||
borderColor: '{form.field.border.color}',
|
borderColor: '{form.field.border.color}',
|
||||||
|
hoverBorderColor: '{form.field.border.color}',
|
||||||
|
checkedBorderColor: '{primary.color}',
|
||||||
|
checkedHoverBorderColor: '{primary.color}',
|
||||||
invalidBorderColor: '{form.field.invalid.border.color}',
|
invalidBorderColor: '{form.field.invalid.border.color}',
|
||||||
background: '{form.field.background}',
|
background: '{form.field.background}',
|
||||||
hoverBackground: '{form.field.background}',
|
hoverBackground: '{form.field.background}',
|
||||||
|
|
|
@ -55,6 +55,7 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
|
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
|
||||||
background: ${dt('toggleswitch.checked.background')};
|
background: ${dt('toggleswitch.checked.background')};
|
||||||
|
border-color: ${dt('toggleswitch.checked.border.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider:before {
|
.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 {
|
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
|
||||||
background: ${dt('toggleswitch.hover.background')};
|
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 {
|
.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 {
|
.p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
|
||||||
background: ${dt('toggleswitch.checked.hover.background')};
|
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 {
|
.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 {
|
.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')};
|
box-shadow: ${dt('toggleswitch.focus.ring.shadow')};
|
||||||
outline: ${dt('toggleswitch.focus.ring.width')} ${dt('toggleswitch.focus.ring.style')} ${dt('toggleswitch.focus.ring.color')};
|
outline: ${dt('toggleswitch.focus.ring.width')} ${dt('toggleswitch.focus.ring.style')} ${dt('toggleswitch.focus.ring.color')};
|
||||||
outline-offset: ${dt('toggleswitch.focus.ring.offset')};
|
outline-offset: ${dt('toggleswitch.focus.ring.offset')};
|
||||||
|
|
Loading…
Reference in New Issue