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

1 lines 5.53 kB
{"version":3,"file":"index.mjs","sources":["../../../src/megamenu/style/MegaMenuStyle.js"],"sourcesContent":["import { style } from '@primeuix/styles/megamenu';\nimport BaseStyle from '@primevue/core/base/style';\n\nconst inlineStyles = {\n rootList: ({ props }) => ({ 'max-height': props.scrollHeight, overflow: 'auto' })\n};\n\nconst classes = {\n root: ({ instance }) => [\n 'p-megamenu p-component',\n {\n 'p-megamenu-mobile': instance.queryMatches,\n 'p-megamenu-mobile-active': instance.mobileActive,\n 'p-megamenu-horizontal': instance.horizontal,\n 'p-megamenu-vertical': instance.vertical\n }\n ],\n start: 'p-megamenu-start',\n button: 'p-megamenu-button',\n rootList: 'p-megamenu-root-list',\n submenuLabel: ({ instance, processedItem }) => [\n 'p-megamenu-submenu-label',\n {\n 'p-disabled': instance.isItemDisabled(processedItem)\n }\n ],\n item: ({ instance, processedItem }) => [\n 'p-megamenu-item',\n {\n 'p-megamenu-item-active': instance.isItemActive(processedItem),\n 'p-focus': instance.isItemFocused(processedItem),\n 'p-disabled': instance.isItemDisabled(processedItem)\n }\n ],\n itemContent: 'p-megamenu-item-content',\n itemLink: 'p-megamenu-item-link',\n itemIcon: 'p-megamenu-item-icon',\n itemLabel: 'p-megamenu-item-label',\n submenuIcon: 'p-megamenu-submenu-icon',\n overlay: 'p-megamenu-overlay',\n grid: 'p-megamenu-grid',\n column: ({ instance, processedItem }) => {\n let length = instance.isItemGroup(processedItem) ? processedItem.items.length : 0;\n let columnClass;\n\n if (instance.$parentInstance.queryMatches) columnClass = 'p-megamenu-col-12';\n else {\n switch (length) {\n case 2:\n columnClass = 'p-megamenu-col-6';\n break;\n\n case 3:\n columnClass = 'p-megamenu-col-4';\n break;\n\n case 4:\n columnClass = 'p-megamenu-col-3';\n break;\n\n case 6:\n columnClass = 'p-megamenu-col-2';\n break;\n\n default:\n columnClass = 'p-megamenu-col-12';\n break;\n }\n }\n\n return columnClass;\n },\n submenu: 'p-megamenu-submenu',\n separator: 'p-megamenu-separator',\n end: 'p-megamenu-end'\n};\n\nexport default BaseStyle.extend({\n name: 'megamenu',\n style,\n classes,\n inlineStyles\n});\n"],"names":["inlineStyles","rootList","_ref","props","scrollHeight","overflow","classes","root","_ref2","instance","queryMatches","mobileActive","horizontal","vertical","start","button","submenuLabel","_ref3","processedItem","isItemDisabled","item","_ref4","isItemActive","isItemFocused","itemContent","itemLink","itemIcon","itemLabel","submenuIcon","overlay","grid","column","_ref5","length","isItemGroup","items","columnClass","$parentInstance","submenu","separator","end","BaseStyle","extend","name","style"],"mappings":";;;AAGA,IAAMA,YAAY,GAAG;AACjBC,EAAAA,QAAQ,EAAE,SAAVA,QAAQA,CAAAC,IAAA,EAAA;AAAA,IAAA,IAAKC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAA,OAAQ;MAAE,YAAY,EAAEA,KAAK,CAACC,YAAY;AAAEC,MAAAA,QAAQ,EAAE;KAAQ;AAAA;AACpF,CAAC;AAED,IAAMC,OAAO,GAAG;AACZC,EAAAA,IAAI,EAAE,SAANA,IAAIA,CAAAC,KAAA,EAAA;AAAA,IAAA,IAAKC,QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAA,OAAO,CACpB,wBAAwB,EACxB;MACI,mBAAmB,EAAEA,QAAQ,CAACC,YAAY;MAC1C,0BAA0B,EAAED,QAAQ,CAACE,YAAY;MACjD,uBAAuB,EAAEF,QAAQ,CAACG,UAAU;MAC5C,qBAAqB,EAAEH,QAAQ,CAACI;AACpC,KAAC,CACJ;AAAA,GAAA;AACDC,EAAAA,KAAK,EAAE,kBAAkB;AACzBC,EAAAA,MAAM,EAAE,mBAAmB;AAC3Bd,EAAAA,QAAQ,EAAE,sBAAsB;AAChCe,EAAAA,YAAY,EAAE,SAAdA,YAAYA,CAAAC,KAAA,EAAA;AAAA,IAA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