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

@react-stately/radio

Package Overview
Dependencies
Maintainers
1
Versions
796
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-stately/radio - npm Package Compare versions

Comparing version 3.0.0-rc.1 to 3.0.0-rc.2

LICENSE

15

dist/main.js

@@ -1,5 +0,7 @@

var _babelRuntimeHelpersEsmSlicedToArray = $parcel$interopDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
var _babelRuntimeHelpersSlicedToArray = $parcel$interopDefault(require("@babel/runtime/helpers/slicedToArray"));
var useControlledState = require("@react-stately/utils").useControlledState;
var useState = require("react").useState;
function $parcel$interopDefault(a) {

@@ -11,6 +13,11 @@ return a && a.__esModule ? a.default : a;

var _useControlledState = useControlledState(props.value, props.defaultValue, props.onChange),
_useControlledState2 = _babelRuntimeHelpersEsmSlicedToArray(_useControlledState, 2),
_useControlledState2 = _babelRuntimeHelpersSlicedToArray(_useControlledState, 2),
selectedRadio = _useControlledState2[0],
setSelected = _useControlledState2[1];
var _useState = useState(null),
_useState2 = _babelRuntimeHelpersSlicedToArray(_useState, 2),
focusableRadio = _useState2[0],
setFocusableRadio = _useState2[1];
var setSelectedRadio = function setSelectedRadio(value) {

@@ -24,3 +31,5 @@ if (!props.isReadOnly) {

selectedRadio: selectedRadio,
setSelectedRadio: setSelectedRadio
setSelectedRadio: setSelectedRadio,
focusableRadio: focusableRadio,
setFocusableRadio: setFocusableRadio
};

@@ -27,0 +36,0 @@ }

6

dist/module.js
import { useControlledState } from "@react-stately/utils";
import { useState } from "react";
export function useRadioGroupState(props) {
let [selectedRadio, setSelected] = useControlledState(props.value, props.defaultValue, props.onChange);
let [focusableRadio, setFocusableRadio] = useState(null);

@@ -13,4 +15,6 @@ let setSelectedRadio = value => {

selectedRadio,
setSelectedRadio
setSelectedRadio,
focusableRadio,
setFocusableRadio
};
}

@@ -5,2 +5,4 @@ import { RadioGroupProps } from "@react-types/radio";

setSelectedRadio: (value: string) => void;
focusableRadio: string | undefined;
setFocusableRadio: (value: string) => void;
}

@@ -7,0 +9,0 @@ export function useRadioGroupState(props: RadioGroupProps): RadioGroupState;

{
"name": "@react-stately/radio",
"version": "3.0.0-rc.1",
"version": "3.0.0-rc.2",
"description": "Spectrum UI components in React",

@@ -20,4 +20,4 @@ "license": "Apache-2.0",

"@babel/runtime": "^7.6.2",
"@react-stately/utils": "^3.0.0-rc.1",
"@react-types/radio": "^3.0.0-rc.1"
"@react-stately/utils": "^3.0.0-rc.2",
"@react-types/radio": "^3.0.0-rc.2"
},

@@ -33,3 +33,3 @@ "peerDependencies": {

},
"gitHead": "5a9784f0bb6c25af7422215efb31ef72caeb9600"
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410"
}

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