🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@radix-ui/react-navigation-menu

Package Overview
Dependencies
Maintainers
6
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-navigation-menu - npm Package Compare versions

Comparing version

to
1.0.1-rc.12

1

dist/index.d.ts

@@ -79,2 +79,3 @@ import * as React from "react";

focusProxyRef: React.RefObject<FocusProxyElement>;
wasEscapeCloseRef: React.MutableRefObject<boolean>;
onContentFocusOutside(): void;

@@ -81,0 +82,0 @@ onRootContentClose(): void;

@@ -240,2 +240,3 @@ var $6jHCS$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");

const restoreContentTabOrderRef = $6jHCS$react.useRef(()=>{});
const wasEscapeCloseRef = $6jHCS$react.useRef(false);
const handleContentEntry = $6jHCS$react.useCallback((side = 'start')=>{

@@ -260,2 +261,3 @@ if (contentRef.current) {

focusProxyRef: focusProxyRef,
wasEscapeCloseRef: wasEscapeCloseRef,
onEntryKeyDown: handleContentEntry,

@@ -301,5 +303,6 @@ onFocusProxyEnter: handleContentEntry,

wasClickCloseRef.current = false;
itemContext.wasEscapeCloseRef.current = false;
}),
onPointerMove: $6jHCS$radixuiprimitive.composeEventHandlers(props.onPointerMove, $7f73b938b73b5118$var$whenMouse(()=>{
if (disabled || wasClickCloseRef.current) return;
if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current) return;
context.onItemOver(itemContext.value);

@@ -462,2 +465,3 @@ })),

focusProxyRef: itemContext.focusProxyRef,
wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
onContentFocusOutside: itemContext.onContentFocusOutside,

@@ -515,3 +519,3 @@ onRootContentClose: itemContext.onRootContentClose,

const $7f73b938b73b5118$var$NavigationMenuContentImpl = /*#__PURE__*/ $6jHCS$react.forwardRef((props, forwardedRef)=>{
const { __scopeNavigationMenu: __scopeNavigationMenu , value: value , triggerRef: triggerRef , focusProxyRef: focusProxyRef , onRootContentClose: onRootContentClose , onContentFocusOutside: onContentFocusOutside , ...contentProps } = props;
const { __scopeNavigationMenu: __scopeNavigationMenu , value: value , triggerRef: triggerRef , focusProxyRef: focusProxyRef , wasEscapeCloseRef: wasEscapeCloseRef , onRootContentClose: onRootContentClose , onContentFocusOutside: onContentFocusOutside , ...contentProps } = props;
const context = $7f73b938b73b5118$var$useNavigationMenuContext($7f73b938b73b5118$var$CONTENT_NAME, __scopeNavigationMenu);

@@ -628,2 +632,7 @@ const ref = $6jHCS$react.useRef(null);

}
}),
onEscapeKeyDown: $6jHCS$radixuiprimitive.composeEventHandlers(props.onEscapeKeyDown, (event)=>{
// prevent the dropdown from reopening
// after the escape key has been pressed
wasEscapeCloseRef.current = true;
})

@@ -630,0 +639,0 @@ })));

@@ -214,2 +214,3 @@ import $yHMN2$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";

const restoreContentTabOrderRef = $yHMN2$useRef(()=>{});
const wasEscapeCloseRef = $yHMN2$useRef(false);
const handleContentEntry = $yHMN2$useCallback((side = 'start')=>{

@@ -234,2 +235,3 @@ if (contentRef.current) {

focusProxyRef: focusProxyRef,
wasEscapeCloseRef: wasEscapeCloseRef,
onEntryKeyDown: handleContentEntry,

@@ -275,5 +277,6 @@ onFocusProxyEnter: handleContentEntry,

wasClickCloseRef.current = false;
itemContext.wasEscapeCloseRef.current = false;
}),
onPointerMove: $yHMN2$composeEventHandlers(props.onPointerMove, $322c88a641701f3b$var$whenMouse(()=>{
if (disabled || wasClickCloseRef.current) return;
if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current) return;
context.onItemOver(itemContext.value);

@@ -436,2 +439,3 @@ })),

focusProxyRef: itemContext.focusProxyRef,
wasEscapeCloseRef: itemContext.wasEscapeCloseRef,
onContentFocusOutside: itemContext.onContentFocusOutside,

@@ -489,3 +493,3 @@ onRootContentClose: itemContext.onRootContentClose,

const $322c88a641701f3b$var$NavigationMenuContentImpl = /*#__PURE__*/ $yHMN2$forwardRef((props, forwardedRef)=>{
const { __scopeNavigationMenu: __scopeNavigationMenu , value: value , triggerRef: triggerRef , focusProxyRef: focusProxyRef , onRootContentClose: onRootContentClose , onContentFocusOutside: onContentFocusOutside , ...contentProps } = props;
const { __scopeNavigationMenu: __scopeNavigationMenu , value: value , triggerRef: triggerRef , focusProxyRef: focusProxyRef , wasEscapeCloseRef: wasEscapeCloseRef , onRootContentClose: onRootContentClose , onContentFocusOutside: onContentFocusOutside , ...contentProps } = props;
const context = $322c88a641701f3b$var$useNavigationMenuContext($322c88a641701f3b$var$CONTENT_NAME, __scopeNavigationMenu);

@@ -602,2 +606,7 @@ const ref = $yHMN2$useRef(null);

}
}),
onEscapeKeyDown: $yHMN2$composeEventHandlers(props.onEscapeKeyDown, (event)=>{
// prevent the dropdown from reopening
// after the escape key has been pressed
wasEscapeCloseRef.current = true;
})

@@ -604,0 +613,0 @@ })));

10

package.json
{
"name": "@radix-ui/react-navigation-menu",
"version": "1.0.1-rc.11",
"version": "1.0.1-rc.12",
"license": "MIT",

@@ -21,10 +21,10 @@ "source": "src/index.ts",

"@radix-ui/primitive": "1.0.0",
"@radix-ui/react-collection": "1.0.1-rc.4",
"@radix-ui/react-collection": "1.0.1-rc.5",
"@radix-ui/react-compose-refs": "1.0.0",
"@radix-ui/react-context": "1.0.0",
"@radix-ui/react-direction": "1.0.0",
"@radix-ui/react-dismissable-layer": "1.0.1-rc.11",
"@radix-ui/react-dismissable-layer": "1.0.1-rc.12",
"@radix-ui/react-id": "1.0.0",
"@radix-ui/react-presence": "1.0.0",
"@radix-ui/react-primitive": "1.0.1-rc.4",
"@radix-ui/react-primitive": "1.0.1-rc.5",
"@radix-ui/react-use-callback-ref": "1.0.0",

@@ -34,3 +34,3 @@ "@radix-ui/react-use-controllable-state": "1.0.0",

"@radix-ui/react-use-previous": "1.0.0",
"@radix-ui/react-visually-hidden": "1.0.1-rc.4"
"@radix-ui/react-visually-hidden": "1.0.1-rc.5"
},

@@ -37,0 +37,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet