@react-spectrum/radio
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -22,2 +22,6 @@ var { | ||
var { | ||
useHover | ||
} = require("@react-aria/interactions"); | ||
var _react2 = require("react"); | ||
@@ -63,2 +67,3 @@ | ||
"spectrum-Radio--labelBelow": "_spectrum-Radio--labelBelow_db05c", | ||
"is-hovered": "_is-hovered_db05c", | ||
"spectrum-Radio--quiet": "_spectrum-Radio--quiet_db05c", | ||
@@ -87,2 +92,8 @@ "is-invalid": "_is-invalid_db05c" | ||
} = useStyleProps(otherProps); | ||
let { | ||
hoverProps, | ||
isHovered | ||
} = useHover({ | ||
isDisabled | ||
}); | ||
let inputRef = useRef(null); | ||
@@ -102,3 +113,3 @@ let domRef = useFocusableRef(ref, inputRef); | ||
}), state, inputRef); | ||
return /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersExtends({}, styleProps, { | ||
return /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersExtends({}, styleProps, hoverProps, { | ||
ref: domRef, | ||
@@ -110,3 +121,4 @@ className: classNames($b50b26895e9d451b27b55d215ff6a51$$interop$default, 'spectrum-Radio', { | ||
'is-disabled': isDisabled, | ||
'is-invalid': validationState === 'invalid' | ||
'is-invalid': validationState === 'invalid', | ||
'is-hovered': isHovered | ||
}, styleProps.className) | ||
@@ -113,0 +125,0 @@ }), /*#__PURE__*/_react.createElement(FocusRing, { |
@@ -6,2 +6,3 @@ import { useRadioGroupState } from "@react-stately/radio"; | ||
import { useRadio, useRadioGroup } from "@react-aria/radio"; | ||
import { useHover } from "@react-aria/interactions"; | ||
import _react, { forwardRef, useRef, useContext } from "react"; | ||
@@ -27,2 +28,3 @@ import { FocusRing } from "@react-aria/focus"; | ||
"spectrum-Radio--labelBelow": "_spectrum-Radio--labelBelow_db05c", | ||
"is-hovered": "_is-hovered_db05c", | ||
"spectrum-Radio--quiet": "_spectrum-Radio--quiet_db05c", | ||
@@ -51,2 +53,8 @@ "is-invalid": "_is-invalid_db05c" | ||
} = useStyleProps(otherProps); | ||
let { | ||
hoverProps, | ||
isHovered | ||
} = useHover({ | ||
isDisabled | ||
}); | ||
let inputRef = useRef(null); | ||
@@ -66,3 +74,3 @@ let domRef = useFocusableRef(ref, inputRef); | ||
}), state, inputRef); | ||
return /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersEsmExtends({}, styleProps, { | ||
return /*#__PURE__*/_react.createElement("label", _babelRuntimeHelpersEsmExtends({}, styleProps, hoverProps, { | ||
ref: domRef, | ||
@@ -74,3 +82,4 @@ className: classNames($caf9effdead839c12d96b05817b87a$$interop$default, 'spectrum-Radio', { | ||
'is-disabled': isDisabled, | ||
'is-invalid': validationState === 'invalid' | ||
'is-invalid': validationState === 'invalid', | ||
'is-hovered': isHovered | ||
}, styleProps.className) | ||
@@ -77,0 +86,0 @@ }), /*#__PURE__*/_react.createElement(FocusRing, { |
{ | ||
"name": "@react-spectrum/radio", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "Spectrum UI components in React", | ||
@@ -35,10 +35,11 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-aria/focus": "^3.0.2", | ||
"@react-aria/radio": "^3.0.2", | ||
"@react-spectrum/form": "^3.0.2", | ||
"@react-spectrum/label": "^3.0.2", | ||
"@react-spectrum/utils": "^3.0.2", | ||
"@react-stately/radio": "^3.0.2", | ||
"@react-types/radio": "^3.0.2", | ||
"@react-types/shared": "^3.0.2" | ||
"@react-aria/focus": "^3.1.0", | ||
"@react-aria/interactions": "^3.1.0", | ||
"@react-aria/radio": "^3.1.0", | ||
"@react-spectrum/form": "^3.1.0", | ||
"@react-spectrum/label": "^3.1.0", | ||
"@react-spectrum/utils": "^3.1.0", | ||
"@react-stately/radio": "^3.1.0", | ||
"@react-types/radio": "^3.1.0", | ||
"@react-types/shared": "^3.1.0" | ||
}, | ||
@@ -55,3 +56,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "05003506f02a0ec173f3448f1801cbdf12b47bc7" | ||
"gitHead": "211099972fe75ee581892efd01a7f89dfb9cdf69" | ||
} |
@@ -13,3 +13,5 @@ /* | ||
/// <reference types="css-module-types" /> | ||
export * from './Radio'; | ||
export * from './RadioGroup'; |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
680
104741
12
Updated@react-aria/focus@^3.1.0
Updated@react-aria/radio@^3.1.0
Updated@react-spectrum/form@^3.1.0
Updated@react-spectrum/label@^3.1.0
Updated@react-spectrum/utils@^3.1.0
Updated@react-stately/radio@^3.1.0
Updated@react-types/radio@^3.1.0
Updated@react-types/shared@^3.1.0