Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-aria/selection

Package Overview
Dependencies
Maintainers
2
Versions
825
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/selection - npm Package Compare versions

Comparing version 3.0.0-nightly-ab9fd5c68-241126 to 3.0.0-nightly-b0f156972-241128

2

dist/useSelectableCollection.main.js

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

if (delegate.getFirstKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();

@@ -124,2 +125,3 @@ let firstKey = delegate.getFirstKey(manager.focusedKey, (0, $ee0bdf4faa47f2a8$exports.isCtrlKeyPressed)(e));

if (delegate.getLastKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();

@@ -126,0 +128,0 @@ let lastKey = delegate.getLastKey(manager.focusedKey, (0, $ee0bdf4faa47f2a8$exports.isCtrlKeyPressed)(e));

@@ -106,2 +106,3 @@ import {isCtrlKeyPressed as $feb5ffebff200149$export$16792effe837dba3, isNonContiguousSelectionModifier as $feb5ffebff200149$export$d3e3bd3e26688c04} from "./utils.module.js";

if (delegate.getFirstKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();

@@ -118,2 +119,3 @@ let firstKey = delegate.getFirstKey(manager.focusedKey, (0, $feb5ffebff200149$export$16792effe837dba3)(e));

if (delegate.getLastKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();

@@ -120,0 +122,0 @@ let lastKey = delegate.getLastKey(manager.focusedKey, (0, $feb5ffebff200149$export$16792effe837dba3)(e));

8

dist/useSelectableItem.main.js

@@ -120,3 +120,3 @@ var $ee0bdf4faa47f2a8$exports = require("./utils.main.js");

};
// If allowsDifferentPressOrigin, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)

@@ -131,5 +131,7 @@ if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{

itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e)=>{
if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
if (e.pointerType === 'mouse' && allowsSelection) onSelect(e);
};
itemPressProps.onPress = hasPrimaryAction ? performAction : undefined;
itemPressProps.onPress = hasPrimaryAction ? performAction : (e)=>{
if (e.pointerType !== 'keyboard' && e.pointerType !== 'mouse' && allowsSelection) onSelect(e);
};
}

@@ -136,0 +138,0 @@ } else {

@@ -114,3 +114,3 @@ import {isCtrlKeyPressed as $feb5ffebff200149$export$16792effe837dba3, isNonContiguousSelectionModifier as $feb5ffebff200149$export$d3e3bd3e26688c04} from "./utils.module.js";

};
// If allowsDifferentPressOrigin, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)

@@ -125,5 +125,7 @@ if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{

itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e)=>{
if (e.pointerType !== 'keyboard' && allowsSelection) onSelect(e);
if (e.pointerType === 'mouse' && allowsSelection) onSelect(e);
};
itemPressProps.onPress = hasPrimaryAction ? performAction : undefined;
itemPressProps.onPress = hasPrimaryAction ? performAction : (e)=>{
if (e.pointerType !== 'keyboard' && e.pointerType !== 'mouse' && allowsSelection) onSelect(e);
};
}

@@ -130,0 +132,0 @@ } else {

{
"name": "@react-aria/selection",
"version": "3.0.0-nightly-ab9fd5c68-241126",
"version": "3.0.0-nightly-b0f156972-241128",
"description": "Spectrum UI components in React",

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

"dependencies": {
"@react-aria/focus": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-aria/i18n": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-aria/interactions": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-aria/utils": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-stately/selection": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-types/shared": "^3.0.0-nightly-ab9fd5c68-241126",
"@react-aria/focus": "^3.0.0-nightly-b0f156972-241128",
"@react-aria/i18n": "^3.0.0-nightly-b0f156972-241128",
"@react-aria/interactions": "^3.0.0-nightly-b0f156972-241128",
"@react-aria/utils": "^3.0.0-nightly-b0f156972-241128",
"@react-stately/selection": "^3.0.0-nightly-b0f156972-241128",
"@react-types/shared": "^3.0.0-nightly-b0f156972-241128",
"@swc/helpers": "^0.5.0"

@@ -33,0 +33,0 @@ },

@@ -225,2 +225,5 @@ /*

if (delegate.getFirstKey) {
if (manager.focusedKey === null && e.shiftKey) {
return;
}
e.preventDefault();

@@ -240,2 +243,5 @@ let firstKey: Key | null = delegate.getFirstKey(manager.focusedKey, isCtrlKeyPressed(e));

if (delegate.getLastKey) {
if (manager.focusedKey === null && e.shiftKey) {
return;
}
e.preventDefault();

@@ -242,0 +248,0 @@ let lastKey = delegate.getLastKey(manager.focusedKey, isCtrlKeyPressed(e));

@@ -244,3 +244,3 @@ /*

// If allowsDifferentPressOrigin, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)

@@ -261,3 +261,3 @@ if (!allowsDifferentPressOrigin) {

itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e) => {
if (e.pointerType !== 'keyboard' && allowsSelection) {
if (e.pointerType === 'mouse' && allowsSelection) {
onSelect(e);

@@ -267,3 +267,7 @@ }

itemPressProps.onPress = hasPrimaryAction ? performAction : undefined;
itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
if (e.pointerType !== 'keyboard' && e.pointerType !== 'mouse' && allowsSelection) {
onSelect(e);
}
};
}

@@ -270,0 +274,0 @@ } else {

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