2024-02-11 21:11:28 +00:00
|
|
|
export default {
|
|
|
|
name: 'MenuItem',
|
|
|
|
selector: '.menu-item',
|
|
|
|
validInnerComponents: [
|
|
|
|
'Text',
|
|
|
|
'Icon',
|
|
|
|
'Input',
|
2024-02-15 18:20:27 +00:00
|
|
|
'Border',
|
2024-02-15 22:29:16 +00:00
|
|
|
'ButtonUnstyled',
|
2024-02-28 12:57:19 +00:00
|
|
|
'Badge',
|
|
|
|
'Avatar'
|
2024-02-11 21:11:28 +00:00
|
|
|
],
|
|
|
|
states: {
|
|
|
|
hover: ':hover',
|
2024-02-29 15:49:56 +00:00
|
|
|
active: '.-active'
|
2024-02-11 21:11:28 +00:00
|
|
|
},
|
|
|
|
defaultRules: [
|
|
|
|
{
|
|
|
|
directives: {
|
2024-02-12 15:26:08 +00:00
|
|
|
background: '--bg',
|
|
|
|
opacity: 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
state: ['hover'],
|
|
|
|
directives: {
|
|
|
|
background: '$mod(--bg, 5)',
|
|
|
|
opacity: 1
|
2024-02-11 21:11:28 +00:00
|
|
|
}
|
|
|
|
},
|
2024-02-13 00:09:43 +00:00
|
|
|
{
|
|
|
|
state: ['active'],
|
|
|
|
directives: {
|
2024-02-27 15:03:39 +00:00
|
|
|
background: '$mod(--bg, 10)',
|
|
|
|
opacity: 1
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
state: ['active', 'hover'],
|
|
|
|
directives: {
|
|
|
|
background: '$mod(--bg, 15)',
|
2024-02-13 00:09:43 +00:00
|
|
|
opacity: 1
|
|
|
|
}
|
|
|
|
},
|
2024-02-11 21:11:28 +00:00
|
|
|
{
|
|
|
|
component: 'Text',
|
|
|
|
parent: {
|
|
|
|
component: 'MenuItem',
|
2024-02-27 15:03:39 +00:00
|
|
|
state: ['hover']
|
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
textColor: '--link',
|
|
|
|
textAuto: 'no-preserve'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Text',
|
|
|
|
parent: {
|
|
|
|
component: 'MenuItem',
|
|
|
|
state: ['active']
|
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
textColor: '--link',
|
|
|
|
textAuto: 'no-preserve'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Icon',
|
|
|
|
parent: {
|
|
|
|
component: 'MenuItem',
|
|
|
|
state: ['active']
|
2024-02-11 21:11:28 +00:00
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
textColor: '--link',
|
|
|
|
textAuto: 'no-preserve'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Icon',
|
|
|
|
parent: {
|
|
|
|
component: 'MenuItem',
|
|
|
|
state: ['hover']
|
|
|
|
},
|
|
|
|
directives: {
|
|
|
|
textColor: '--link',
|
|
|
|
textAuto: 'no-preserve'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|