@react-aria/searchfield
Advanced tools
Comparing version 3.0.0-nightly.2912 to 3.0.0-nightly.2917
@@ -31,13 +31,13 @@ var $8e80a08ea739bb00$exports = require("./intlStrings.main.js"); | ||
function $ccae92a71d96d51a$export$9bb30bbe003b82e0(props, state, inputRef) { | ||
let stringFormatter = (0, $2KtRb$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($8e80a08ea739bb00$exports))), "@react-aria/searchfield"); | ||
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{}, onClear: onClear, type: type = "search" } = props; | ||
let stringFormatter = (0, $2KtRb$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($8e80a08ea739bb00$exports))), '@react-aria/searchfield'); | ||
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{}, onClear: onClear, type: type = 'search' } = props; | ||
let onKeyDown = (e)=>{ | ||
const key = e.key; | ||
if (key === "Enter") e.preventDefault(); | ||
if (key === 'Enter') e.preventDefault(); | ||
if (isDisabled || isReadOnly) return; | ||
if (key === "Enter") onSubmit(state.value); | ||
if (key === "Escape") { | ||
if (state.value === "") e.continuePropagation(); | ||
if (key === 'Enter') onSubmit(state.value); | ||
if (key === 'Escape') { | ||
if (state.value === '') e.continuePropagation(); | ||
else { | ||
state.setValue(""); | ||
state.setValue(''); | ||
if (onClear) onClear(); | ||
@@ -48,3 +48,3 @@ } | ||
let onClearButtonClick = ()=>{ | ||
state.setValue(""); | ||
state.setValue(''); | ||
if (onClear) onClear(); | ||
@@ -73,3 +73,3 @@ }; | ||
clearButtonProps: { | ||
"aria-label": stringFormatter.format("Clear search"), | ||
'aria-label': stringFormatter.format('Clear search'), | ||
excludeFromTabOrder: true, | ||
@@ -76,0 +76,0 @@ // @ts-ignore |
@@ -25,13 +25,13 @@ import $kTEqN$intlStringsmodulejs from "./intlStrings.module.js"; | ||
function $4d52238874b24f86$export$9bb30bbe003b82e0(props, state, inputRef) { | ||
let stringFormatter = (0, $kTEqN$useLocalizedStringFormatter)((0, ($parcel$interopDefault($kTEqN$intlStringsmodulejs))), "@react-aria/searchfield"); | ||
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{}, onClear: onClear, type: type = "search" } = props; | ||
let stringFormatter = (0, $kTEqN$useLocalizedStringFormatter)((0, ($parcel$interopDefault($kTEqN$intlStringsmodulejs))), '@react-aria/searchfield'); | ||
let { isDisabled: isDisabled, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{}, onClear: onClear, type: type = 'search' } = props; | ||
let onKeyDown = (e)=>{ | ||
const key = e.key; | ||
if (key === "Enter") e.preventDefault(); | ||
if (key === 'Enter') e.preventDefault(); | ||
if (isDisabled || isReadOnly) return; | ||
if (key === "Enter") onSubmit(state.value); | ||
if (key === "Escape") { | ||
if (state.value === "") e.continuePropagation(); | ||
if (key === 'Enter') onSubmit(state.value); | ||
if (key === 'Escape') { | ||
if (state.value === '') e.continuePropagation(); | ||
else { | ||
state.setValue(""); | ||
state.setValue(''); | ||
if (onClear) onClear(); | ||
@@ -42,3 +42,3 @@ } | ||
let onClearButtonClick = ()=>{ | ||
state.setValue(""); | ||
state.setValue(''); | ||
if (onClear) onClear(); | ||
@@ -67,3 +67,3 @@ }; | ||
clearButtonProps: { | ||
"aria-label": stringFormatter.format("Clear search"), | ||
'aria-label': stringFormatter.format('Clear search'), | ||
excludeFromTabOrder: true, | ||
@@ -70,0 +70,0 @@ // @ts-ignore |
{ | ||
"name": "@react-aria/searchfield", | ||
"version": "3.0.0-nightly.2912+d80999e89", | ||
"version": "3.0.0-nightly.2917+c34886769", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,9 +25,9 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/i18n": "3.0.0-nightly.2912+d80999e89", | ||
"@react-aria/textfield": "3.0.0-nightly.2912+d80999e89", | ||
"@react-aria/utils": "3.0.0-nightly.2912+d80999e89", | ||
"@react-stately/searchfield": "3.0.0-nightly.2912+d80999e89", | ||
"@react-types/button": "3.9.4-nightly.4624+d80999e89", | ||
"@react-types/searchfield": "3.0.0-nightly.2912+d80999e89", | ||
"@react-types/shared": "3.0.0-nightly.2912+d80999e89", | ||
"@react-aria/i18n": "3.0.0-nightly.2917+c34886769", | ||
"@react-aria/textfield": "3.0.0-nightly.2917+c34886769", | ||
"@react-aria/utils": "3.0.0-nightly.2917+c34886769", | ||
"@react-stately/searchfield": "3.0.0-nightly.2917+c34886769", | ||
"@react-types/button": "3.9.5-nightly.4629+c34886769", | ||
"@react-types/searchfield": "3.0.0-nightly.2917+c34886769", | ||
"@react-types/shared": "3.0.0-nightly.2917+c34886769", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -41,3 +41,3 @@ }, | ||
}, | ||
"gitHead": "d80999e897b4d4db9fcfb4e9b8fcdc9fdd700882" | ||
"gitHead": "c34886769d3e69bb56553a02eead6a0fd877e754" | ||
} |
Sorry, the diff of this file is not supported yet
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
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