@radix-ui/react-menu
Advanced tools
Comparing version 2.0.2-rc.2 to 2.0.2-rc.3
@@ -78,2 +78,3 @@ import * as React from "react"; | ||
loop?: RovingFocusGroupProps['loop']; | ||
onEntryFocus?: RovingFocusGroupProps['onEntryFocus']; | ||
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown']; | ||
@@ -139,3 +140,3 @@ onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside']; | ||
export const MenuSubTrigger: React.ForwardRefExoticComponent<MenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>; | ||
export interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'side' | 'align'> { | ||
export interface MenuSubContentProps extends Omit<MenuContentImplProps, keyof MenuContentImplPrivateProps | 'onCloseAutoFocus' | 'onEntryFocus' | 'side' | 'align'> { | ||
/** | ||
@@ -142,0 +143,0 @@ * Used to force mounting when more control is needed. Useful when |
@@ -281,3 +281,3 @@ var $cnSS2$babelruntimehelpersextends = require("@babel/runtime/helpers/extends"); | ||
/* ---------------------------------------------------------------------------------------------- */ const $213e4d2df823067d$var$MenuContentImpl = /*#__PURE__*/ $cnSS2$react.forwardRef((props, forwardedRef)=>{ | ||
const { __scopeMenu: __scopeMenu , loop: loop = false , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , disableOutsideScroll: disableOutsideScroll , ...contentProps } = props; | ||
const { __scopeMenu: __scopeMenu , loop: loop = false , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEntryFocus: onEntryFocus , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , disableOutsideScroll: disableOutsideScroll , ...contentProps } = props; | ||
const context = $213e4d2df823067d$var$useMenuContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu); | ||
@@ -390,6 +390,6 @@ const rootContext = $213e4d2df823067d$var$useMenuRootContext($213e4d2df823067d$var$CONTENT_NAME, __scopeMenu); | ||
onCurrentTabStopIdChange: setCurrentItemId, | ||
onEntryFocus: (event)=>{ | ||
onEntryFocus: $cnSS2$radixuiprimitive.composeEventHandlers(onEntryFocus, (event)=>{ | ||
// only focus first item when using keyboard | ||
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault(); | ||
} | ||
}) | ||
}), /*#__PURE__*/ $cnSS2$react.createElement($cnSS2$radixuireactpopper.Content, ($parcel$interopDefault($cnSS2$babelruntimehelpersextends))({ | ||
@@ -396,0 +396,0 @@ role: "menu", |
@@ -241,3 +241,3 @@ import $epM9y$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends"; | ||
/* ---------------------------------------------------------------------------------------------- */ const $6cc32821e9371a1c$var$MenuContentImpl = /*#__PURE__*/ $epM9y$forwardRef((props, forwardedRef)=>{ | ||
const { __scopeMenu: __scopeMenu , loop: loop = false , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , disableOutsideScroll: disableOutsideScroll , ...contentProps } = props; | ||
const { __scopeMenu: __scopeMenu , loop: loop = false , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEntryFocus: onEntryFocus , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , disableOutsideScroll: disableOutsideScroll , ...contentProps } = props; | ||
const context = $6cc32821e9371a1c$var$useMenuContext($6cc32821e9371a1c$var$CONTENT_NAME, __scopeMenu); | ||
@@ -350,6 +350,6 @@ const rootContext = $6cc32821e9371a1c$var$useMenuRootContext($6cc32821e9371a1c$var$CONTENT_NAME, __scopeMenu); | ||
onCurrentTabStopIdChange: setCurrentItemId, | ||
onEntryFocus: (event)=>{ | ||
onEntryFocus: $epM9y$composeEventHandlers(onEntryFocus, (event)=>{ | ||
// only focus first item when using keyboard | ||
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault(); | ||
} | ||
}) | ||
}), /*#__PURE__*/ $epM9y$createElement($epM9y$Content, $epM9y$babelruntimehelpersesmextends({ | ||
@@ -356,0 +356,0 @@ role: "menu", |
{ | ||
"name": "@radix-ui/react-menu", | ||
"version": "2.0.2-rc.2", | ||
"version": "2.0.2-rc.3", | ||
"license": "MIT", | ||
@@ -29,7 +29,7 @@ "source": "src/index.ts", | ||
"@radix-ui/react-id": "1.0.0", | ||
"@radix-ui/react-popper": "1.1.0-rc.1", | ||
"@radix-ui/react-popper": "1.1.0-rc.2", | ||
"@radix-ui/react-portal": "1.0.1", | ||
"@radix-ui/react-presence": "1.0.0", | ||
"@radix-ui/react-primitive": "1.0.1", | ||
"@radix-ui/react-roving-focus": "1.0.1", | ||
"@radix-ui/react-roving-focus": "1.0.2-rc.1", | ||
"@radix-ui/react-slot": "1.0.1", | ||
@@ -36,0 +36,0 @@ "@radix-ui/react-use-callback-ref": "1.0.0", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
326734
2129
+ Added@radix-ui/react-popper@1.1.0-rc.2(transitive)
+ Added@radix-ui/react-roving-focus@1.0.2-rc.1(transitive)
- Removed@radix-ui/react-popper@1.1.0-rc.1(transitive)
- Removed@radix-ui/react-roving-focus@1.0.1(transitive)