@radix-ui/react-navigation-menu 1.2.0-rc.2 → 1.2.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 +14 -15
- package/dist/index.d.ts +14 -15
- package/dist/index.js +790 -768
- package/dist/index.js.map +4 -4
- package/dist/index.mjs.map +2 -2
- package/package.json +17 -17
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
3
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
3
|
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
5
4
|
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
|
|
6
5
|
import { Scope as Scope$1 } from '@radix-ui/react-context';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
type Scope<C = any> = {
|
|
9
8
|
[scopeName: string]: React.Context<C>[];
|
|
10
9
|
} | undefined;
|
|
11
|
-
|
|
10
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
11
|
[__scopeProp: string]: Scope;
|
|
13
12
|
};
|
|
14
13
|
interface CreateScope {
|
|
@@ -16,11 +15,11 @@ interface CreateScope {
|
|
|
16
15
|
(): ScopeHook;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
type Orientation = 'vertical' | 'horizontal';
|
|
19
|
+
type Direction = 'ltr' | 'rtl';
|
|
21
20
|
declare const createNavigationMenuScope: CreateScope;
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
type NavigationMenuElement = React.ElementRef<typeof Primitive.nav>;
|
|
22
|
+
type PrimitiveNavProps = React.ComponentPropsWithoutRef<typeof Primitive.nav>;
|
|
24
23
|
interface NavigationMenuProps extends Omit<NavigationMenuProviderProps, keyof NavigationMenuProviderPrivateProps>, PrimitiveNavProps {
|
|
25
24
|
value?: string;
|
|
26
25
|
defaultValue?: string;
|
|
@@ -39,7 +38,7 @@ interface NavigationMenuProps extends Omit<NavigationMenuProviderProps, keyof Na
|
|
|
39
38
|
skipDelayDuration?: number;
|
|
40
39
|
}
|
|
41
40
|
declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
42
|
-
|
|
41
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
43
42
|
interface NavigationMenuSubProps extends Omit<NavigationMenuProviderProps, keyof NavigationMenuProviderPrivateProps>, PrimitiveDivProps {
|
|
44
43
|
value?: string;
|
|
45
44
|
defaultValue?: string;
|
|
@@ -64,22 +63,22 @@ interface NavigationMenuProviderPrivateProps {
|
|
|
64
63
|
}
|
|
65
64
|
interface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps {
|
|
66
65
|
}
|
|
67
|
-
|
|
66
|
+
type PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef<typeof Primitive.ul>;
|
|
68
67
|
interface NavigationMenuListProps extends PrimitiveUnorderedListProps {
|
|
69
68
|
}
|
|
70
69
|
declare const NavigationMenuList: React.ForwardRefExoticComponent<NavigationMenuListProps & React.RefAttributes<HTMLUListElement>>;
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
type FocusProxyElement = React.ElementRef<typeof VisuallyHiddenPrimitive.Root>;
|
|
71
|
+
type PrimitiveListItemProps = React.ComponentPropsWithoutRef<typeof Primitive.li>;
|
|
73
72
|
interface NavigationMenuItemProps extends PrimitiveListItemProps {
|
|
74
73
|
value?: string;
|
|
75
74
|
}
|
|
76
75
|
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
type NavigationMenuTriggerElement = React.ElementRef<typeof Primitive.button>;
|
|
77
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
79
78
|
interface NavigationMenuTriggerProps extends PrimitiveButtonProps {
|
|
80
79
|
}
|
|
81
80
|
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
-
|
|
81
|
+
type PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;
|
|
83
82
|
interface NavigationMenuLinkProps extends Omit<PrimitiveLinkProps, 'onSelect'> {
|
|
84
83
|
active?: boolean;
|
|
85
84
|
onSelect?: (event: Event) => void;
|
|
@@ -103,7 +102,7 @@ interface NavigationMenuContentProps extends Omit<NavigationMenuContentImplProps
|
|
|
103
102
|
forceMount?: true;
|
|
104
103
|
}
|
|
105
104
|
declare const NavigationMenuContent: React.ForwardRefExoticComponent<NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
-
|
|
105
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
107
106
|
interface NavigationMenuContentImplPrivateProps {
|
|
108
107
|
value: string;
|
|
109
108
|
triggerRef: React.RefObject<NavigationMenuTriggerElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Radix from '@radix-ui/react-primitive';
|
|
3
2
|
import { Primitive } from '@radix-ui/react-primitive';
|
|
4
3
|
import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
|
|
5
4
|
import * as VisuallyHiddenPrimitive from '@radix-ui/react-visually-hidden';
|
|
6
5
|
import { Scope as Scope$1 } from '@radix-ui/react-context';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
type Scope<C = any> = {
|
|
9
8
|
[scopeName: string]: React.Context<C>[];
|
|
10
9
|
} | undefined;
|
|
11
|
-
|
|
10
|
+
type ScopeHook = (scope: Scope) => {
|
|
12
11
|
[__scopeProp: string]: Scope;
|
|
13
12
|
};
|
|
14
13
|
interface CreateScope {
|
|
@@ -16,11 +15,11 @@ interface CreateScope {
|
|
|
16
15
|
(): ScopeHook;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
type Orientation = 'vertical' | 'horizontal';
|
|
19
|
+
type Direction = 'ltr' | 'rtl';
|
|
21
20
|
declare const createNavigationMenuScope: CreateScope;
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
type NavigationMenuElement = React.ElementRef<typeof Primitive.nav>;
|
|
22
|
+
type PrimitiveNavProps = React.ComponentPropsWithoutRef<typeof Primitive.nav>;
|
|
24
23
|
interface NavigationMenuProps extends Omit<NavigationMenuProviderProps, keyof NavigationMenuProviderPrivateProps>, PrimitiveNavProps {
|
|
25
24
|
value?: string;
|
|
26
25
|
defaultValue?: string;
|
|
@@ -39,7 +38,7 @@ interface NavigationMenuProps extends Omit<NavigationMenuProviderProps, keyof Na
|
|
|
39
38
|
skipDelayDuration?: number;
|
|
40
39
|
}
|
|
41
40
|
declare const NavigationMenu: React.ForwardRefExoticComponent<NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
42
|
-
|
|
41
|
+
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
43
42
|
interface NavigationMenuSubProps extends Omit<NavigationMenuProviderProps, keyof NavigationMenuProviderPrivateProps>, PrimitiveDivProps {
|
|
44
43
|
value?: string;
|
|
45
44
|
defaultValue?: string;
|
|
@@ -64,22 +63,22 @@ interface NavigationMenuProviderPrivateProps {
|
|
|
64
63
|
}
|
|
65
64
|
interface NavigationMenuProviderProps extends NavigationMenuProviderPrivateProps {
|
|
66
65
|
}
|
|
67
|
-
|
|
66
|
+
type PrimitiveUnorderedListProps = React.ComponentPropsWithoutRef<typeof Primitive.ul>;
|
|
68
67
|
interface NavigationMenuListProps extends PrimitiveUnorderedListProps {
|
|
69
68
|
}
|
|
70
69
|
declare const NavigationMenuList: React.ForwardRefExoticComponent<NavigationMenuListProps & React.RefAttributes<HTMLUListElement>>;
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
type FocusProxyElement = React.ElementRef<typeof VisuallyHiddenPrimitive.Root>;
|
|
71
|
+
type PrimitiveListItemProps = React.ComponentPropsWithoutRef<typeof Primitive.li>;
|
|
73
72
|
interface NavigationMenuItemProps extends PrimitiveListItemProps {
|
|
74
73
|
value?: string;
|
|
75
74
|
}
|
|
76
75
|
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
type NavigationMenuTriggerElement = React.ElementRef<typeof Primitive.button>;
|
|
77
|
+
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
|
79
78
|
interface NavigationMenuTriggerProps extends PrimitiveButtonProps {
|
|
80
79
|
}
|
|
81
80
|
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
82
|
-
|
|
81
|
+
type PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;
|
|
83
82
|
interface NavigationMenuLinkProps extends Omit<PrimitiveLinkProps, 'onSelect'> {
|
|
84
83
|
active?: boolean;
|
|
85
84
|
onSelect?: (event: Event) => void;
|
|
@@ -103,7 +102,7 @@ interface NavigationMenuContentProps extends Omit<NavigationMenuContentImplProps
|
|
|
103
102
|
forceMount?: true;
|
|
104
103
|
}
|
|
105
104
|
declare const NavigationMenuContent: React.ForwardRefExoticComponent<NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
|
-
|
|
105
|
+
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
107
106
|
interface NavigationMenuContentImplPrivateProps {
|
|
108
107
|
value: string;
|
|
109
108
|
triggerRef: React.RefObject<NavigationMenuTriggerElement>;
|