@react-aria/focus
Advanced tools
Comparing version 3.0.0-nightly.1076 to 3.0.0-nightly.1079
@@ -628,4 +628,4 @@ var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose")); | ||
let state = useRef({ | ||
isFocused: autoFocus, | ||
isFocusVisible: _isFocusVisible() | ||
isFocused: false, | ||
isFocusVisible: autoFocus || _isFocusVisible() | ||
}).current; | ||
@@ -632,0 +632,0 @@ let [isFocusVisibleState, setFocusVisible] = useState(() => state.isFocused && state.isFocusVisible); |
@@ -585,4 +585,4 @@ import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
let state = useRef({ | ||
isFocused: autoFocus, | ||
isFocusVisible: _isFocusVisible() | ||
isFocused: false, | ||
isFocusVisible: autoFocus || _isFocusVisible() | ||
}).current; | ||
@@ -589,0 +589,0 @@ let [isFocusVisibleState, setFocusVisible] = useState(() => state.isFocused && state.isFocusVisible); |
{ | ||
"name": "@react-aria/focus", | ||
"version": "3.0.0-nightly.1076+415888d27", | ||
"version": "3.0.0-nightly.1079+4b75cbe84", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,5 +21,5 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/interactions": "3.0.0-nightly.1076+415888d27", | ||
"@react-aria/utils": "3.0.0-nightly.1076+415888d27", | ||
"@react-types/shared": "3.0.0-nightly.1076+415888d27", | ||
"@react-aria/interactions": "3.0.0-nightly.1079+4b75cbe84", | ||
"@react-aria/utils": "3.0.0-nightly.1079+4b75cbe84", | ||
"@react-types/shared": "3.0.0-nightly.1079+4b75cbe84", | ||
"clsx": "^1.1.1" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "415888d27f27c6af844fc1b325a39612f15775be" | ||
"gitHead": "4b75cbe84157bcd735f7097a41f397d2c5c58543" | ||
} |
@@ -44,4 +44,4 @@ import {HTMLAttributes, useState} from 'react'; | ||
let state = useRef({ | ||
isFocused: autoFocus, | ||
isFocusVisible: isFocusVisible() | ||
isFocused: false, | ||
isFocusVisible: autoFocus || isFocusVisible() | ||
}).current; | ||
@@ -51,2 +51,3 @@ let [isFocusVisibleState, setFocusVisible] = useState(() => state.isFocused && state.isFocusVisible); | ||
let updateState = () => setFocusVisible(state.isFocused && state.isFocusVisible); | ||
let onFocusChange = isFocused => { | ||
@@ -53,0 +54,0 @@ state.isFocused = isFocused; |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
209338