You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@react-aria/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
852
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/autocomplete - npm Package Compare versions

Comparing version

to
3.0.0-alpha.28

dist/useSearchAutocomplete.main.js

66

dist/main.js

@@ -1,4 +0,2 @@

var $kDrMH$reactariautils = require("@react-aria/utils");
var $kDrMH$reactariacombobox = require("@react-aria/combobox");
var $kDrMH$reactariasearchfield = require("@react-aria/searchfield");
var $3c40871f8cc2eb01$exports = require("./useSearchAutocomplete.main.js");

@@ -10,3 +8,3 @@

$parcel$export(module.exports, "useSearchAutocomplete", () => $3c40871f8cc2eb01$export$da7ade746446be1f);
$parcel$export(module.exports, "useSearchAutocomplete", () => $3c40871f8cc2eb01$exports.useSearchAutocomplete);
/*

@@ -22,65 +20,5 @@ * Copyright 2021 Adobe. All rights reserved.

* governing permissions and limitations under the License.
*/ /*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $3c40871f8cc2eb01$export$da7ade746446be1f(props, state) {
let { popoverRef: popoverRef, inputRef: inputRef, listBoxRef: listBoxRef, keyboardDelegate: keyboardDelegate, onSubmit: onSubmit = ()=>{}, onClear: onClear, onKeyDown: onKeyDown, onKeyUp: onKeyUp, isInvalid: isInvalid, validationState: validationState, validationBehavior: validationBehavior, isRequired: isRequired, ...otherProps } = props;
let { inputProps: inputProps, clearButtonProps: clearButtonProps } = (0, $kDrMH$reactariasearchfield.useSearchField)({
...otherProps,
value: state.inputValue,
onChange: state.setInputValue,
autoComplete: "off",
onClear: ()=>{
state.setInputValue("");
if (onClear) onClear();
},
onSubmit: (value)=>{
// Prevent submission from search field if menu item was selected
if (state.selectionManager.focusedKey === null) onSubmit(value, null);
},
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
}, {
value: state.inputValue,
setValue: state.setInputValue
}, inputRef);
let { listBoxProps: listBoxProps, labelProps: labelProps, inputProps: comboBoxInputProps, ...validation } = (0, $kDrMH$reactariacombobox.useComboBox)({
...otherProps,
keyboardDelegate: keyboardDelegate,
popoverRef: popoverRef,
listBoxRef: listBoxRef,
inputRef: inputRef,
onFocus: undefined,
onFocusChange: undefined,
onBlur: undefined,
onKeyDown: undefined,
onKeyUp: undefined,
isInvalid: isInvalid,
validationState: validationState,
validationBehavior: validationBehavior,
isRequired: isRequired,
validate: undefined
}, state);
return {
labelProps: labelProps,
inputProps: (0, $kDrMH$reactariautils.mergeProps)(inputProps, comboBoxInputProps),
listBoxProps: listBoxProps,
clearButtonProps: clearButtonProps,
...validation
};
}
//# sourceMappingURL=main.js.map

@@ -1,4 +0,2 @@

import {mergeProps as $fgZRc$mergeProps} from "@react-aria/utils";
import {useComboBox as $fgZRc$useComboBox} from "@react-aria/combobox";
import {useSearchField as $fgZRc$useSearchField} from "@react-aria/searchfield";
import {useSearchAutocomplete as $c04f11f368135585$export$da7ade746446be1f} from "./useSearchAutocomplete.module.js";

@@ -15,66 +13,6 @@ /*

* governing permissions and limitations under the License.
*/ /*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $c04f11f368135585$export$da7ade746446be1f(props, state) {
let { popoverRef: popoverRef, inputRef: inputRef, listBoxRef: listBoxRef, keyboardDelegate: keyboardDelegate, onSubmit: onSubmit = ()=>{}, onClear: onClear, onKeyDown: onKeyDown, onKeyUp: onKeyUp, isInvalid: isInvalid, validationState: validationState, validationBehavior: validationBehavior, isRequired: isRequired, ...otherProps } = props;
let { inputProps: inputProps, clearButtonProps: clearButtonProps } = (0, $fgZRc$useSearchField)({
...otherProps,
value: state.inputValue,
onChange: state.setInputValue,
autoComplete: "off",
onClear: ()=>{
state.setInputValue("");
if (onClear) onClear();
},
onSubmit: (value)=>{
// Prevent submission from search field if menu item was selected
if (state.selectionManager.focusedKey === null) onSubmit(value, null);
},
onKeyDown: onKeyDown,
onKeyUp: onKeyUp
}, {
value: state.inputValue,
setValue: state.setInputValue
}, inputRef);
let { listBoxProps: listBoxProps, labelProps: labelProps, inputProps: comboBoxInputProps, ...validation } = (0, $fgZRc$useComboBox)({
...otherProps,
keyboardDelegate: keyboardDelegate,
popoverRef: popoverRef,
listBoxRef: listBoxRef,
inputRef: inputRef,
onFocus: undefined,
onFocusChange: undefined,
onBlur: undefined,
onKeyDown: undefined,
onKeyUp: undefined,
isInvalid: isInvalid,
validationState: validationState,
validationBehavior: validationBehavior,
isRequired: isRequired,
validate: undefined
}, state);
return {
labelProps: labelProps,
inputProps: (0, $fgZRc$mergeProps)(inputProps, comboBoxInputProps),
listBoxProps: listBoxProps,
clearButtonProps: clearButtonProps,
...validation
};
}
export {$c04f11f368135585$export$da7ade746446be1f as useSearchAutocomplete};
//# sourceMappingURL=module.js.map
{
"name": "@react-aria/autocomplete",
"version": "3.0.0-alpha.27",
"version": "3.0.0-alpha.28",
"description": "Spectrum UI components in React",

@@ -25,10 +25,10 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/combobox": "^3.8.4",
"@react-aria/listbox": "^3.11.5",
"@react-aria/searchfield": "^3.7.3",
"@react-aria/utils": "^3.23.2",
"@react-stately/combobox": "^3.8.2",
"@react-types/autocomplete": "3.0.0-alpha.20",
"@react-types/button": "^3.9.2",
"@react-types/shared": "^3.22.1",
"@react-aria/combobox": "^3.9.0",
"@react-aria/listbox": "^3.12.0",
"@react-aria/searchfield": "^3.7.4",
"@react-aria/utils": "^3.24.0",
"@react-stately/combobox": "^3.8.3",
"@react-types/autocomplete": "3.0.0-alpha.21",
"@react-types/button": "^3.9.3",
"@react-types/shared": "^3.23.0",
"@swc/helpers": "^0.5.0"

@@ -43,3 +43,3 @@ },

},
"gitHead": "de9f84a22583fc741c29b341d14cd35ef4cca161"
"gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
}

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