@react-aria/form
Advanced tools
Comparing version 3.0.5-nightly.4624 to 3.0.5
@@ -28,8 +28,8 @@ var $j3sn1$react = require("react"); | ||
(0, $j3sn1$reactariautils.useLayoutEffect)(()=>{ | ||
if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) { | ||
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : ""; | ||
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) { | ||
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : ''; | ||
ref.current.setCustomValidity(errorMessage); | ||
// Prevent default tooltip for validation message. | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277 | ||
if (!ref.current.hasAttribute("title")) ref.current.title = ""; | ||
if (!ref.current.hasAttribute('title')) ref.current.title = ''; | ||
if (!state.realtimeValidation.isInvalid) state.updateValidation($9da8e3f192aba981$var$getNativeValidity(ref.current)); | ||
@@ -53,3 +53,3 @@ } | ||
// Always show focus ring. | ||
(0, $j3sn1$reactariainteractions.setInteractionModality)("keyboard"); | ||
(0, $j3sn1$reactariainteractions.setInteractionModality)('keyboard'); | ||
} | ||
@@ -66,9 +66,9 @@ // Prevent default browser error UI from appearing. | ||
let form = input.form; | ||
input.addEventListener("invalid", onInvalid); | ||
input.addEventListener("change", onChange); | ||
form === null || form === void 0 ? void 0 : form.addEventListener("reset", onReset); | ||
input.addEventListener('invalid', onInvalid); | ||
input.addEventListener('change', onChange); | ||
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset); | ||
return ()=>{ | ||
input.removeEventListener("invalid", onInvalid); | ||
input.removeEventListener("change", onChange); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", onReset); | ||
input.removeEventListener('invalid', onInvalid); | ||
input.removeEventListener('change', onChange); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset); | ||
}; | ||
@@ -75,0 +75,0 @@ }, [ |
@@ -22,8 +22,8 @@ import {useEffect as $9Gacy$useEffect} from "react"; | ||
(0, $9Gacy$useLayoutEffect)(()=>{ | ||
if (validationBehavior === "native" && (ref === null || ref === void 0 ? void 0 : ref.current)) { | ||
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(" ") || "Invalid value." : ""; | ||
if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) { | ||
let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : ''; | ||
ref.current.setCustomValidity(errorMessage); | ||
// Prevent default tooltip for validation message. | ||
// https://bugzilla.mozilla.org/show_bug.cgi?id=605277 | ||
if (!ref.current.hasAttribute("title")) ref.current.title = ""; | ||
if (!ref.current.hasAttribute('title')) ref.current.title = ''; | ||
if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current)); | ||
@@ -47,3 +47,3 @@ } | ||
// Always show focus ring. | ||
(0, $9Gacy$setInteractionModality)("keyboard"); | ||
(0, $9Gacy$setInteractionModality)('keyboard'); | ||
} | ||
@@ -60,9 +60,9 @@ // Prevent default browser error UI from appearing. | ||
let form = input.form; | ||
input.addEventListener("invalid", onInvalid); | ||
input.addEventListener("change", onChange); | ||
form === null || form === void 0 ? void 0 : form.addEventListener("reset", onReset); | ||
input.addEventListener('invalid', onInvalid); | ||
input.addEventListener('change', onChange); | ||
form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset); | ||
return ()=>{ | ||
input.removeEventListener("invalid", onInvalid); | ||
input.removeEventListener("change", onChange); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener("reset", onReset); | ||
input.removeEventListener('invalid', onInvalid); | ||
input.removeEventListener('change', onChange); | ||
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset); | ||
}; | ||
@@ -69,0 +69,0 @@ }, [ |
{ | ||
"name": "@react-aria/form", | ||
"version": "3.0.5-nightly.4624+d80999e89", | ||
"version": "3.0.5", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,6 +25,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/interactions": "3.0.0-nightly.2912+d80999e89", | ||
"@react-aria/utils": "3.0.0-nightly.2912+d80999e89", | ||
"@react-stately/form": "3.0.3-nightly.4624+d80999e89", | ||
"@react-types/shared": "3.0.0-nightly.2912+d80999e89", | ||
"@react-aria/interactions": "^3.21.3", | ||
"@react-aria/utils": "^3.24.1", | ||
"@react-stately/form": "^3.0.3", | ||
"@react-types/shared": "^3.23.1", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -38,3 +38,3 @@ }, | ||
}, | ||
"gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882" | ||
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433" | ||
} |
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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
1
0
54391
+ Added@react-aria/interactions@3.22.2(transitive)
+ Added@react-aria/ssr@3.9.5(transitive)
+ Added@react-aria/utils@3.25.2(transitive)
+ Added@react-stately/form@3.0.5(transitive)
+ Added@react-stately/utils@3.10.3(transitive)
+ Added@react-types/shared@3.24.1(transitive)
+ Addedclsx@2.1.1(transitive)
Updated@react-aria/utils@^3.24.1
Updated@react-stately/form@^3.0.3
Updated@react-types/shared@^3.23.1