@radix-ui/react-menubar 1.1.0-rc.2 → 1.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.js +473 -435
- package/dist/index.js.map +4 -4
- package/dist/index.mjs.map +2 -2
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import * as MenuPrimitive from '@radix-ui/react-menu';
|
|
3
4
|
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
4
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
5
5
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
6
6
|
import { Scope as Scope$1 } from '@radix-ui/react-context';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type Scope<C = any> = {
|
|
9
9
|
[scopeName: string]: React.Context<C>[];
|
|
10
10
|
} | undefined;
|
|
11
|
-
|
|
11
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
12
|
[__scopeProp: string]: Scope;
|
|
13
13
|
};
|
|
14
14
|
interface CreateScope {
|
|
@@ -16,12 +16,12 @@ interface CreateScope {
|
|
|
16
16
|
(): ScopeHook;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
type ScopedProps<P> = P & {
|
|
20
20
|
__scopeMenubar?: Scope$1;
|
|
21
21
|
};
|
|
22
22
|
declare const createMenubarScope: CreateScope;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
|
24
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
25
25
|
interface MenubarProps extends PrimitiveDivProps {
|
|
26
26
|
value?: string;
|
|
27
27
|
defaultValue?: string;
|
|
@@ -35,54 +35,54 @@ interface MenubarMenuProps {
|
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
}
|
|
37
37
|
declare const MenubarMenu: {
|
|
38
|
-
(props: ScopedProps<MenubarMenuProps>): JSX.Element;
|
|
38
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
42
42
|
interface MenubarTriggerProps extends PrimitiveButtonProps {
|
|
43
43
|
}
|
|
44
44
|
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
-
|
|
45
|
+
type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
46
46
|
interface MenubarPortalProps extends MenuPortalProps {
|
|
47
47
|
}
|
|
48
48
|
declare const MenubarPortal: React.FC<MenubarPortalProps>;
|
|
49
|
-
|
|
49
|
+
type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
|
|
50
50
|
interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
|
|
51
51
|
}
|
|
52
52
|
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
-
|
|
53
|
+
type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
54
54
|
interface MenubarGroupProps extends MenuGroupProps {
|
|
55
55
|
}
|
|
56
56
|
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
|
|
57
|
+
type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
|
|
58
58
|
interface MenubarLabelProps extends MenuLabelProps {
|
|
59
59
|
}
|
|
60
60
|
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
|
|
61
|
+
type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
|
|
62
62
|
interface MenubarItemProps extends MenuItemProps {
|
|
63
63
|
}
|
|
64
64
|
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
-
|
|
65
|
+
type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
|
|
66
66
|
interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
|
|
67
67
|
}
|
|
68
68
|
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
-
|
|
69
|
+
type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
|
|
70
70
|
interface MenubarRadioGroupProps extends MenuRadioGroupProps {
|
|
71
71
|
}
|
|
72
72
|
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
-
|
|
73
|
+
type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
|
|
74
74
|
interface MenubarRadioItemProps extends MenuRadioItemProps {
|
|
75
75
|
}
|
|
76
76
|
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
-
|
|
77
|
+
type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
|
|
78
78
|
interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
|
|
79
79
|
}
|
|
80
80
|
declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
81
|
-
|
|
81
|
+
type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
|
|
82
82
|
interface MenubarSeparatorProps extends MenuSeparatorProps {
|
|
83
83
|
}
|
|
84
84
|
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
|
|
85
|
+
type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
|
|
86
86
|
interface MenubarArrowProps extends MenuArrowProps {
|
|
87
87
|
}
|
|
88
88
|
declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -93,17 +93,17 @@ interface MenubarSubProps {
|
|
|
93
93
|
onOpenChange?(open: boolean): void;
|
|
94
94
|
}
|
|
95
95
|
declare const MenubarSub: React.FC<MenubarSubProps>;
|
|
96
|
-
|
|
96
|
+
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
97
97
|
interface MenubarSubTriggerProps extends MenuSubTriggerProps {
|
|
98
98
|
}
|
|
99
99
|
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
-
|
|
100
|
+
type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
101
101
|
interface MenubarSubContentProps extends MenuSubContentProps {
|
|
102
102
|
}
|
|
103
103
|
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
104
104
|
declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
105
105
|
declare const Menu: {
|
|
106
|
-
(props: ScopedProps<MenubarMenuProps>): JSX.Element;
|
|
106
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
107
107
|
displayName: string;
|
|
108
108
|
};
|
|
109
109
|
declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import * as MenuPrimitive from '@radix-ui/react-menu';
|
|
3
4
|
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
|
4
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
5
5
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
6
6
|
import { Scope as Scope$1 } from '@radix-ui/react-context';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type Scope<C = any> = {
|
|
9
9
|
[scopeName: string]: React.Context<C>[];
|
|
10
10
|
} | undefined;
|
|
11
|
-
|
|
11
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
12
|
[__scopeProp: string]: Scope;
|
|
13
13
|
};
|
|
14
14
|
interface CreateScope {
|
|
@@ -16,12 +16,12 @@ interface CreateScope {
|
|
|
16
16
|
(): ScopeHook;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
type ScopedProps<P> = P & {
|
|
20
20
|
__scopeMenubar?: Scope$1;
|
|
21
21
|
};
|
|
22
22
|
declare const createMenubarScope: CreateScope;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
|
24
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
25
25
|
interface MenubarProps extends PrimitiveDivProps {
|
|
26
26
|
value?: string;
|
|
27
27
|
defaultValue?: string;
|
|
@@ -35,54 +35,54 @@ interface MenubarMenuProps {
|
|
|
35
35
|
children?: React.ReactNode;
|
|
36
36
|
}
|
|
37
37
|
declare const MenubarMenu: {
|
|
38
|
-
(props: ScopedProps<MenubarMenuProps>): JSX.Element;
|
|
38
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
39
39
|
displayName: string;
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
42
42
|
interface MenubarTriggerProps extends PrimitiveButtonProps {
|
|
43
43
|
}
|
|
44
44
|
declare const MenubarTrigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
-
|
|
45
|
+
type MenuPortalProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Portal>;
|
|
46
46
|
interface MenubarPortalProps extends MenuPortalProps {
|
|
47
47
|
}
|
|
48
48
|
declare const MenubarPortal: React.FC<MenubarPortalProps>;
|
|
49
|
-
|
|
49
|
+
type MenuContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Content>;
|
|
50
50
|
interface MenubarContentProps extends Omit<MenuContentProps, 'onEntryFocus'> {
|
|
51
51
|
}
|
|
52
52
|
declare const MenubarContent: React.ForwardRefExoticComponent<MenubarContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
-
|
|
53
|
+
type MenuGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Group>;
|
|
54
54
|
interface MenubarGroupProps extends MenuGroupProps {
|
|
55
55
|
}
|
|
56
56
|
declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
|
|
57
|
+
type MenuLabelProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Label>;
|
|
58
58
|
interface MenubarLabelProps extends MenuLabelProps {
|
|
59
59
|
}
|
|
60
60
|
declare const MenubarLabel: React.ForwardRefExoticComponent<MenubarLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
-
|
|
61
|
+
type MenuItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Item>;
|
|
62
62
|
interface MenubarItemProps extends MenuItemProps {
|
|
63
63
|
}
|
|
64
64
|
declare const MenubarItem: React.ForwardRefExoticComponent<MenubarItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
-
|
|
65
|
+
type MenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.CheckboxItem>;
|
|
66
66
|
interface MenubarCheckboxItemProps extends MenuCheckboxItemProps {
|
|
67
67
|
}
|
|
68
68
|
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
|
-
|
|
69
|
+
type MenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioGroup>;
|
|
70
70
|
interface MenubarRadioGroupProps extends MenuRadioGroupProps {
|
|
71
71
|
}
|
|
72
72
|
declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
-
|
|
73
|
+
type MenuRadioItemProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.RadioItem>;
|
|
74
74
|
interface MenubarRadioItemProps extends MenuRadioItemProps {
|
|
75
75
|
}
|
|
76
76
|
declare const MenubarRadioItem: React.ForwardRefExoticComponent<MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
77
|
-
|
|
77
|
+
type MenuItemIndicatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.ItemIndicator>;
|
|
78
78
|
interface MenubarItemIndicatorProps extends MenuItemIndicatorProps {
|
|
79
79
|
}
|
|
80
80
|
declare const MenubarItemIndicator: React.ForwardRefExoticComponent<MenubarItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
81
|
-
|
|
81
|
+
type MenuSeparatorProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Separator>;
|
|
82
82
|
interface MenubarSeparatorProps extends MenuSeparatorProps {
|
|
83
83
|
}
|
|
84
84
|
declare const MenubarSeparator: React.ForwardRefExoticComponent<MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
-
|
|
85
|
+
type MenuArrowProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.Arrow>;
|
|
86
86
|
interface MenubarArrowProps extends MenuArrowProps {
|
|
87
87
|
}
|
|
88
88
|
declare const MenubarArrow: React.ForwardRefExoticComponent<MenubarArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -93,17 +93,17 @@ interface MenubarSubProps {
|
|
|
93
93
|
onOpenChange?(open: boolean): void;
|
|
94
94
|
}
|
|
95
95
|
declare const MenubarSub: React.FC<MenubarSubProps>;
|
|
96
|
-
|
|
96
|
+
type MenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubTrigger>;
|
|
97
97
|
interface MenubarSubTriggerProps extends MenuSubTriggerProps {
|
|
98
98
|
}
|
|
99
99
|
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
100
|
-
|
|
100
|
+
type MenuSubContentProps = React.ComponentPropsWithoutRef<typeof MenuPrimitive.SubContent>;
|
|
101
101
|
interface MenubarSubContentProps extends MenuSubContentProps {
|
|
102
102
|
}
|
|
103
103
|
declare const MenubarSubContent: React.ForwardRefExoticComponent<MenubarSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
104
104
|
declare const Root: React.ForwardRefExoticComponent<MenubarProps & React.RefAttributes<HTMLDivElement>>;
|
|
105
105
|
declare const Menu: {
|
|
106
|
-
(props: ScopedProps<MenubarMenuProps>): JSX.Element;
|
|
106
|
+
(props: ScopedProps<MenubarMenuProps>): react_jsx_runtime.JSX.Element;
|
|
107
107
|
displayName: string;
|
|
108
108
|
};
|
|
109
109
|
declare const Trigger: React.ForwardRefExoticComponent<MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|