Merge branch 'v4' of https://github.com/primefaces/primevue into v4
commit
cd3ee39e5f
|
@ -30,7 +30,7 @@
|
||||||
<template v-if="!templates.item">
|
<template v-if="!templates.item">
|
||||||
<a v-ripple :href="getItemProp(processedItem, 'url')" :class="cx('itemLink')" :target="getItemProp(processedItem, 'target')" tabindex="-1" aria-hidden="true" v-bind="getPTOptions('itemLink', processedItem, index)">
|
<a v-ripple :href="getItemProp(processedItem, 'url')" :class="cx('itemLink')" :target="getItemProp(processedItem, 'target')" tabindex="-1" aria-hidden="true" v-bind="getPTOptions('itemLink', processedItem, index)">
|
||||||
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="cx('itemIcon')" />
|
<component v-if="templates.itemicon" :is="templates.itemicon" :item="processedItem.item" :class="cx('itemIcon')" />
|
||||||
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('icon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('itemIcon', processedItem, index)" />
|
<span v-else-if="getItemProp(processedItem, 'icon')" :class="[cx('itemIcon'), getItemProp(processedItem, 'icon')]" v-bind="getPTOptions('itemIcon', processedItem, index)" />
|
||||||
<span :id="getItemLabelId(processedItem)" :class="cx('itemLabel')" v-bind="getPTOptions('itemLabel', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
<span :id="getItemLabelId(processedItem)" :class="cx('itemLabel')" v-bind="getPTOptions('itemLabel', processedItem, index)">{{ getItemLabel(processedItem) }}</span>
|
||||||
<template v-if="getItemProp(processedItem, 'items')">
|
<template v-if="getItemProp(processedItem, 'items')">
|
||||||
<component v-if="templates.submenuicon" :is="templates.submenuicon" :active="isItemActive(processedItem)" :class="cx('submenuIcon')" />
|
<component v-if="templates.submenuicon" :is="templates.submenuicon" :active="isItemActive(processedItem)" :class="cx('submenuIcon')" />
|
||||||
|
|
|
@ -2,21 +2,23 @@ import BaseStyle from 'primevue/base/style';
|
||||||
|
|
||||||
const theme = ({ dt }) => `
|
const theme = ({ dt }) => `
|
||||||
.p-contextmenu {
|
.p-contextmenu {
|
||||||
padding: 0.25rem 0.25rem;
|
|
||||||
background: ${dt('contextmenu.background')};
|
background: ${dt('contextmenu.background')};
|
||||||
color: ${dt('contextmenu.color')};
|
color: ${dt('contextmenu.color')};
|
||||||
border: 1px solid ${dt('contextmenu.border.color')};
|
border: 1px solid ${dt('contextmenu.border.color')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('contextmenu.border.radius')};
|
||||||
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('contextmenu.shadow')};
|
||||||
min-width: 12.5rem;
|
min-width: 12.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-root-list,
|
.p-contextmenu-root-list,
|
||||||
.p-contextmenu-submenu {
|
.p-contextmenu-submenu {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: ${dt('contextmenu.list.padding')};
|
||||||
list-style: none;
|
list-style: none;
|
||||||
outline: 0 none;
|
outline: 0 none;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: ${dt('contextmenu.list.gap')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-submenu {
|
.p-contextmenu-submenu {
|
||||||
|
@ -25,29 +27,20 @@ const theme = ({ dt }) => `
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
padding: 0.25rem 0.25rem;
|
|
||||||
background: ${dt('contextmenu.background')};
|
background: ${dt('contextmenu.background')};
|
||||||
color: ${dt('contextmenu.color')};
|
color: ${dt('contextmenu.color')};
|
||||||
border: 1px solid ${dt('contextmenu.border.color')};
|
border: 1px solid ${dt('contextmenu.border.color')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('contextmenu.border.radius')};
|
||||||
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('contextmenu.shadow')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item {
|
.p-contextmenu-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: 2px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-contextmenu-item:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.p-contextmenu-item:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item-content {
|
.p-contextmenu-item-content {
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')};
|
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')};
|
||||||
border-radius: ${dt('border.radius.sm')};
|
border-radius: ${dt('contextmenu.item.border.radius')};
|
||||||
color: ${dt('contextmenu.item.color')};
|
color: ${dt('contextmenu.item.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,7 +52,8 @@ const theme = ({ dt }) => `
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('contextmenu.item.padding')};
|
||||||
|
gap: ${dt('contextmenu.item.gap')};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,15 +63,14 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-contextmenu-item-icon {
|
.p-contextmenu-item-icon {
|
||||||
color: ${dt('contextmenu.item.icon.color')};
|
color: ${dt('contextmenu.item.icon.color')};
|
||||||
margin-right: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-submenu-icon {
|
.p-contextmenu-submenu-icon {
|
||||||
color: ${dt('contextmenu.item.icon.color')};
|
color: ${dt('contextmenu.submenu.icon.color')};
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.875rem;
|
font-size: ${dt('contextmenu.submenu.icon.size')};
|
||||||
width: 0.875rem;
|
width: ${dt('contextmenu.submenu.icon.size')};
|
||||||
height: 0.875rem;
|
height: ${dt('contextmenu.submenu.icon.size')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
||||||
|
@ -85,9 +78,12 @@ const theme = ({ dt }) => `
|
||||||
background: ${dt('contextmenu.item.focus.background')};
|
background: ${dt('contextmenu.item.focus.background')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon,
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
||||||
|
color: ${dt('contextmenu.item.icon.focus.color')};
|
||||||
|
}
|
||||||
|
|
||||||
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
||||||
color: ${dt('contextmenu.item.icon.hover.color')};
|
color: ${dt('contextmenu.submenu.icon.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
||||||
|
@ -95,24 +91,29 @@ const theme = ({ dt }) => `
|
||||||
background: ${dt('contextmenu.item.focus.background')};
|
background: ${dt('contextmenu.item.focus.background')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon,
|
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
||||||
|
color: ${dt('contextmenu.item.icon.focus.color')};
|
||||||
|
}
|
||||||
|
|
||||||
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
||||||
color: ${dt('contextmenu.item.icon.hover.color')};
|
color: ${dt('contextmenu.submenu.icon.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
||||||
color: ${dt('contextmenu.item.focus.color')};
|
color: ${dt('contextmenu.item.active.color')};
|
||||||
background: ${dt('contextmenu.item.focus.background')};
|
background: ${dt('contextmenu.item.active.background')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
||||||
|
color: ${dt('contextmenu.item.icon.active.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon,
|
|
||||||
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
||||||
color: ${dt('contextmenu.item.icon.hover.color')};
|
color: ${dt('contextmenu.submenu.icon.active.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-separator {
|
.p-contextmenu-separator {
|
||||||
border-top: 1px solid ${dt('contextmenu.separator.border.color')};
|
border-top: 1px solid ${dt('contextmenu.separator.border.color')};
|
||||||
margin: 2px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-contextmenu-enter-from,
|
.p-contextmenu-enter-from,
|
||||||
|
|
|
@ -2,19 +2,34 @@ export default {
|
||||||
root: {
|
root: {
|
||||||
background: '{content.background}',
|
background: '{content.background}',
|
||||||
borderColor: '{content.border.color}',
|
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: {
|
item: {
|
||||||
focusBackground: '{navigation.item.focus.background}',
|
focusBackground: '{navigation.item.focus.background}',
|
||||||
|
activeBackground: '{navigation.item.active.background}',
|
||||||
color: '{navigation.item.color}',
|
color: '{navigation.item.color}',
|
||||||
focusColor: '{navigation.item.focus.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: {
|
icon: {
|
||||||
color: '{navigation.item.icon.color}',
|
color: '{navigation.item.icon.color}',
|
||||||
hoverColor: '{navigation.item.icon.hover.color}'
|
focusColor: '{navigation.item.icon.focus.color}',
|
||||||
|
focusColor: '{navigation.item.icon.active.color}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submenuItem: {
|
submenuIcon: {
|
||||||
color: '{navigation.submenu.color}'
|
size: '{navigation.submenu.icon.size}',
|
||||||
|
color: '{navigation.submenu.icon.color}',
|
||||||
|
focusColor: '{navigation.submenu.icon.focus.color}',
|
||||||
|
focusColor: '{navigation.submenu.icon.active.color}'
|
||||||
},
|
},
|
||||||
separator: {
|
separator: {
|
||||||
borderColor: '{content.border.color}'
|
borderColor: '{content.border.color}'
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default {
|
||||||
submenuLabel: {
|
submenuLabel: {
|
||||||
padding: '{navigation.submenu.label.padding}',
|
padding: '{navigation.submenu.label.padding}',
|
||||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||||
bakcground: '{navigation.submenu.label.background.}',
|
background: '{navigation.submenu.label.background.}',
|
||||||
color: '{navigation.submenu.label.color}'
|
color: '{navigation.submenu.label.color}'
|
||||||
},
|
},
|
||||||
separator: {
|
separator: {
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default {
|
||||||
submenuLabel: {
|
submenuLabel: {
|
||||||
padding: '{navigation.submenu.label.padding}',
|
padding: '{navigation.submenu.label.padding}',
|
||||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||||
bakcground: '{navigation.submenu.label.background.}',
|
background: '{navigation.submenu.label.background.}',
|
||||||
color: '{navigation.submenu.label.color}'
|
color: '{navigation.submenu.label.color}'
|
||||||
},
|
},
|
||||||
submenuIcon: {
|
submenuIcon: {
|
||||||
|
|
|
@ -2,19 +2,40 @@ export default {
|
||||||
root: {
|
root: {
|
||||||
background: '{content.background}',
|
background: '{content.background}',
|
||||||
borderColor: '{content.border.color}',
|
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: {
|
item: {
|
||||||
focusBackground: '{navigation.item.focus.background}',
|
focusBackground: '{navigation.item.focus.background}',
|
||||||
|
activeBackground: '{navigation.item.active.background}',
|
||||||
color: '{navigation.item.color}',
|
color: '{navigation.item.color}',
|
||||||
focusColor: '{navigation.item.focus.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: {
|
icon: {
|
||||||
color: '{navigation.item.icon.color}',
|
color: '{navigation.item.icon.color}',
|
||||||
hoverColor: '{navigation.item.icon.hover.color}'
|
focusColor: '{navigation.item.icon.focus.color}',
|
||||||
|
focusColor: '{navigation.item.icon.active.color}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submenuItem: {
|
submenuLabel: {
|
||||||
color: '{navigation.submenu.color}'
|
padding: '{navigation.submenu.label.padding}',
|
||||||
|
fontWeight: '{navigation.submenu.label.font.weight}',
|
||||||
|
background: '{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: {
|
separator: {
|
||||||
borderColor: '{content.border.color}'
|
borderColor: '{content.border.color}'
|
||||||
|
|
|
@ -25,12 +25,6 @@ export default {
|
||||||
focusColor: '{navigation.item.icon.active.color}'
|
focusColor: '{navigation.item.icon.active.color}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submenuLabel: {
|
|
||||||
padding: '{navigation.submenu.label.padding}',
|
|
||||||
fontWeight: '{navigation.submenu.label.font.weight}',
|
|
||||||
bakcground: '{navigation.submenu.label.background.}',
|
|
||||||
color: '{navigation.submenu.label.color}'
|
|
||||||
},
|
|
||||||
submenuIcon: {
|
submenuIcon: {
|
||||||
size: '{navigation.submenu.icon.size}',
|
size: '{navigation.submenu.icon.size}',
|
||||||
color: '{navigation.submenu.icon.color}',
|
color: '{navigation.submenu.icon.color}',
|
||||||
|
|
Loading…
Reference in New Issue