@radix-ui/react-menu 2.0.7-rc.9 → 2.1.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/dist/index.d.mts CHANGED
@@ -1,27 +1,39 @@
1
- import * as React from "react";
2
- import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3
- import { FocusScope } from "@radix-ui/react-focus-scope";
4
- import * as PopperPrimitive from "@radix-ui/react-popper";
5
- import { Portal as _Portal1 } from "@radix-ui/react-portal";
6
- import * as Radix from "@radix-ui/react-primitive";
7
- import { Primitive } from "@radix-ui/react-primitive";
8
- import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
9
- type Direction = 'ltr' | 'rtl';
10
- export const createMenuScope: import("@radix-ui/react-context").CreateScope;
11
- export interface MenuProps {
1
+ import * as React from 'react';
2
+ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
3
+ import { FocusScope } from '@radix-ui/react-focus-scope';
4
+ import * as PopperPrimitive from '@radix-ui/react-popper';
5
+ import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
+ import * as Radix from '@radix-ui/react-primitive';
7
+ import { Primitive } from '@radix-ui/react-primitive';
8
+ import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
9
+
10
+ declare type Scope<C = any> = {
11
+ [scopeName: string]: React.Context<C>[];
12
+ } | undefined;
13
+ declare type ScopeHook = (scope: Scope) => {
14
+ [__scopeProp: string]: Scope;
15
+ };
16
+ interface CreateScope {
17
+ scopeName: string;
18
+ (): ScopeHook;
19
+ }
20
+
21
+ declare type Direction = 'ltr' | 'rtl';
22
+ declare const createMenuScope: CreateScope;
23
+ interface MenuProps {
12
24
  children?: React.ReactNode;
13
25
  open?: boolean;
14
26
  onOpenChange?(open: boolean): void;
15
27
  dir?: Direction;
16
28
  modal?: boolean;
17
29
  }
18
- export const Menu: React.FC<MenuProps>;
19
- type PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
20
- export interface MenuAnchorProps extends PopperAnchorProps {
30
+ declare const Menu: React.FC<MenuProps>;
31
+ declare type PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
32
+ interface MenuAnchorProps extends PopperAnchorProps {
21
33
  }
22
- export const MenuAnchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
23
- type PortalProps = React.ComponentPropsWithoutRef<typeof _Portal1>;
24
- export interface MenuPortalProps {
34
+ declare const MenuAnchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
35
+ declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
36
+ interface MenuPortalProps {
25
37
  children?: React.ReactNode;
26
38
  /**
27
39
  * Specify a container element to portal the content into.
@@ -33,27 +45,27 @@ export interface MenuPortalProps {
33
45
  */
34
46
  forceMount?: true;
35
47
  }
36
- export const MenuPortal: React.FC<MenuPortalProps>;
48
+ declare const MenuPortal: React.FC<MenuPortalProps>;
37
49
  /**
38
50
  * We purposefully don't union MenuRootContent and MenuSubContent props here because
39
51
  * they have conflicting prop types. We agreed that we would allow MenuSubContent to
40
52
  * accept props that it would just ignore.
41
53
  */
42
- export interface MenuContentProps extends MenuRootContentTypeProps {
54
+ interface MenuContentProps extends MenuRootContentTypeProps {
43
55
  /**
44
56
  * Used to force mounting when more control is needed. Useful when
45
57
  * controlling animation with React animation libraries.
46
58
  */
47
59
  forceMount?: true;
48
60
  }
49
- export const MenuContent: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
61
+ declare const MenuContent: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
50
62
  interface MenuRootContentTypeProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps> {
51
63
  }
52
- type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
53
- type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
54
- type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
55
- type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
56
- type MenuContentImplPrivateProps = {
64
+ declare type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
65
+ declare type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
66
+ declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
67
+ declare type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
68
+ declare type MenuContentImplPrivateProps = {
57
69
  onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
58
70
  onDismiss?: DismissableLayerProps['onDismiss'];
59
71
  disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents'];
@@ -85,84 +97,84 @@ interface MenuContentImplProps extends MenuContentImplPrivateProps, Omit<PopperC
85
97
  onFocusOutside?: DismissableLayerProps['onFocusOutside'];
86
98
  onInteractOutside?: DismissableLayerProps['onInteractOutside'];
87
99
  }
88
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
89
- export interface MenuGroupProps extends PrimitiveDivProps {
100
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
101
+ interface MenuGroupProps extends PrimitiveDivProps {
90
102
  }
91
- export const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
92
- export interface MenuLabelProps extends PrimitiveDivProps {
103
+ declare const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
104
+ interface MenuLabelProps extends PrimitiveDivProps {
93
105
  }
94
- export const MenuLabel: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
95
- export interface MenuItemProps extends Omit<MenuItemImplProps, 'onSelect'> {
106
+ declare const MenuLabel: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
107
+ interface MenuItemProps extends Omit<MenuItemImplProps, 'onSelect'> {
96
108
  onSelect?: (event: Event) => void;
97
109
  }
98
- export const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
110
+ declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
99
111
  interface MenuItemImplProps extends PrimitiveDivProps {
100
112
  disabled?: boolean;
101
113
  textValue?: string;
102
114
  }
103
- type CheckedState = boolean | 'indeterminate';
104
- export interface MenuCheckboxItemProps extends MenuItemProps {
115
+ declare type CheckedState = boolean | 'indeterminate';
116
+ interface MenuCheckboxItemProps extends MenuItemProps {
105
117
  checked?: CheckedState;
106
118
  onCheckedChange?: (checked: boolean) => void;
107
119
  }
108
- export const MenuCheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
109
- export interface MenuRadioGroupProps extends MenuGroupProps {
120
+ declare const MenuCheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
121
+ interface MenuRadioGroupProps extends MenuGroupProps {
110
122
  value?: string;
111
123
  onValueChange?: (value: string) => void;
112
124
  }
113
- export const MenuRadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
114
- export interface MenuRadioItemProps extends MenuItemProps {
125
+ declare const MenuRadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
126
+ interface MenuRadioItemProps extends MenuItemProps {
115
127
  value: string;
116
128
  }
117
- export const MenuRadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
118
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
119
- export interface MenuItemIndicatorProps extends PrimitiveSpanProps {
129
+ declare const MenuRadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
130
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
131
+ interface MenuItemIndicatorProps extends PrimitiveSpanProps {
120
132
  /**
121
133
  * Used to force mounting when more control is needed. Useful when
122
134
  * controlling animation with React animation libraries.
123
135
  */
124
136
  forceMount?: true;
125
137
  }
126
- export const MenuItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
127
- export interface MenuSeparatorProps extends PrimitiveDivProps {
138
+ declare const MenuItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
139
+ interface MenuSeparatorProps extends PrimitiveDivProps {
128
140
  }
129
- export const MenuSeparator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
130
- type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
131
- export interface MenuArrowProps extends PopperArrowProps {
141
+ declare const MenuSeparator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
142
+ declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
143
+ interface MenuArrowProps extends PopperArrowProps {
132
144
  }
133
- export const MenuArrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
134
- export interface MenuSubProps {
145
+ declare const MenuArrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
146
+ interface MenuSubProps {
135
147
  children?: React.ReactNode;
136
148
  open?: boolean;
137
149
  onOpenChange?(open: boolean): void;
138
150
  }
139
- export const MenuSub: React.FC<MenuSubProps>;
140
- export interface MenuSubTriggerProps extends MenuItemImplProps {
151
+ declare const MenuSub: React.FC<MenuSubProps>;
152
+ interface MenuSubTriggerProps extends MenuItemImplProps {
141
153
  }
142
- export const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
143
- export interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'> {
154
+ declare const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
155
+ interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'> {
144
156
  /**
145
157
  * Used to force mounting when more control is needed. Useful when
146
158
  * controlling animation with React animation libraries.
147
159
  */
148
160
  forceMount?: true;
149
161
  }
150
- export const MenuSubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
151
- export const Root: React.FC<MenuProps>;
152
- export const Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
153
- export const Portal: React.FC<MenuPortalProps>;
154
- export const Content: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
155
- export const Group: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
156
- export const Label: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
157
- export const Item: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
158
- export const CheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
159
- export const RadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
160
- export const RadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
161
- export const ItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
162
- export const Separator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
163
- export const Arrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
164
- export const Sub: React.FC<MenuSubProps>;
165
- export const SubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
166
- export const SubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
162
+ declare const MenuSubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
163
+ declare const Root: React.FC<MenuProps>;
164
+ declare const Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
165
+ declare const Portal: React.FC<MenuPortalProps>;
166
+ declare const Content: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
167
+ declare const Group: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
168
+ declare const Label: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
169
+ declare const Item: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
170
+ declare const CheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
171
+ declare const RadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
172
+ declare const RadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
173
+ declare const ItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
174
+ declare const Separator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
175
+ declare const Arrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
176
+ declare const Sub: React.FC<MenuSubProps>;
177
+ declare const SubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
178
+ declare const SubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
167
179
 
168
- //# sourceMappingURL=index.d.ts.map
180
+ export { Anchor, Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, MenuAnchor, type MenuAnchorProps, MenuArrow, type MenuArrowProps, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, type MenuContentProps, MenuGroup, type MenuGroupProps, MenuItem, MenuItemIndicator, type MenuItemIndicatorProps, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuPortal, type MenuPortalProps, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuRadioItem, type MenuRadioItemProps, MenuSeparator, type MenuSeparatorProps, MenuSub, MenuSubContent, type MenuSubContentProps, type MenuSubProps, MenuSubTrigger, type MenuSubTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, createMenuScope };
package/dist/index.d.ts CHANGED
@@ -1,27 +1,39 @@
1
- import * as React from "react";
2
- import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3
- import { FocusScope } from "@radix-ui/react-focus-scope";
4
- import * as PopperPrimitive from "@radix-ui/react-popper";
5
- import { Portal as _Portal1 } from "@radix-ui/react-portal";
6
- import * as Radix from "@radix-ui/react-primitive";
7
- import { Primitive } from "@radix-ui/react-primitive";
8
- import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
9
- type Direction = 'ltr' | 'rtl';
10
- export const createMenuScope: import("@radix-ui/react-context").CreateScope;
11
- export interface MenuProps {
1
+ import * as React from 'react';
2
+ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
3
+ import { FocusScope } from '@radix-ui/react-focus-scope';
4
+ import * as PopperPrimitive from '@radix-ui/react-popper';
5
+ import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
+ import * as Radix from '@radix-ui/react-primitive';
7
+ import { Primitive } from '@radix-ui/react-primitive';
8
+ import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
9
+
10
+ declare type Scope<C = any> = {
11
+ [scopeName: string]: React.Context<C>[];
12
+ } | undefined;
13
+ declare type ScopeHook = (scope: Scope) => {
14
+ [__scopeProp: string]: Scope;
15
+ };
16
+ interface CreateScope {
17
+ scopeName: string;
18
+ (): ScopeHook;
19
+ }
20
+
21
+ declare type Direction = 'ltr' | 'rtl';
22
+ declare const createMenuScope: CreateScope;
23
+ interface MenuProps {
12
24
  children?: React.ReactNode;
13
25
  open?: boolean;
14
26
  onOpenChange?(open: boolean): void;
15
27
  dir?: Direction;
16
28
  modal?: boolean;
17
29
  }
18
- export const Menu: React.FC<MenuProps>;
19
- type PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
20
- export interface MenuAnchorProps extends PopperAnchorProps {
30
+ declare const Menu: React.FC<MenuProps>;
31
+ declare type PopperAnchorProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Anchor>;
32
+ interface MenuAnchorProps extends PopperAnchorProps {
21
33
  }
22
- export const MenuAnchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
23
- type PortalProps = React.ComponentPropsWithoutRef<typeof _Portal1>;
24
- export interface MenuPortalProps {
34
+ declare const MenuAnchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
35
+ declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
36
+ interface MenuPortalProps {
25
37
  children?: React.ReactNode;
26
38
  /**
27
39
  * Specify a container element to portal the content into.
@@ -33,27 +45,27 @@ export interface MenuPortalProps {
33
45
  */
34
46
  forceMount?: true;
35
47
  }
36
- export const MenuPortal: React.FC<MenuPortalProps>;
48
+ declare const MenuPortal: React.FC<MenuPortalProps>;
37
49
  /**
38
50
  * We purposefully don't union MenuRootContent and MenuSubContent props here because
39
51
  * they have conflicting prop types. We agreed that we would allow MenuSubContent to
40
52
  * accept props that it would just ignore.
41
53
  */
42
- export interface MenuContentProps extends MenuRootContentTypeProps {
54
+ interface MenuContentProps extends MenuRootContentTypeProps {
43
55
  /**
44
56
  * Used to force mounting when more control is needed. Useful when
45
57
  * controlling animation with React animation libraries.
46
58
  */
47
59
  forceMount?: true;
48
60
  }
49
- export const MenuContent: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
61
+ declare const MenuContent: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
50
62
  interface MenuRootContentTypeProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps> {
51
63
  }
52
- type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
53
- type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
54
- type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
55
- type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
56
- type MenuContentImplPrivateProps = {
64
+ declare type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
65
+ declare type DismissableLayerProps = Radix.ComponentPropsWithoutRef<typeof DismissableLayer>;
66
+ declare type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
67
+ declare type PopperContentProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
68
+ declare type MenuContentImplPrivateProps = {
57
69
  onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
58
70
  onDismiss?: DismissableLayerProps['onDismiss'];
59
71
  disableOutsidePointerEvents?: DismissableLayerProps['disableOutsidePointerEvents'];
@@ -85,84 +97,84 @@ interface MenuContentImplProps extends MenuContentImplPrivateProps, Omit<PopperC
85
97
  onFocusOutside?: DismissableLayerProps['onFocusOutside'];
86
98
  onInteractOutside?: DismissableLayerProps['onInteractOutside'];
87
99
  }
88
- type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
89
- export interface MenuGroupProps extends PrimitiveDivProps {
100
+ declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
101
+ interface MenuGroupProps extends PrimitiveDivProps {
90
102
  }
91
- export const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
92
- export interface MenuLabelProps extends PrimitiveDivProps {
103
+ declare const MenuGroup: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
104
+ interface MenuLabelProps extends PrimitiveDivProps {
93
105
  }
94
- export const MenuLabel: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
95
- export interface MenuItemProps extends Omit<MenuItemImplProps, 'onSelect'> {
106
+ declare const MenuLabel: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
107
+ interface MenuItemProps extends Omit<MenuItemImplProps, 'onSelect'> {
96
108
  onSelect?: (event: Event) => void;
97
109
  }
98
- export const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
110
+ declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
99
111
  interface MenuItemImplProps extends PrimitiveDivProps {
100
112
  disabled?: boolean;
101
113
  textValue?: string;
102
114
  }
103
- type CheckedState = boolean | 'indeterminate';
104
- export interface MenuCheckboxItemProps extends MenuItemProps {
115
+ declare type CheckedState = boolean | 'indeterminate';
116
+ interface MenuCheckboxItemProps extends MenuItemProps {
105
117
  checked?: CheckedState;
106
118
  onCheckedChange?: (checked: boolean) => void;
107
119
  }
108
- export const MenuCheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
109
- export interface MenuRadioGroupProps extends MenuGroupProps {
120
+ declare const MenuCheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
121
+ interface MenuRadioGroupProps extends MenuGroupProps {
110
122
  value?: string;
111
123
  onValueChange?: (value: string) => void;
112
124
  }
113
- export const MenuRadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
114
- export interface MenuRadioItemProps extends MenuItemProps {
125
+ declare const MenuRadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
126
+ interface MenuRadioItemProps extends MenuItemProps {
115
127
  value: string;
116
128
  }
117
- export const MenuRadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
118
- type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
119
- export interface MenuItemIndicatorProps extends PrimitiveSpanProps {
129
+ declare const MenuRadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
130
+ declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
131
+ interface MenuItemIndicatorProps extends PrimitiveSpanProps {
120
132
  /**
121
133
  * Used to force mounting when more control is needed. Useful when
122
134
  * controlling animation with React animation libraries.
123
135
  */
124
136
  forceMount?: true;
125
137
  }
126
- export const MenuItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
127
- export interface MenuSeparatorProps extends PrimitiveDivProps {
138
+ declare const MenuItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
139
+ interface MenuSeparatorProps extends PrimitiveDivProps {
128
140
  }
129
- export const MenuSeparator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
130
- type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
131
- export interface MenuArrowProps extends PopperArrowProps {
141
+ declare const MenuSeparator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
142
+ declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
143
+ interface MenuArrowProps extends PopperArrowProps {
132
144
  }
133
- export const MenuArrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
134
- export interface MenuSubProps {
145
+ declare const MenuArrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
146
+ interface MenuSubProps {
135
147
  children?: React.ReactNode;
136
148
  open?: boolean;
137
149
  onOpenChange?(open: boolean): void;
138
150
  }
139
- export const MenuSub: React.FC<MenuSubProps>;
140
- export interface MenuSubTriggerProps extends MenuItemImplProps {
151
+ declare const MenuSub: React.FC<MenuSubProps>;
152
+ interface MenuSubTriggerProps extends MenuItemImplProps {
141
153
  }
142
- export const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
143
- export interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'> {
154
+ declare const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
155
+ interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'> {
144
156
  /**
145
157
  * Used to force mounting when more control is needed. Useful when
146
158
  * controlling animation with React animation libraries.
147
159
  */
148
160
  forceMount?: true;
149
161
  }
150
- export const MenuSubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
151
- export const Root: React.FC<MenuProps>;
152
- export const Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
153
- export const Portal: React.FC<MenuPortalProps>;
154
- export const Content: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
155
- export const Group: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
156
- export const Label: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
157
- export const Item: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
158
- export const CheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
159
- export const RadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
160
- export const RadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
161
- export const ItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
162
- export const Separator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
163
- export const Arrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
164
- export const Sub: React.FC<MenuSubProps>;
165
- export const SubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
166
- export const SubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
162
+ declare const MenuSubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
163
+ declare const Root: React.FC<MenuProps>;
164
+ declare const Anchor: React.ForwardRefExoticComponent<MenuAnchorProps & React.RefAttributes<HTMLDivElement>>;
165
+ declare const Portal: React.FC<MenuPortalProps>;
166
+ declare const Content: React.ForwardRefExoticComponent<MenuContentProps & React.RefAttributes<HTMLDivElement>>;
167
+ declare const Group: React.ForwardRefExoticComponent<MenuGroupProps & React.RefAttributes<HTMLDivElement>>;
168
+ declare const Label: React.ForwardRefExoticComponent<MenuLabelProps & React.RefAttributes<HTMLDivElement>>;
169
+ declare const Item: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLDivElement>>;
170
+ declare const CheckboxItem: React.ForwardRefExoticComponent<MenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>>;
171
+ declare const RadioGroup: React.ForwardRefExoticComponent<MenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
172
+ declare const RadioItem: React.ForwardRefExoticComponent<MenuRadioItemProps & React.RefAttributes<HTMLDivElement>>;
173
+ declare const ItemIndicator: React.ForwardRefExoticComponent<MenuItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
174
+ declare const Separator: React.ForwardRefExoticComponent<MenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
175
+ declare const Arrow: React.ForwardRefExoticComponent<MenuArrowProps & React.RefAttributes<SVGSVGElement>>;
176
+ declare const Sub: React.FC<MenuSubProps>;
177
+ declare const SubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
178
+ declare const SubContent: React.ForwardRefExoticComponent<MenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
167
179
 
168
- //# sourceMappingURL=index.d.ts.map
180
+ export { Anchor, Arrow, CheckboxItem, Content, Group, Item, ItemIndicator, Label, Menu, MenuAnchor, type MenuAnchorProps, MenuArrow, type MenuArrowProps, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, type MenuContentProps, MenuGroup, type MenuGroupProps, MenuItem, MenuItemIndicator, type MenuItemIndicatorProps, type MenuItemProps, MenuLabel, type MenuLabelProps, MenuPortal, type MenuPortalProps, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuRadioItem, type MenuRadioItemProps, MenuSeparator, type MenuSeparatorProps, MenuSub, MenuSubContent, type MenuSubContentProps, type MenuSubProps, MenuSubTrigger, type MenuSubTriggerProps, Portal, RadioGroup, RadioItem, Root, Separator, Sub, SubContent, SubTrigger, createMenuScope };