{"version":3,"file":"MenubarTrigger.cjs","sources":["../../src/Menubar/MenubarTrigger.vue"],"sourcesContent":["\n\n\n\n\n \n \n \n {\n // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)\n // but not when the control key is pressed (avoiding MacOS right click)\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n rootContext.onMenuOpen(menuContext.value);\n // prevent trigger focusing when opening\n // this allows the content to be given focus without competition\n if (!open) event.preventDefault();\n }\n }\"\n @pointerenter=\"() => {\n const menubarOpen = Boolean(rootContext.modelValue.value);\n if (menubarOpen && !open) {\n rootContext.onMenuOpen(menuContext.value);\n triggerElement?.focus()\n }\n }\"\n @keydown.enter.space.arrow-down=\"(event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) rootContext.onMenuToggle(menuContext.value);\n if (event.key === 'ArrowDown') rootContext.onMenuOpen(menuContext.value);\n // prevent keydown from scrolling window / first focused item to execute\n // that keydown (inadvertently closing the menu)\n if (['Enter', ' ', 'ArrowDown'].includes(event.key)) {\n menuContext.wasKeyboardTriggerOpenRef.value = true;\n event.preventDefault();\n }\n }\"\n @focus=\"isFocused = true\"\n @blur=\"isFocused = false\"\n >\n \n \n \n \n \n\n"],"names":["injectMenubarRootContext","injectMenubarMenuContext","useForwardExpose","useCollection","ref","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAA,MAAM,cAAcA,4CAAyB,EAAA;AAC7C,IAAA,MAAM,cAAcC,4CAAyB,EAAA;AAE7C,IAAA,MAAM,EAAE,UAAA,EAAY,cAAgB,EAAA,cAAA,KAAmBC,wCAAiB,EAAA;AACxE,IAAA,MAAM,EAAE,cAAe,EAAA,GAAIC,oCAAc,EAAE,GAAA,EAAK,WAAW,CAAA;AAE3D,IAAM,MAAA,SAAA,GAAYC,QAAI,KAAK,CAAA;AAE3B,IAAA,MAAM,OAAOC,YAAS,CAAA,MAAM,YAAY,UAAW,CAAA,KAAA,KAAU,YAAY,KAAK,CAAA;AAE9E,IAAAC,aAAA,CAAU,MAAM;AACd,MAAA,WAAA,CAAY,cAAiB,GAAA,cAAA;AAAA,KAC9B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}