@react-aria/visually-hidden
Advanced tools
Comparing version 3.2.4 to 3.2.5
@@ -1,4 +0,4 @@ | ||
var $34CuA$reactariautils = require("@react-aria/utils"); | ||
var $34CuA$react = require("react"); | ||
var $34CuA$reactariainteractions = require("@react-aria/interactions"); | ||
var $l9SOU$reactariautils = require("@react-aria/utils"); | ||
var $l9SOU$react = require("react"); | ||
var $l9SOU$reactariainteractions = require("@react-aria/interactions"); | ||
@@ -27,10 +27,10 @@ function $parcel$exportWildcard(dest, source) { | ||
} | ||
var $31fc8cc860e08cc0$exports = {}; | ||
var $8b518376223642b1$exports = {}; | ||
$parcel$export($31fc8cc860e08cc0$exports, "useVisuallyHidden", () => $31fc8cc860e08cc0$export$a966af930f325cab); | ||
$parcel$export($31fc8cc860e08cc0$exports, "VisuallyHidden", () => $31fc8cc860e08cc0$export$439d29a4e110a164); | ||
$parcel$export($8b518376223642b1$exports, "useVisuallyHidden", () => $8b518376223642b1$export$a966af930f325cab); | ||
$parcel$export($8b518376223642b1$exports, "VisuallyHidden", () => $8b518376223642b1$export$439d29a4e110a164); | ||
const $31fc8cc860e08cc0$var$styles = { | ||
const $8b518376223642b1$var$styles = { | ||
border: 0, | ||
@@ -47,7 +47,7 @@ clip: 'rect(0 0 0 0)', | ||
}; | ||
function $31fc8cc860e08cc0$export$a966af930f325cab(props = { | ||
function $8b518376223642b1$export$a966af930f325cab(props = { | ||
}) { | ||
let { style: style , isFocusable: isFocusable } = props; | ||
let [isFocused, setFocused] = $34CuA$react.useState(false); | ||
let { focusProps: focusProps } = $34CuA$reactariainteractions.useFocus({ | ||
let [isFocused, setFocused] = $l9SOU$react.useState(false); | ||
let { focusProps: focusProps } = $l9SOU$reactariainteractions.useFocus({ | ||
isDisabled: !isFocusable, | ||
@@ -57,9 +57,9 @@ onFocusChange: setFocused | ||
// If focused, don't hide the element. | ||
let combinedStyles = $34CuA$react.useMemo(()=>{ | ||
let combinedStyles = $l9SOU$react.useMemo(()=>{ | ||
if (isFocused) return style; | ||
else if (style) return { | ||
...$31fc8cc860e08cc0$var$styles, | ||
...$8b518376223642b1$var$styles, | ||
...style | ||
}; | ||
else return $31fc8cc860e08cc0$var$styles; | ||
else return $8b518376223642b1$var$styles; | ||
}, [ | ||
@@ -75,13 +75,13 @@ isFocused | ||
} | ||
function $31fc8cc860e08cc0$export$439d29a4e110a164(props) { | ||
function $8b518376223642b1$export$439d29a4e110a164(props) { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
let { children: children , elementType: Element = 'div' , isFocusable: isFocusable , style: style , ...otherProps } = props; | ||
let { visuallyHiddenProps: visuallyHiddenProps } = $31fc8cc860e08cc0$export$a966af930f325cab(props); | ||
return(/*#__PURE__*/ ($parcel$interopDefault($34CuA$react)).createElement(Element, $34CuA$reactariautils.mergeProps(otherProps, visuallyHiddenProps), children)); | ||
let { visuallyHiddenProps: visuallyHiddenProps } = $8b518376223642b1$export$a966af930f325cab(props); | ||
return(/*#__PURE__*/ ($parcel$interopDefault($l9SOU$react)).createElement(Element, $l9SOU$reactariautils.mergeProps(otherProps, visuallyHiddenProps), children)); | ||
} | ||
$parcel$exportWildcard(module.exports, $31fc8cc860e08cc0$exports); | ||
$parcel$exportWildcard(module.exports, $8b518376223642b1$exports); | ||
//# sourceMappingURL=main.js.map |
@@ -1,4 +0,4 @@ | ||
import {mergeProps as $48FbJ$mergeProps} from "@react-aria/utils"; | ||
import $48FbJ$react, {useState as $48FbJ$useState, useMemo as $48FbJ$useMemo} from "react"; | ||
import {useFocus as $48FbJ$useFocus} from "@react-aria/interactions"; | ||
import {mergeProps as $hZMlr$mergeProps} from "@react-aria/utils"; | ||
import $hZMlr$react, {useState as $hZMlr$useState, useMemo as $hZMlr$useMemo} from "react"; | ||
import {useFocus as $hZMlr$useFocus} from "@react-aria/interactions"; | ||
@@ -8,10 +8,10 @@ function $parcel$export(e, n, v, s) { | ||
} | ||
var $b05beb39a168f0a6$exports = {}; | ||
var $2b1a1e0abf5e6e14$exports = {}; | ||
$parcel$export($b05beb39a168f0a6$exports, "useVisuallyHidden", () => $b05beb39a168f0a6$export$a966af930f325cab); | ||
$parcel$export($b05beb39a168f0a6$exports, "VisuallyHidden", () => $b05beb39a168f0a6$export$439d29a4e110a164); | ||
$parcel$export($2b1a1e0abf5e6e14$exports, "useVisuallyHidden", () => $2b1a1e0abf5e6e14$export$a966af930f325cab); | ||
$parcel$export($2b1a1e0abf5e6e14$exports, "VisuallyHidden", () => $2b1a1e0abf5e6e14$export$439d29a4e110a164); | ||
const $b05beb39a168f0a6$var$styles = { | ||
const $2b1a1e0abf5e6e14$var$styles = { | ||
border: 0, | ||
@@ -28,7 +28,7 @@ clip: 'rect(0 0 0 0)', | ||
}; | ||
function $b05beb39a168f0a6$export$a966af930f325cab(props = { | ||
function $2b1a1e0abf5e6e14$export$a966af930f325cab(props = { | ||
}) { | ||
let { style: style , isFocusable: isFocusable } = props; | ||
let [isFocused, setFocused] = $48FbJ$useState(false); | ||
let { focusProps: focusProps } = $48FbJ$useFocus({ | ||
let [isFocused, setFocused] = $hZMlr$useState(false); | ||
let { focusProps: focusProps } = $hZMlr$useFocus({ | ||
isDisabled: !isFocusable, | ||
@@ -38,9 +38,9 @@ onFocusChange: setFocused | ||
// If focused, don't hide the element. | ||
let combinedStyles = $48FbJ$useMemo(()=>{ | ||
let combinedStyles = $hZMlr$useMemo(()=>{ | ||
if (isFocused) return style; | ||
else if (style) return { | ||
...$b05beb39a168f0a6$var$styles, | ||
...$2b1a1e0abf5e6e14$var$styles, | ||
...style | ||
}; | ||
else return $b05beb39a168f0a6$var$styles; | ||
else return $2b1a1e0abf5e6e14$var$styles; | ||
}, [ | ||
@@ -56,7 +56,7 @@ isFocused | ||
} | ||
function $b05beb39a168f0a6$export$439d29a4e110a164(props) { | ||
function $2b1a1e0abf5e6e14$export$439d29a4e110a164(props) { | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
let { children: children , elementType: Element = 'div' , isFocusable: isFocusable , style: style , ...otherProps } = props; | ||
let { visuallyHiddenProps: visuallyHiddenProps } = $b05beb39a168f0a6$export$a966af930f325cab(props); | ||
return(/*#__PURE__*/ $48FbJ$react.createElement(Element, $48FbJ$mergeProps(otherProps, visuallyHiddenProps), children)); | ||
let { visuallyHiddenProps: visuallyHiddenProps } = $2b1a1e0abf5e6e14$export$a966af930f325cab(props); | ||
return(/*#__PURE__*/ $hZMlr$react.createElement(Element, $hZMlr$mergeProps(otherProps, visuallyHiddenProps), children)); | ||
} | ||
@@ -67,3 +67,3 @@ | ||
export {$b05beb39a168f0a6$export$a966af930f325cab as useVisuallyHidden, $b05beb39a168f0a6$export$439d29a4e110a164 as VisuallyHidden}; | ||
export {$2b1a1e0abf5e6e14$export$a966af930f325cab as useVisuallyHidden, $2b1a1e0abf5e6e14$export$439d29a4e110a164 as VisuallyHidden}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@react-aria/visually-hidden", | ||
"version": "3.2.4", | ||
"version": "3.2.5", | ||
"description": "Spectrum UI components in React", | ||
@@ -23,4 +23,4 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/interactions": "^3.8.0", | ||
"@react-aria/utils": "^3.11.1", | ||
"@react-aria/interactions": "^3.8.1", | ||
"@react-aria/utils": "^3.11.2", | ||
"clsx": "^1.1.1" | ||
@@ -34,3 +34,3 @@ }, | ||
}, | ||
"gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc" | ||
"gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937" | ||
} |
Updated@react-aria/utils@^3.11.2