Merge branch 'shadow-control-2.0' into themes3-grand-finale-maybe

This commit is contained in:
Henry Jameson 2024-09-24 18:09:44 +03:00
commit 22d3c13135
17 changed files with 642 additions and 353 deletions

View file

@ -10,17 +10,18 @@ const hoverGlow = {
export default {
name: 'Input',
selector: '.input',
variant: {
states: {
hover: ':hover:not(.disabled)',
focused: ':focus-within',
disabled: '.disabled'
},
variants: {
checkbox: '.-checkbox',
radio: '.-radio'
},
states: {
disabled: ':disabled',
hover: ':hover:not(:disabled)',
focused: ':focus-within'
},
validInnerComponents: [
'Text'
'Text',
'Icon'
],
defaultRules: [
{
@ -55,6 +56,34 @@ export default {
directives: {
shadow: [hoverGlow, '--defaultInputBevel']
}
},
{
state: ['disabled'],
directives: {
background: '--parent'
}
},
{
component: 'Text',
parent: {
component: 'Input',
state: ['disabled']
},
directives: {
textOpacity: 0.25,
textOpacityMode: 'blend'
}
},
{
component: 'Icon',
parent: {
component: 'Input',
state: ['disabled']
},
directives: {
textOpacity: 0.25,
textOpacityMode: 'blend'
}
}
]
}