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
881
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-993de98ad-241210 to 3.0.0-nightly-9d70953f1-250204

2

dist/types.d.ts

@@ -65,2 +65,4 @@ import { AriaMenuProps, MenuTriggerType } from "@react-types/menu";

isFocused: boolean;
/** Whether the item is keyboard focused. */
isFocusVisible: boolean;
/** Whether the item is currently selected. */

@@ -67,0 +69,0 @@ isSelected: boolean;

@@ -191,2 +191,3 @@ var $815e346b11b84016$exports = require("./utils.main.js");

isFocused: isFocused,
isFocusVisible: isFocused && (0, $byVdR$reactariainteractions.isFocusVisible)(),
isSelected: isSelected,

@@ -193,0 +194,0 @@ isPressed: isPressed,

@@ -185,2 +185,3 @@ import {menuData as $fc79756100351201$export$6f49b4016bfc8d56} from "./utils.module.js";

isFocused: isFocused,
isFocusVisible: isFocused && (0, $7Kjv5$isFocusVisible)(),
isSelected: isSelected,

@@ -187,0 +188,0 @@ isPressed: isPressed,

13

dist/useMenuTrigger.main.js
var $d1742ec2644a0949$exports = require("./intlStrings.main.js");
var $jo7gW$reactariautils = require("@react-aria/utils");
var $jo7gW$reactariainteractions = require("@react-aria/interactions");
var $jo7gW$reactariai18n = require("@react-aria/i18n");
var $jo7gW$reactariainteractions = require("@react-aria/interactions");
var $jo7gW$reactariaoverlays = require("@react-aria/overlays");

@@ -74,7 +74,12 @@

let pressProps = {
preventFocusOnPress: true,
onPressStart (e) {
// For consistency with native, open the menu on mouse/key down, but touch up.
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) // If opened with a screen reader, auto focus the first item.
// Otherwise, the menu itself will be focused.
state.open(e.pointerType === 'virtual' ? 'first' : null);
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {
// Ensure trigger has focus before opening the menu so it can be restored by FocusScope on close.
(0, $jo7gW$reactariautils.focusWithoutScrolling)(e.target);
// If opened with a screen reader, auto focus the first item.
// Otherwise, the menu itself will be focused.
state.open(e.pointerType === 'virtual' ? 'first' : null);
}
},

@@ -81,0 +86,0 @@ onPress (e) {

import $czs6v$intlStringsmodulejs from "./intlStrings.module.js";
import {useId as $czs6v$useId} from "@react-aria/utils";
import {useId as $czs6v$useId, focusWithoutScrolling as $czs6v$focusWithoutScrolling} from "@react-aria/utils";
import {useLongPress as $czs6v$useLongPress} from "@react-aria/interactions";
import {useLocalizedStringFormatter as $czs6v$useLocalizedStringFormatter} from "@react-aria/i18n";
import {useLongPress as $czs6v$useLongPress} from "@react-aria/interactions";
import {useOverlayTrigger as $czs6v$useOverlayTrigger} from "@react-aria/overlays";

@@ -68,7 +68,12 @@

let pressProps = {
preventFocusOnPress: true,
onPressStart (e) {
// For consistency with native, open the menu on mouse/key down, but touch up.
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) // If opened with a screen reader, auto focus the first item.
// Otherwise, the menu itself will be focused.
state.open(e.pointerType === 'virtual' ? 'first' : null);
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {
// Ensure trigger has focus before opening the menu so it can be restored by FocusScope on close.
(0, $czs6v$focusWithoutScrolling)(e.target);
// If opened with a screen reader, auto focus the first item.
// Otherwise, the menu itself will be focused.
state.open(e.pointerType === 'virtual' ? 'first' : null);
}
},

@@ -75,0 +80,0 @@ onPress (e) {

{
"name": "@react-aria/menu",
"version": "3.0.0-nightly-993de98ad-241210",
"version": "3.0.0-nightly-9d70953f1-250204",
"description": "Spectrum UI components in React",

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

"dependencies": {
"@react-aria/focus": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/i18n": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/interactions": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/overlays": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/selection": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/utils": "^3.0.0-nightly-993de98ad-241210",
"@react-stately/collections": "^3.0.0-nightly-993de98ad-241210",
"@react-stately/menu": "^3.0.0-nightly-993de98ad-241210",
"@react-stately/selection": "^3.0.0-nightly-993de98ad-241210",
"@react-stately/tree": "^3.0.0-nightly-993de98ad-241210",
"@react-types/button": "^3.0.0-nightly-993de98ad-241210",
"@react-types/menu": "^3.0.0-nightly-993de98ad-241210",
"@react-types/shared": "^3.0.0-nightly-993de98ad-241210",
"@react-aria/focus": "3.0.0-nightly-9d70953f1-250204",
"@react-aria/i18n": "3.0.0-nightly-9d70953f1-250204",
"@react-aria/interactions": "3.0.0-nightly-9d70953f1-250204",
"@react-aria/overlays": "3.0.0-nightly-9d70953f1-250204",
"@react-aria/selection": "3.0.0-nightly-9d70953f1-250204",
"@react-aria/utils": "3.0.0-nightly-9d70953f1-250204",
"@react-stately/collections": "3.0.0-nightly-9d70953f1-250204",
"@react-stately/menu": "3.0.0-nightly-9d70953f1-250204",
"@react-stately/selection": "3.0.0-nightly-9d70953f1-250204",
"@react-stately/tree": "3.0.0-nightly-9d70953f1-250204",
"@react-types/button": "3.0.0-nightly-9d70953f1-250204",
"@react-types/menu": "3.0.0-nightly-9d70953f1-250204",
"@react-types/shared": "3.0.0-nightly-9d70953f1-250204",
"@swc/helpers": "^0.5.0"

@@ -47,4 +47,3 @@ },

"access": "public"
},
"stableVersion": "3.16.0"
}
}

@@ -37,2 +37,4 @@ /*

isFocused: boolean,
/** Whether the item is keyboard focused. */
isFocusVisible: boolean,
/** Whether the item is currently selected. */

@@ -320,2 +322,3 @@ isSelected: boolean,

isFocused,
isFocusVisible: isFocused && isFocusVisible(),
isSelected,

@@ -322,0 +325,0 @@ isPressed,

@@ -15,2 +15,4 @@ /*

import {AriaMenuOptions} from './useMenu';
import {FocusableElement, RefObject} from '@react-types/shared';
import {focusWithoutScrolling, useId} from '@react-aria/utils';
// @ts-ignore

@@ -20,6 +22,4 @@ import intlMessages from '../intl/*.json';

import {MenuTriggerType} from '@react-types/menu';
import {RefObject} from '@react-types/shared';
import {useId} from '@react-aria/utils';
import {PressProps, useLongPress} from '@react-aria/interactions';
import {useLocalizedStringFormatter} from '@react-aria/i18n';
import {useLongPress} from '@react-aria/interactions';
import {useOverlayTrigger} from '@react-aria/overlays';

@@ -113,6 +113,10 @@

let pressProps = {
let pressProps: PressProps = {
preventFocusOnPress: true,
onPressStart(e) {
// For consistency with native, open the menu on mouse/key down, but touch up.
if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {
// Ensure trigger has focus before opening the menu so it can be restored by FocusScope on close.
focusWithoutScrolling(e.target as FocusableElement);
// If opened with a screen reader, auto focus the first item.

@@ -119,0 +123,0 @@ // Otherwise, the menu itself will be focused.

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

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