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

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