Material menus

pull/6275/head^2
Cagatay Civici 2024-10-01 11:28:36 +03:00
parent e697fc324a
commit cf51a07ab3
4 changed files with 62 additions and 26 deletions

View File

@ -73,14 +73,14 @@ export default {
padding: '0.5rem 0', padding: '0.5rem 0',
gap: '0', gap: '0',
header: { header: {
padding: '0.75rem 0.75rem' padding: '0.75rem 1rem'
}, },
option: { option: {
padding: '0.75rem 0.75rem', padding: '0.75rem 1rem',
borderRadius: '{border.radius.none}' borderRadius: '{border.radius.none}'
}, },
optionGroup: { optionGroup: {
padding: '0.75rem 0.75rem', padding: '0.75rem 1rem',
fontWeight: '700' fontWeight: '700'
} }
}, },
@ -96,12 +96,12 @@ export default {
gap: '0' gap: '0'
}, },
item: { item: {
padding: '0.75rem 0.75rem', padding: '0.75rem 1rem',
borderRadius: '{border.radius.none}', borderRadius: '{border.radius.none}',
gap: '0.5rem' gap: '0.5rem'
}, },
submenuLabel: { submenuLabel: {
padding: '0.75rem 0.75rem', padding: '0.75rem 1rem',
fontWeight: '700' fontWeight: '700'
}, },
submenuIcon: { submenuIcon: {

View File

@ -63,16 +63,21 @@ export default {
}, },
mobileButton: { mobileButton: {
borderRadius: '50%', borderRadius: '50%',
size: '1.75rem', size: '2.5rem',
color: '{text.muted.color}', color: '{text.muted.color}',
hoverColor: '{text.muted.hover.color}', hoverColor: '{text.muted.hover.color}',
hoverBackground: '{content.hover.background}', hoverBackground: '{content.hover.background}',
focusRing: { focusRing: {
width: '{focus.ring.width}', width: '0',
style: '{focus.ring.style}', style: 'none',
color: '{focus.ring.color}', color: 'unset',
offset: '{focus.ring.offset}', offset: '0',
shadow: '{focus.ring.shadow}' shadow: 'none'
}
} }
},
style: ({ dt }) => `
.p-megamenu-button:focus-visible {
background: ${dt('content.focus.background')};
}
`
}; };

View File

@ -47,16 +47,21 @@ export default {
}, },
mobileButton: { mobileButton: {
borderRadius: '50%', borderRadius: '50%',
size: '1.75rem', size: '2.5rem',
color: '{text.muted.color}', color: '{text.muted.color}',
hoverColor: '{text.muted.hover.color}', hoverColor: '{text.muted.hover.color}',
hoverBackground: '{content.hover.background}', hoverBackground: '{content.hover.background}',
focusRing: { focusRing: {
width: '{focus.ring.width}', width: '0',
style: '{focus.ring.style}', style: 'none',
color: '{focus.ring.color}', color: 'unset',
offset: '{focus.ring.offset}', offset: '0',
shadow: '{focus.ring.shadow}' shadow: 'none'
}
} }
},
style: ({ dt }) => `
.p-menubar-button:focus-visible {
background: ${dt('content.focus.background')};
}
`
}; };

View File

@ -1,21 +1,21 @@
export default { export default {
root: { root: {
gap: '0.5rem', gap: '0',
transitionDuration: '{transition.duration}' transitionDuration: '{transition.duration}'
}, },
panel: { panel: {
background: '{content.background}', background: '{content.background}',
borderColor: '{content.border.color}', borderColor: '{content.border.color}',
borderWidth: '1px', borderWidth: '0',
color: '{content.color}', color: '{content.color}',
padding: '0.25rem 0.25rem', padding: '0',
borderRadius: '{content.border.radius}', borderRadius: '0',
first: { first: {
borderWidth: '1px', borderWidth: '0',
topBorderRadius: '{content.border.radius}' topBorderRadius: '{content.border.radius}'
}, },
last: { last: {
borderWidth: '1px', borderWidth: '0',
bottomBorderRadius: '{content.border.radius}' bottomBorderRadius: '{content.border.radius}'
} }
}, },
@ -37,5 +37,31 @@ export default {
submenuIcon: { submenuIcon: {
color: '{navigation.submenu.icon.color}', color: '{navigation.submenu.icon.color}',
focusColor: '{navigation.submenu.icon.focus.color}' focusColor: '{navigation.submenu.icon.focus.color}'
} },
style: ({ dt }) => `
.p-panelmenu-panel {
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
transition: margin ${dt('panelmenu.transition.duration')};
}
.p-panelmenu-panel:has(.p-panelmenu-header-active) {
margin: 1rem 0;
}
.p-panelmenu-panel:first-child {
border-top-left-radius: ${dt('content.border.radius')};
border-top-right-radius: ${dt('content.border.radius')};
margin-top: 0;
}
.p-panelmenu-panel:last-child {
border-bottom-left-radius: ${dt('content.border.radius')};
border-bottom-right-radius: ${dt('content.border.radius')};
margin-bottom: 0;
}
.p-accordionpanel:not(.p-disabled) .p-accordionheader:focus-visible {
background: ${dt('content.focus.background')};
}
`
}; };