@radix-ui/react-menubar 1.1.0-rc.3 → 1.1.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import * as MenuPrimitive from '@radix-ui/react-menu';
3
4
  import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
4
- import * as Radix from '@radix-ui/react-primitive';
5
5
  import { Primitive } from '@radix-ui/react-primitive';
6
6
  import { Scope as Scope$1 } from '@radix-ui/react-context';
7
7
 
8
- declare type Scope<C = any> = {
8
+ type Scope<C = any> = {
9
9
  [scopeName: string]: React.Context<C>[];
10
10
  } | undefined;
11
- declare type ScopeHook = (scope: Scope) => {
11
+ type ScopeHook = (scope: Scope) => {
12
12
  [__scopeProp: string]: Scope;
13
13
  };
14
14
  interface CreateScope {
@@ -16,12 +16,12 @@ interface CreateScope {
16
16
  (): ScopeHook;
17
17
  }
18
18
 
19
- declare type ScopedProps<P> = P & {
19
+ type ScopedProps<P> = P & {
20
20
  __scopeMenubar?: Scope$1;
21
21
  };
22
22
  declare const createMenubarScope: CreateScope;
23
- declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
24
- declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
23
+ type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
24
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
25
25
  interface MenubarProps extends PrimitiveDivProps {
26
26
  value?: string;
27
27
  defaultValue?: string;
@@ -35,54 +35,54 @@ interface MenubarMenuProps {
35
35
  children?: React.ReactNode;
36
36
  }
37
37
  declare const MenubarMenu: {
38
- (props: ScopedProps<MenubarMenuProps>): JSX.Element;
38
+ (props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
39
39
  displayName: string;
40
40
  };
41
- declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
41
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
42
42
  interface MenubarTriggerProps extends PrimitiveButtonProps {
43
43
  }
44
44
  declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
45
- declare type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
45
+ type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
46
46
  interface MenubarPortalProps extends MenuPortalProps {
47
47
  }
48
48
  declare const MenubarPortal: React.FC<MenubarPortalProps>;
49
- declare type MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
49
+ type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
50
50
  interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
51
51
  }
52
52
  declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
53
- declare type MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
53
+ type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
54
54
  interface MenubarGroupProps extends MenuGroupProps {
55
55
  }
56
56
  declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
57
- declare type MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
57
+ type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
58
58
  interface MenubarLabelProps extends MenuLabelProps {
59
59
  }
60
60
  declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
61
- declare type MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
61
+ type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
62
62
  interface MenubarItemProps extends MenuItemProps {
63
63
  }
64
64
  declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
65
- declare type MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
65
+ type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
66
66
  interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
67
67
  }
68
68
  declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
69
- declare type MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
69
+ type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
70
70
  interface MenubarRadioGroupProps extends MenuRadioGroupProps {
71
71
  }
72
72
  declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
73
- declare type MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
73
+ type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
74
74
  interface MenubarRadioItemProps extends MenuRadioItemProps {
75
75
  }
76
76
  declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
77
- declare type MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
77
+ type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
78
78
  interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
79
79
  }
80
80
  declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
81
- declare type MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
81
+ type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
82
82
  interface MenubarSeparatorProps extends MenuSeparatorProps {
83
83
  }
84
84
  declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
85
- declare type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
85
+ type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
86
86
  interface MenubarArrowProps extends MenuArrowProps {
87
87
  }
88
88
  declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
@@ -93,17 +93,17 @@ interface MenubarSubProps {
93
93
  onOpenChange?(open: boolean): void;
94
94
  }
95
95
  declare const MenubarSub: React.FC<MenubarSubProps>;
96
- declare type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
96
+ type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
97
97
  interface MenubarSubTriggerProps extends MenuSubTriggerProps {
98
98
  }
99
99
  declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
100
- declare type MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
100
+ type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
101
101
  interface MenubarSubContentProps extends MenuSubContentProps {
102
102
  }
103
103
  declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
104
104
  declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
105
105
  declare const Menu: {
106
- (props: ScopedProps<MenubarMenuProps>): JSX.Element;
106
+ (props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
107
107
  displayName: string;
108
108
  };
109
109
  declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import * as MenuPrimitive from '@radix-ui/react-menu';
3
4
  import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
4
- import * as Radix from '@radix-ui/react-primitive';
5
5
  import { Primitive } from '@radix-ui/react-primitive';
6
6
  import { Scope as Scope$1 } from '@radix-ui/react-context';
7
7
 
8
- declare type Scope<C = any> = {
8
+ type Scope<C = any> = {
9
9
  [scopeName: string]: React.Context<C>[];
10
10
  } | undefined;
11
- declare type ScopeHook = (scope: Scope) => {
11
+ type ScopeHook = (scope: Scope) => {
12
12
  [__scopeProp: string]: Scope;
13
13
  };
14
14
  interface CreateScope {
@@ -16,12 +16,12 @@ interface CreateScope {
16
16
  (): ScopeHook;
17
17
  }
18
18
 
19
- declare type ScopedProps<P> = P & {
19
+ type ScopedProps<P> = P & {
20
20
  __scopeMenubar?: Scope$1;
21
21
  };
22
22
  declare const createMenubarScope: CreateScope;
23
- declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
24
- declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
23
+ type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
24
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
25
25
  interface MenubarProps extends PrimitiveDivProps {
26
26
  value?: string;
27
27
  defaultValue?: string;
@@ -35,54 +35,54 @@ interface MenubarMenuProps {
35
35
  children?: React.ReactNode;
36
36
  }
37
37
  declare const MenubarMenu: {
38
- (props: ScopedProps<MenubarMenuProps>): JSX.Element;
38
+ (props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
39
39
  displayName: string;
40
40
  };
41
- declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
41
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
42
42
  interface MenubarTriggerProps extends PrimitiveButtonProps {
43
43
  }
44
44
  declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
45
- declare type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
45
+ type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
46
46
  interface MenubarPortalProps extends MenuPortalProps {
47
47
  }
48
48
  declare const MenubarPortal: React.FC<MenubarPortalProps>;
49
- declare type MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
49
+ type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
50
50
  interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
51
51
  }
52
52
  declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
53
- declare type MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
53
+ type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
54
54
  interface MenubarGroupProps extends MenuGroupProps {
55
55
  }
56
56
  declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
57
- declare type MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
57
+ type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
58
58
  interface MenubarLabelProps extends MenuLabelProps {
59
59
  }
60
60
  declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
61
- declare type MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
61
+ type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
62
62
  interface MenubarItemProps extends MenuItemProps {
63
63
  }
64
64
  declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
65
- declare type MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
65
+ type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
66
66
  interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
67
67
  }
68
68
  declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
69
- declare type MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
69
+ type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
70
70
  interface MenubarRadioGroupProps extends MenuRadioGroupProps {
71
71
  }
72
72
  declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
73
- declare type MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
73
+ type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
74
74
  interface MenubarRadioItemProps extends MenuRadioItemProps {
75
75
  }
76
76
  declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
77
- declare type MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
77
+ type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
78
78
  interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
79
79
  }
80
80
  declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
81
- declare type MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
81
+ type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
82
82
  interface MenubarSeparatorProps extends MenuSeparatorProps {
83
83
  }
84
84
  declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
85
- declare type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
85
+ type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
86
86
  interface MenubarArrowProps extends MenuArrowProps {
87
87
  }
88
88
  declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
@@ -93,17 +93,17 @@ interface MenubarSubProps {
93
93
  onOpenChange?(open: boolean): void;
94
94
  }
95
95
  declare const MenubarSub: React.FC<MenubarSubProps>;
96
- declare type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
96
+ type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
97
97
  interface MenubarSubTriggerProps extends MenuSubTriggerProps {
98
98
  }
99
99
  declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
100
- declare type MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
100
+ type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
101
101
  interface MenubarSubContentProps extends MenuSubContentProps {
102
102
  }
103
103
  declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
104
104
  declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
105
105
  declare const Menu: {
106
- (props: ScopedProps<MenubarMenuProps>): JSX.Element;
106
+ (props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
107
107
  displayName: string;
108
108
  };
109
109
  declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/Menubar.tsx"],
4
- "sourcesContent": ["'use client';\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} 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> = 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<MenubarContextValue>(MENUBAR_NAME);\n\ntype MenubarElement = React.ElementRef<typeof Primitive.div>;\ntype RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\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<MenubarElement, MenubarProps>(\n (props: ScopedProps<MenubarProps>, 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<string | null>(null);\n\n return (\n <MenubarContextProvider\n scope={__scopeMenubar}\n value={value}\n onMenuOpen={React.useCallback(\n (value) => {\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 <Collection.Provider scope={__scopeMenubar}>\n <Collection.Slot scope={__scopeMenubar}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation=\"horizontal\"\n loop={loop}\n dir={direction}\n currentTabStopId={currentTabStopId}\n onCurrentTabStopIdChange={setCurrentTabStopId}\n >\n <Primitive.div role=\"menubar\" {...menubarProps} ref={forwardedRef} />\n </RovingFocusGroup.Root>\n </Collection.Slot>\n </Collection.Provider>\n </MenubarContextProvider>\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<MenubarTriggerElement>;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject<boolean>;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext<MenubarMenuContextValue>(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps<MenubarMenuProps>) => {\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<MenubarTriggerElement>(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 <MenubarMenuProvider\n scope={__scopeMenubar}\n value={value}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n wasKeyboardTriggerOpenRef={wasKeyboardTriggerOpenRef}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={(open) => {\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 </MenubarMenuProvider>\n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n (props: ScopedProps<MenubarTriggerProps>, 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<MenubarTriggerElement>(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 <Collection.ItemSlot scope={__scopeMenubar} value={menuContext.value} disabled={disabled}>\n <RovingFocusGroup.Item\n asChild\n {...rovingFocusGroupScope}\n focusable={!disabled}\n tabStopId={menuContext.value}\n >\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n role=\"menuitem\"\n id={menuContext.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuContext.contentId : undefined}\n data-highlighted={isFocused ? '' : undefined}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composedRefs}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\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 </MenuPrimitive.Anchor>\n </RovingFocusGroup.Item>\n </Collection.ItemSlot>\n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC<MenubarPortalProps> = (props: ScopedProps<MenubarPortalProps>) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n (props: ScopedProps<MenubarContentProps>, 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 <MenuPrimitive.Content\n id={menuContext.contentId}\n aria-labelledby={menuContext.triggerId}\n data-radix-menubar-content=\"\"\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n align={align}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\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<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef<MenubarGroupElement, MenubarGroupProps>(\n (props: ScopedProps<MenubarGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n (props: ScopedProps<MenubarLabelProps>, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n (props: ScopedProps<MenubarItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n (props: ScopedProps<MenubarCheckboxItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef<MenubarRadioGroupElement, MenubarRadioGroupProps>(\n (props: ScopedProps<MenubarRadioGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n (props: ScopedProps<MenubarRadioItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps<MenubarItemIndicatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n (props: ScopedProps<MenubarSeparatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef<MenubarArrowElement, MenubarArrowProps>(\n (props: ScopedProps<MenubarArrowProps>, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\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<MenubarSubProps> = (props: ScopedProps<MenubarSubProps>) => {\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 <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n (props: ScopedProps<MenubarSubTriggerProps>, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n <MenuPrimitive.SubTrigger\n data-radix-menubar-subtrigger=\"\"\n {...menuScope}\n {...subTriggerProps}\n ref={forwardedRef}\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<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n (props: ScopedProps<MenubarSubContentProps>, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n data-radix-menubar-content=\"\"\n {...subContentProps}\n ref={forwardedRef}\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\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<T>(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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,iBAAAC;AAAA,EAAA,WAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,8BAAiC;AACjC,6BAA6B;AAC7B,uBAAqC;AACrC,gCAAgC;AAChC,2BAAmC;AACnC,sBAAsB;AACtB,oBAA+B;AAC/B,wBAAgC;AAChC,uBAAkC;AAClC,gCAA4C;AAC5C,6BAA0B;AAC1B,0CAAqC;AA8GvB;AAnGd,IAAM,eAAe;AAGrB,IAAM,CAAC,YAAY,e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AAA,EAC9B,CAAC,OAA4C,iBAAiB;AAC5D,UAAM,EAAE,gBAAgB,GAAG,gBAAgB,IAAI;AAC/C,UAAM,YAAY,aAAa,cAAc;AAE7C,WACE;AAAA,MAAe;AAAA,MAAd;AAAA,QACE,GAAG;AAAA,QACJ,8BAA2B;AAAA,QAC1B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA;AAAA,UAET,GAAG;AAAA,YACD,4CAA4C;AAAA,YAC5C,2CAA2C;AAAA,YAC3C,4CAA4C;AAAA,YAC5C,iCAAiC;AAAA,YACjC,kCAAkC;AAAA,UACpC;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAQhC,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAI,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAC;AAC3E;AAEA,IAAMC,QAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
4
+ "sourcesContent": ["'use client';\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} 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';\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> = 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<MenubarContextValue>(MENUBAR_NAME);\n\ntype MenubarElement = React.ElementRef<typeof Primitive.div>;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\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<MenubarElement, MenubarProps>(\n (props: ScopedProps<MenubarProps>, 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<string | null>(null);\n\n return (\n <MenubarContextProvider\n scope={__scopeMenubar}\n value={value}\n onMenuOpen={React.useCallback(\n (value) => {\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 <Collection.Provider scope={__scopeMenubar}>\n <Collection.Slot scope={__scopeMenubar}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation=\"horizontal\"\n loop={loop}\n dir={direction}\n currentTabStopId={currentTabStopId}\n onCurrentTabStopIdChange={setCurrentTabStopId}\n >\n <Primitive.div role=\"menubar\" {...menubarProps} ref={forwardedRef} />\n </RovingFocusGroup.Root>\n </Collection.Slot>\n </Collection.Provider>\n </MenubarContextProvider>\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<MenubarTriggerElement>;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject<boolean>;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext<MenubarMenuContextValue>(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps<MenubarMenuProps>) => {\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<MenubarTriggerElement>(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 <MenubarMenuProvider\n scope={__scopeMenubar}\n value={value}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n wasKeyboardTriggerOpenRef={wasKeyboardTriggerOpenRef}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={(open) => {\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 </MenubarMenuProvider>\n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n (props: ScopedProps<MenubarTriggerProps>, 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<MenubarTriggerElement>(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 <Collection.ItemSlot scope={__scopeMenubar} value={menuContext.value} disabled={disabled}>\n <RovingFocusGroup.Item\n asChild\n {...rovingFocusGroupScope}\n focusable={!disabled}\n tabStopId={menuContext.value}\n >\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n role=\"menuitem\"\n id={menuContext.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuContext.contentId : undefined}\n data-highlighted={isFocused ? '' : undefined}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composedRefs}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\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 </MenuPrimitive.Anchor>\n </RovingFocusGroup.Item>\n </Collection.ItemSlot>\n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC<MenubarPortalProps> = (props: ScopedProps<MenubarPortalProps>) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n (props: ScopedProps<MenubarContentProps>, 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 <MenuPrimitive.Content\n id={menuContext.contentId}\n aria-labelledby={menuContext.triggerId}\n data-radix-menubar-content=\"\"\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n align={align}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\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<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef<MenubarGroupElement, MenubarGroupProps>(\n (props: ScopedProps<MenubarGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n (props: ScopedProps<MenubarLabelProps>, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n (props: ScopedProps<MenubarItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n (props: ScopedProps<MenubarCheckboxItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef<MenubarRadioGroupElement, MenubarRadioGroupProps>(\n (props: ScopedProps<MenubarRadioGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n (props: ScopedProps<MenubarRadioItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps<MenubarItemIndicatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n (props: ScopedProps<MenubarSeparatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef<MenubarArrowElement, MenubarArrowProps>(\n (props: ScopedProps<MenubarArrowProps>, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\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<MenubarSubProps> = (props: ScopedProps<MenubarSubProps>) => {\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 <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n (props: ScopedProps<MenubarSubTriggerProps>, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n <MenuPrimitive.SubTrigger\n data-radix-menubar-subtrigger=\"\"\n {...menuScope}\n {...subTriggerProps}\n ref={forwardedRef}\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<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n (props: ScopedProps<MenubarSubContentProps>, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n data-radix-menubar-content=\"\"\n {...subContentProps}\n ref={forwardedRef}\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\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<T>(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"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA,oBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,aAAAC;AAAA,EAAA,YAAAC;AAAA,EAAA,qBAAAC;AAAA,E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AAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
6
6
  "names": ["Arrow", "CheckboxItem", "Content", "Group", "Item", "ItemIndicator", "Label", "Portal", "RadioGroup", "RadioItem", "Root", "Separator", "Sub", "SubContent", "SubTrigger", "value", "open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/Menubar.tsx"],
4
- "sourcesContent": ["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> = 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<MenubarContextValue>(MENUBAR_NAME);\n\ntype MenubarElement = React.ElementRef<typeof Primitive.div>;\ntype RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\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<MenubarElement, MenubarProps>(\n (props: ScopedProps<MenubarProps>, 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<string | null>(null);\n\n return (\n <MenubarContextProvider\n scope={__scopeMenubar}\n value={value}\n onMenuOpen={React.useCallback(\n (value) => {\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 <Collection.Provider scope={__scopeMenubar}>\n <Collection.Slot scope={__scopeMenubar}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation=\"horizontal\"\n loop={loop}\n dir={direction}\n currentTabStopId={currentTabStopId}\n onCurrentTabStopIdChange={setCurrentTabStopId}\n >\n <Primitive.div role=\"menubar\" {...menubarProps} ref={forwardedRef} />\n </RovingFocusGroup.Root>\n </Collection.Slot>\n </Collection.Provider>\n </MenubarContextProvider>\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<MenubarTriggerElement>;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject<boolean>;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext<MenubarMenuContextValue>(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps<MenubarMenuProps>) => {\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<MenubarTriggerElement>(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 <MenubarMenuProvider\n scope={__scopeMenubar}\n value={value}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n wasKeyboardTriggerOpenRef={wasKeyboardTriggerOpenRef}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={(open) => {\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 </MenubarMenuProvider>\n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n (props: ScopedProps<MenubarTriggerProps>, 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<MenubarTriggerElement>(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 <Collection.ItemSlot scope={__scopeMenubar} value={menuContext.value} disabled={disabled}>\n <RovingFocusGroup.Item\n asChild\n {...rovingFocusGroupScope}\n focusable={!disabled}\n tabStopId={menuContext.value}\n >\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n role=\"menuitem\"\n id={menuContext.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuContext.contentId : undefined}\n data-highlighted={isFocused ? '' : undefined}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composedRefs}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\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 </MenuPrimitive.Anchor>\n </RovingFocusGroup.Item>\n </Collection.ItemSlot>\n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC<MenubarPortalProps> = (props: ScopedProps<MenubarPortalProps>) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n (props: ScopedProps<MenubarContentProps>, 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 <MenuPrimitive.Content\n id={menuContext.contentId}\n aria-labelledby={menuContext.triggerId}\n data-radix-menubar-content=\"\"\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n align={align}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\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<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef<MenubarGroupElement, MenubarGroupProps>(\n (props: ScopedProps<MenubarGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n (props: ScopedProps<MenubarLabelProps>, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n (props: ScopedProps<MenubarItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n (props: ScopedProps<MenubarCheckboxItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef<MenubarRadioGroupElement, MenubarRadioGroupProps>(\n (props: ScopedProps<MenubarRadioGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n (props: ScopedProps<MenubarRadioItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps<MenubarItemIndicatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n (props: ScopedProps<MenubarSeparatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef<MenubarArrowElement, MenubarArrowProps>(\n (props: ScopedProps<MenubarArrowProps>, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\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<MenubarSubProps> = (props: ScopedProps<MenubarSubProps>) => {\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 <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n (props: ScopedProps<MenubarSubTriggerProps>, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n <MenuPrimitive.SubTrigger\n data-radix-menubar-subtrigger=\"\"\n {...menuScope}\n {...subTriggerProps}\n ref={forwardedRef}\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<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n (props: ScopedProps<MenubarSubContentProps>, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n data-radix-menubar-content=\"\"\n {...subContentProps}\n ref={forwardedRef}\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\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<T>(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,\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AAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
4
+ "sourcesContent": ["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';\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> = 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<MenubarContextValue>(MENUBAR_NAME);\n\ntype MenubarElement = React.ElementRef<typeof Primitive.div>;\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\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<MenubarElement, MenubarProps>(\n (props: ScopedProps<MenubarProps>, 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<string | null>(null);\n\n return (\n <MenubarContextProvider\n scope={__scopeMenubar}\n value={value}\n onMenuOpen={React.useCallback(\n (value) => {\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 <Collection.Provider scope={__scopeMenubar}>\n <Collection.Slot scope={__scopeMenubar}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation=\"horizontal\"\n loop={loop}\n dir={direction}\n currentTabStopId={currentTabStopId}\n onCurrentTabStopIdChange={setCurrentTabStopId}\n >\n <Primitive.div role=\"menubar\" {...menubarProps} ref={forwardedRef} />\n </RovingFocusGroup.Root>\n </Collection.Slot>\n </Collection.Provider>\n </MenubarContextProvider>\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<MenubarTriggerElement>;\n contentId: string;\n wasKeyboardTriggerOpenRef: React.MutableRefObject<boolean>;\n};\n\nconst [MenubarMenuProvider, useMenubarMenuContext] =\n createMenubarContext<MenubarMenuContextValue>(MENU_NAME);\n\ninterface MenubarMenuProps {\n value?: string;\n children?: React.ReactNode;\n}\n\nconst MenubarMenu = (props: ScopedProps<MenubarMenuProps>) => {\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<MenubarTriggerElement>(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 <MenubarMenuProvider\n scope={__scopeMenubar}\n value={value}\n triggerId={useId()}\n triggerRef={triggerRef}\n contentId={useId()}\n wasKeyboardTriggerOpenRef={wasKeyboardTriggerOpenRef}\n >\n <MenuPrimitive.Root\n {...menuScope}\n open={open}\n onOpenChange={(open) => {\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 </MenubarMenuProvider>\n );\n};\n\nMenubarMenu.displayName = MENU_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'MenubarTrigger';\n\ntype MenubarTriggerElement = React.ElementRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface MenubarTriggerProps extends PrimitiveButtonProps {}\n\nconst MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(\n (props: ScopedProps<MenubarTriggerProps>, 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<MenubarTriggerElement>(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 <Collection.ItemSlot scope={__scopeMenubar} value={menuContext.value} disabled={disabled}>\n <RovingFocusGroup.Item\n asChild\n {...rovingFocusGroupScope}\n focusable={!disabled}\n tabStopId={menuContext.value}\n >\n <MenuPrimitive.Anchor asChild {...menuScope}>\n <Primitive.button\n type=\"button\"\n role=\"menuitem\"\n id={menuContext.triggerId}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={open ? menuContext.contentId : undefined}\n data-highlighted={isFocused ? '' : undefined}\n data-state={open ? 'open' : 'closed'}\n data-disabled={disabled ? '' : undefined}\n disabled={disabled}\n {...triggerProps}\n ref={composedRefs}\n onPointerDown={composeEventHandlers(props.onPointerDown, (event) => {\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 </MenuPrimitive.Anchor>\n </RovingFocusGroup.Item>\n </Collection.ItemSlot>\n );\n }\n);\n\nMenubarTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'MenubarPortal';\n\ntype MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;\ninterface MenubarPortalProps extends MenuPortalProps {}\n\nconst MenubarPortal: React.FC<MenubarPortalProps> = (props: ScopedProps<MenubarPortalProps>) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Portal {...menuScope} {...portalProps} />;\n};\n\nMenubarPortal.displayName = PORTAL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'MenubarContent';\n\ntype MenubarContentElement = React.ElementRef<typeof MenuPrimitive.Content>;\ntype MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;\ninterface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {}\n\nconst MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(\n (props: ScopedProps<MenubarContentProps>, 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 <MenuPrimitive.Content\n id={menuContext.contentId}\n aria-labelledby={menuContext.triggerId}\n data-radix-menubar-content=\"\"\n {...menuScope}\n {...contentProps}\n ref={forwardedRef}\n align={align}\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\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<typeof MenuPrimitive.Group>;\ntype MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;\ninterface MenubarGroupProps extends MenuGroupProps {}\n\nconst MenubarGroup = React.forwardRef<MenubarGroupElement, MenubarGroupProps>(\n (props: ScopedProps<MenubarGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Group {...menuScope} {...groupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarGroup.displayName = GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarLabel\n * -----------------------------------------------------------------------------------------------*/\n\nconst LABEL_NAME = 'MenubarLabel';\n\ntype MenubarLabelElement = React.ElementRef<typeof MenuPrimitive.Label>;\ntype MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;\ninterface MenubarLabelProps extends MenuLabelProps {}\n\nconst MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(\n (props: ScopedProps<MenubarLabelProps>, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Label {...menuScope} {...labelProps} ref={forwardedRef} />;\n }\n);\n\nMenubarLabel.displayName = LABEL_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'MenubarItem';\n\ntype MenubarItemElement = React.ElementRef<typeof MenuPrimitive.Item>;\ntype MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;\ninterface MenubarItemProps extends MenuItemProps {}\n\nconst MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(\n (props: ScopedProps<MenubarItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Item {...menuScope} {...itemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarItem.displayName = ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarCheckboxItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst CHECKBOX_ITEM_NAME = 'MenubarCheckboxItem';\n\ntype MenubarCheckboxItemElement = React.ElementRef<typeof MenuPrimitive.CheckboxItem>;\ntype MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;\ninterface MenubarCheckboxItemProps extends MenuCheckboxItemProps {}\n\nconst MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(\n (props: ScopedProps<MenubarCheckboxItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.CheckboxItem {...menuScope} {...checkboxItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_GROUP_NAME = 'MenubarRadioGroup';\n\ntype MenubarRadioGroupElement = React.ElementRef<typeof MenuPrimitive.RadioGroup>;\ntype MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;\ninterface MenubarRadioGroupProps extends MenuRadioGroupProps {}\n\nconst MenubarRadioGroup = React.forwardRef<MenubarRadioGroupElement, MenubarRadioGroupProps>(\n (props: ScopedProps<MenubarRadioGroupProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioGroup {...menuScope} {...radioGroupProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarRadioItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst RADIO_ITEM_NAME = 'MenubarRadioItem';\n\ntype MenubarRadioItemElement = React.ElementRef<typeof MenuPrimitive.RadioItem>;\ntype MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;\ninterface MenubarRadioItemProps extends MenuRadioItemProps {}\n\nconst MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(\n (props: ScopedProps<MenubarRadioItemProps>, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.RadioItem {...menuScope} {...radioItemProps} ref={forwardedRef} />;\n }\n);\n\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarItemIndicator\n * -----------------------------------------------------------------------------------------------*/\n\nconst INDICATOR_NAME = 'MenubarItemIndicator';\n\ntype MenubarItemIndicatorElement = React.ElementRef<typeof MenuPrimitive.ItemIndicator>;\ntype MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;\ninterface MenubarItemIndicatorProps extends MenuItemIndicatorProps {}\n\nconst MenubarItemIndicator = React.forwardRef<\n MenubarItemIndicatorElement,\n MenubarItemIndicatorProps\n>((props: ScopedProps<MenubarItemIndicatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.ItemIndicator {...menuScope} {...itemIndicatorProps} ref={forwardedRef} />;\n});\n\nMenubarItemIndicator.displayName = INDICATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'MenubarSeparator';\n\ntype MenubarSeparatorElement = React.ElementRef<typeof MenuPrimitive.Separator>;\ntype MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;\ninterface MenubarSeparatorProps extends MenuSeparatorProps {}\n\nconst MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(\n (props: ScopedProps<MenubarSeparatorProps>, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Separator {...menuScope} {...separatorProps} ref={forwardedRef} />;\n }\n);\n\nMenubarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'MenubarArrow';\n\ntype MenubarArrowElement = React.ElementRef<typeof MenuPrimitive.Arrow>;\ntype MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;\ninterface MenubarArrowProps extends MenuArrowProps {}\n\nconst MenubarArrow = React.forwardRef<MenubarArrowElement, MenubarArrowProps>(\n (props: ScopedProps<MenubarArrowProps>, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return <MenuPrimitive.Arrow {...menuScope} {...arrowProps} ref={forwardedRef} />;\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<MenubarSubProps> = (props: ScopedProps<MenubarSubProps>) => {\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 <MenuPrimitive.Sub {...menuScope} open={open} onOpenChange={setOpen}>\n {children}\n </MenuPrimitive.Sub>\n );\n};\n\nMenubarSub.displayName = SUB_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * MenubarSubTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst SUB_TRIGGER_NAME = 'MenubarSubTrigger';\n\ntype MenubarSubTriggerElement = React.ElementRef<typeof MenuPrimitive.SubTrigger>;\ntype MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;\ninterface MenubarSubTriggerProps extends MenuSubTriggerProps {}\n\nconst MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(\n (props: ScopedProps<MenubarSubTriggerProps>, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return (\n <MenuPrimitive.SubTrigger\n data-radix-menubar-subtrigger=\"\"\n {...menuScope}\n {...subTriggerProps}\n ref={forwardedRef}\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<typeof MenuPrimitive.Content>;\ntype MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;\ninterface MenubarSubContentProps extends MenuSubContentProps {}\n\nconst MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(\n (props: ScopedProps<MenubarSubContentProps>, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n\n return (\n <MenuPrimitive.SubContent\n {...menuScope}\n data-radix-menubar-content=\"\"\n {...subContentProps}\n ref={forwardedRef}\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\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<T>(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"],
5
+ "mappings": ";;;AAAA,YAAY,WAAW;AACvB,SAAS,wBAAwB;AACjC,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,aAAa;AACtB,YAAY,mBAAmB;AAC/B,SAAS,uBAAuB;AAChC,YAAY,sBAAsB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AA6GvB;AAnGd,IAAM,eAAe;AAGrB,IAAM,CAAC,YAAY,eAAe,qBAAqB,IAAI,iBAGzD,YAAY;AAGd,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,cAAc;AAAA,EAClF;AAAA,EACA;AACF,CAAC;AAED,IAAM,eAAe,g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,QACE,GAAG;AAAA,QACJ,8BAA2B;AAAA,QAC1B,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,OAAO;AAAA,UACL,GAAG,MAAM;AAAA;AAAA,UAET,GAAG;AAAA,YACD,4CAA4C;AAAA,YAC5C,2CAA2C;AAAA,YAC3C,4CAA4C;AAAA,YAC5C,iCAAiC;AAAA,YACjC,kCAAkC;AAAA,UACpC;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,kBAAkB,cAAc;AAQhC,SAAS,UAAa,OAAY,YAAoB;AACpD,SAAO,MAAM,IAAI,CAAC,GAAG,UAAU,OAAO,aAAa,SAAS,MAAM,MAAM,CAAC;AAC3E;AAEA,IAAMC,QAAO;AACb,IAAM,OAAO;AACb,IAAM,UAAU;AAChB,IAAMC,UAAS;AACf,IAAMC,WAAU;AAChB,IAAMC,SAAQ;AACd,IAAMC,SAAQ;AACd,IAAMC,QAAO;AACb,IAAMC,gBAAe;AACrB,IAAMC,cAAa;AACnB,IAAMC,aAAY;AAClB,IAAMC,iBAAgB;AACtB,IAAMC,aAAY;AAClB,IAAMC,SAAQ;AACd,IAAMC,OAAM;AACZ,IAAMC,cAAa;AACnB,IAAMC,cAAa;",
6
6
  "names": ["value", "open", "Root", "Portal", "Content", "Group", "Label", "Item", "CheckboxItem", "RadioGroup", "RadioItem", "ItemIndicator", "Separator", "Arrow", "Sub", "SubTrigger", "SubContent"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-menubar",
3
- "version": "1.1.0-rc.3",
3
+ "version": "1.1.0-rc.4",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": {
@@ -28,22 +28,22 @@
28
28
  "version": "yarn version"
29
29
  },
30
30
  "dependencies": {
31
- "@radix-ui/primitive": "1.1.0-rc.3",
32
- "@radix-ui/react-collection": "1.1.0-rc.3",
33
- "@radix-ui/react-compose-refs": "1.1.0-rc.3",
34
- "@radix-ui/react-context": "1.1.0-rc.3",
35
- "@radix-ui/react-direction": "1.1.0-rc.3",
36
- "@radix-ui/react-id": "1.1.0-rc.3",
37
- "@radix-ui/react-menu": "2.1.0-rc.3",
38
- "@radix-ui/react-primitive": "1.1.0-rc.3",
39
- "@radix-ui/react-roving-focus": "1.1.0-rc.3",
40
- "@radix-ui/react-use-controllable-state": "1.1.0-rc.3"
31
+ "@radix-ui/primitive": "1.1.0-rc.4",
32
+ "@radix-ui/react-collection": "1.1.0-rc.4",
33
+ "@radix-ui/react-compose-refs": "1.1.0-rc.4",
34
+ "@radix-ui/react-context": "1.1.0-rc.4",
35
+ "@radix-ui/react-direction": "1.1.0-rc.4",
36
+ "@radix-ui/react-id": "1.1.0-rc.4",
37
+ "@radix-ui/react-menu": "2.1.0-rc.4",
38
+ "@radix-ui/react-primitive": "2.0.0-rc.1",
39
+ "@radix-ui/react-roving-focus": "1.1.0-rc.4",
40
+ "@radix-ui/react-use-controllable-state": "1.1.0-rc.4"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@types/react": "*",
44
44
  "@types/react-dom": "*",
45
- "react": "^16.8 || ^17.0 || ^18.0",
46
- "react-dom": "^16.8 || ^17.0 || ^18.0"
45
+ "react": "^16.8 || ^17.0 || ^18.0 || ^19.0",
46
+ "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "@types/react": {