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) 21.1 kB
this.primevue=this.primevue||{},this.primevue.menubar=function(e,t,i,s,n,o){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=r(e),l=r(i),m=r(s),c=r(n),d={name:"MenubarSub",emits:["item-mouseenter","item-click"],props:{items:{type:Array,default:null},root:{type:Boolean,default:!1},popup:{type:Boolean,default:!1},mobileActive:{type:Boolean,default:!1},templates:{type:Object,default:null},exact:{type:Boolean,default:!0},level:{type:Number,default:0},menuId:{type:String,default:null},focusedItemId:{type:String,default:null},activeItemPath:{type:Object,default:null}},list:null,methods:{getItemId(e){return`${this.menuId}_${e.key}`},getItemKey(e){return this.getItemId(e)},getItemProp:(e,i,s)=>e&&e.item?t.ObjectUtils.getItemValue(e.item[i],s):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemActive(e){return this.activeItemPath.some((t=>t.key===e.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:e=>t.ObjectUtils.isNotEmpty(e.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},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")]}},computed:{containerClass(){return{"p-submenu-list":!this.root,"p-menubar-root-list":this.root}}},components:{AngleRightIcon:m.default,AngleDownIcon:l.default},directives:{ripple:c.default}};const u=["id","aria-label","aria-disabled","aria-expanded","aria-haspopup","aria-level","aria-setsize","aria-posinset"],I=["onClick","onMouseenter"],h=["href","onClick"],p={class:"p-menuitem-text"},f=["href","target"],b={class:"p-menuitem-text"},v=["id"];d.render=function(e,t,i,s,n,r){const a=o.resolveComponent("router-link"),l=o.resolveComponent("MenubarSub",!0),m=o.resolveDirective("ripple");return o.openBlock(),o.createElementBlock("ul",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.items,((s,n)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:r.getItemKey(s)},[r.isItemVisible(s)&&!r.getItemProp(s,"separator")?(o.openBlock(),o.createElementBlock("li",{key:0,id:r.getItemId(s),style:o.normalizeStyle(r.getItemProp(s,"style")),class:o.normalizeClass(r.getItemClass(s)),role:"menuitem","aria-label":r.getItemLabel(s),"aria-disabled":r.isItemDisabled(s)||void 0,"aria-expanded":r.isItemGroup(s)?r.isItemActive(s):void 0,"aria-haspopup":r.isItemGroup(s)&&!r.getItemProp(s,"to")?"menu":void 0,"aria-level":i.level+1,"aria-setsize":r.getAriaSetSize(),"aria-posinset":r.getAriaPosInset(n)},[o.createElementVNode("div",{class:"p-menuitem-content",onClick:e=>r.onItemClick(e,s),onMouseenter:e=>r.onItemMouseEnter(e,s)},[i.templates.item?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.item),{key:1,item:s.item},null,8,["item"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[r.getItemProp(s,"to")&&!r.isItemDisabled(s)?(o.openBlock(),o.createBlock(a,{key:0,to:r.getItemProp(s,"to"),custom:""},{default:o.withCtx((({navigate:e,href:t,isActive:n,isExactActive:a})=>[o.withDirectives((o.openBlock(),o.createElementBlock("a",{href:t,class:o.normalizeClass(r.getItemActionClass(s,{isActive:n,isExactActive:a})),tabindex:"-1","aria-hidden":"true",onClick:t=>r.onItemActionClick(t,e)},[i.templates.itemicon?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.itemicon),{key:0,item:s.item,class:o.normalizeClass(r.getItemIconClass(s))},null,8,["item","class"])):r.getItemProp(s,"icon")?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(r.getItemIconClass(s))},null,2)):o.createCommentVNode("",!0),o.createElementVNode("span",p,o.toDisplayString(r.getItemLabel(s)),1)],10,h)),[[m]])])),_:2},1032,["to"])):o.withDirectives((o.openBlock(),o.createElementBlock("a",{key:1,href:r.getItemProp(s,"url"),class:o.normalizeClass(r.getItemActionClass(s)),target:r.getItemProp(s,"target"),tabindex:"-1","aria-hidden":"true"},[i.templates.itemicon?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.itemicon),{key:0,item:s.item,class:o.normalizeClass(r.getItemIconClass(s))},null,8,["item","class"])):r.getItemProp(s,"icon")?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(r.getItemIconClass(s))},null,2)):o.createCommentVNode("",!0),o.createElementVNode("span",b,o.toDisplayString(r.getItemLabel(s)),1),r.getItemProp(s,"items")?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[i.templates.submenuicon?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.templates.submenuicon),{key:0,root:i.root,active:r.isItemActive(s),class:"p-submenu-icon"},null,8,["root","active"])):(o.openBlock(),o.createBlock(o.resolveDynamicComponent(i.root?"AngleDownIcon":"AngleRightIcon"),{key:1,class:"p-submenu-icon"}))],64)):o.createCommentVNode("",!0)],10,f)),[[m]])],64))],40,I),r.isItemVisible(s)&&r.isItemGroup(s)?(o.openBlock(),o.createBlock(l,{key:0,menuId:i.menuId,role:"menu",class:"p-submenu-list",focusedItemId:i.focusedItemId,items:s.items,mobileActive:i.mobileActive,activeItemPath:i.activeItemPath,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,["menuId","focusedItemId","items","mobileActive","activeItemPath","templates","exact","level"])):o.createCommentVNode("",!0)],14,u)):o.createCommentVNode("",!0),r.isItemVisible(s)&&r.getItemProp(s,"separator")?(o.openBlock(),o.createElementBlock("li",{key:1,id:r.getItemId(s),style:o.normalizeStyle(r.getItemProp(s,"style")),class:o.normalizeClass(r.getSeparatorItemClass(s)),role:"separator"},null,14,v)):o.createCommentVNode("",!0)],64)))),128))])};var y={name:"Menubar",emits:["focus","blur"],props:{model:{type:Array,default:null},exact:{type:Boolean,default:!0},buttonProps:{type:null,default:null},"aria-labelledby":{type:String,default:null},"aria-label":{type:String,default:null}},data(){return{id:this.$attrs.id,mobileActive:!1,focused:!1,focusedItemInfo:{index:-1,level:0,parentKey:""},activeItemPath:[],dirty:!1}},watch:{"$attrs.id":function(e){this.id=e||t.UniqueComponentId()},activeItemPath(e){t.ObjectUtils.isNotEmpty(e)?(this.bindOutsideClickListener(),this.bindResizeListener()):(this.unbindOutsideClickListener(),this.unbindResizeListener())}},outsideClickListener:null,container:null,menubar:null,mounted(){this.id=this.id||t.UniqueComponentId()},beforeUnmount(){this.mobileActive=!1,this.unbindOutsideClickListener(),this.unbindResizeListener(),this.container&&t.ZIndexUtils.clear(this.container),this.container=null},methods:{getItemProp:(e,i)=>e?t.ObjectUtils.getItemValue(e[i]):void 0,getItemLabel(e){return this.getItemProp(e,"label")},isItemDisabled(e){return this.getItemProp(e,"disabled")},isItemGroup(e){return t.ObjectUtils.isNotEmpty(this.getItemProp(e,"items"))},isItemSeparator(e){return this.getItemProp(e,"separator")},getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0},isProccessedItemGroup:e=>e&&t.ObjectUtils.isNotEmpty(e.items),toggle(e){this.mobileActive?(this.mobileActive=!1,t.ZIndexUtils.clear(this.menubar),this.hide()):(this.mobileActive=!0,t.ZIndexUtils.set("menu",this.menubar,this.$primevue.config.zIndex.menu),setTimeout((()=>{this.show()}),0)),this.bindOutsideClickListener(),e.preventDefault()},show(){this.focusedItemInfo={index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},t.DomHandler.focus(this.menubar)},hide(e,i){this.mobileActive&&setTimeout((()=>{t.DomHandler.focus(this.$refs.menubutton)}),0),this.activeItemPath=[],this.focusedItemInfo={index:-1,level:0,parentKey:""},i&&t.DomHandler.focus(this.menubar),this.dirty=!1},onFocus(e){this.focused=!0,this.focusedItemInfo=-1!==this.focusedItemInfo.index?this.focusedItemInfo:{index:this.findFirstFocusedItemIndex(),level:0,parentKey:""},this.$emit("focus",e)},onBlur(e){this.focused=!1,this.focusedItemInfo={index:-1,level:0,parentKey:""},this.searchValue="",this.dirty=!1,this.$emit("blur",e)},onKeyDown(e){const i=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!i&&t.ObjectUtils.isPrintableCharacter(e.key)&&this.searchItems(e,e.key)}},onItemChange(e){const{processedItem:i,isFocus:s}=e;if(t.ObjectUtils.isEmpty(i))return;const{index:n,key:o,level:r,parentKey:a,items:l}=i,m=t.ObjectUtils.isNotEmpty(l),c=this.activeItemPath.filter((e=>e.parentKey!==a&&e.parentKey!==o));m&&c.push(i),this.focusedItemInfo={index:n,level:r,parentKey:a},this.activeItemPath=c,m&&(this.dirty=!0),s&&t.DomHandler.focus(this.menubar)},onItemClick(e){const{originalEvent:i,processedItem:s}=e,n=this.isProccessedItemGroup(s),o=t.ObjectUtils.isEmpty(s.parent);if(this.isSelected(s)){const{index:e,key:i,level:n,parentKey:r}=s;this.activeItemPath=this.activeItemPath.filter((e=>i!==e.key&&i.startsWith(e.key))),this.focusedItemInfo={index:e,level:n,parentKey:r},this.dirty=!o,t.DomHandler.focus(this.menubar)}else if(n)this.onItemChange(e);else{const e=o?s:this.activeItemPath.find((e=>""===e.parentKey));this.hide(i),this.changeFocusedItemIndex(i,e?e.index:-1),this.mobileActive=!1,t.DomHandler.focus(this.menubar)}},onItemMouseEnter(e){!this.mobileActive&&this.dirty&&this.onItemChange(e)},menuButtonClick(e){this.toggle(e)},menuButtonKeydown(e){("Enter"===e.code||"Space"===e.code)&&this.menuButtonClick(e)},onArrowDownKey(e){const i=this.visibleItems[this.focusedItemInfo.index];if(i?t.ObjectUtils.isEmpty(i.parent):null){this.isProccessedItemGroup(i)&&(this.onItemChange({originalEvent:e,processedItem:i}),this.focusedItemInfo={index:-1,parentKey:i.key},this.onArrowRightKey(e))}else{const t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}},onArrowUpKey(e){const i=this.visibleItems[this.focusedItemInfo.index];if(t.ObjectUtils.isEmpty(i.parent)){if(this.isProccessedItemGroup(i)){this.onItemChange({originalEvent:e,processedItem:i}),this.focusedItemInfo={index:-1,parentKey:i.key};const t=this.findLastItemIndex();this.changeFocusedItemIndex(e,t)}}else{const t=this.activeItemPath.find((e=>e.key===i.parentKey));if(0===this.focusedItemInfo.index)this.focusedItemInfo={index:-1,parentKey:t?t.parentKey:""},this.searchValue="",this.onArrowLeftKey(e),this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==this.focusedItemInfo.parentKey));else{const t=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t)}}e.preventDefault()},onArrowLeftKey(e){const t=this.visibleItems[this.focusedItemInfo.index],i=t?this.activeItemPath.find((e=>e.key===t.parentKey)):null;if(i)this.onItemChange({originalEvent:e,processedItem:i}),this.activeItemPath=this.activeItemPath.filter((e=>e.parentKey!==this.focusedItemInfo.parentKey)),e.preventDefault();else{const t=-1!==this.focusedItemInfo.index?this.findPrevItemIndex(this.focusedItemInfo.index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}},onArrowRightKey(e){const t=this.visibleItems[this.focusedItemInfo.index];if(t?this.activeItemPath.find((e=>e.key===t.parentKey)):null){this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo={index:-1,parentKey:t.key},this.onArrowDownKey(e))}else{const t=-1!==this.focusedItemInfo.index?this.findNextItemIndex(this.focusedItemInfo.index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}},onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()},onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()},onEnterKey(e){if(-1!==this.focusedItemInfo.index){const e=t.DomHandler.findSingle(this.menubar,`li[id="${this.focusedItemId}"]`),i=e&&t.DomHandler.findSingle(e,".p-menuitem-link");i?i.click():e&&e.click();const s=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(s)&&(this.focusedItemInfo.index=this.findFirstFocusedItemIndex())}e.preventDefault()},onSpaceKey(e){this.onEnterKey(e)},onEscapeKey(e){this.hide(e,!0),this.focusedItemInfo.index=this.findFirstFocusedItemIndex(),e.preventDefault()},onTabKey(e){if(-1!==this.focusedItemInfo.index){const t=this.visibleItems[this.focusedItemInfo.index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{const t=this.menubar!==e.target&&!this.menubar.contains(e.target),i=this.mobileActive&&this.$refs.menubutton!==e.target&&!this.$refs.menubutton.contains(e.target);t&&(i?this.mobileActive=!1:this.hide())},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindResizeListener(){this.resizeListener||(this.resizeListener=e=>{t.DomHandler.isTouchDevice()||this.hide(e,!0),this.mobileActive=!1},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(e){return this.activeItemPath.some((t=>t.key===e.key))},findFirstItemIndex(){return this.visibleItems.findIndex((e=>this.isValidItem(e)))},findLastItemIndex(){return t.ObjectUtils.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(e){const i=e>0?t.ObjectUtils.findLastIndex(this.visibleItems.slice(0,e),(e=>this.isValidItem(e))):-1;return i>-1?i:e},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},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.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>{this.searchValue="",this.searchTimeout=null}),500),s},changeFocusedItemIndex(e,t){this.focusedItemInfo.index!==t&&(this.focusedItemInfo.index=t,this.scrollInView())},scrollInView(e=-1){const i=-1!==e?`${this.id}_${e}`:this.focusedItemId,s=t.DomHandler.findSingle(this.menubar,`li[id="${i}"]`);s&&s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"start"})},createProcessedItems(e,t=0,i={},s=""){const n=[];return e&&e.forEach(((e,o)=>{const r=(""!==s?s+"_":"")+o,a={item:e,index:o,level:t,key:r,parent:i,parentKey:s};a.items=this.createProcessedItems(e.items,t+1,a,r),n.push(a)})),n},containerRef(e){this.container=e},menubarRef(e){this.menubar=e?e.$el:void 0}},computed:{containerClass(){return["p-menubar p-component",{"p-menubar-mobile-active":this.mobileActive}]},processedItems(){return this.createProcessedItems(this.model||[])},visibleItems(){const e=this.activeItemPath.find((e=>e.key===this.focusedItemInfo.parentKey));return e?e.items:this.processedItems},focusedItemId(){return-1!==this.focusedItemInfo.index?`${this.id}${t.ObjectUtils.isNotEmpty(this.focusedItemInfo.parentKey)?"_"+this.focusedItemInfo.parentKey:""}_${this.focusedItemInfo.index}`:null}},components:{MenubarSub:d,BarsIcon:a.default}};const g={key:0,class:"p-menubar-start"},k=["aria-haspopup","aria-expanded","aria-controls","aria-label"],x={key:2,class:"p-menubar-end"};return 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-menubar {\n display: flex;\n align-items: center;\n}\n.p-menubar ul {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.p-menubar .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-menubar .p-menuitem-text {\n line-height: 1;\n}\n.p-menubar .p-menuitem {\n position: relative;\n}\n.p-menubar-root-list {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n}\n.p-menubar-root-list > li ul {\n display: none;\n z-index: 1;\n}\n.p-menubar-root-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n}\n.p-menubar .p-submenu-list {\n display: none;\n position: absolute;\n z-index: 1;\n}\n.p-menubar .p-submenu-list > .p-menuitem-active > .p-submenu-list {\n display: block;\n left: 100%;\n top: 0;\n}\n.p-menubar .p-submenu-list .p-menuitem .p-menuitem-content .p-menuitem-link .p-submenu-icon {\n margin-left: auto;\n}\n.p-menubar .p-menubar-end {\n margin-left: auto;\n align-self: center;\n}\n.p-menubar-button {\n display: none;\n cursor: pointer;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n}\n"),y.render=function(e,t,i,s,n,r){const a=o.resolveComponent("BarsIcon"),l=o.resolveComponent("MenubarSub");return o.openBlock(),o.createElementBlock("div",{ref:r.containerRef,class:o.normalizeClass(r.containerClass)},[e.$slots.start?(o.openBlock(),o.createElementBlock("div",g,[o.renderSlot(e.$slots,"start")])):o.createCommentVNode("",!0),i.model&&i.model.length>0?(o.openBlock(),o.createElementBlock("a",o.mergeProps({key:1,ref:"menubutton",role:"button",tabindex:"0",class:"p-menubar-button","aria-haspopup":!!(i.model.length&&i.model.length>0),"aria-expanded":n.mobileActive,"aria-controls":n.id,"aria-label":e.$primevue.config.locale.aria.navigation,onClick:t[0]||(t[0]=e=>r.menuButtonClick(e)),onKeydown:t[1]||(t[1]=e=>r.menuButtonKeydown(e))},i.buttonProps),[o.renderSlot(e.$slots,"popupicon",{},(()=>[o.createVNode(a)]))],16,k)):o.createCommentVNode("",!0),o.createVNode(l,{ref:r.menubarRef,id:n.id,class:"p-menubar-root-list",role:"menubar",items:r.processedItems,templates:e.$slots,root:!0,mobileActive:n.mobileActive,tabindex:"0","aria-activedescendant":n.focused?r.focusedItemId:void 0,menuId:n.id,focusedItemId:n.focused?r.focusedItemId:void 0,activeItemPath:n.activeItemPath,exact:i.exact,level:0,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,onFocus:r.onFocus,onBlur:r.onBlur,onKeydown:r.onKeyDown,onItemClick:r.onItemClick,onItemMouseenter:r.onItemMouseEnter},null,8,["id","items","templates","mobileActive","aria-activedescendant","menuId","focusedItemId","activeItemPath","exact","aria-labelledby","aria-label","onFocus","onBlur","onKeydown","onItemClick","onItemMouseenter"]),e.$slots.end?(o.openBlock(),o.createElementBlock("div",x,[o.renderSlot(e.$slots,"end")])):o.createCommentVNode("",!0)],2)},y}(primevue.icons.bars,primevue.utils,primevue.icons.angledown,primevue.icons.angleright,primevue.ripple,Vue);