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MkB,yCAAU,GAAGjB,yCAAnB,AAAA;;ADhsBA","sources":["packages/react/menubar/src/index.ts","packages/react/menubar/src/Menubar.tsx"],"sourcesContent":["export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './Menubar';\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './Menubar';\n","import * as React from 'react';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\nimport type * as Radix from '@radix-ui/react-primitive';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Menubar\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENUBAR_NAME = 'Menubar';\n\ntype ItemData = { value: string; disabled: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenubarTriggerElement,\n ItemData\n>(MENUBAR_NAME);\n\ntype ScopedProps

= P & { __scopeMenubar?: Scope };\nconst [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [\n createCollectionScope,\n createRovingFocusGroupScope,\n]);\n\nconst useMenuScope = createMenuScope();\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\n\ntype MenubarContextValue = {\n value: string;\n dir: Direction;\n loop: boolean;\n onMenuOpen(value: string): void;\n onMenuClose(): void;\n onMenuToggle(value: string): void;\n};\n\nconst [MenubarContextProvider, useMenubarContext] =\n createMenubarContext(MENUBAR_NAME);\n\ntype MenubarElement = React.ElementRef;\ntype RovingFocusGroupProps = Radix.ComponentPropsWithoutRef;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarProps extends PrimitiveDivProps {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Menubar = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const {\n __scopeMenubar,\n value: valueProp,\n onValueChange,\n defaultValue,\n loop = true,\n dir,\n ...menubarProps\n } = props;\n const direction = useDirection(dir);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const [value = '', setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue,\n });\n\n // We need to manage tab stop id manually as `RovingFocusGroup` updates the stop\n // based on focus, and in some situations our triggers won't ever be given focus\n // (e.g. click to open and then outside to close)\n const [currentTabStopId, setCurrentTabStopId] = React.useState(null);\n\n return (\n {\n setValue(value);\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n onMenuClose={React.useCallback(() => setValue(''), [setValue])}\n onMenuToggle={React.useCallback(\n (value) => {\n setValue((prevValue) => (Boolean(prevValue) ? '' : value));\n // `openMenuOpen` and `onMenuToggle` are called exclusively so we\n // need to update the id in either case.\n setCurrentTabStopId(value);\n },\n [setValue]\n )}\n dir={direction}\n loop={loop}\n >\n \n \n \n \n \n \n \n \n );\n }\n);\n\nMenubar.displayName = MENUBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarMenu\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENU_NAME = 'MenubarMenu';\n\ntype MenubarMenuContextValue = {\n value: string;\n triggerId: string;\n triggerRef: React.RefObject;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps) => {\n const { __scopeMenubar, value: valueProp, ...menuProps } = props;\n const autoValue = useId();\n // We need to provide an initial deterministic value as `useId` will return\n // empty string on the first render and we don't want to match our internal \"closed\" value.\n const value = valueProp || autoValue || 'LEGACY_REACT_AUTO_VALUE';\n const context = useMenubarContext(MENU_NAME, __scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const triggerRef = React.useRef(null);\n const wasKeyboardTriggerOpenRef = React.useRef(false);\n const open = context.value === value;\n\n React.useEffect(() => {\n if (!open) wasKeyboardTriggerOpenRef.current = false;\n }, [open]);\n\n return (\n \n {\n // Menu only calls `onOpenChange` when dismissing so we\n // want to close our MenuBar based on the same events.\n if (!open) context.onMenuClose();\n }}\n modal={false}\n dir={context.dir}\n {...menuProps}\n />\n \n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ElementRef;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, disabled = false, ...triggerProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);\n const [isFocused, setIsFocused] = React.useState(false);\n const open = context.value === menuContext.value;\n\n return (\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 context.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 onPointerEnter={composeEventHandlers(props.onPointerEnter, () => {\n const menubarOpen = Boolean(context.value);\n if (menubarOpen && !open) {\n context.onMenuOpen(menuContext.value);\n ref.current?.focus();\n }\n })}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if (['Enter', ' '].includes(event.key)) context.onMenuToggle(menuContext.value);\n if (event.key === 'ArrowDown') context.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.current = true;\n event.preventDefault();\n }\n })}\n onFocus={composeEventHandlers(props.onFocus, () => setIsFocused(true))}\n onBlur={composeEventHandlers(props.onBlur, () => setIsFocused(false))}\n />\n \n \n \n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ElementRef;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarContentProps extends Omit {}\n\nconst MenubarContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, align = 'start', ...contentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);\n const getItems = useCollection(__scopeMenubar);\n const hasInteractedOutsideRef = React.useRef(false);\n\n return (\n {\n const menubarOpen = Boolean(context.value);\n if (!menubarOpen && !hasInteractedOutsideRef.current) {\n menuContext.triggerRef.current?.focus();\n }\n\n hasInteractedOutsideRef.current = false;\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n })}\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) => {\n const target = event.target as HTMLElement;\n const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target));\n if (isMenubarTrigger) event.preventDefault();\n })}\n onInteractOutside={composeEventHandlers(props.onInteractOutside, () => {\n hasInteractedOutsideRef.current = true;\n })}\n onEntryFocus={(event) => {\n if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();\n }}\n onKeyDown={composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if (['ArrowRight', 'ArrowLeft'].includes(event.key)) {\n const target = event.target as HTMLElement;\n const targetIsSubTrigger = target.hasAttribute('data-radix-menubar-subtrigger');\n const isKeyDownInsideSubMenu =\n target.closest('[data-radix-menubar-content]') !== event.currentTarget;\n\n const prevMenuKey = context.dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n const isPrevKey = prevMenuKey === event.key;\n const isNextKey = !isPrevKey;\n\n // Prevent navigation when we're opening a submenu\n if (isNextKey && targetIsSubTrigger) return;\n // or we're inside a submenu and are moving backwards to close it\n if (isKeyDownInsideSubMenu && isPrevKey) return;\n\n const items = getItems().filter((item) => !item.disabled);\n let candidateValues = items.map((item) => item.value);\n if (isPrevKey) candidateValues.reverse();\n\n const currentIndex = candidateValues.indexOf(menuContext.value);\n\n candidateValues = context.loop\n ? wrapArray(candidateValues, currentIndex + 1)\n : candidateValues.slice(currentIndex + 1);\n\n const [nextValue] = candidateValues;\n if (nextValue) context.onMenuOpen(nextValue);\n }\n },\n { checkForDefaultPrevented: false }\n )}\n style={{\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n '--radix-menubar-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-menubar-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-menubar-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-menubar-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-menubar-trigger-height': 'var(--radix-popper-anchor-height)',\n },\n }}\n />\n );\n }\n);\n\nMenubarContent.displayName = CONTENT_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'MenubarGroup';\n\ntype MenubarGroupElement = React.ElementRef;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ElementRef;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ElementRef;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ElementRef;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ElementRef;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ElementRef;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ElementRef;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ElementRef;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ElementRef;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return ;\n }\n);\n\nMenubarArrow.displayName = ARROW_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSub\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_NAME = 'MenubarSub';\n\ninterface MenubarSubProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenubarSub: React.FC = (props: ScopedProps) => {\n const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n\n return (\n \n {children}\n \n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ElementRef;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n \n );\n }\n);\n\nMenubarSubTrigger.displayName = SUB_TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_CONTENT_NAME = 'MenubarSubContent';\n\ntype MenubarSubContentElement = React.ElementRef;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef(\n (props: ScopedProps, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n \n );\n }\n);\n\nMenubarSubContent.displayName = SUB_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray(array: T[], startIndex: number) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\nconst Root = Menubar;\nconst Menu = MenubarMenu;\nconst Trigger = MenubarTrigger;\nconst Portal = MenubarPortal;\nconst Content = MenubarContent;\nconst Group = MenubarGroup;\nconst Label = MenubarLabel;\nconst Item = MenubarItem;\nconst CheckboxItem = MenubarCheckboxItem;\nconst RadioGroup = MenubarRadioGroup;\nconst RadioItem = MenubarRadioItem;\nconst ItemIndicator = MenubarItemIndicator;\nconst Separator = MenubarSeparator;\nconst Arrow = MenubarArrow;\nconst Sub = MenubarSub;\nconst SubTrigger = MenubarSubTrigger;\nconst SubContent = MenubarSubContent;\n\nexport {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n};\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n};\n"],"names":["createMenubarScope","Menubar","MenubarMenu","MenubarTrigger","MenubarPortal","MenubarContent","MenubarGroup","MenubarLabel","MenubarItem","MenubarCheckboxItem","MenubarRadioGroup","MenubarRadioItem","MenubarItemIndicator","MenubarSeparator","MenubarArrow","MenubarSub","MenubarSubTrigger","MenubarSubContent","Root","Menu","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","React","createCollection","useDirection","composeEventHandlers","useComposedRefs","createContextScope","useId","MenuPrimitive","createMenuScope","RovingFocusGroup","createRovingFocusGroupScope","Primitive","useControllableState","MENUBAR_NAME","Collection","useCollection","createCollectionScope","createMenubarContext","useMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","rovingFocusGroupScope","setValue","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","useCallback","prevValue","Boolean","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","menuProps","autoValue","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","onMenuClose","TRIGGER_NAME","disabled","triggerProps","menuContext","ref","composedRefs","isFocused","setIsFocused","triggerId","contentId","undefined","onPointerDown","event","button","ctrlKey","onMenuOpen","preventDefault","onPointerEnter","menubarOpen","focus","onKeyDown","includes","key","onMenuToggle","onFocus","onBlur","PORTAL_NAME","portalProps","CONTENT_NAME","align","contentProps","getItems","hasInteractedOutsideRef","onCloseAutoFocus","onFocusOutside","target","isMenubarTrigger","some","item","contains","onInteractOutside","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","prevMenuKey","isPrevKey","isNextKey","items","filter","candidateValues","map","reverse","currentIndex","indexOf","wrapArray","slice","nextValue","checkForDefaultPrevented","style","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","SUB_NAME","children","openProp","onOpenChange","defaultOpen","setOpen","SUB_TRIGGER_NAME","subTriggerProps","SUB_CONTENT_NAME","subContentProps","array","startIndex","_","index","length"],"version":3,"file":"index.mjs.map"}