@radix-ui/react-menubar 0.0.0-20250116175529
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/README.md +13 -0
- package/dist/index.d.mts +115 -0
- package/dist/index.d.ts +115 -0
- package/dist/index.js +500 -0
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +468 -0
- package/dist/index.mjs.map +7 -0
- package/package.json +63 -0
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
|
3
|
+
import { Scope } from '@radix-ui/react-context';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import * as MenuPrimitive from '@radix-ui/react-menu';
|
|
6
|
+
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
7
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
8
|
+
|
|
9
|
+
type ScopedProps<P> = P & {
|
|
10
|
+
__scopeMenubar?: Scope;
|
|
11
|
+
};
|
|
12
|
+
declare const createMenubarScope: _radix_ui_react_context.CreateScope;
|
|
13
|
+
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
|
14
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
15
|
+
interface MenubarProps extends PrimitiveDivProps {
|
|
16
|
+
value?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
onValueChange?: (value: string) => void;
|
|
19
|
+
loop?: RovingFocusGroupProps['loop'];
|
|
20
|
+
dir?: RovingFocusGroupProps['dir'];
|
|
21
|
+
}
|
|
22
|
+
declare const Menubar: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface MenubarMenuProps {
|
|
24
|
+
value?: string;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const MenubarMenu: {
|
|
28
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
32
|
+
interface MenubarTriggerProps extends PrimitiveButtonProps {
|
|
33
|
+
}
|
|
34
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
36
|
+
interface MenubarPortalProps extends MenuPortalProps {
|
|
37
|
+
}
|
|
38
|
+
declare const MenubarPortal: React.FC<MenubarPortalProps>;
|
|
39
|
+
type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
|
|
40
|
+
interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
|
|
41
|
+
}
|
|
42
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
44
|
+
interface MenubarGroupProps extends MenuGroupProps {
|
|
45
|
+
}
|
|
46
|
+
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
|
|
48
|
+
interface MenubarLabelProps extends MenuLabelProps {
|
|
49
|
+
}
|
|
50
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
|
|
52
|
+
interface MenubarItemProps extends MenuItemProps {
|
|
53
|
+
}
|
|
54
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
|
|
56
|
+
interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
|
|
57
|
+
}
|
|
58
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
|
|
60
|
+
interface MenubarRadioGroupProps extends MenuRadioGroupProps {
|
|
61
|
+
}
|
|
62
|
+
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
|
|
64
|
+
interface MenubarRadioItemProps extends MenuRadioItemProps {
|
|
65
|
+
}
|
|
66
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
|
|
68
|
+
interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
|
|
69
|
+
}
|
|
70
|
+
declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
71
|
+
type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
|
|
72
|
+
interface MenubarSeparatorProps extends MenuSeparatorProps {
|
|
73
|
+
}
|
|
74
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
|
|
76
|
+
interface MenubarArrowProps extends MenuArrowProps {
|
|
77
|
+
}
|
|
78
|
+
declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
79
|
+
interface MenubarSubProps {
|
|
80
|
+
children?: React.ReactNode;
|
|
81
|
+
open?: boolean;
|
|
82
|
+
defaultOpen?: boolean;
|
|
83
|
+
onOpenChange?(open: boolean): void;
|
|
84
|
+
}
|
|
85
|
+
declare const MenubarSub: React.FC<MenubarSubProps>;
|
|
86
|
+
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
87
|
+
interface MenubarSubTriggerProps extends MenuSubTriggerProps {
|
|
88
|
+
}
|
|
89
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
91
|
+
interface MenubarSubContentProps extends MenuSubContentProps {
|
|
92
|
+
}
|
|
93
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
declare const Menu: {
|
|
96
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
100
|
+
declare const Portal: React.FC<MenubarPortalProps>;
|
|
101
|
+
declare const Content: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
declare const Group: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
declare const Label: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
declare const Item: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
declare const CheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
declare const RadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
+
declare const ItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
109
|
+
declare const Separator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
110
|
+
declare const Arrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
111
|
+
declare const Sub: React.FC<MenubarSubProps>;
|
|
112
|
+
declare const SubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
declare const SubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
114
|
+
|
|
115
|
+
export { Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, MenubarItemIndicator, type MenubarItemIndicatorProps, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, MenubarPortal, type MenubarPortalProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createMenubarScope };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
|
3
|
+
import { Scope } from '@radix-ui/react-context';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import * as MenuPrimitive from '@radix-ui/react-menu';
|
|
6
|
+
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
7
|
+
import { Primitive } from '@radix-ui/react-primitive';
|
|
8
|
+
|
|
9
|
+
type ScopedProps<P> = P & {
|
|
10
|
+
__scopeMenubar?: Scope;
|
|
11
|
+
};
|
|
12
|
+
declare const createMenubarScope: _radix_ui_react_context.CreateScope;
|
|
13
|
+
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
|
14
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
15
|
+
interface MenubarProps extends PrimitiveDivProps {
|
|
16
|
+
value?: string;
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
onValueChange?: (value: string) => void;
|
|
19
|
+
loop?: RovingFocusGroupProps['loop'];
|
|
20
|
+
dir?: RovingFocusGroupProps['dir'];
|
|
21
|
+
}
|
|
22
|
+
declare const Menubar: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface MenubarMenuProps {
|
|
24
|
+
value?: string;
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
declare const MenubarMenu: {
|
|
28
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
32
|
+
interface MenubarTriggerProps extends PrimitiveButtonProps {
|
|
33
|
+
}
|
|
34
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
36
|
+
interface MenubarPortalProps extends MenuPortalProps {
|
|
37
|
+
}
|
|
38
|
+
declare const MenubarPortal: React.FC<MenubarPortalProps>;
|
|
39
|
+
type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
|
|
40
|
+
interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
|
|
41
|
+
}
|
|
42
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
44
|
+
interface MenubarGroupProps extends MenuGroupProps {
|
|
45
|
+
}
|
|
46
|
+
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
|
|
48
|
+
interface MenubarLabelProps extends MenuLabelProps {
|
|
49
|
+
}
|
|
50
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
|
|
52
|
+
interface MenubarItemProps extends MenuItemProps {
|
|
53
|
+
}
|
|
54
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
+
type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
|
|
56
|
+
interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
|
|
57
|
+
}
|
|
58
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
59
|
+
type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
|
|
60
|
+
interface MenubarRadioGroupProps extends MenuRadioGroupProps {
|
|
61
|
+
}
|
|
62
|
+
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
|
|
64
|
+
interface MenubarRadioItemProps extends MenuRadioItemProps {
|
|
65
|
+
}
|
|
66
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
67
|
+
type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
|
|
68
|
+
interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
|
|
69
|
+
}
|
|
70
|
+
declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
71
|
+
type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
|
|
72
|
+
interface MenubarSeparatorProps extends MenuSeparatorProps {
|
|
73
|
+
}
|
|
74
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
75
|
+
type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
|
|
76
|
+
interface MenubarArrowProps extends MenuArrowProps {
|
|
77
|
+
}
|
|
78
|
+
declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
79
|
+
interface MenubarSubProps {
|
|
80
|
+
children?: React.ReactNode;
|
|
81
|
+
open?: boolean;
|
|
82
|
+
defaultOpen?: boolean;
|
|
83
|
+
onOpenChange?(open: boolean): void;
|
|
84
|
+
}
|
|
85
|
+
declare const MenubarSub: React.FC<MenubarSubProps>;
|
|
86
|
+
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
87
|
+
interface MenubarSubTriggerProps extends MenuSubTriggerProps {
|
|
88
|
+
}
|
|
89
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
90
|
+
type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
91
|
+
interface MenubarSubContentProps extends MenuSubContentProps {
|
|
92
|
+
}
|
|
93
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
95
|
+
declare const Menu: {
|
|
96
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
97
|
+
displayName: string;
|
|
98
|
+
};
|
|
99
|
+
declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
100
|
+
declare const Portal: React.FC<MenubarPortalProps>;
|
|
101
|
+
declare const Content: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
102
|
+
declare const Group: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
declare const Label: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
104
|
+
declare const Item: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
declare const CheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
declare const RadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
108
|
+
declare const ItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
109
|
+
declare const Separator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
110
|
+
declare const Arrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
111
|
+
declare const Sub: React.FC<MenubarSubProps>;
|
|
112
|
+
declare const SubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
declare const SubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
114
|
+
|
|
115
|
+
export { Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, MenubarItemIndicator, type MenubarItemIndicatorProps, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, MenubarPortal, type MenubarPortalProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, Trigger, createMenubarScope };
|