You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@react-aria/checkbox

Package Overview
Dependencies
Maintainers
0
Versions
940
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/checkbox - npm Package Compare versions

Comparing version

to
3.0.0-nightly-4b2c6e76f-250320

18

dist/useCheckbox.main.js
var $ar5WQ$react = require("react");
var $ar5WQ$reactariautils = require("@react-aria/utils");
var $ar5WQ$reactstatelyform = require("@react-stately/form");
var $ar5WQ$reactariaform = require("@react-aria/form");
var $ar5WQ$reactstatelyform = require("@react-stately/form");
var $ar5WQ$reactariainteractions = require("@react-aria/interactions");
var $ar5WQ$reactariatoggle = require("@react-aria/toggle");

@@ -26,2 +28,4 @@

function $468c774d7db917b7$export$e375f10ce42261c5(props, state, inputRef) {

@@ -45,4 +49,14 @@ // Create validation state here because it doesn't make sense to add to general useToggleState.

});
// Reset validation state on label press for checkbox with a hidden input.
let { pressProps: pressProps } = (0, $ar5WQ$reactariainteractions.usePress)({
isDisabled: isDisabled || isReadOnly,
onPress () {
// @ts-expect-error
let { [(0, $ar5WQ$reactstatelyform.privateValidationStateProp)]: groupValidationState } = props;
let { commitValidation: commitValidation } = groupValidationState ? groupValidationState : validationState;
commitValidation();
}
});
return {
labelProps: labelProps,
labelProps: (0, $ar5WQ$reactariautils.mergeProps)(labelProps, pressProps),
inputProps: {

@@ -49,0 +63,0 @@ ...inputProps,

import {useEffect as $jNP0e$useEffect} from "react";
import {mergeProps as $jNP0e$mergeProps} from "@react-aria/utils";
import {useFormValidationState as $jNP0e$useFormValidationState, privateValidationStateProp as $jNP0e$privateValidationStateProp} from "@react-stately/form";
import {useFormValidation as $jNP0e$useFormValidation} from "@react-aria/form";
import {useFormValidationState as $jNP0e$useFormValidationState} from "@react-stately/form";
import {usePress as $jNP0e$usePress} from "@react-aria/interactions";
import {useToggle as $jNP0e$useToggle} from "@react-aria/toggle";

@@ -20,2 +22,4 @@

function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {

@@ -39,4 +43,14 @@ // Create validation state here because it doesn't make sense to add to general useToggleState.

});
// Reset validation state on label press for checkbox with a hidden input.
let { pressProps: pressProps } = (0, $jNP0e$usePress)({
isDisabled: isDisabled || isReadOnly,
onPress () {
// @ts-expect-error
let { [(0, $jNP0e$privateValidationStateProp)]: groupValidationState } = props;
let { commitValidation: commitValidation } = groupValidationState ? groupValidationState : validationState;
commitValidation();
}
});
return {
labelProps: labelProps,
labelProps: (0, $jNP0e$mergeProps)(labelProps, pressProps),
inputProps: {

@@ -43,0 +57,0 @@ ...inputProps,

28

package.json
{
"name": "@react-aria/checkbox",
"version": "3.0.0-nightly-4980928d3-240906",
"version": "3.0.0-nightly-4b2c6e76f-250320",
"description": "Spectrum UI components in React",

@@ -25,21 +25,21 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/form": "^3.0.0-nightly-4980928d3-240906",
"@react-aria/interactions": "^3.0.0-nightly-4980928d3-240906",
"@react-aria/label": "^3.0.0-nightly-4980928d3-240906",
"@react-aria/toggle": "^3.0.0-nightly-4980928d3-240906",
"@react-aria/utils": "^3.0.0-nightly-4980928d3-240906",
"@react-stately/checkbox": "^3.0.0-nightly-4980928d3-240906",
"@react-stately/form": "^3.0.0-nightly-4980928d3-240906",
"@react-stately/toggle": "^3.0.0-nightly-4980928d3-240906",
"@react-types/checkbox": "^3.0.0-nightly-4980928d3-240906",
"@react-types/shared": "^3.0.0-nightly-4980928d3-240906",
"@react-aria/form": "3.0.0-nightly-4b2c6e76f-250320",
"@react-aria/interactions": "3.0.0-nightly-4b2c6e76f-250320",
"@react-aria/label": "3.0.0-nightly-4b2c6e76f-250320",
"@react-aria/toggle": "3.0.0-nightly-4b2c6e76f-250320",
"@react-aria/utils": "3.0.0-nightly-4b2c6e76f-250320",
"@react-stately/checkbox": "3.0.0-nightly-4b2c6e76f-250320",
"@react-stately/form": "3.0.0-nightly-4b2c6e76f-250320",
"@react-stately/toggle": "3.0.0-nightly-4b2c6e76f-250320",
"@react-types/checkbox": "3.0.0-nightly-4b2c6e76f-250320",
"@react-types/shared": "3.0.0-nightly-4b2c6e76f-250320",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"stableVersion": "3.14.6"
}
}

@@ -15,6 +15,8 @@ /*

import {InputHTMLAttributes, LabelHTMLAttributes, useEffect} from 'react';
import {mergeProps} from '@react-aria/utils';
import {privateValidationStateProp, useFormValidationState} from '@react-stately/form';
import {RefObject, ValidationResult} from '@react-types/shared';
import {ToggleState} from '@react-stately/toggle';
import {useFormValidation} from '@react-aria/form';
import {useFormValidationState} from '@react-stately/form';
import {usePress} from '@react-aria/interactions';
import {useToggle} from '@react-aria/toggle';

@@ -65,4 +67,19 @@

// Reset validation state on label press for checkbox with a hidden input.
let {pressProps} = usePress({
isDisabled: isDisabled || isReadOnly,
onPress() {
// @ts-expect-error
let {[privateValidationStateProp]: groupValidationState} = props;
let {commitValidation} = groupValidationState
? groupValidationState
: validationState;
commitValidation();
}
});
return {
labelProps,
labelProps: mergeProps(labelProps, pressProps),
inputProps: {

@@ -69,0 +86,0 @@ ...inputProps,

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