@react-stately/searchfield
Advanced tools
Comparing version 3.0.0-rc.2 to 3.0.0-rc.3
@@ -1,18 +0,13 @@ | ||
var _babelRuntimeHelpersSlicedToArray = $parcel$interopDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var { | ||
useControlledState | ||
} = require("@react-stately/utils"); | ||
var useControlledState = require("@react-stately/utils").useControlledState; | ||
function $parcel$interopDefault(a) { | ||
return a && a.__esModule ? a.default : a; | ||
} | ||
/** | ||
* Provides state management for a search field. | ||
*/ | ||
function useSearchFieldState(props) { | ||
var _useControlledState = useControlledState($cf21454c543ee669f759591ed6631$var$toString(props.value), $cf21454c543ee669f759591ed6631$var$toString(props.defaultValue) || '', props.onChange), | ||
_useControlledState2 = _babelRuntimeHelpersSlicedToArray(_useControlledState, 2), | ||
value = _useControlledState2[0], | ||
setValue = _useControlledState2[1]; | ||
let [value, setValue] = useControlledState($f7e1711a9e517c942ab938ede655$var$toString(props.value), $f7e1711a9e517c942ab938ede655$var$toString(props.defaultValue) || '', props.onChange); | ||
return { | ||
value: value, | ||
setValue: setValue | ||
value, | ||
setValue | ||
}; | ||
@@ -23,3 +18,3 @@ } | ||
function $cf21454c543ee669f759591ed6631$var$toString(val) { | ||
function $f7e1711a9e517c942ab938ede655$var$toString(val) { | ||
if (val == null) { | ||
@@ -30,2 +25,3 @@ return; | ||
return val.toString(); | ||
} | ||
} | ||
//# sourceMappingURL=main.js.map |
import { useControlledState } from "@react-stately/utils"; | ||
/** | ||
* Provides state management for a search field. | ||
*/ | ||
export function useSearchFieldState(props) { | ||
let [value, setValue] = useControlledState($cf643e74c41eb05efa8a8db5310d09c$var$toString(props.value), $cf643e74c41eb05efa8a8db5310d09c$var$toString(props.defaultValue) || '', props.onChange); | ||
let [value, setValue] = useControlledState($a9d4cb04630987986dd69a33031$var$toString(props.value), $a9d4cb04630987986dd69a33031$var$toString(props.defaultValue) || '', props.onChange); | ||
return { | ||
@@ -10,3 +14,3 @@ value, | ||
function $cf643e74c41eb05efa8a8db5310d09c$var$toString(val) { | ||
function $a9d4cb04630987986dd69a33031$var$toString(val) { | ||
if (val == null) { | ||
@@ -17,2 +21,3 @@ return; | ||
return val.toString(); | ||
} | ||
} | ||
//# sourceMappingURL=module.js.map |
@@ -1,8 +0,13 @@ | ||
import { ValueBase } from "@react-types/shared"; | ||
import { SearchFieldProps } from "@react-types/searchfield"; | ||
export interface SearchFieldState { | ||
value: string; | ||
setValue: (val: string, ...args: any) => void; | ||
/** The current value of the search field. */ | ||
readonly value: string; | ||
/** Sets the value of the search field. */ | ||
setValue(value: string): void; | ||
} | ||
export function useSearchFieldState(props: ValueBase<string>): SearchFieldState; | ||
/** | ||
* Provides state management for a search field. | ||
*/ | ||
export function useSearchFieldState(props: SearchFieldProps): SearchFieldState; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-stately/searchfield", | ||
"version": "3.0.0-rc.2", | ||
"version": "3.0.0-rc.3", | ||
"description": "Spectrum UI components in React", | ||
@@ -20,5 +20,5 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-stately/utils": "^3.0.0-rc.2", | ||
"@react-types/searchfield": "^3.0.0-rc.2", | ||
"@react-types/shared": "^3.0.0-rc.2" | ||
"@react-stately/utils": "3.0.0-rc.3", | ||
"@react-types/searchfield": "3.0.0-rc.3", | ||
"@react-types/shared": "3.0.0-rc.3" | ||
}, | ||
@@ -34,3 +34,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "207e6ee9076905c96638a7f81a367758872e1410" | ||
"gitHead": "461d6321126ae9b4f1508aa912f7b36bf8a603f8" | ||
} |
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances 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
18491
9
51
2
80
+ Added@react-stately/utils@3.0.0-rc.3(transitive)
+ Added@react-types/searchfield@3.0.0-rc.3(transitive)
+ Added@react-types/shared@3.0.0-rc.3(transitive)
+ Added@react-types/textfield@3.0.0-rc.3(transitive)
- Removed@react-stately/utils@3.10.4(transitive)
- Removed@react-types/searchfield@3.5.9(transitive)
- Removed@react-types/shared@3.25.0(transitive)
- Removed@react-types/textfield@3.9.7(transitive)
- Removed@swc/helpers@0.5.13(transitive)
- Removedtslib@2.8.1(transitive)