@react-aria/checkbox
Advanced tools
Comparing version
@@ -27,3 +27,3 @@ var $64fc3370e682155f$exports = require("./utils.main.js"); | ||
function $253685172d17db7d$export$49ff6f28c54f1cbe(props, state) { | ||
let { isDisabled: isDisabled, name: name, validationBehavior: validationBehavior = 'aria' } = props; | ||
let { isDisabled: isDisabled, name: name, form: form, validationBehavior: validationBehavior = 'aria' } = props; | ||
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
@@ -40,2 +40,3 @@ let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $6d1SX$reactarialabel.useField)({ | ||
name: name, | ||
form: form, | ||
descriptionId: descriptionProps.id, | ||
@@ -42,0 +43,0 @@ errorMessageId: errorMessageProps.id, |
@@ -21,3 +21,3 @@ import {checkboxGroupData as $1ae600c947479353$export$ec98120685d4f57d} from "./utils.module.js"; | ||
function $1e9fce0cfacc738b$export$49ff6f28c54f1cbe(props, state) { | ||
let { isDisabled: isDisabled, name: name, validationBehavior: validationBehavior = 'aria' } = props; | ||
let { isDisabled: isDisabled, name: name, form: form, validationBehavior: validationBehavior = 'aria' } = props; | ||
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
@@ -34,2 +34,3 @@ let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $gtLuF$useField)({ | ||
name: name, | ||
form: form, | ||
descriptionId: descriptionProps.id, | ||
@@ -36,0 +37,0 @@ errorMessageId: errorMessageProps.id, |
@@ -32,2 +32,3 @@ var $468c774d7db917b7$exports = require("./useCheckbox.main.js"); | ||
isSelected: state.isSelected(props.value), | ||
defaultSelected: state.defaultValue.includes(props.value), | ||
onChange (isSelected) { | ||
@@ -39,3 +40,3 @@ if (isSelected) state.addValue(props.value); | ||
}); | ||
let { name: name, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $64fc3370e682155f$exports.checkboxGroupData).get(state); | ||
let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $64fc3370e682155f$exports.checkboxGroupData).get(state); | ||
var _props_validationBehavior; | ||
@@ -66,2 +67,3 @@ validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : validationBehavior; | ||
name: props.name || name, | ||
form: props.form || form, | ||
isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== void 0 ? _props_isRequired : state.isRequired, | ||
@@ -68,0 +70,0 @@ validationBehavior: validationBehavior, |
@@ -26,2 +26,3 @@ import {useCheckbox as $406796ff087fe49b$export$e375f10ce42261c5} from "./useCheckbox.module.js"; | ||
isSelected: state.isSelected(props.value), | ||
defaultSelected: state.defaultValue.includes(props.value), | ||
onChange (isSelected) { | ||
@@ -33,3 +34,3 @@ if (isSelected) state.addValue(props.value); | ||
}); | ||
let { name: name, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $1ae600c947479353$export$ec98120685d4f57d).get(state); | ||
let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $1ae600c947479353$export$ec98120685d4f57d).get(state); | ||
var _props_validationBehavior; | ||
@@ -60,2 +61,3 @@ validationBehavior = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : validationBehavior; | ||
name: props.name || name, | ||
form: props.form || form, | ||
isRequired: (_props_isRequired = props.isRequired) !== null && _props_isRequired !== void 0 ? _props_isRequired : state.isRequired, | ||
@@ -62,0 +64,0 @@ validationBehavior: validationBehavior, |
{ | ||
"name": "@react-aria/checkbox", | ||
"version": "3.0.0-nightly-e7053dd8f-250108", | ||
"version": "3.0.0-nightly-e717ee924-250830", | ||
"description": "Spectrum UI components in React", | ||
@@ -9,3 +9,7 @@ "license": "Apache-2.0", | ||
"exports": { | ||
"types": "./dist/types.d.ts", | ||
"source": "./src/index.ts", | ||
"types": [ | ||
"./dist/types.d.ts", | ||
"./src/index.ts" | ||
], | ||
"import": "./dist/import.mjs", | ||
@@ -26,16 +30,17 @@ "require": "./dist/main.js" | ||
"dependencies": { | ||
"@react-aria/form": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-aria/interactions": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-aria/label": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-aria/toggle": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-aria/utils": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-stately/checkbox": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-stately/form": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-stately/toggle": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-types/checkbox": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-types/shared": "3.0.0-nightly-e7053dd8f-250108", | ||
"@react-aria/form": "3.0.0-nightly-e717ee924-250830", | ||
"@react-aria/interactions": "3.0.0-nightly-e717ee924-250830", | ||
"@react-aria/label": "3.0.0-nightly-e717ee924-250830", | ||
"@react-aria/toggle": "3.0.0-nightly-e717ee924-250830", | ||
"@react-aria/utils": "3.0.0-nightly-e717ee924-250830", | ||
"@react-stately/checkbox": "3.0.0-nightly-e717ee924-250830", | ||
"@react-stately/form": "3.0.0-nightly-e717ee924-250830", | ||
"@react-stately/toggle": "3.0.0-nightly-e717ee924-250830", | ||
"@react-types/checkbox": "3.0.0-nightly-e717ee924-250830", | ||
"@react-types/shared": "3.0.0-nightly-e717ee924-250830", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
"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" | ||
}, | ||
@@ -42,0 +47,0 @@ "publishConfig": { |
@@ -39,3 +39,3 @@ /* | ||
export function useCheckboxGroup(props: AriaCheckboxGroupProps, state: CheckboxGroupState): CheckboxGroupAria { | ||
let {isDisabled, name, validationBehavior = 'aria'} = props; | ||
let {isDisabled, name, form, validationBehavior = 'aria'} = props; | ||
let {isInvalid, validationErrors, validationDetails} = state.displayValidation; | ||
@@ -54,2 +54,3 @@ | ||
name, | ||
form, | ||
descriptionId: descriptionProps.id, | ||
@@ -56,0 +57,0 @@ errorMessageId: errorMessageProps.id, |
@@ -33,2 +33,3 @@ /* | ||
isSelected: state.isSelected(props.value), | ||
defaultSelected: state.defaultValue.includes(props.value), | ||
onChange(isSelected) { | ||
@@ -47,3 +48,3 @@ if (isSelected) { | ||
let {name, descriptionId, errorMessageId, validationBehavior} = checkboxGroupData.get(state)!; | ||
let {name, form, descriptionId, errorMessageId, validationBehavior} = checkboxGroupData.get(state)!; | ||
validationBehavior = props.validationBehavior ?? validationBehavior; | ||
@@ -77,2 +78,3 @@ | ||
name: props.name || name, | ||
form: props.form || form, | ||
isRequired: props.isRequired ?? state.isRequired, | ||
@@ -79,0 +81,0 @@ validationBehavior, |
@@ -17,2 +17,3 @@ /* | ||
name?: string, | ||
form?: string, | ||
descriptionId?: string, | ||
@@ -23,2 +24,2 @@ errorMessageId?: string, | ||
export const checkboxGroupData = new WeakMap<CheckboxGroupState, CheckboxGroupData>(); | ||
export const checkboxGroupData: WeakMap<CheckboxGroupState, CheckboxGroupData> = new WeakMap<CheckboxGroupState, CheckboxGroupData>(); |
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
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
94001
1.43%1058
1.24%13
8.33%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated