2024-02-19 22:53:42 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-02-19 22:53:42 +00:00
|
|
|
.p-contextmenu {
|
|
|
|
padding: 0.25rem 0.25rem;
|
2024-03-13 06:56:24 +00:00
|
|
|
background: ${dt('contextmenu.background')};
|
|
|
|
color: ${dt('contextmenu.color')};
|
|
|
|
border: 1px solid ${dt('contextmenu.border.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
|
|
min-width: 12.5rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-root-list,
|
2024-04-09 13:43:12 +00:00
|
|
|
.p-contextmenu-submenu {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
outline: 0 none;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:43:12 +00:00
|
|
|
.p-contextmenu-submenu {
|
2024-02-19 22:53:42 +00:00
|
|
|
position: absolute;
|
|
|
|
min-width: 100%;
|
|
|
|
z-index: 1;
|
|
|
|
padding: 0.25rem 0.25rem;
|
2024-03-13 06:56:24 +00:00
|
|
|
background: ${dt('contextmenu.background')};
|
|
|
|
color: ${dt('contextmenu.color')};
|
|
|
|
border: 1px solid ${dt('contextmenu.border.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item {
|
2024-02-19 22:53:42 +00:00
|
|
|
position: relative;
|
|
|
|
margin: 2px 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item:first-child {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-top: 0;
|
|
|
|
}
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item:last-child {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item-content {
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')};
|
2024-03-13 06:56:24 +00:00
|
|
|
border-radius: ${dt('rounded.sm')};
|
|
|
|
color: ${dt('contextmenu.item.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item-link {
|
|
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
text-decoration: none;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
color: inherit;
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-contextmenu-item-label {
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-contextmenu-item-icon {
|
|
|
|
color: ${dt('contextmenu.item.icon.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.icon.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-left: auto;
|
|
|
|
font-size: 0.875rem;
|
|
|
|
width: 0.875rem;
|
|
|
|
height: 0.875rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.focus.color')};
|
|
|
|
background: ${dt('contextmenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon,
|
|
|
|
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.icon.focus.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.focus.color')};
|
|
|
|
background: ${dt('contextmenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.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-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.icon.focus.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.focus.color')};
|
|
|
|
background: ${dt('contextmenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon,
|
|
|
|
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('contextmenu.item.icon.focus.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:21:05 +00:00
|
|
|
.p-contextmenu-separator {
|
2024-03-13 06:56:24 +00:00
|
|
|
border-top: 1px solid ${dt('contextmenu.separator.border.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 2px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-contextmenu-enter-from,
|
|
|
|
.p-contextmenu-leave-active {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-contextmenu-enter-active {
|
|
|
|
transition: opacity 250ms;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|