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

@react-aria/disclosure

Package Overview
Dependencies
Maintainers
0
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/disclosure - npm Package Compare versions

Comparing version 3.0.0-nightly-5ae234603-240925 to 3.0.0-nightly-69109f003-241018

10

dist/useDisclosure.main.js

@@ -32,10 +32,8 @@ var $l3cx6$react = require("react");

// @ts-ignore https://github.com/facebook/react/pull/24741
(0, $l3cx6$reactariautils.useEvent)(ref, 'beforematch', supportsBeforeMatch ? ()=>state.expand() : null);
(0, $l3cx6$reactariautils.useEvent)(ref, 'beforematch', supportsBeforeMatch && !isControlled ? ()=>state.expand() : null);
(0, $l3cx6$react.useEffect)(()=>{
// Until React supports hidden="until-found": https://github.com/facebook/react/pull/24741
if (supportsBeforeMatch && (ref === null || ref === void 0 ? void 0 : ref.current) && !isControlled && !isDisabled) {
if (state.isExpanded) // @ts-ignore
ref.current.hidden = undefined;
else // @ts-ignore
ref.current.hidden = 'until-found';
if (state.isExpanded) ref.current.removeAttribute('hidden');
else ref.current.setAttribute('hidden', 'until-found');
}

@@ -56,3 +54,3 @@ }, [

onPress: (e)=>{
if (e.pointerType !== 'keyboard') state.toggle();
if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();
},

@@ -59,0 +57,0 @@ isDisabled: isDisabled,

@@ -26,10 +26,8 @@ import {useEffect as $6wN6e$useEffect} from "react";

// @ts-ignore https://github.com/facebook/react/pull/24741
(0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? ()=>state.expand() : null);
(0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch && !isControlled ? ()=>state.expand() : null);
(0, $6wN6e$useEffect)(()=>{
// Until React supports hidden="until-found": https://github.com/facebook/react/pull/24741
if (supportsBeforeMatch && (ref === null || ref === void 0 ? void 0 : ref.current) && !isControlled && !isDisabled) {
if (state.isExpanded) // @ts-ignore
ref.current.hidden = undefined;
else // @ts-ignore
ref.current.hidden = 'until-found';
if (state.isExpanded) ref.current.removeAttribute('hidden');
else ref.current.setAttribute('hidden', 'until-found');
}

@@ -50,3 +48,3 @@ }, [

onPress: (e)=>{
if (e.pointerType !== 'keyboard') state.toggle();
if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();
},

@@ -53,0 +51,0 @@ isDisabled: isDisabled,

22

package.json
{
"name": "@react-aria/disclosure",
"version": "3.0.0-nightly-5ae234603-240925",
"version": "3.0.0-nightly-69109f003-241018",
"description": "Spectrum UI components in React",

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

"dependencies": {
"@react-aria/button": "^3.0.0-nightly-5ae234603-240925",
"@react-aria/selection": "^3.0.0-nightly-5ae234603-240925",
"@react-aria/ssr": "^3.0.0-nightly-5ae234603-240925",
"@react-aria/utils": "^3.0.0-nightly-5ae234603-240925",
"@react-stately/disclosure": "3.0.0-nightly-5ae234603-240925",
"@react-stately/toggle": "^3.0.0-nightly-5ae234603-240925",
"@react-stately/tree": "^3.0.0-nightly-5ae234603-240925",
"@react-types/button": "^3.0.0-nightly-5ae234603-240925",
"@react-types/shared": "^3.0.0-nightly-5ae234603-240925",
"@react-aria/button": "^3.0.0-nightly-69109f003-241018",
"@react-aria/selection": "^3.0.0-nightly-69109f003-241018",
"@react-aria/ssr": "^3.0.0-nightly-69109f003-241018",
"@react-aria/utils": "^3.0.0-nightly-69109f003-241018",
"@react-stately/disclosure": "3.0.0-nightly-69109f003-241018",
"@react-stately/toggle": "^3.0.0-nightly-69109f003-241018",
"@react-stately/tree": "^3.0.0-nightly-69109f003-241018",
"@react-types/button": "^3.0.0-nightly-69109f003-241018",
"@react-types/shared": "^3.0.0-nightly-69109f003-241018",
"@swc/helpers": "^0.5.0"

@@ -44,3 +44,3 @@ },

},
"stableVersion": "3.0.0-alpha.0"
"stableVersion": "3.0.0-alpha.1"
}

@@ -54,3 +54,3 @@ /*

// @ts-ignore https://github.com/facebook/react/pull/24741
useEvent(ref, 'beforematch', supportsBeforeMatch ? () => state.expand() : null);
useEvent(ref, 'beforematch', supportsBeforeMatch && !isControlled ? () => state.expand() : null);

@@ -61,7 +61,5 @@ useEffect(() => {

if (state.isExpanded) {
// @ts-ignore
ref.current.hidden = undefined;
ref.current.removeAttribute('hidden');
} else {
// @ts-ignore
ref.current.hidden = 'until-found';
ref.current.setAttribute('hidden', 'until-found');
}

@@ -77,3 +75,3 @@ }

onPress: (e) => {
if (e.pointerType !== 'keyboard') {
if (!isDisabled && e.pointerType !== 'keyboard') {
state.toggle();

@@ -80,0 +78,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