@react-aria/link
Advanced tools
Comparing version 3.0.0-nightly.1245 to 3.0.0-nightly.1246
@@ -6,2 +6,6 @@ var { | ||
var { | ||
useFocusable | ||
} = require("@react-aria/focus"); | ||
var { | ||
filterDOMProps, | ||
@@ -46,2 +50,5 @@ mergeProps | ||
let { | ||
focusableProps | ||
} = useFocusable(props, ref); | ||
let { | ||
pressProps, | ||
@@ -59,6 +66,7 @@ isPressed | ||
}); | ||
let interactionHandlers = mergeProps(focusableProps, pressProps); | ||
return { | ||
isPressed, | ||
// Used to indicate press state for visual | ||
linkProps: mergeProps(domProps, _babelRuntimeHelpersExtends({}, pressProps, linkProps, { | ||
linkProps: mergeProps(domProps, _babelRuntimeHelpersExtends({}, interactionHandlers, linkProps, { | ||
'aria-disabled': isDisabled || undefined, | ||
@@ -65,0 +73,0 @@ onClick: e => { |
import { usePress } from "@react-aria/interactions"; | ||
import { useFocusable } from "@react-aria/focus"; | ||
import { filterDOMProps, mergeProps } from "@react-aria/utils"; | ||
@@ -33,2 +34,5 @@ import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
let { | ||
focusableProps | ||
} = useFocusable(props, ref); | ||
let { | ||
pressProps, | ||
@@ -46,6 +50,7 @@ isPressed | ||
}); | ||
let interactionHandlers = mergeProps(focusableProps, pressProps); | ||
return { | ||
isPressed, | ||
// Used to indicate press state for visual | ||
linkProps: mergeProps(domProps, _babelRuntimeHelpersEsmExtends({}, pressProps, linkProps, { | ||
linkProps: mergeProps(domProps, _babelRuntimeHelpersEsmExtends({}, interactionHandlers, linkProps, { | ||
'aria-disabled': isDisabled || undefined, | ||
@@ -52,0 +57,0 @@ onClick: e => { |
{ | ||
"name": "@react-aria/link", | ||
"version": "3.0.0-nightly.1245+25c8f46f4", | ||
"version": "3.0.0-nightly.1246+b49c14b74", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,6 +21,7 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/interactions": "3.0.0-nightly.1245+25c8f46f4", | ||
"@react-aria/utils": "3.0.0-nightly.1245+25c8f46f4", | ||
"@react-types/link": "3.0.0-nightly.1245+25c8f46f4", | ||
"@react-types/shared": "3.0.0-nightly.1245+25c8f46f4" | ||
"@react-aria/focus": "3.0.0-nightly.1246+b49c14b74", | ||
"@react-aria/interactions": "3.0.0-nightly.1246+b49c14b74", | ||
"@react-aria/utils": "3.0.0-nightly.1246+b49c14b74", | ||
"@react-types/link": "3.0.0-nightly.1246+b49c14b74", | ||
"@react-types/shared": "3.0.0-nightly.1246+b49c14b74" | ||
}, | ||
@@ -33,3 +34,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "25c8f46f4bb49e95e9b52f6fa624f0a3a4e07035" | ||
"gitHead": "b49c14b74a770d3dbc98d850a5c13552ad821f46" | ||
} |
@@ -16,2 +16,3 @@ /* | ||
import {HTMLAttributes, RefObject} from 'react'; | ||
import {useFocusable} from '@react-aria/focus'; | ||
import {usePress} from '@react-aria/interactions'; | ||
@@ -60,5 +61,6 @@ | ||
} | ||
let {focusableProps} = useFocusable(props, ref); | ||
let {pressProps, isPressed} = usePress({onPress, onPressStart, onPressEnd, isDisabled, ref}); | ||
let domProps = filterDOMProps(otherProps, {labelable: true}); | ||
let interactionHandlers = mergeProps(focusableProps, pressProps); | ||
@@ -68,3 +70,3 @@ return { | ||
linkProps: mergeProps(domProps, { | ||
...pressProps, | ||
...interactionHandlers, | ||
...linkProps, | ||
@@ -71,0 +73,0 @@ 'aria-disabled': isDisabled || 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
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
30824
243
7