New tokens for customizable focus rings
parent
94b4cf5d3d
commit
ee5843c315
|
@ -159,8 +159,9 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
|
.p-autocomplete:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
|
||||||
border-color: ${dt('autocomplete.focus.border.color')};
|
border-color: ${dt('autocomplete.focus.border.color')};
|
||||||
box-shadow: ${dt('autocomplete.focus.shadow')};
|
box-shadow: ${dt('autocomplete.focus.ring.shadow')};
|
||||||
outline: 0 none;
|
outline: ${dt('autocomplete.focus.ring.width')} ${dt('autocomplete.focus.ring.style')} ${dt('autocomplete.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('autocomplete.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-autocomplete.p-invalid .p-autocomplete-input-multiple {
|
.p-autocomplete.p-invalid .p-autocomplete-input-multiple {
|
||||||
|
|
|
@ -22,8 +22,9 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-inputtext:enabled:focus {
|
.p-inputtext:enabled:focus {
|
||||||
border-color: ${dt('inputtext.focus.border.color')};
|
border-color: ${dt('inputtext.focus.border.color')};
|
||||||
box-shadow: ${dt('inputtext.focus.shadow')};
|
box-shadow: ${dt('inputtext.focus.ring.shadow')};
|
||||||
outline: 0 none;
|
outline: ${dt('inputtext.focus.ring.width')} ${dt('inputtext.focus.ring.style')} ${dt('inputtext.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('inputtext.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-inputtext.p-invalid {
|
.p-inputtext.p-invalid {
|
||||||
|
|
|
@ -22,8 +22,9 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-inputtextarea:enabled:focus {
|
.p-inputtextarea:enabled:focus {
|
||||||
border-color: ${dt('textarea.focus.border.color')};
|
border-color: ${dt('textarea.focus.border.color')};
|
||||||
box-shadow: ${dt('textarea.focus.shadow')};
|
box-shadow: ${dt('textarea.focus.ring.shadow')};
|
||||||
outline: 0 none;
|
outline: ${dt('textarea.focus.ring.width')} ${dt('textarea.focus.ring.style')} ${dt('textarea.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('textarea.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-inputtextarea.p-invalid {
|
.p-inputtextarea.p-invalid {
|
||||||
|
|
|
@ -12,10 +12,16 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
background: '{overlay.select.background}',
|
background: '{overlay.select.background}',
|
||||||
|
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '1px',
|
width: '1px',
|
||||||
style: 'solid',
|
style: 'solid',
|
||||||
color: '{primary.500}',
|
color: '{primary.color}',
|
||||||
offset: '2px'
|
offset: '2px'
|
||||||
},
|
},
|
||||||
anchorGutter: '2px',
|
anchorGutter: '2px',
|
||||||
|
@ -141,7 +141,14 @@ export default {
|
||||||
formField: {
|
formField: {
|
||||||
paddingX: '0.75rem',
|
paddingX: '0.75rem',
|
||||||
paddingY: '0.5rem',
|
paddingY: '0.5rem',
|
||||||
borderRadius: '{border.radius.md}'
|
borderRadius: '{border.radius.md}',
|
||||||
|
focusRing: {
|
||||||
|
width: '0',
|
||||||
|
style: 'none',
|
||||||
|
color: 'transparent',
|
||||||
|
offset: '0',
|
||||||
|
shadow: 'none'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
padding: '0.25rem 0.25rem',
|
padding: '0.25rem 0.25rem',
|
||||||
|
@ -199,8 +206,7 @@ export default {
|
||||||
floatLabelFocusColor: '{surface.500}',
|
floatLabelFocusColor: '{surface.500}',
|
||||||
floatLabelInvalidColor: '{red.400}',
|
floatLabelInvalidColor: '{red.400}',
|
||||||
iconColor: '{surface.400}',
|
iconColor: '{surface.400}',
|
||||||
shadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)',
|
shadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
||||||
focusShadow: 'none'
|
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: '{surface.700}',
|
color: '{surface.700}',
|
||||||
|
@ -306,8 +312,7 @@ export default {
|
||||||
floatLabelFocusColor: '{surface.400}',
|
floatLabelFocusColor: '{surface.400}',
|
||||||
floatLabelInvalidColor: '{red.300}',
|
floatLabelInvalidColor: '{red.300}',
|
||||||
iconColor: '{surface.400}',
|
iconColor: '{surface.400}',
|
||||||
shadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)',
|
shadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
||||||
focusShadow: 'none'
|
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: '{surface.0}',
|
color: '{surface.0}',
|
||||||
|
|
|
@ -12,9 +12,15 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,9 +12,15 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,10 +12,16 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
background: '{overlay.select.background}',
|
background: '{overlay.select.background}',
|
||||||
|
|
|
@ -119,10 +119,10 @@ export default {
|
||||||
semantic: {
|
semantic: {
|
||||||
transitionDuration: '0.2s',
|
transitionDuration: '0.2s',
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '1px',
|
width: '0',
|
||||||
style: 'solid',
|
style: 'none',
|
||||||
color: '{primary.500}',
|
color: 'transparent',
|
||||||
offset: '2px'
|
offset: '0'
|
||||||
},
|
},
|
||||||
anchorGutter: '2px',
|
anchorGutter: '2px',
|
||||||
primary: {
|
primary: {
|
||||||
|
@ -141,7 +141,14 @@ export default {
|
||||||
formField: {
|
formField: {
|
||||||
paddingX: '0.75rem',
|
paddingX: '0.75rem',
|
||||||
paddingY: '0.625rem',
|
paddingY: '0.625rem',
|
||||||
borderRadius: '{border.radius.sm}'
|
borderRadius: '{border.radius.sm}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{focus.ring.width}',
|
||||||
|
style: '{focus.ring.style}',
|
||||||
|
color: '{focus.ring.color}',
|
||||||
|
offset: '{focus.ring.offset}',
|
||||||
|
shadow: '{focus.ring.shadow}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
padding: '0.5rem 0',
|
padding: '0.5rem 0',
|
||||||
|
@ -182,6 +189,9 @@ export default {
|
||||||
color: '{primary.700}',
|
color: '{primary.700}',
|
||||||
focusColor: '{primary.800}'
|
focusColor: '{primary.800}'
|
||||||
},
|
},
|
||||||
|
focusRing: {
|
||||||
|
shadow: '0 0 0 0.2rem {primary.200}'
|
||||||
|
},
|
||||||
maskBackground: 'rgba(0,0,0,0.4)',
|
maskBackground: 'rgba(0,0,0,0.4)',
|
||||||
formField: {
|
formField: {
|
||||||
background: '{surface.0}',
|
background: '{surface.0}',
|
||||||
|
@ -199,8 +209,7 @@ export default {
|
||||||
floatLabelFocusColor: '{surface.500}',
|
floatLabelFocusColor: '{surface.500}',
|
||||||
floatLabelInvalidColor: '{red.400}',
|
floatLabelInvalidColor: '{red.400}',
|
||||||
iconColor: '{surface.400}',
|
iconColor: '{surface.400}',
|
||||||
shadow: 'none',
|
shadow: 'none'
|
||||||
focusShadow: '0 0 0 0.2rem {primary.200}'
|
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: '{surface.700}',
|
color: '{surface.700}',
|
||||||
|
@ -289,6 +298,9 @@ export default {
|
||||||
color: 'rgba(255,255,255,.87)',
|
color: 'rgba(255,255,255,.87)',
|
||||||
focusColor: 'rgba(255,255,255,.87)'
|
focusColor: 'rgba(255,255,255,.87)'
|
||||||
},
|
},
|
||||||
|
focusRing: {
|
||||||
|
shadow: '0 0 0 0.2rem color-mix(in srgb, {primary.color}, transparent 80%)'
|
||||||
|
},
|
||||||
maskBackground: 'rgba(0,0,0,0.4)',
|
maskBackground: 'rgba(0,0,0,0.4)',
|
||||||
formField: {
|
formField: {
|
||||||
background: '{surface.950}',
|
background: '{surface.950}',
|
||||||
|
@ -296,7 +308,7 @@ export default {
|
||||||
filledBackground: '{surface.800}',
|
filledBackground: '{surface.800}',
|
||||||
filledFocusBackground: '{surface.950}',
|
filledFocusBackground: '{surface.950}',
|
||||||
borderColor: '{surface.700}',
|
borderColor: '{surface.700}',
|
||||||
hoverBorderColor: '{surface.600}',
|
hoverBorderColor: '{primary.color}',
|
||||||
focusBorderColor: '{primary.color}',
|
focusBorderColor: '{primary.color}',
|
||||||
invalidBorderColor: '{red.300}',
|
invalidBorderColor: '{red.300}',
|
||||||
color: '{surface.0}',
|
color: '{surface.0}',
|
||||||
|
@ -306,8 +318,7 @@ export default {
|
||||||
floatLabelFocusColor: '{surface.400}',
|
floatLabelFocusColor: '{surface.400}',
|
||||||
floatLabelInvalidColor: '{red.300}',
|
floatLabelInvalidColor: '{red.300}',
|
||||||
iconColor: '{surface.400}',
|
iconColor: '{surface.400}',
|
||||||
shadow: 'none',
|
shadow: 'none'
|
||||||
focusShadow: '0 0 0 0.2rem color-mix(in srgb, {primary.color}, transparent 80%)'
|
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
color: '{surface.0}',
|
color: '{surface.0}',
|
||||||
|
|
|
@ -12,9 +12,15 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,9 +12,15 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}',
|
shadow: '{form.field.shadow}',
|
||||||
focusShadow: '{form.field.focus.shadow}',
|
|
||||||
paddingX: '{form.field.padding.x}',
|
paddingX: '{form.field.padding.x}',
|
||||||
paddingY: '{form.field.padding.y}',
|
paddingY: '{form.field.padding.y}',
|
||||||
borderRadius: '{form.field.border.radius}'
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue