UNPKG

primevue

Version:

PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBloc

88 lines (85 loc) 2.61 kB
import { style } from '@primeuix/styles/megamenu'; import BaseStyle from '@primevue/core/base/style'; var inlineStyles = { rootList: function rootList(_ref) { var props = _ref.props; return { 'max-height': props.scrollHeight, overflow: 'auto' }; } }; var classes = { root: function root(_ref2) { var instance = _ref2.instance; return ['p-megamenu p-component', { 'p-megamenu-mobile': instance.queryMatches, 'p-megamenu-mobile-active': instance.mobileActive, 'p-megamenu-horizontal': instance.horizontal, 'p-megamenu-vertical': instance.vertical }]; }, start: 'p-megamenu-start', button: 'p-megamenu-button', rootList: 'p-megamenu-root-list', submenuLabel: function submenuLabel(_ref3) { var instance = _ref3.instance, processedItem = _ref3.processedItem; return ['p-megamenu-submenu-label', { 'p-disabled': instance.isItemDisabled(processedItem) }]; }, item: function item(_ref4) { var instance = _ref4.instance, processedItem = _ref4.processedItem; return ['p-megamenu-item', { 'p-megamenu-item-active': instance.isItemActive(processedItem), 'p-focus': instance.isItemFocused(processedItem), 'p-disabled': instance.isItemDisabled(processedItem) }]; }, itemContent: 'p-megamenu-item-content', itemLink: 'p-megamenu-item-link', itemIcon: 'p-megamenu-item-icon', itemLabel: 'p-megamenu-item-label', submenuIcon: 'p-megamenu-submenu-icon', overlay: 'p-megamenu-overlay', grid: 'p-megamenu-grid', column: function column(_ref5) { var instance = _ref5.instance, processedItem = _ref5.processedItem; var length = instance.isItemGroup(processedItem) ? processedItem.items.length : 0; var columnClass; if (instance.$parentInstance.queryMatches) columnClass = 'p-megamenu-col-12';else { switch (length) { case 2: columnClass = 'p-megamenu-col-6'; break; case 3: columnClass = 'p-megamenu-col-4'; break; case 4: columnClass = 'p-megamenu-col-3'; break; case 6: columnClass = 'p-megamenu-col-2'; break; default: columnClass = 'p-megamenu-col-12'; break; } } return columnClass; }, submenu: 'p-megamenu-submenu', separator: 'p-megamenu-separator', end: 'p-megamenu-end' }; var MegaMenuStyle = BaseStyle.extend({ name: 'megamenu', style: style, classes: classes, inlineStyles: inlineStyles }); export { MegaMenuStyle as default }; //# sourceMappingURL=index.mjs.map