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

@react-aria/toggle

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/toggle - npm Package Compare versions

Comparing version 3.0.0-nightly-e1b72a79f-241017 to 3.0.0-nightly-e228ed814-250129

13

dist/useToggle.main.js

@@ -35,12 +35,9 @@ var $2jyrz$reactariautils = require("@react-aria/utils");

if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
// This handles focusing the input on pointer down, which Safari does not do by default.
// Handle press state for keyboard interactions and cases where labelProps is not used.
let { pressProps: pressProps, isPressed: isPressed } = (0, $2jyrz$reactariainteractions.usePress)({
isDisabled: isDisabled
});
// iOS does not toggle checkboxes if you drag off and back onto the label, so handle it ourselves.
// Handle press state on the label.
let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $2jyrz$reactariainteractions.usePress)({
isDisabled: isDisabled || isReadOnly,
onPress () {
state.toggle();
}
isDisabled: isDisabled || isReadOnly
});

@@ -54,5 +51,3 @@ let { focusableProps: focusableProps } = (0, $2jyrz$reactariafocus.useFocusable)(props, ref);

return {
labelProps: (0, $2jyrz$reactariautils.mergeProps)(labelProps, {
onClick: (e)=>e.preventDefault()
}),
labelProps: labelProps,
inputProps: (0, $2jyrz$reactariautils.mergeProps)(domProps, {

@@ -59,0 +54,0 @@ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,

@@ -29,12 +29,9 @@ import {mergeProps as $bvdLj$mergeProps, filterDOMProps as $bvdLj$filterDOMProps, useFormReset as $bvdLj$useFormReset} from "@react-aria/utils";

if (!hasChildren && !hasAriaLabel) console.warn('If you do not provide children, you must specify an aria-label for accessibility');
// This handles focusing the input on pointer down, which Safari does not do by default.
// Handle press state for keyboard interactions and cases where labelProps is not used.
let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
isDisabled: isDisabled
});
// iOS does not toggle checkboxes if you drag off and back onto the label, so handle it ourselves.
// Handle press state on the label.
let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({
isDisabled: isDisabled || isReadOnly,
onPress () {
state.toggle();
}
isDisabled: isDisabled || isReadOnly
});

@@ -48,5 +45,3 @@ let { focusableProps: focusableProps } = (0, $bvdLj$useFocusable)(props, ref);

return {
labelProps: (0, $bvdLj$mergeProps)(labelProps, {
onClick: (e)=>e.preventDefault()
}),
labelProps: labelProps,
inputProps: (0, $bvdLj$mergeProps)(domProps, {

@@ -53,0 +48,0 @@ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,

{
"name": "@react-aria/toggle",
"version": "3.0.0-nightly-e1b72a79f-241017",
"version": "3.0.0-nightly-e228ed814-250129",
"description": "Spectrum UI components in React",

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

"dependencies": {
"@react-aria/focus": "^3.0.0-nightly-e1b72a79f-241017",
"@react-aria/interactions": "^3.0.0-nightly-e1b72a79f-241017",
"@react-aria/utils": "^3.0.0-nightly-e1b72a79f-241017",
"@react-stately/toggle": "^3.0.0-nightly-e1b72a79f-241017",
"@react-types/checkbox": "^3.0.0-nightly-e1b72a79f-241017",
"@react-types/shared": "^3.0.0-nightly-e1b72a79f-241017",
"@react-aria/focus": "3.0.0-nightly-e228ed814-250129",
"@react-aria/interactions": "3.0.0-nightly-e228ed814-250129",
"@react-aria/utils": "3.0.0-nightly-e228ed814-250129",
"@react-stately/toggle": "3.0.0-nightly-e228ed814-250129",
"@react-types/checkbox": "3.0.0-nightly-e228ed814-250129",
"@react-types/shared": "3.0.0-nightly-e228ed814-250129",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"stableVersion": "3.10.9"
}
}

@@ -67,3 +67,3 @@ /*

// This handles focusing the input on pointer down, which Safari does not do by default.
// Handle press state for keyboard interactions and cases where labelProps is not used.
let {pressProps, isPressed} = usePress({

@@ -73,8 +73,5 @@ isDisabled

// iOS does not toggle checkboxes if you drag off and back onto the label, so handle it ourselves.
// Handle press state on the label.
let {pressProps: labelProps, isPressed: isLabelPressed} = usePress({
isDisabled: isDisabled || isReadOnly,
onPress() {
state.toggle();
}
isDisabled: isDisabled || isReadOnly
});

@@ -89,3 +86,3 @@

return {
labelProps: mergeProps(labelProps, {onClick: e => e.preventDefault()}),
labelProps,
inputProps: mergeProps(domProps, {

@@ -92,0 +89,0 @@ 'aria-invalid': isInvalid || validationState === 'invalid' || undefined,

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