Tokens for TieredMenu
parent
32c592b74e
commit
3cc7a5d44c
|
@ -2,7 +2,6 @@ import BaseStyle from 'primevue/base/style';
|
|||
|
||||
const theme = ({ dt }) => `
|
||||
.p-menu {
|
||||
padding: ${dt('menu.padding')};
|
||||
background: ${dt('menu.background')};
|
||||
color: ${dt('menu.color')};
|
||||
border: 1px solid ${dt('menu.border.color')};
|
||||
|
@ -12,12 +11,18 @@ const theme = ({ dt }) => `
|
|||
|
||||
.p-menu-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: 0;
|
||||
padding: ${dt('menu.list.padding')};
|
||||
outline: 0 none;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: ${dt('menu.gap')};
|
||||
gap: ${dt('menu.list.gap')};
|
||||
}
|
||||
|
||||
.p-menu-item-content {
|
||||
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')};
|
||||
border-radius: ${dt('menu.item.border.radius')};
|
||||
color: ${dt('menu.item.color')};
|
||||
}
|
||||
|
||||
.p-menu-item-link {
|
||||
|
@ -29,17 +34,11 @@ const theme = ({ dt }) => `
|
|||
position: relative;
|
||||
color: inherit;
|
||||
padding: ${dt('menu.item.padding')};
|
||||
user-select: none;
|
||||
gap: ${dt('menu.item.gap')};
|
||||
user-select: none;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-menu-item-content {
|
||||
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')};
|
||||
border-radius: ${dt('menu.item.border.radius')};
|
||||
color: ${dt('menu.item.color')};
|
||||
}
|
||||
|
||||
.p-menu-item-label {
|
||||
line-height: 1;
|
||||
}
|
||||
|
|
|
@ -184,6 +184,9 @@ export default {
|
|||
submenuLabel: {
|
||||
padding: '0.5rem 0.75rem',
|
||||
fontWeight: '600'
|
||||
},
|
||||
submenuIcon: {
|
||||
size: '0.875rem'
|
||||
}
|
||||
},
|
||||
overlay: {
|
||||
|
@ -304,16 +307,24 @@ export default {
|
|||
navigation: {
|
||||
item: {
|
||||
focusBackground: '{surface.100}',
|
||||
activeBackground: '{surface.100}',
|
||||
color: '{text.color}',
|
||||
focusColor: '{text.hover.color}',
|
||||
activeColor: '{text.hover.color}',
|
||||
icon: {
|
||||
color: '{surface.400}',
|
||||
focusColor: '{surface.500}'
|
||||
focusColor: '{surface.500}',
|
||||
activeColor: '{surface.500}',
|
||||
}
|
||||
},
|
||||
submenuLabel: {
|
||||
background: '{surface.0}',
|
||||
color: '{text.muted.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
color: '{surface.400}',
|
||||
focusColor: '{surface.500}',
|
||||
activeColor: '{surface.500}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -415,16 +426,24 @@ export default {
|
|||
navigation: {
|
||||
item: {
|
||||
focusBackground: '{surface.800}',
|
||||
activeBackground: '{surface.800}',
|
||||
color: '{text.color}',
|
||||
focusColor: '{text.hover.color}',
|
||||
activeColor: '{text.hover.color}',
|
||||
icon: {
|
||||
color: '{surface.500}',
|
||||
focusColor: '{surface.400}'
|
||||
focusColor: '{surface.400}',
|
||||
activeColor: '{surface.400}'
|
||||
}
|
||||
},
|
||||
submenuLabel: {
|
||||
background: '{surface.900}',
|
||||
color: '{text.muted.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
color: '{surface.500}',
|
||||
focusColor: '{surface.400}',
|
||||
activeColor: '{surface.400}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,13 @@ export default {
|
|||
background: '{content.background}',
|
||||
borderColor: '{content.border.color}',
|
||||
color: '{content.color}',
|
||||
padding: '{navigation.list.padding}',
|
||||
borderRadius: '{content.border.radius}',
|
||||
gap: '{navigation.list.gap}',
|
||||
shadow: '{overlay.navigation.shadow}'
|
||||
},
|
||||
list: {
|
||||
padding: '{navigation.list.padding}',
|
||||
gap: '{navigation.list.gap}'
|
||||
},
|
||||
item: {
|
||||
focusBackground: '{navigation.item.focus.background}',
|
||||
color: '{navigation.item.color}',
|
||||
|
|
|
@ -2,19 +2,40 @@ export default {
|
|||
root: {
|
||||
background: '{content.background}',
|
||||
borderColor: '{content.border.color}',
|
||||
color: '{content.color}'
|
||||
color: '{content.color}',
|
||||
borderRadius: '{content.border.radius}',
|
||||
shadow: '{overlay.navigation.shadow}'
|
||||
},
|
||||
list: {
|
||||
padding: '{navigation.list.padding}',
|
||||
gap: '{navigation.list.gap}'
|
||||
},
|
||||
item: {
|
||||
focusBackground: '{navigation.item.focus.background}',
|
||||
activeBackground: '{navigation.item.active.background}',
|
||||
color: '{navigation.item.color}',
|
||||
focusColor: '{navigation.item.focus.color}',
|
||||
activeColor: '{navigation.item.active.color}',
|
||||
padding: '{navigation.item.padding}',
|
||||
borderRadius: '{navigation.item.border.radius}',
|
||||
gap: '{navigation.item.gap}',
|
||||
icon: {
|
||||
color: '{navigation.item.icon.color}',
|
||||
hoverColor: '{navigation.item.icon.hover.color}'
|
||||
focusColor: '{navigation.item.icon.focus.color}',
|
||||
focusColor: '{navigation.item.icon.active.color}'
|
||||
}
|
||||
},
|
||||
submenuItem: {
|
||||
color: '{navigation.submenu.color}'
|
||||
submenuLabel: {
|
||||
padding: '{navigation.submenu.label.padding}',
|
||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||
bakcground: '{navigation.submenu.label.background.}',
|
||||
color: '{navigation.submenu.label.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
size: '{navigation.submenu.icon.size}',
|
||||
color: '{navigation.submenu.icon.color}',
|
||||
focusColor: '{navigation.submenu.icon.focus.color}',
|
||||
focusColor: '{navigation.submenu.icon.active.color}'
|
||||
},
|
||||
separator: {
|
||||
borderColor: '{content.border.color}'
|
||||
|
|
|
@ -183,6 +183,9 @@ export default {
|
|||
submenuLabel: {
|
||||
padding: '0.625rem 1rem',
|
||||
fontWeight: '600'
|
||||
},
|
||||
submenuIcon: {
|
||||
size: '0.875rem'
|
||||
}
|
||||
},
|
||||
overlay: {
|
||||
|
@ -306,16 +309,24 @@ export default {
|
|||
navigation: {
|
||||
item: {
|
||||
focusBackground: '{surface.100}',
|
||||
activeBackground: '{surface.100}',
|
||||
color: '{text.color}',
|
||||
focusColor: '{text.hover.color}',
|
||||
activeColor: '{text.hover.color}',
|
||||
icon: {
|
||||
color: '{surface.400}',
|
||||
focusColor: '{surface.500}'
|
||||
focusColor: '{surface.500}',
|
||||
activeColor: '{surface.500}'
|
||||
}
|
||||
},
|
||||
submenuLabel: {
|
||||
background: '{surface.0}',
|
||||
color: '{text.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
color: '{surface.400}',
|
||||
focusColor: '{surface.500}',
|
||||
activeColor: '{surface.500}'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -420,16 +431,24 @@ export default {
|
|||
navigation: {
|
||||
item: {
|
||||
focusBackground: '{surface.800}',
|
||||
activeBackground: '{surface.800}',
|
||||
color: '{text.color}',
|
||||
focusColor: '{text.hover.color}',
|
||||
activeColor: '{text.hover.color}',
|
||||
icon: {
|
||||
color: '{surface.500}',
|
||||
focusColor: '{surface.400}'
|
||||
focusColor: '{surface.400}',
|
||||
activeColor: '{surface.400}'
|
||||
}
|
||||
},
|
||||
submenuLabel: {
|
||||
background: '{surface.900}',
|
||||
color: '{text.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
color: '{surface.500}',
|
||||
focusColor: '{surface.400}',
|
||||
activeColor: '{surface.400}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,13 @@ export default {
|
|||
background: '{content.background}',
|
||||
borderColor: '{content.border.color}',
|
||||
color: '{content.color}',
|
||||
padding: '{navigation.list.padding}',
|
||||
borderRadius: '{content.border.radius}',
|
||||
gap: '{navigation.list.gap}',
|
||||
shadow: '{overlay.navigation.shadow}'
|
||||
},
|
||||
list: {
|
||||
padding: '{navigation.list.padding}',
|
||||
gap: '{navigation.list.gap}'
|
||||
},
|
||||
item: {
|
||||
focusBackground: '{navigation.item.focus.background}',
|
||||
color: '{navigation.item.color}',
|
||||
|
@ -23,7 +25,7 @@ export default {
|
|||
submenuLabel: {
|
||||
padding: '{navigation.submenu.label.padding}',
|
||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||
bakcground: '{navigation.submenu.label.background.}',
|
||||
background: '{navigation.submenu.label.background.}',
|
||||
color: '{navigation.submenu.label.color}'
|
||||
},
|
||||
separator: {
|
||||
|
|
|
@ -2,19 +2,40 @@ export default {
|
|||
root: {
|
||||
background: '{content.background}',
|
||||
borderColor: '{content.border.color}',
|
||||
color: '{content.color}'
|
||||
color: '{content.color}',
|
||||
borderRadius: '{content.border.radius}',
|
||||
shadow: '{overlay.navigation.shadow}'
|
||||
},
|
||||
list: {
|
||||
padding: '{navigation.list.padding}',
|
||||
gap: '{navigation.list.gap}'
|
||||
},
|
||||
item: {
|
||||
focusBackground: '{navigation.item.focus.background}',
|
||||
activeBackground: '{navigation.item.active.background}',
|
||||
color: '{navigation.item.color}',
|
||||
focusColor: '{navigation.item.focus.color}',
|
||||
activeColor: '{navigation.item.active.color}',
|
||||
padding: '{navigation.item.padding}',
|
||||
borderRadius: '{navigation.item.border.radius}',
|
||||
gap: '{navigation.item.gap}',
|
||||
icon: {
|
||||
color: '{navigation.item.icon.color}',
|
||||
hoverColor: '{navigation.item.icon.hover.color}'
|
||||
focusColor: '{navigation.item.icon.focus.color}',
|
||||
focusColor: '{navigation.item.icon.active.color}'
|
||||
}
|
||||
},
|
||||
submenuItem: {
|
||||
color: '{navigation.submenu.color}'
|
||||
submenuLabel: {
|
||||
padding: '{navigation.submenu.label.padding}',
|
||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||
bakcground: '{navigation.submenu.label.background.}',
|
||||
color: '{navigation.submenu.label.color}'
|
||||
},
|
||||
submenuIcon: {
|
||||
size: '{navigation.submenu.icon.size}',
|
||||
color: '{navigation.submenu.icon.color}',
|
||||
focusColor: '{navigation.submenu.icon.focus.color}',
|
||||
focusColor: '{navigation.submenu.icon.active.color}'
|
||||
},
|
||||
separator: {
|
||||
borderColor: '{content.border.color}'
|
||||
|
|
|
@ -2,50 +2,38 @@ import BaseStyle from 'primevue/base/style';
|
|||
|
||||
const theme = ({ dt }) => `
|
||||
.p-tieredmenu {
|
||||
padding: 0.25rem 0.25rem;
|
||||
background: ${dt('tieredmenu.background')};
|
||||
color: ${dt('tieredmenu.color')};
|
||||
border: 1px solid ${dt('tieredmenu.border.color')};
|
||||
border-radius: ${dt('border.radius.md')};
|
||||
border-radius: ${dt('tieredmenu.border.radius')};
|
||||
min-width: 12.5rem;
|
||||
}
|
||||
|
||||
.p-tieredmenu-root-list,
|
||||
.p-tieredmenu-submenu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: ${dt('tieredmenu.list.padding')};
|
||||
list-style: none;
|
||||
outline: 0 none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: ${dt('tieredmenu.list.gap')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-submenu {
|
||||
position: absolute;
|
||||
min-width: 100%;
|
||||
z-index: 1;
|
||||
padding: 0.25rem 0.25rem;
|
||||
background: ${dt('tieredmenu.background')};
|
||||
color: ${dt('tieredmenu.color')};
|
||||
border: 1px solid ${dt('tieredmenu.border.color')};
|
||||
border-radius: ${dt('border.radius.md')};
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.p-tieredmenu-item {
|
||||
position: relative;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.p-tieredmenu-item:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.p-tieredmenu-item:last-child {
|
||||
margin-bottom: 0;
|
||||
border-radius: ${dt('tieredmenu.border.radius')};
|
||||
box-shadow: ${dt('tieredmenu.shadow')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item-content {
|
||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')};
|
||||
border-radius: ${dt('border.radius.sm')};
|
||||
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')};
|
||||
border-radius: ${dt('tieredmenu.item.border.radius')};
|
||||
color: ${dt('tieredmenu.item.color')};
|
||||
}
|
||||
|
||||
|
@ -57,8 +45,10 @@ const theme = ({ dt }) => `
|
|||
overflow: hidden;
|
||||
position: relative;
|
||||
color: inherit;
|
||||
padding: 0.5rem 0.75rem;
|
||||
padding: ${dt('tieredmenu.item.padding')};
|
||||
gap: ${dt('tieredmenu.item.gap')};
|
||||
user-select: none;
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
.p-tieredmenu-item-label {
|
||||
|
@ -67,15 +57,14 @@ const theme = ({ dt }) => `
|
|||
|
||||
.p-tieredmenu-item-icon {
|
||||
color: ${dt('tieredmenu.item.icon.color')};
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.p-tieredmenu-submenu-icon {
|
||||
color: ${dt('tieredmenu.item.icon.color')};
|
||||
color: ${dt('tieredmenu.submenu.icon.color')};
|
||||
margin-left: auto;
|
||||
font-size: 0.875rem;
|
||||
width: 0.875rem;
|
||||
height: 0.875rem;
|
||||
font-size: ${dt('tieredmenu.submenu.icon.size')};
|
||||
width: ${dt('tieredmenu.submenu.icon.size')};
|
||||
height: ${dt('tieredmenu.submenu.icon.size')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content {
|
||||
|
@ -83,9 +72,12 @@ const theme = ({ dt }) => `
|
|||
background: ${dt('tieredmenu.item.focus.background')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon,
|
||||
.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-item-icon {
|
||||
color: ${dt('tieredmenu.item.icon.focus.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item.p-focus > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {
|
||||
color: ${dt('tieredmenu.item.icon.hover.color')};
|
||||
color: ${dt('tieredmenu.submenu.icon.focus.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover {
|
||||
|
@ -93,28 +85,33 @@ const theme = ({ dt }) => `
|
|||
background: ${dt('tieredmenu.item.focus.background')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon,
|
||||
.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-item-icon {
|
||||
color: ${dt('tieredmenu.item.icon.focus.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item:not(.p-disabled) > .p-tieredmenu-item-content:hover .p-tieredmenu-submenu-icon {
|
||||
color: ${dt('tieredmenu.item.icon.hover.color')};
|
||||
color: ${dt('tieredmenu.submenu.icon.focus.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item-active > .p-tieredmenu-item-content {
|
||||
color: ${dt('tieredmenu.item.focus.color')};
|
||||
background: ${dt('tieredmenu.item.focus.background')};
|
||||
color: ${dt('tieredmenu.item.active.color')};
|
||||
background: ${dt('tieredmenu.item.active.background')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon {
|
||||
color: ${dt('tieredmenu.item.icon.active.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-item-icon,
|
||||
.p-tieredmenu-item-active > .p-tieredmenu-item-content .p-tieredmenu-submenu-icon {
|
||||
color: ${dt('tieredmenu.item.icon.hover.color')};
|
||||
color: ${dt('tieredmenu.item.icon.active.color')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-separator {
|
||||
border-top: 1px solid ${dt('tieredmenu.separator.border.color')};
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.p-tieredmenu-overlay {
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: ${dt('tieredmenu.shadow')};
|
||||
}
|
||||
|
||||
.p-tieredmenu-enter-from,
|
||||
|
|
Loading…
Reference in New Issue