New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@react-aria/menu

Package Overview
Dependencies
Maintainers
2
Versions
909
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/menu - npm Package Compare versions

Comparing version 3.0.0-nightly-9b3385ac6-250228 to 3.0.0-nightly-9bd8a5f19-250304

9

dist/useSubmenuTrigger.main.js
var $62347d8c4183e713$exports = require("./useSafelyMouseToSubmenu.main.js");
var $23MMN$reactariautils = require("@react-aria/utils");
var $23MMN$reactariainteractions = require("@react-aria/interactions");
var $23MMN$react = require("react");

@@ -27,3 +26,2 @@ var $23MMN$reactariai18n = require("@react-aria/i18n");

function $5f4753043c9f6cdf$export$7138b0d059a6e743(props, state, ref) {

@@ -59,2 +57,5 @@ let { parentMenuRef: parentMenuRef, submenuRef: submenuRef, type: type = 'menu', isDisabled: isDisabled, delay: delay = 200, shouldUseVirtualFocus: shouldUseVirtualFocus } = props;

let submenuKeyDown = (e)=>{
// If focus is not within the menu, assume virtual focus is being used.
// This means some other input element is also within the popover, so we shouldn't close the menu.
if (!e.currentTarget.contains(document.activeElement)) return;
switch(e.key){

@@ -174,6 +175,2 @@ case 'ArrowLeft':

isNonModal: true,
// We will manually coerce focus back to the triggers for mobile screen readers and non virtual focus use cases (aka submenus outside of autocomplete) so turn off
// FocusScope then. For virtual focus use cases (Autocomplete subdialogs/menu) and subdialogs we want to keep FocusScope restoreFocus to automatically
// send focus to parent subdialog input fields and/or tab containment
disableFocusManagement: !shouldUseVirtualFocus && ((0, $23MMN$reactariainteractions.getInteractionModality)() === 'virtual' || type === 'menu'),
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside

@@ -180,0 +177,0 @@ }

import {useSafelyMouseToSubmenu as $d275435c250248f8$export$85ec83e04c95f50a} from "./useSafelyMouseToSubmenu.module.js";
import {useId as $dXlYe$useId, useEffectEvent as $dXlYe$useEffectEvent, useLayoutEffect as $dXlYe$useLayoutEffect, focusWithoutScrolling as $dXlYe$focusWithoutScrolling} from "@react-aria/utils";
import {getInteractionModality as $dXlYe$getInteractionModality} from "@react-aria/interactions";
import {useRef as $dXlYe$useRef, useCallback as $dXlYe$useCallback} from "react";

@@ -21,3 +20,2 @@ import {useLocale as $dXlYe$useLocale} from "@react-aria/i18n";

function $0065b146e7192841$export$7138b0d059a6e743(props, state, ref) {

@@ -53,2 +51,5 @@ let { parentMenuRef: parentMenuRef, submenuRef: submenuRef, type: type = 'menu', isDisabled: isDisabled, delay: delay = 200, shouldUseVirtualFocus: shouldUseVirtualFocus } = props;

let submenuKeyDown = (e)=>{
// If focus is not within the menu, assume virtual focus is being used.
// This means some other input element is also within the popover, so we shouldn't close the menu.
if (!e.currentTarget.contains(document.activeElement)) return;
switch(e.key){

@@ -168,6 +169,2 @@ case 'ArrowLeft':

isNonModal: true,
// We will manually coerce focus back to the triggers for mobile screen readers and non virtual focus use cases (aka submenus outside of autocomplete) so turn off
// FocusScope then. For virtual focus use cases (Autocomplete subdialogs/menu) and subdialogs we want to keep FocusScope restoreFocus to automatically
// send focus to parent subdialog input fields and/or tab containment
disableFocusManagement: !shouldUseVirtualFocus && ((0, $dXlYe$getInteractionModality)() === 'virtual' || type === 'menu'),
shouldCloseOnInteractOutside: shouldCloseOnInteractOutside

@@ -174,0 +171,0 @@ }

{
"name": "@react-aria/menu",
"version": "3.0.0-nightly-9b3385ac6-250228",
"version": "3.0.0-nightly-9bd8a5f19-250304",
"description": "Spectrum UI components in React",

@@ -25,15 +25,15 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/focus": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/i18n": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/interactions": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/overlays": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/selection": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/utils": "3.0.0-nightly-9b3385ac6-250228",
"@react-stately/collections": "3.0.0-nightly-9b3385ac6-250228",
"@react-stately/menu": "3.0.0-nightly-9b3385ac6-250228",
"@react-stately/selection": "3.0.0-nightly-9b3385ac6-250228",
"@react-stately/tree": "3.0.0-nightly-9b3385ac6-250228",
"@react-types/button": "3.0.0-nightly-9b3385ac6-250228",
"@react-types/menu": "3.0.0-nightly-9b3385ac6-250228",
"@react-types/shared": "3.0.0-nightly-9b3385ac6-250228",
"@react-aria/focus": "3.0.0-nightly-9bd8a5f19-250304",
"@react-aria/i18n": "3.0.0-nightly-9bd8a5f19-250304",
"@react-aria/interactions": "3.0.0-nightly-9bd8a5f19-250304",
"@react-aria/overlays": "3.0.0-nightly-9bd8a5f19-250304",
"@react-aria/selection": "3.0.0-nightly-9bd8a5f19-250304",
"@react-aria/utils": "3.0.0-nightly-9bd8a5f19-250304",
"@react-stately/collections": "3.0.0-nightly-9bd8a5f19-250304",
"@react-stately/menu": "3.0.0-nightly-9bd8a5f19-250304",
"@react-stately/selection": "3.0.0-nightly-9bd8a5f19-250304",
"@react-stately/tree": "3.0.0-nightly-9bd8a5f19-250304",
"@react-types/button": "3.0.0-nightly-9bd8a5f19-250304",
"@react-types/menu": "3.0.0-nightly-9bd8a5f19-250304",
"@react-types/shared": "3.0.0-nightly-9bd8a5f19-250304",
"@swc/helpers": "^0.5.0"

@@ -40,0 +40,0 @@ },

@@ -18,3 +18,2 @@ /*

import {focusWithoutScrolling, useEffectEvent, useId, useLayoutEffect} from '@react-aria/utils';
import {getInteractionModality} from '@react-aria/interactions';
import type {SubmenuTriggerState} from '@react-stately/menu';

@@ -103,2 +102,8 @@ import {useCallback, useRef} from 'react';

let submenuKeyDown = (e: KeyboardEvent) => {
// If focus is not within the menu, assume virtual focus is being used.
// This means some other input element is also within the popover, so we shouldn't close the menu.
if (!e.currentTarget.contains(document.activeElement)) {
return;
}
switch (e.key) {

@@ -255,6 +260,2 @@ case 'ArrowLeft':

isNonModal: true,
// We will manually coerce focus back to the triggers for mobile screen readers and non virtual focus use cases (aka submenus outside of autocomplete) so turn off
// FocusScope then. For virtual focus use cases (Autocomplete subdialogs/menu) and subdialogs we want to keep FocusScope restoreFocus to automatically
// send focus to parent subdialog input fields and/or tab containment
disableFocusManagement: !shouldUseVirtualFocus && (getInteractionModality() === 'virtual' || type === 'menu'),
shouldCloseOnInteractOutside

@@ -261,0 +262,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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc