mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #4504
This commit is contained in:
parent
aca8d3ecf7
commit
e6499c0365
73 changed files with 4097 additions and 3951 deletions
|
@ -3,115 +3,117 @@ import BaseComponent from 'primevue/basecomponent';
|
|||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
.p-megamenu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list > .p-menuitem {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-megamenu .p-menuitem-link {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-megamenu .p-menuitem-text {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.p-megamenu-panel {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.p-megamenu-submenu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Horizontal */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* Vertical */
|
||||
.p-megamenu-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {
|
||||
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%;
|
||||
@layer primevue {
|
||||
.p-megamenu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list > .p-menuitem {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-megamenu .p-menuitem-link {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-megamenu .p-menuitem-text {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.p-megamenu-panel {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: auto;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.p-megamenu-submenu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* Horizontal */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* Vertical */
|
||||
.p-megamenu-vertical {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {
|
||||
left: 100%;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {
|
||||
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%;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue