@radix-ui/react-menubar 1.0.0-rc.1 → 1.0.0-rc.3

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.ts CHANGED
@@ -74,13 +74,13 @@ type MenuArrowProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>
74
74
  export interface MenubarArrowProps extends MenuArrowProps {
75
75
  }
76
76
  export const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
77
- export interface MenubarSubMenuProps {
77
+ export interface MenubarSubProps {
78
78
  children?: React.ReactNode;
79
79
  open?: boolean;
80
80
  defaultOpen?: boolean;
81
81
  onOpenChange?(open: boolean): void;
82
82
  }
83
- export const MenubarSubMenu: React.FC<MenubarSubMenuProps>;
83
+ export const MenubarSub: React.FC<MenubarSubProps>;
84
84
  type MenuSubTriggerProps = Radix.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
85
85
  export interface MenubarSubTriggerProps extends MenuSubTriggerProps {
86
86
  }
@@ -106,7 +106,7 @@ export const RadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps &
106
106
  export const ItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
107
107
  export const Separator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
108
108
  export const Arrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
109
- export const SubMenu: React.FC<MenubarSubMenuProps>;
109
+ export const Sub: React.FC<MenubarSubProps>;
110
110
  export const SubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
111
111
  export const SubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
112
112
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;AA+BA,iBAAiB,CAAC,IAA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B,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACpC;AAED,OAAA,MAAM,gBAAgB,MAAM,EAAE,CAAC,mBAAmB,CAcjD,CAAC;AASF,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,uCAAiC,SAAQ,mBAAmB;CAAG;AAE/D,OAAA,MAAM,gHAaL,CAAC;AAWF,2BAA2B,MAAM,wBAAwB,CAAC,OAAO,cAAc,UAAU,CAAC,CAAC;AAC3F,uCAAiC,SAAQ,mBAAmB;CAAG;AAE/D,OAAA,MAAM,gHAoBL,CAAC;AAcF,OAAA,MAAM,yFAAc,CAAC;AACrB,OAAA,MAAM;YAxgBsB,YAAY,gBAAgB,CAAC;;CAwgBjC,CAAC;AACzB,OAAA,MAAM,sGAAwB,CAAC;AAC/B,OAAA,MAAM,oCAAsB,CAAC;AAC7B,OAAA,MAAM,mGAAwB,CAAC;AAC/B,OAAA,MAAM,+FAAoB,CAAC;AAC3B,OAAA,MAAM,+FAAoB,CAAC;AAC3B,OAAA,MAAM,6FAAkB,CAAC;AACzB,OAAA,MAAM,6GAAkC,CAAC;AACzC,OAAA,MAAM,yGAA8B,CAAC;AACrC,OAAA,MAAM,uGAA4B,CAAC;AACnC,OAAA,MAAM,gHAAoC,CAAC;AAC3C,OAAA,MAAM,uGAA4B,CAAC;AACnC,OAAA,MAAM,8FAAoB,CAAC;AAC3B,OAAA,MAAM,sCAAwB,CAAC;AAC/B,OAAA,MAAM,yGAA8B,CAAC;AACrC,OAAA,MAAM,yGAA8B,CAAC","sources":["packages/react/menubar/src/packages/react/menubar/src/Menubar.tsx","packages/react/menubar/src/packages/react/menubar/src/index.ts","packages/react/menubar/src/index.ts"],"sourcesContent":[null,null,"export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSubMenu,\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 SubMenu,\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 MenubarSubMenuProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './Menubar';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;;AA+BA,iBAAiB,CAAC,IAAI,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AACrD,OAAA,yFAGE,CAAC;AAkBH,6BAA6B,MAAM,wBAAwB,CAAC,OAAO,iBAAiB,IAAI,CAAC,CAAC;AAC1F,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,6BAAuB,SAAQ,iBAAiB;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;CACpC;AAED,OAAA,MAAM,4FAkEL,CAAC;AAqBF;IACE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CA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A,MAAM,+FAAoB,CAAC;AAC3B,OAAA,MAAM,+FAAoB,CAAC;AAC3B,OAAA,MAAM,6FAAkB,CAAC;AACzB,OAAA,MAAM,6GAAkC,CAAC;AACzC,OAAA,MAAM,yGAA8B,CAAC;AACrC,OAAA,MAAM,uGAA4B,CAAC;AACnC,OAAA,MAAM,gHAAoC,CAAC;AAC3C,OAAA,MAAM,uGAA4B,CAAC;AACnC,OAAA,MAAM,8FAAoB,CAAC;AAC3B,OAAA,MAAM,8BAAgB,CAAC;AACvB,OAAA,MAAM,yGAA8B,CAAC;AACrC,OAAA,MAAM,yGAA8B,CAAC","sources":["packages/react/menubar/src/packages/react/menubar/src/Menubar.tsx","packages/react/menubar/src/packages/react/menubar/src/index.ts","packages/react/menubar/src/index.ts"],"sourcesContent":[null,null,"export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './Menubar';\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './Menubar';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ $parcel$export(module.exports, "MenubarRadioItem", () => $f5560139001bae38$expor
33
33
  $parcel$export(module.exports, "MenubarItemIndicator", () => $f5560139001bae38$export$63e15a0e2af5a57);
34
34
  $parcel$export(module.exports, "MenubarSeparator", () => $f5560139001bae38$export$588aef9e7b5183b5);
35
35
  $parcel$export(module.exports, "MenubarArrow", () => $f5560139001bae38$export$474b9891f5b9e633);
36
- $parcel$export(module.exports, "MenubarSubMenu", () => $f5560139001bae38$export$e19edd7963476d53);
36
+ $parcel$export(module.exports, "MenubarSub", () => $f5560139001bae38$export$ed0be551778c493a);
37
37
  $parcel$export(module.exports, "MenubarSubTrigger", () => $f5560139001bae38$export$1820ea18a1dfed3c);
38
38
  $parcel$export(module.exports, "MenubarSubContent", () => $f5560139001bae38$export$1b21e255bb3e4f7f);
39
39
  $parcel$export(module.exports, "Root", () => $f5560139001bae38$export$be92b6f5f03c0fe9);
@@ -50,7 +50,7 @@ $parcel$export(module.exports, "RadioItem", () => $f5560139001bae38$export$371ab
50
50
  $parcel$export(module.exports, "ItemIndicator", () => $f5560139001bae38$export$c3468e2714d175fa);
51
51
  $parcel$export(module.exports, "Separator", () => $f5560139001bae38$export$1ff3c3f08ae963c0);
52
52
  $parcel$export(module.exports, "Arrow", () => $f5560139001bae38$export$21b07c8f274aebd5);
53
- $parcel$export(module.exports, "SubMenu", () => $f5560139001bae38$export$a9c522a6d7beb830);
53
+ $parcel$export(module.exports, "Sub", () => $f5560139001bae38$export$d7a01e11500dfb6f);
54
54
  $parcel$export(module.exports, "SubTrigger", () => $f5560139001bae38$export$2ea8a7a591ac5eac);
55
55
  $parcel$export(module.exports, "SubContent", () => $f5560139001bae38$export$6d4de93b380beddf);
56
56
 
@@ -459,8 +459,9 @@ const $f5560139001bae38$export$474b9891f5b9e633 = /*#__PURE__*/ $fIWtd$react.for
459
459
  displayName: $f5560139001bae38$var$ARROW_NAME
460
460
  });
461
461
  /* -------------------------------------------------------------------------------------------------
462
- * MenubarSubMenu
463
- * -----------------------------------------------------------------------------------------------*/ const $f5560139001bae38$export$e19edd7963476d53 = (props)=>{
462
+ * MenubarSub
463
+ * -----------------------------------------------------------------------------------------------*/ const $f5560139001bae38$var$SUB_NAME = 'MenubarSub';
464
+ const $f5560139001bae38$export$ed0be551778c493a = (props)=>{
464
465
  const { __scopeMenubar: __scopeMenubar , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
465
466
  const menuScope = $f5560139001bae38$var$useMenuScope(__scopeMenubar);
466
467
  const [open = false, setOpen] = $fIWtd$radixuireactusecontrollablestate.useControllableState({
@@ -473,6 +474,9 @@ const $f5560139001bae38$export$474b9891f5b9e633 = /*#__PURE__*/ $fIWtd$react.for
473
474
  onOpenChange: setOpen
474
475
  }), children);
475
476
  };
477
+ /*#__PURE__*/ Object.assign($f5560139001bae38$export$ed0be551778c493a, {
478
+ displayName: $f5560139001bae38$var$SUB_NAME
479
+ });
476
480
  /* -------------------------------------------------------------------------------------------------
477
481
  * MenubarSubTrigger
478
482
  * -----------------------------------------------------------------------------------------------*/ const $f5560139001bae38$var$SUB_TRIGGER_NAME = 'MenubarSubTrigger';
@@ -529,7 +533,7 @@ const $f5560139001bae38$export$371ab307eab489c0 = $f5560139001bae38$export$7d2f4
529
533
  const $f5560139001bae38$export$c3468e2714d175fa = $f5560139001bae38$export$63e15a0e2af5a57;
530
534
  const $f5560139001bae38$export$1ff3c3f08ae963c0 = $f5560139001bae38$export$588aef9e7b5183b5;
531
535
  const $f5560139001bae38$export$21b07c8f274aebd5 = $f5560139001bae38$export$474b9891f5b9e633;
532
- const $f5560139001bae38$export$a9c522a6d7beb830 = $f5560139001bae38$export$e19edd7963476d53;
536
+ const $f5560139001bae38$export$d7a01e11500dfb6f = $f5560139001bae38$export$ed0be551778c493a;
533
537
  const $f5560139001bae38$export$2ea8a7a591ac5eac = $f5560139001bae38$export$1820ea18a1dfed3c;
534
538
  const $f5560139001bae38$export$6d4de93b380beddf = $f5560139001bae38$export$1b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MAAA,CAAA,MAAA,CAAA,yCAAA,EAAA;IAAA,WAAA,EAAA,sCAAA;CAAA,CAAA,CAAA;AAEA,oGAAA,CAEA;;;GAGA,CACA,SAASJ,+BAAT,CAAsBgC,KAAtB,EAAkCC,UAAlC,EAAsD;IACpD,OAAOD,KAAK,CAACpC,GAAN,CAAU,CAACsC,CAAD,EAAIC,KAAJ,GAAcH,KAAK,CAAC,AAACC,CAAAA,UAAU,GAAGE,KAAd,CAAA,GAAuBH,KAAK,CAACI,MAA9B,CAA7B;IAAA,CAAP,CAAA;CACD;AAED,MAAMxK,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAM,GAAGjB,yCAAf,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,wCAAd,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAY,GAAGjB,yCAArB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAa,GAAGjB,wCAAtB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;;ADlrBA","sources":["packages/react/menubar/src/index.ts","packages/react/menubar/src/Menubar.tsx"],"sourcesContent":["export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSubMenu,\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 SubMenu,\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 MenubarSubMenuProps,\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 * MenubarSubMenu\n * -----------------------------------------------------------------------------------------------*/\n\ninterface MenubarSubMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenubarSubMenu: React.FC<MenubarSubMenuProps> = (props: ScopedProps<MenubarSubMenuProps>) => {\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\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 SubMenu = MenubarSubMenu;\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 MenubarSubMenu,\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 SubMenu,\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 MenubarSubMenuProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n};\n"],"names":["createMenubarScope","Menubar","MenubarMenu","MenubarTrigger","MenubarPortal","MenubarContent","MenubarGroup","MenubarLabel","MenubarItem","MenubarCheckboxItem","MenubarRadioGroup","MenubarRadioItem","MenubarItemIndicator","MenubarSeparator","MenubarArrow","MenubarSubMenu","MenubarSubTrigger","MenubarSubContent","Root","Menu","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","SubMenu","SubTrigger","SubContent","React","createCollection","useDirection","composeEventHandlers","useComposedRefs","createContextScope","useId","MenuPrimitive","createMenuScope","RovingFocusGroup","createRovingFocusGroupScope","Primitive","useControllableState","MENUBAR_NAME","Collection","useCollection","createCollectionScope","createMenubarContext","useMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","rovingFocusGroupScope","setValue","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","useCallback","prevValue","Boolean","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","menuProps","autoValue","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","onMenuClose","TRIGGER_NAME","disabled","triggerProps","menuContext","ref","composedRefs","isFocused","setIsFocused","triggerId","contentId","undefined","onPointerDown","event","button","ctrlKey","onMenuOpen","preventDefault","onPointerEnter","menubarOpen","focus","onKeyDown","includes","key","onMenuToggle","onFocus","onBlur","PORTAL_NAME","portalProps","CONTENT_NAME","align","contentProps","getItems","hasInteractedOutsideRef","onCloseAutoFocus","onFocusOutside","target","isMenubarTrigger","some","item","contains","onInteractOutside","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","prevMenuKey","isPrevKey","isNextKey","items","filter","candidateValues","map","reverse","currentIndex","indexOf","wrapArray","slice","nextValue","checkForDefaultPrevented","style","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","children","openProp","onOpenChange","defaultOpen","setOpen","SUB_TRIGGER_NAME","subTriggerProps","SUB_CONTENT_NAME","subContentProps","array","startIndex","_","index","length"],"version":3,"file":"index.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esContent":["export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './Menubar';\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './Menubar';\n","import * as React from 'react';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\nimport type * as Radix from '@radix-ui/react-primitive';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Menubar\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENUBAR_NAME = 'Menubar';\n\ntype ItemData = { value: string; disabled: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenubarTriggerElement,\n ItemData\n>(MENUBAR_NAME);\n\ntype ScopedProps<P> = 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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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"],"names":["createMenubarScope","Menubar","MenubarMenu","MenubarTrigger","MenubarPortal","MenubarContent","MenubarGroup","MenubarLabel","MenubarItem","MenubarCheckboxItem","MenubarRadioGroup","MenubarRadioItem","MenubarItemIndicator","MenubarSeparator","MenubarArrow","MenubarSub","MenubarSubTrigger","MenubarSubContent","Root","Menu","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","React","createCollection","useDirection","composeEventHandlers","useComposedRefs","createContextScope","useId","MenuPrimitive","createMenuScope","RovingFocusGroup","createRovingFocusGroupScope","Primitive","useControllableState","MENUBAR_NAME","Collection","useCollection","createCollectionScope","createMenubarContext","useMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","rovingFocusGroupScope","setValue","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","useCallback","prevValue","Boolean","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","menuProps","autoValue","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","onMenuClose","TRIGGER_NAME","disabled","triggerProps","menuContext","ref","composedRefs","isFocused","setIsFocused","triggerId","contentId","undefined","onPointerDown","event","button","ctrlKey","onMenuOpen","preventDefault","onPointerEnter","menubarOpen","focus","onKeyDown","includes","key","onMenuToggle","onFocus","onBlur","PORTAL_NAME","portalProps","CONTENT_NAME","align","contentProps","getItems","hasInteractedOutsideRef","onCloseAutoFocus","onFocusOutside","target","isMenubarTrigger","some","item","contains","onInteractOutside","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","prevMenuKey","isPrevKey","isNextKey","items","filter","candidateValues","map","reverse","currentIndex","indexOf","wrapArray","slice","nextValue","checkForDefaultPrevented","style","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","SUB_NAME","children","openProp","onOpenChange","defaultOpen","setOpen","SUB_TRIGGER_NAME","subTriggerProps","SUB_CONTENT_NAME","subContentProps","array","startIndex","_","index","length"],"version":3,"file":"index.js.map"}
@@ -417,8 +417,9 @@ const $0520064cdfc1bd2d$export$474b9891f5b9e633 = /*#__PURE__*/ $jLgaT$forwardRe
417
417
  displayName: $0520064cdfc1bd2d$var$ARROW_NAME
418
418
  });
419
419
  /* -------------------------------------------------------------------------------------------------
420
- * MenubarSubMenu
421
- * -----------------------------------------------------------------------------------------------*/ const $0520064cdfc1bd2d$export$e19edd7963476d53 = (props)=>{
420
+ * MenubarSub
421
+ * -----------------------------------------------------------------------------------------------*/ const $0520064cdfc1bd2d$var$SUB_NAME = 'MenubarSub';
422
+ const $0520064cdfc1bd2d$export$ed0be551778c493a = (props)=>{
422
423
  const { __scopeMenubar: __scopeMenubar , children: children , open: openProp , onOpenChange: onOpenChange , defaultOpen: defaultOpen } = props;
423
424
  const menuScope = $0520064cdfc1bd2d$var$useMenuScope(__scopeMenubar);
424
425
  const [open = false, setOpen] = $jLgaT$useControllableState({
@@ -431,6 +432,9 @@ const $0520064cdfc1bd2d$export$474b9891f5b9e633 = /*#__PURE__*/ $jLgaT$forwardRe
431
432
  onOpenChange: setOpen
432
433
  }), children);
433
434
  };
435
+ /*#__PURE__*/ Object.assign($0520064cdfc1bd2d$export$ed0be551778c493a, {
436
+ displayName: $0520064cdfc1bd2d$var$SUB_NAME
437
+ });
434
438
  /* -------------------------------------------------------------------------------------------------
435
439
  * MenubarSubTrigger
436
440
  * -----------------------------------------------------------------------------------------------*/ const $0520064cdfc1bd2d$var$SUB_TRIGGER_NAME = 'MenubarSubTrigger';
@@ -487,12 +491,12 @@ const $0520064cdfc1bd2d$export$371ab307eab489c0 = $0520064cdfc1bd2d$export$7d2f4
487
491
  const $0520064cdfc1bd2d$export$c3468e2714d175fa = $0520064cdfc1bd2d$export$63e15a0e2af5a57;
488
492
  const $0520064cdfc1bd2d$export$1ff3c3f08ae963c0 = $0520064cdfc1bd2d$export$588aef9e7b5183b5;
489
493
  const $0520064cdfc1bd2d$export$21b07c8f274aebd5 = $0520064cdfc1bd2d$export$474b9891f5b9e633;
490
- const $0520064cdfc1bd2d$export$a9c522a6d7beb830 = $0520064cdfc1bd2d$export$e19edd7963476d53;
494
+ const $0520064cdfc1bd2d$export$d7a01e11500dfb6f = $0520064cdfc1bd2d$export$ed0be551778c493a;
491
495
  const $0520064cdfc1bd2d$export$2ea8a7a591ac5eac = $0520064cdfc1bd2d$export$1820ea18a1dfed3c;
492
496
  const $0520064cdfc1bd2d$export$6d4de93b380beddf = $0520064cdfc1bd2d$export$1b21e255bb3e4f7f;
493
497
 
494
498
 
495
499
 
496
500
 
497
- export {$0520064cdfc1bd2d$export$7a4049d5555b545c as createMenubarScope, $0520064cdfc1bd2d$export$7d4583da7581e674 as Menubar, $0520064cdfc1bd2d$export$c777b394d551050b as MenubarMenu, $0520064cdfc1bd2d$export$df05cd234081ebd5 as MenubarTrigger, $0520064cdfc1bd2d$export$a98ed304d621e164 as MenubarPortal, $0520064cdfc1bd2d$export$f42a00bc8a46c161 as MenubarContent, $0520064cdfc1bd2d$export$7669e79198e0f2eb as MenubarGroup, $0520064cdfc1bd2d$export$39935c5b19a4b4e as MenubarLabel, $0520064cdfc1bd2d$export$92f903c8c91c291c as MenubarItem, $0520064cdfc1bd2d$export$372384eccd27af53 as MenubarCheckboxItem, $0520064cdfc1bd2d$export$94dfa2322f330fdb as MenubarRadioGroup, $0520064cdfc1bd2d$export$7d2f467b4a7f68d8 as MenubarRadioItem, $0520064cdfc1bd2d$export$63e15a0e2af5a57 as MenubarItemIndicator, $0520064cdfc1bd2d$export$588aef9e7b5183b5 as MenubarSeparator, $0520064cdfc1bd2d$export$474b9891f5b9e633 as MenubarArrow, $0520064cdfc1bd2d$export$e19edd7963476d53 as MenubarSubMenu, $0520064cdfc1bd2d$export$1820ea18a1dfed3c as MenubarSubTrigger, $0520064cdfc1bd2d$export$1b21e255bb3e4f7f as MenubarSubContent, $0520064cdfc1bd2d$export$be92b6f5f03c0fe9 as Root, $0520064cdfc1bd2d$export$d9b273488cd8ce6f as Menu, $0520064cdfc1bd2d$export$41fb9f06171c75f4 as Trigger, $0520064cdfc1bd2d$export$602eac185826482c as Portal, $0520064cdfc1bd2d$export$7c6e2c02157bb7d2 as Content, $0520064cdfc1bd2d$export$eb2fcfdbd7ba97d4 as Group, $0520064cdfc1bd2d$export$b04be29aa201d4f5 as Label, $0520064cdfc1bd2d$export$6d08773d2e66f8f2 as Item, $0520064cdfc1bd2d$export$16ce288f89fa631c as CheckboxItem, $0520064cdfc1bd2d$export$a98f0dcb43a68a25 as RadioGroup, $0520064cdfc1bd2d$export$371ab307eab489c0 as RadioItem, $0520064cdfc1bd2d$export$c3468e2714d175fa as ItemIndicator, $0520064cdfc1bd2d$export$1ff3c3f08ae963c0 as Separator, $0520064cdfc1bd2d$export$21b07c8f274aebd5 as Arrow, $0520064cdfc1bd2d$export$a9c522a6d7beb830 as SubMenu, $0520064cdfc1bd2d$export$2ea8a7a591ac5eac as SubTrigger, $0520064cdfc1bd2d$export$6d4de93b380beddf as SubContent};
501
+ export {$0520064cdfc1bd2d$export$7a4049d5555b545c as createMenubarScope, $0520064cdfc1bd2d$export$7d4583da7581e674 as Menubar, $0520064cdfc1bd2d$export$c777b394d551050b as MenubarMenu, $0520064cdfc1bd2d$export$df05cd234081ebd5 as MenubarTrigger, $0520064cdfc1bd2d$export$a98ed304d621e164 as MenubarPortal, $0520064cdfc1bd2d$export$f42a00bc8a46c161 as MenubarContent, $0520064cdfc1bd2d$export$7669e79198e0f2eb as MenubarGroup, $0520064cdfc1bd2d$export$39935c5b19a4b4e as MenubarLabel, $0520064cdfc1bd2d$export$92f903c8c91c291c as MenubarItem, $0520064cdfc1bd2d$export$372384eccd27af53 as MenubarCheckboxItem, $0520064cdfc1bd2d$export$94dfa2322f330fdb as MenubarRadioGroup, $0520064cdfc1bd2d$export$7d2f467b4a7f68d8 as MenubarRadioItem, $0520064cdfc1bd2d$export$63e15a0e2af5a57 as MenubarItemIndicator, $0520064cdfc1bd2d$export$588aef9e7b5183b5 as MenubarSeparator, $0520064cdfc1bd2d$export$474b9891f5b9e633 as MenubarArrow, $0520064cdfc1bd2d$export$ed0be551778c493a as MenubarSub, $0520064cdfc1bd2d$export$1820ea18a1dfed3c as MenubarSubTrigger, $0520064cdfc1bd2d$export$1b21e255bb3e4f7f as MenubarSubContent, $0520064cdfc1bd2d$export$be92b6f5f03c0fe9 as Root, $0520064cdfc1bd2d$export$d9b273488cd8ce6f as Menu, $0520064cdfc1bd2d$export$41fb9f06171c75f4 as Trigger, $0520064cdfc1bd2d$export$602eac185826482c as Portal, $0520064cdfc1bd2d$export$7c6e2c02157bb7d2 as Content, $0520064cdfc1bd2d$export$eb2fcfdbd7ba97d4 as Group, $0520064cdfc1bd2d$export$b04be29aa201d4f5 as Label, $0520064cdfc1bd2d$export$6d08773d2e66f8f2 as Item, $0520064cdfc1bd2d$export$16ce288f89fa631c as CheckboxItem, $0520064cdfc1bd2d$export$a98f0dcb43a68a25 as RadioGroup, $0520064cdfc1bd2d$export$371ab307eab489c0 as RadioItem, $0520064cdfc1bd2d$export$c3468e2714d175fa as ItemIndicator, $0520064cdfc1bd2d$export$1ff3c3f08ae963c0 as Separator, $0520064cdfc1bd2d$export$21b07c8f274aebd5 as Arrow, $0520064cdfc1bd2d$export$d7a01e11500dfb6f as Sub, $0520064cdfc1bd2d$export$2ea8a7a591ac5eac as SubTrigger, $0520064cdfc1bd2d$export$6d4de93b380beddf as SubContent};
498
502
  //# sourceMappingURL=index.module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;A;;;;;;;;;;;;;;ACmBA;;oGAEA,CAEA,MAAMgD,kCAAY,GAAG,SAArB,AAAA;AAGA,MAAM,CAACC,gCAAD,EAAaC,mCAAb,EAA4BC,2CAA5B,CAAA,GAAqDf,uBAAgB,CAGzEY,kCAHyE,CAA3E,AAAA;AAMA,MAAM,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,MAAMxK,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAM,GAAGjB,yCAAf,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,wCAAd,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAY,GAAGjB,yCAArB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAa,GAAGjB,wCAAtB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;;ADlrBA","sources":["packages/react/menubar/src/index.ts","packages/react/menubar/src/Menubar.tsx"],"sourcesContent":["export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSubMenu,\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 SubMenu,\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 MenubarSubMenuProps,\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 * MenubarSubMenu\n * -----------------------------------------------------------------------------------------------*/\n\ninterface MenubarSubMenuProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n}\n\nconst MenubarSubMenu: React.FC<MenubarSubMenuProps> = (props: ScopedProps<MenubarSubMenuProps>) => {\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\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 SubMenu = MenubarSubMenu;\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 MenubarSubMenu,\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 SubMenu,\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 MenubarSubMenuProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n};\n"],"names":["createMenubarScope","Menubar","MenubarMenu","MenubarTrigger","MenubarPortal","MenubarContent","MenubarGroup","MenubarLabel","MenubarItem","MenubarCheckboxItem","MenubarRadioGroup","MenubarRadioItem","MenubarItemIndicator","MenubarSeparator","MenubarArrow","MenubarSubMenu","MenubarSubTrigger","MenubarSubContent","Root","Menu","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","SubMenu","SubTrigger","SubContent","React","createCollection","useDirection","composeEventHandlers","useComposedRefs","createContextScope","useId","MenuPrimitive","createMenuScope","RovingFocusGroup","createRovingFocusGroupScope","Primitive","useControllableState","MENUBAR_NAME","Collection","useCollection","createCollectionScope","createMenubarContext","useMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","rovingFocusGroupScope","setValue","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","useCallback","prevValue","Boolean","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","menuProps","autoValue","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","onMenuClose","TRIGGER_NAME","disabled","triggerProps","menuContext","ref","composedRefs","isFocused","setIsFocused","triggerId","contentId","undefined","onPointerDown","event","button","ctrlKey","onMenuOpen","preventDefault","onPointerEnter","menubarOpen","focus","onKeyDown","includes","key","onMenuToggle","onFocus","onBlur","PORTAL_NAME","portalProps","CONTENT_NAME","align","contentProps","getItems","hasInteractedOutsideRef","onCloseAutoFocus","onFocusOutside","target","isMenubarTrigger","some","item","contains","onInteractOutside","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","prevMenuKey","isPrevKey","isNextKey","items","filter","candidateValues","map","reverse","currentIndex","indexOf","wrapArray","slice","nextValue","checkForDefaultPrevented","style","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","children","openProp","onOpenChange","defaultOpen","setOpen","SUB_TRIGGER_NAME","subTriggerProps","SUB_CONTENT_NAME","subContentProps","array","startIndex","_","index","length"],"version":3,"file":"index.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;A;;;;;;;;;;;;;;ACmBA;;oGAEA,CAEA,MAAMgD,kCAAY,GAAG,SAArB,AAAA;AAGA,MAAM,CAACC,gCAAD,EAAaC,mCAAb,EAA4BC,2CAA5B,CAAA,GAAqDf,uBAAgB,CAGzEY,kCAHyE,CAA3E,AAAA;AAMA,MAAM,CAACI,0CAAD,EAAuBpD,yCAAvB,CAAA,GAA6CwC,yBAAkB,CAACQ,kCAAD,EAAe;IAClFG,2CADkF;IAElFN,kCAFkF;CAAf,CAArE,AA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CAAP,CAAA;CACD;AAED,MAAMzK,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAM,GAAGjB,yCAAf,AAAA;AACA,MAAMkB,yCAAO,GAAGjB,yCAAhB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,wCAAd,AAAA;AACA,MAAMkB,yCAAI,GAAGjB,yCAAb,AAAA;AACA,MAAMkB,yCAAY,GAAGjB,yCAArB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAa,GAAGjB,wCAAtB,AAAA;AACA,MAAMkB,yCAAS,GAAGjB,yCAAlB,AAAA;AACA,MAAMkB,yCAAK,GAAGjB,yCAAd,AAAA;AACA,MAAMkB,yCAAG,GAAGjB,yCAAZ,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;AACA,MAAMkB,yCAAU,GAAGjB,yCAAnB,AAAA;;ADtrBA","sources":["packages/react/menubar/src/index.ts","packages/react/menubar/src/Menubar.tsx"],"sourcesContent":["export {\n createMenubarScope,\n //\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarPortal,\n MenubarContent,\n MenubarGroup,\n MenubarLabel,\n MenubarItem,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarItemIndicator,\n MenubarSeparator,\n MenubarArrow,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n //\n Root,\n Menu,\n Trigger,\n Portal,\n Content,\n Group,\n Label,\n Item,\n CheckboxItem,\n RadioGroup,\n RadioItem,\n ItemIndicator,\n Separator,\n Arrow,\n Sub,\n SubTrigger,\n SubContent,\n} from './Menubar';\nexport type {\n MenubarProps,\n MenubarMenuProps,\n MenubarTriggerProps,\n MenubarPortalProps,\n MenubarContentProps,\n MenubarGroupProps,\n MenubarLabelProps,\n MenubarItemProps,\n MenubarCheckboxItemProps,\n MenubarRadioGroupProps,\n MenubarRadioItemProps,\n MenubarItemIndicatorProps,\n MenubarSeparatorProps,\n MenubarArrowProps,\n MenubarSubProps,\n MenubarSubTriggerProps,\n MenubarSubContentProps,\n} from './Menubar';\n","import * as React from 'react';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useDirection } from '@radix-ui/react-direction';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport * as MenuPrimitive from '@radix-ui/react-menu';\nimport { createMenuScope } from '@radix-ui/react-menu';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\n\nimport type { Scope } from '@radix-ui/react-context';\nimport type * as Radix from '@radix-ui/react-primitive';\n\ntype Direction = 'ltr' | 'rtl';\n\n/* -------------------------------------------------------------------------------------------------\n * Menubar\n * -----------------------------------------------------------------------------------------------*/\n\nconst MENUBAR_NAME = 'Menubar';\n\ntype ItemData = { value: string; disabled: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n MenubarTriggerElement,\n ItemData\n>(MENUBAR_NAME);\n\ntype ScopedProps<P> = 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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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 property\n ['--radix-menubar-content-transform-origin' as any]:\n 'var(--radix-popper-transform-origin)',\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"],"names":["createMenubarScope","Menubar","MenubarMenu","MenubarTrigger","MenubarPortal","MenubarContent","MenubarGroup","MenubarLabel","MenubarItem","MenubarCheckboxItem","MenubarRadioGroup","MenubarRadioItem","MenubarItemIndicator","MenubarSeparator","MenubarArrow","MenubarSub","MenubarSubTrigger","MenubarSubContent","Root","Menu","Trigger","Portal","Content","Group","Label","Item","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","React","createCollection","useDirection","composeEventHandlers","useComposedRefs","createContextScope","useId","MenuPrimitive","createMenuScope","RovingFocusGroup","createRovingFocusGroupScope","Primitive","useControllableState","MENUBAR_NAME","Collection","useCollection","createCollectionScope","createMenubarContext","useMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","rovingFocusGroupScope","setValue","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","useCallback","prevValue","Boolean","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","menuProps","autoValue","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","onMenuClose","TRIGGER_NAME","disabled","triggerProps","menuContext","ref","composedRefs","isFocused","setIsFocused","triggerId","contentId","undefined","onPointerDown","event","button","ctrlKey","onMenuOpen","preventDefault","onPointerEnter","menubarOpen","focus","onKeyDown","includes","key","onMenuToggle","onFocus","onBlur","PORTAL_NAME","portalProps","CONTENT_NAME","align","contentProps","getItems","hasInteractedOutsideRef","onCloseAutoFocus","onFocusOutside","target","isMenubarTrigger","some","item","contains","onInteractOutside","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","prevMenuKey","isPrevKey","isNextKey","items","filter","candidateValues","map","reverse","currentIndex","indexOf","wrapArray","slice","nextValue","checkForDefaultPrevented","style","GROUP_NAME","groupProps","LABEL_NAME","labelProps","ITEM_NAME","itemProps","CHECKBOX_ITEM_NAME","checkboxItemProps","RADIO_GROUP_NAME","radioGroupProps","RADIO_ITEM_NAME","radioItemProps","INDICATOR_NAME","itemIndicatorProps","SEPARATOR_NAME","separatorProps","ARROW_NAME","arrowProps","SUB_NAME","children","openProp","onOpenChange","defaultOpen","setOpen","SUB_TRIGGER_NAME","subTriggerProps","SUB_CONTENT_NAME","subContentProps","array","startIndex","_","index","length"],"version":3,"file":"index.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-menubar",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0-rc.3",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "@radix-ui/react-context": "1.0.0",
24
24
  "@radix-ui/react-direction": "1.0.0",
25
25
  "@radix-ui/react-id": "1.0.0",
26
- "@radix-ui/react-menu": "2.0.2-rc.3",
26
+ "@radix-ui/react-menu": "2.0.2-rc.5",
27
27
  "@radix-ui/react-primitive": "1.0.1",
28
- "@radix-ui/react-roving-focus": "1.0.2-rc.1",
28
+ "@radix-ui/react-roving-focus": "1.0.2-rc.3",
29
29
  "@radix-ui/react-use-controllable-state": "1.0.0"
30
30
  },
31
31
  "peerDependencies": {