@radix-ui/react-checkbox
Advanced tools
Comparing version 1.0.0 to 1.0.1-rc.1
@@ -9,3 +9,2 @@ var $dKOox$babelruntimehelpersextends = require("@babel/runtime/helpers/extends"); | ||
var $dKOox$radixuireactusesize = require("@radix-ui/react-use-size"); | ||
var $dKOox$radixuireactlabel = require("@radix-ui/react-label"); | ||
var $dKOox$radixuireactpresence = require("@radix-ui/react-presence"); | ||
@@ -36,3 +35,2 @@ var $dKOox$radixuireactprimitive = require("@radix-ui/react-primitive"); | ||
/* ------------------------------------------------------------------------------------------------- | ||
@@ -44,8 +42,6 @@ * Checkbox | ||
const $a17f2c9fbf2ccf8c$export$48513f6b9f8ce62d = /*#__PURE__*/ $dKOox$react.forwardRef((props, forwardedRef)=>{ | ||
const { __scopeCheckbox: __scopeCheckbox , 'aria-labelledby': ariaLabelledby , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props; | ||
const { __scopeCheckbox: __scopeCheckbox , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props; | ||
const [button, setButton] = $dKOox$react.useState(null); | ||
const composedRefs = $dKOox$radixuireactcomposerefs.useComposedRefs(forwardedRef, (node)=>setButton(node) | ||
); | ||
const labelId = $dKOox$radixuireactlabel.useLabelContext(button); | ||
const labelledBy = ariaLabelledby || labelId; | ||
const hasConsumerStoppedPropagationRef = $dKOox$react.useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR) | ||
@@ -66,3 +62,2 @@ const isFormControl = button ? Boolean(button.closest('form')) : true; | ||
"aria-checked": $a17f2c9fbf2ccf8c$var$isIndeterminate(checked) ? 'mixed' : checked, | ||
"aria-labelledby": labelledBy, | ||
"aria-required": required, | ||
@@ -69,0 +64,0 @@ "data-state": $a17f2c9fbf2ccf8c$var$getState(checked), |
@@ -9,3 +9,2 @@ import $1bpvS$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends"; | ||
import {useSize as $1bpvS$useSize} from "@radix-ui/react-use-size"; | ||
import {useLabelContext as $1bpvS$useLabelContext} from "@radix-ui/react-label"; | ||
import {Presence as $1bpvS$Presence} from "@radix-ui/react-presence"; | ||
@@ -24,3 +23,2 @@ import {Primitive as $1bpvS$Primitive} from "@radix-ui/react-primitive"; | ||
/* ------------------------------------------------------------------------------------------------- | ||
@@ -32,8 +30,6 @@ * Checkbox | ||
const $e698a72e93240346$export$48513f6b9f8ce62d = /*#__PURE__*/ $1bpvS$forwardRef((props, forwardedRef)=>{ | ||
const { __scopeCheckbox: __scopeCheckbox , 'aria-labelledby': ariaLabelledby , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props; | ||
const { __scopeCheckbox: __scopeCheckbox , name: name , checked: checkedProp , defaultChecked: defaultChecked , required: required , disabled: disabled , value: value = 'on' , onCheckedChange: onCheckedChange , ...checkboxProps } = props; | ||
const [button, setButton] = $1bpvS$useState(null); | ||
const composedRefs = $1bpvS$useComposedRefs(forwardedRef, (node)=>setButton(node) | ||
); | ||
const labelId = $1bpvS$useLabelContext(button); | ||
const labelledBy = ariaLabelledby || labelId; | ||
const hasConsumerStoppedPropagationRef = $1bpvS$useRef(false); // We set this to true by default so that events bubble to forms without JS (SSR) | ||
@@ -54,3 +50,2 @@ const isFormControl = button ? Boolean(button.closest('form')) : true; | ||
"aria-checked": $e698a72e93240346$var$isIndeterminate(checked) ? 'mixed' : checked, | ||
"aria-labelledby": labelledBy, | ||
"aria-required": required, | ||
@@ -57,0 +52,0 @@ "data-state": $e698a72e93240346$var$getState(checked), |
{ | ||
"name": "@radix-ui/react-checkbox", | ||
"version": "1.0.0", | ||
"version": "1.0.1-rc.1", | ||
"license": "MIT", | ||
@@ -23,5 +23,4 @@ "source": "src/index.ts", | ||
"@radix-ui/react-context": "1.0.0", | ||
"@radix-ui/react-label": "1.0.0", | ||
"@radix-ui/react-presence": "1.0.0", | ||
"@radix-ui/react-primitive": "1.0.0", | ||
"@radix-ui/react-primitive": "1.0.1-rc.1", | ||
"@radix-ui/react-use-controllable-state": "1.0.0", | ||
@@ -42,3 +41,4 @@ "@radix-ui/react-use-previous": "1.0.0", | ||
"url": "https://github.com/radix-ui/primitives/issues" | ||
} | ||
}, | ||
"stableVersion": "1.0.0" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11
50757
326
1
+ Added@radix-ui/react-primitive@1.0.1-rc.1(transitive)
- Removed@radix-ui/react-label@1.0.0
- Removed@radix-ui/react-id@1.0.0(transitive)
- Removed@radix-ui/react-label@1.0.0(transitive)
- Removed@radix-ui/react-primitive@1.0.0(transitive)