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-megamenu {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
padding: 0.5rem 0.5rem;
|
2024-03-13 06:56:24 +00:00
|
|
|
background: ${dt('megamenu.background')};
|
|
|
|
color: ${dt('megamenu.color')};
|
|
|
|
border: 1px solid ${dt('megamenu.border.color')};
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-root-list {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-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('megamenu.item.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item-link {
|
2024-02-19 22:53:42 +00:00
|
|
|
cursor: pointer;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
text-decoration: none;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
color: inherit;
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item-label {
|
2024-02-19 22:53:42 +00:00
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.icon.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item.p-focus > .p-megamenu-item-content {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.focus.color')};
|
|
|
|
background: ${dt('megamenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item.p-focus > .p-megamenu-item-content .p-megamenu-item-icon,
|
|
|
|
.p-megamenu-item.p-focus > .p-megamenu-item-content .p-megamenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.icon.focus.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.focus.color')};
|
|
|
|
background: ${dt('megamenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover .p-megamenu-item-icon,
|
|
|
|
.p-megamenu-item:not(.p-disabled) > .p-megamenu-item-content:hover .p-megamenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.icon.focus.color')};
|
2024-03-27 10:59:21 +00:00
|
|
|
}
|
2024-02-19 22:53:42 +00:00
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item-active > .p-megamenu-item-content {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.focus.color')};
|
|
|
|
background: ${dt('megamenu.item.focus.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-item-icon,
|
|
|
|
.p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.icon.focus.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-submenu-icon {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.item.icon.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-left: 0.5rem;
|
|
|
|
font-size: 0.875rem;
|
|
|
|
width: 0.875rem;
|
|
|
|
height: 0.875rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-panel {
|
|
|
|
display: none;
|
|
|
|
position: absolute;
|
|
|
|
width: auto;
|
|
|
|
z-index: 1;
|
|
|
|
left: 0;
|
|
|
|
min-width: 100%;
|
2024-03-13 06:56:24 +00:00
|
|
|
background: ${dt('megamenu.background')};
|
|
|
|
color: ${dt('megamenu.color')};
|
|
|
|
border: 1px solid ${dt('megamenu.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:51:16 +00:00
|
|
|
.p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-panel {
|
2024-02-19 22:53:42 +00:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-submenu {
|
|
|
|
margin: 0;
|
|
|
|
list-style: none;
|
|
|
|
padding: 0.25rem 0.25rem;
|
|
|
|
min-width: 12.5rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-submenu .p-megamenu-item {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 2px 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-submenu .p-megamenu-item:first-child {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-submenu .p-megamenu-item:last-child {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-submenu .p-megamenu-submenu-item {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0.5rem 0.75rem;
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.submenu.header.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
font-weight: 600;
|
|
|
|
margin-bottom: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-submenu .p-menuitem-separator {
|
2024-03-13 06:56:24 +00:00
|
|
|
border-top: 1px solid ${dt('megamenu.separator.border.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 2px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-horizontal {
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-horizontal .p-megamenu-root-list {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-horizontal .p-megamenu-end {
|
|
|
|
margin-left: auto;
|
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-vertical {
|
|
|
|
display: inline-flex;
|
|
|
|
flex-direction: column;
|
|
|
|
min-width: 12.5rem;
|
|
|
|
padding: 0.25rem 0.25rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-vertical .p-megamenu-root-list {
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-panel {
|
2024-02-19 22:53:42 +00:00
|
|
|
left: 100%;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-vertical .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-left: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-grid {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-2,
|
|
|
|
.p-megamenu-col-3,
|
|
|
|
.p-megamenu-col-4,
|
|
|
|
.p-megamenu-col-6,
|
|
|
|
.p-megamenu-col-12 {
|
|
|
|
flex: 0 0 auto;
|
|
|
|
padding: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-2 {
|
|
|
|
width: 16.6667%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-3 {
|
|
|
|
width: 25%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-4 {
|
|
|
|
width: 33.3333%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-6 {
|
|
|
|
width: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-col-12 {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-button {
|
|
|
|
display: none;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
cursor: pointer;
|
|
|
|
width: 1.75rem;
|
|
|
|
height: 1.75rem;
|
|
|
|
position: relative;
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.mobile.toggle.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
border: 0 none;
|
|
|
|
background: transparent;
|
|
|
|
border-radius: 50%;
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
outline-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-button:hover {
|
2024-03-13 06:56:24 +00:00
|
|
|
color: ${dt('megamenu.mobile.toggle.hover.color')};
|
|
|
|
background: ${dt('megamenu.mobile.toggle.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-button:focus-visible {
|
2024-03-12 08:19:23 +00:00
|
|
|
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
|
|
|
outline-offset: ${dt('focus.ring.offset')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile .p-megamenu-button {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile .p-megamenu-root-list {
|
|
|
|
position: absolute;
|
|
|
|
display: none;
|
|
|
|
flex-direction: column;
|
|
|
|
top: 100%;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
width: 100%;
|
|
|
|
padding: 0.25rem 0.25rem;
|
2024-03-13 06:56:24 +00:00
|
|
|
background: ${dt('megamenu.background')};
|
|
|
|
border: 1px solid ${dt('megamenu.border.color')};
|
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);
|
|
|
|
gap: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile-active .p-megamenu-root-list {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-mobile .p-megamenu-root-list .p-megamenu-item {
|
2024-02-19 22:53:42 +00:00
|
|
|
width: 100%;
|
|
|
|
position: static;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile .p-megamenu-panel {
|
|
|
|
position: static;
|
|
|
|
border: 0 none;
|
|
|
|
border-radius: 0;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-megamenu-mobile .p-megamenu-grid {
|
|
|
|
flex-wrap: wrap;
|
|
|
|
overflow: auto;
|
|
|
|
max-height: 90%;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-mobile .p-megamenu-root-list > .p-megamenu-item > .p-megamenu-item-content .p-megamenu-submenu-icon {
|
2024-02-19 22:53:42 +00:00
|
|
|
margin-left: auto;
|
|
|
|
transition: transform 0.2s;
|
|
|
|
}
|
|
|
|
|
2024-04-09 13:51:16 +00:00
|
|
|
.p-megamenu-mobile .p-megamenu-root-list > .p-megamenu-item-active > .p-megamenu-item-content .p-megamenu-submenu-icon {
|
2024-02-19 22:53:42 +00:00
|
|
|
transform: rotate(-180deg);
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|