UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

2 lines (1 loc) 20.8 kB
import{ObjectUtils as e,UniqueComponentId as t,DomHandler as i}from"primevue/utils";import s from"primevue/icons/angledown";import n from"primevue/icons/angleright";import o from"primevue/ripple";import{resolveComponent as a,resolveDirective as m,openBlock as r,createElementBlock as l,normalizeClass as d,normalizeStyle as c,toDisplayString as u,createCommentVNode as I,Fragment as h,renderList as p,createElementVNode as f,createBlock as g,withCtx as y,withDirectives as b,resolveDynamicComponent as v,renderSlot as x,createVNode as k}from"vue";var L={name:"MegaMenuSub",emits:["item-click","item-mouseenter"],props:{menuId:{type:String,default:null},focusedItemId:{type:String,default:null},horizontal:{type:Boolean,default:!1},submenu:{type:Object,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItem:{type:Object,default:null},exact:{type:Boolean,default:!0}},methods:{getSubListId(e){return`${this.getItemId(e)}_list`},getSubListKey(e){return this.getSubListId(e)},getItemId(e){return`${this.menuId}_${e.key}`},getItemKey(e){return this.getItemId(e)},getItemProp:(t,i,s)=>t&&t.item?e.getItemValue(t.item[i],s):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(t){return!!e.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},isItemVisible(e){return!1!==this.getItemProp(e,"visible")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemFocused(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:t=>e.isNotEmpty(t.items),onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.$emit("item-click",{originalEvent:e,processedItem:t,isFocus:!0})},onItemMouseEnter(e,t){this.$emit("item-mouseenter",{originalEvent:e,processedItem:t})},onItemActionClick(e,t){t&&t(e)},getAriaSetSize(){return this.items.filter((e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator"))).length},getAriaPosInset(e){return e-this.items.slice(0,e).filter((e=>this.isItemVisible(e)&&this.getItemProp(e,"separator"))).length+1},getSubmenuHeaderClass(e){return["p-megamenu-submenu-header p-submenu-header",this.getItemProp(e,"class"),{"p-disabled":this.isItemDisabled(e)}]},getColumnClass(e){let t;switch(this.isItemGroup(e)?e.items.length:0){case 2:t="p-megamenu-col-6";break;case 3:t="p-megamenu-col-4";break;case 4:t="p-megamenu-col-3";break;case 6:t="p-megamenu-col-2";break;default:t="p-megamenu-col-12"}return t},getItemClass(e){return["p-menuitem",this.getItemProp(e,"class"),{"p-menuitem-active p-highlight":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)}]},getItemActionClass(e,t){return["p-menuitem-link",{"router-link-active":t&&t.isActive,"router-link-active-exact":this.exact&&t&&t.isExactActive}]},getItemIconClass(e){return["p-menuitem-icon",this.getItemProp(e,"icon")]},getSeparatorItemClass(e){return["p-menuitem-separator",this.getItemProp(e,"class")]}},components:{AngleRightIcon:n,AngleDownIcon:s},directives:{ripple:o}};const C=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset"],K=["onClick","onMouseenter"],E=["href","onClick"],P={class:"p-menuitem-text"},w=["href","target"],S={class:"p-menuitem-text"},F={key:0,class:"p-megamenu-panel"},V={class:"p-megamenu-grid"},A=["id"];L.render=function(e,t,i,s,n,o){const x=a("router-link"),k=a("MegaMenuSub",!0),L=m("ripple");return r(),l("ul",null,[i.submenu?(r(),l("li",{key:0,class:d(o.getSubmenuHeaderClass(i.submenu)),style:c(o.getItemProp(i.submenu,"style")),role:"presentation"},u(o.getItemLabel(i.submenu)),7)):I("",!0),(r(!0),l(h,null,p(i.items,((s,n)=>(r(),l(h,{key:o.getItemKey(s)},[o.isItemVisible(s)&&!o.getItemProp(s,"separator")?(r(),l("li",{key:0,id:o.getItemId(s),style:c(o.getItemProp(s,"style")),class:d(o.getItemClass(s)),role:"menuitem","aria-label":o.getItemLabel(s),"aria-disabled":o.isItemDisabled(s)||void 0,"aria-expanded":o.isItemGroup(s)?o.isItemActive(s):void 0,"aria-haspopup":o.isItemGroup(s)&&!o.getItemProp(s,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":o.getAriaSetSize(),"aria-posinset":o.getAriaPosInset(n)},[f("div",{class:"p-menuitem-content",onClick:e=>o.onItemClick(e,s),onMouseenter:e=>o.onItemMouseEnter(e,s)},[i.templates.item?(r(),g(v(i.templates.item),{key:1,item:s.item},null,8,["item"])):(r(),l(h,{key:0},[o.getItemProp(s,"to")&&!o.isItemDisabled(s)?(r(),g(x,{key:0,to:o.getItemProp(s,"to"),custom:""},{default:y((({navigate:e,href:t,isActive:n,isExactActive:a})=>[b((r(),l("a",{href:t,class:d(o.getItemActionClass(s,{isActive:n,isExactActive:a})),tabindex:"-1","aria-hidden":"true",onClick:t=>o.onItemActionClick(t,e)},[i.templates.itemicon?(r(),g(v(i.templates.itemicon),{key:0,item:s.item,class:d(o.getItemIconClass(s))},null,8,["item","class"])):o.getItemProp(s,"icon")?(r(),l("span",{key:1,class:d(o.getItemIconClass(s))},null,2)):I("",!0),f("span",P,u(o.getItemLabel(s)),1)],10,E)),[[L]])])),_:2},1032,["to"])):b((r(),l("a",{key:1,href:o.getItemProp(s,"url"),class:d(o.getItemActionClass(s)),target:o.getItemProp(s,"target"),tabindex:"-1","aria-hidden":"true"},[i.templates.itemicon?(r(),g(v(i.templates.itemicon),{key:0,item:s.item,class:d(o.getItemIconClass(s))},null,8,["item","class"])):o.getItemProp(s,"icon")?(r(),l("span",{key:1,class:d(o.getItemIconClass(s))},null,2)):I("",!0),f("span",S,u(o.getItemLabel(s)),1),o.isItemGroup(s)?(r(),l(h,{key:2},[i.templates.submenuicon?(r(),g(v(i.templates.submenuicon),{key:0,active:o.isItemActive(s),class:"p-submenu-icon"},null,8,["active"])):(r(),g(v(i.horizontal?"AngleDownIcon":"AngleRightIcon"),{key:1,class:"p-submenu-icon"}))],64)):I("",!0)],10,w)),[[L]])],64))],40,K),o.isItemVisible(s)&&o.isItemGroup(s)?(r(),l("div",F,[f("div",V,[(r(!0),l(h,null,p(s.items,(n=>(r(),l("div",{key:o.getItemKey(n),class:d(o.getColumnClass(s))},[(r(!0),l(h,null,p(n,(s=>(r(),g(k,{key:o.getSubListKey(s),id:o.getSubListId(s),role:"menu",class:"p-submenu-list p-megamenu-submenu",menuId:i.menuId,focusedItemId:i.focusedItemId,submenu:s,items:s.items,templates:i.templates,exact:i.exact,level:i.level+1,onItemClick:t[0]||(t[0]=t=>e.$emit("item-click",t)),onItemMouseenter:t[1]||(t[1]=t=>e.$emit("item-mouseenter",t))},null,8,["id","menuId","focusedItemId","submenu","items","templates","exact","level"])))),128))],2)))),128))])])):I("",!0)],14,C)):I("",!0),o.isItemVisible(s)&&o.getItemProp(s,"separator")?(r(),l("li",{key:1,id:o.getItemId(s),style:c(o.getItemProp(s,"style")),class:d(o.getSeparatorItemClass(s)),role:"separator"},null,14,A)):I("",!0)],64)))),128))])};var z={name:"MegaMenu",emits:["focus","blur"],props:{model:{type:Array,default:null},orientation:{type:String,default:"horizontal"},exact:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},tabindex:{type:Number,default:0},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},outsideClickListener:null,resizeListener:null,container:null,menubar:null,searchTimeout:null,searchValue:null,data(){return{id:this.$attrs.id,focused:!1,focusedItemInfo:{index:-1,key:"",parentKey:""},activeItem:null,dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||t()},activeItem(t){e.isNotEmpty(t)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())}},mounted(){this.id=this.id||t()},beforeUnmount(){this.unbindOutsideClickListener(),this.unbindResizeListener()},methods:{getItemProp:(t,i)=>t?e.getItemValue(t[i]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemGroup(t){return e.isNotEmpty(this.getItemProp(t,"items"))},isItemSeparator(e){return this.getItemProp(e,"separator")},getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:t=>t&&e.isNotEmpty(t.items),hide(e,t){this.activeItem=null,this.focusedItemInfo={index:-1,key:"",parentKey:""},t&&i.focus(this.menubar),this.dirty=!1},onFocus(e){if(this.focused=!0,-1===this.focusedItemInfo.index){const e=this.findFirstFocusedItemIndex(),t=this.findVisibleItem(e);this.focusedItemInfo={index:e,key:t.key,parentKey:t.parentKey}}this.$emit("focus",e)},onBlur(e){this.focused=!1,this.focusedItemInfo={index:-1,key:"",parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown(t){if(this.disabled)return void t.preventDefault();const i=t.metaKey||t.ctrlKey;switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"ArrowLeft":this.onArrowLeftKey(t);break;case"ArrowRight":this.onArrowRightKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"Space":this.onSpaceKey(t);break;case"Enter":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&e.isPrintableCharacter(t.key)&&this.searchItems(t,t.key)}},onItemChange(t){const{processedItem:s,isFocus:n}=t;if(e.isEmpty(s))return;const{index:o,key:a,parentKey:m,items:r}=s,l=e.isNotEmpty(r);l&&(this.activeItem=s),this.focusedItemInfo={index:o,key:a,parentKey:m},l&&(this.dirty=!0),n&&i.focus(this.menubar)},onItemClick(t){const{originalEvent:s,processedItem:n}=t,o=this.isProccessedItemGroup(n),a=e.isEmpty(n.parent);if(this.isSelected(n)){const{index:e,key:t,parentKey:s}=n;this.activeItem=null,this.focusedItemInfo={index:e,key:t,parentKey:s},this.dirty=!a,i.focus(this.menubar)}else if(o)this.onItemChange(t);else{const e=a?n:this.activeItem;this.hide(s),this.changeFocusedItemInfo(s,e?e.index:-1),i.focus(this.menubar)}},onItemMouseEnter(e){this.dirty&&this.onItemChange(e)},onArrowDownKey(t){if(this.horizontal)if(e.isNotEmpty(this.activeItem)&&this.activeItem.key===this.focusedItemInfo.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{const e=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(e)&&(this.onItemChange({originalEvent:t,processedItem:e}),this.focusedItemInfo={index:-1,key:e.key,parentKey:e.parentKey},this.searchValue="")}const i=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,i),t.preventDefault()},onArrowUpKey(t){if(t.altKey&&this.horizontal){if(-1!==this.focusedItemInfo.index){const i=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(i)&&e.isNotEmpty(this.activeItem)&&(0===this.focusedItemInfo.index?(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null):this.changeFocusedItemInfo(t,this.findFirstItemIndex()))}t.preventDefault()}else{const e=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,e),t.preventDefault()}},onArrowLeftKey(t){const i=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(i)){if(this.horizontal){const e=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemInfo(t,e)}}else{this.vertical&&e.isNotEmpty(this.activeItem)&&0===i.columnIndex&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key,parentKey:this.activeItem.parentKey},this.activeItem=null);const s=i.columnIndex-1,n=this.visibleItems.findIndex((e=>e.columnIndex===s));-1!==n&&this.changeFocusedItemInfo(t,n)}t.preventDefault()},onArrowRightKey(t){const i=this.findVisibleItem(this.focusedItemInfo.index);if(this.isProccessedItemGroup(i)){if(this.vertical)if(e.isNotEmpty(this.activeItem)&&this.activeItem.key===i.key)this.focusedItemInfo={index:-1,key:"",parentKey:this.activeItem.key};else{const e=this.findVisibleItem(this.focusedItemInfo.index);this.isProccessedItemGroup(e)&&(this.onItemChange({originalEvent:t,processedItem:e}),this.focusedItemInfo={index:-1,key:e.key,parentKey:e.parentKey},this.searchValue="")}const s=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemInfo(t,s)}else{const e=i.columnIndex+1,s=this.visibleItems.findIndex((t=>t.columnIndex===e));-1!==s&&this.changeFocusedItemInfo(t,s)}t.preventDefault()},onHomeKey(e){this.changeFocusedItemInfo(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey(e){this.changeFocusedItemInfo(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey(e){if(-1!==this.focusedItemInfo.index){const t=i.findSingle(this.menubar,`li[id="${this.focusedItemId}"]`),s=t&&i.findSingle(t,".p-menuitem-link");s?s.click():t&&t.click();const n=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(n)&&this.changeFocusedItemInfo(e,this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onEscapeKey(t){e.isNotEmpty(this.activeItem)&&(this.focusedItemInfo={index:this.activeItem.index,key:this.activeItem.key},this.activeItem=null),t.preventDefault()},onTabKey(e){if(-1!==this.focusedItemInfo.index){const t=this.findVisibleItem(this.focusedItemInfo.index);!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.container&&!this.container.contains(e.target),i=!this.popup||!(this.target&&(this.target===e.target||this.target.contains(e.target)));t&&i&&this.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener(){this.resizeListener||(this.resizeListener=e=>{i.isTouchDevice()||this.hide(e,!0)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())},isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)},isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)},isSelected(t){return!!e.isNotEmpty(this.activeItem)&&this.activeItem.key===t.key},findFirstItemIndex(){return this.visibleItems.findIndex((e=>this.isValidItem(e)))},findLastItemIndex(){return e.findLastIndex(this.visibleItems,(e=>this.isValidItem(e)))},findNextItemIndex(e){const t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex((e=>this.isValidItem(e))):-1;return t>-1?t+e+1:e},findPrevItemIndex(t){const i=t>0?e.findLastIndex(this.visibleItems.slice(0,t),(e=>this.isValidItem(e))):-1;return i>-1?i:t},findSelectedItemIndex(){return this.visibleItems.findIndex((e=>this.isValidSelectedItem(e)))},findFirstFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e},findLastFocusedItemIndex(){const e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e},findVisibleItem(t){return e.isNotEmpty(this.visibleItems)?this.visibleItems[t]:null},searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,s=!1;return-1!==this.focusedItemInfo.index?(i=this.visibleItems.slice(this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))),i=-1===i?this.visibleItems.slice(0,this.focusedItemInfo.index).findIndex((e=>this.isItemMatched(e))):i+this.focusedItemInfo.index):i=this.visibleItems.findIndex((e=>this.isItemMatched(e))),-1!==i&&(s=!0),-1===i&&-1===this.focusedItemInfo.index&&(i=this.findFirstFocusedItemIndex()),-1!==i&&this.changeFocusedItemInfo(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),s},changeFocusedItemInfo(t,i){const s=this.findVisibleItem(i);this.focusedItemInfo.index=i,this.focusedItemInfo.key=e.isNotEmpty(s)?s.key:"",this.scrollInView()},scrollInView(e=-1){const t=-1!==e?`${this.id}_${e}`:this.focusedItemId,s=i.findSingle(this.menubar,`li[id="${t}"]`);s&&s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems(e,t=0,i={},s="",n){const o=[];return e&&e.forEach(((e,a)=>{const m=(""!==s?s+"_":"")+(void 0!==n?n+"_":"")+a,r={item:e,index:a,level:t,key:m,parent:i,parentKey:s,columnIndex:void 0!==n?n:void 0!==i.columnIndex?i.columnIndex:a};r.items=0===t&&e.items&&e.items.length>0?e.items.map(((e,i)=>this.createProcessedItems(e,t+1,r,m,i))):this.createProcessedItems(e.items,t+1,r,m),o.push(r)})),o},containerRef(e){this.container=e},menubarRef(e){this.menubar=e?e.$el:void 0}},computed:{containerClass(){return["p-megamenu p-component",{"p-megamenu-horizontal":this.horizontal,"p-megamenu-vertical":this.vertical}]},processedItems(){return this.createProcessedItems(this.model||[])},visibleItems(){const t=e.isNotEmpty(this.activeItem)?this.activeItem:null;return t&&t.key===this.focusedItemInfo.parentKey?t.items.reduce(((e,t)=>(t.forEach((t=>{t.items.forEach((t=>{e.push(t)}))})),e)),[]):this.processedItems},horizontal(){return"horizontal"===this.orientation},vertical(){return"vertical"===this.orientation},focusedItemId(){return e.isNotEmpty(this.focusedItemInfo.key)?`${this.id}_${this.focusedItemInfo.key}`:null}},components:{MegaMenuSub:L}};const D=["id"],M={key:0,class:"p-megamenu-start"},N={key:1,class:"p-megamenu-end"};!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}("\n.p-megamenu {\n display: flex;\n}\n.p-megamenu-root-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-megamenu-root-list > .p-menuitem {\n position: relative;\n}\n.p-megamenu .p-menuitem-link {\n cursor: pointer;\n display: flex;\n align-items: center;\n text-decoration: none;\n overflow: hidden;\n position: relative;\n}\n.p-megamenu .p-menuitem-text {\n line-height: 1;\n}\n.p-megamenu-panel {\n display: none;\n position: absolute;\n width: auto;\n z-index: 1;\n}\n.p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n display: block;\n}\n.p-megamenu-submenu {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n/* Horizontal */\n.p-megamenu-horizontal {\n align-items: center;\n}\n.p-megamenu-horizontal .p-megamenu-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.p-megamenu-horizontal .p-megamenu-end {\n margin-left: auto;\n align-self: center;\n}\n\n/* Vertical */\n.p-megamenu-vertical {\n flex-direction: column;\n}\n.p-megamenu-vertical .p-megamenu-root-list {\n flex-direction: column;\n}\n.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem-active > .p-megamenu-panel {\n left: 100%;\n top: 0;\n}\n.p-megamenu-vertical .p-megamenu-root-list > .p-menuitem > .p-menuitem-content > .p-menuitem-link > .p-submenu-icon {\n margin-left: auto;\n}\n.p-megamenu-grid {\n display: flex;\n}\n.p-megamenu-col-2,\n.p-megamenu-col-3,\n.p-megamenu-col-4,\n.p-megamenu-col-6,\n.p-megamenu-col-12 {\n flex: 0 0 auto;\n padding: 0.5rem;\n}\n.p-megamenu-col-2 {\n width: 16.6667%;\n}\n.p-megamenu-col-3 {\n width: 25%;\n}\n.p-megamenu-col-4 {\n width: 33.3333%;\n}\n.p-megamenu-col-6 {\n width: 50%;\n}\n.p-megamenu-col-12 {\n width: 100%;\n}\n"),z.render=function(e,t,i,s,n,o){const m=a("MegaMenuSub");return r(),l("div",{ref:o.containerRef,id:n.id,class:d(o.containerClass)},[e.$slots.start?(r(),l("div",M,[x(e.$slots,"start")])):I("",!0),k(m,{ref:o.menubarRef,id:n.id+"_list",class:"p-megamenu-root-list",tabindex:i.disabled?-1:i.tabindex,role:"menubar","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-disabled":i.disabled||void 0,"aria-orientation":i.orientation,"aria-activedescendant":n.focused?o.focusedItemId:void 0,menuId:n.id,focusedItemId:n.focused?o.focusedItemId:void 0,items:o.processedItems,horizontal:o.horizontal,templates:e.$slots,activeItem:n.activeItem,exact:i.exact,level:0,onFocus:o.onFocus,onBlur:o.onBlur,onKeydown:o.onKeyDown,onItemClick:o.onItemClick,onItemMouseenter:o.onItemMouseEnter},null,8,["id","tabindex","aria-label","aria-labelledby","aria-disabled","aria-orientation","aria-activedescendant","menuId","focusedItemId","items","horizontal","templates","activeItem","exact","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"]),e.$slots.end?(r(),l("div",N,[x(e.$slots,"end")])):I("",!0)],10,D)};export{z as default};