Socket
Socket
Sign inDemoInstall

@react-types/combobox

Package Overview
Dependencies
Maintainers
2
Versions
699
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-types/combobox - npm Package Compare versions

Comparing version 3.0.0-nightly.2813 to 3.0.0-nightly-4980928d3-240906

10

package.json
{
"name": "@react-types/combobox",
"version": "3.0.0-nightly.2813+a05cbb945",
"version": "3.0.0-nightly-4980928d3-240906",
"description": "Spectrum UI components in React",

@@ -12,6 +12,6 @@ "license": "Apache-2.0",

"dependencies": {
"@react-types/shared": "3.0.0-nightly.1128+a05cbb945"
"@react-types/shared": "^3.0.0-nightly-4980928d3-240906"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1"
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
},

@@ -21,3 +21,3 @@ "publishConfig": {

},
"gitHead": "a05cbb945c22d66c84eea5b1288fe7fc0e9cbce4"
}
"stableVersion": "3.12.1"
}

@@ -13,7 +13,34 @@ /*

import {AsyncLoadable, CollectionBase, DOMProps, FocusableProps, InputBase, LabelableProps, LoadingState, SingleSelection, SpectrumLabelableProps, StyleProps, TextInputBase, Validation} from '@react-types/shared';
import {
AriaLabelingProps,
AsyncLoadable,
CollectionBase,
DimensionValue,
DOMProps,
FocusableProps,
HelpTextProps,
InputBase,
InputDOMProps,
Key,
LabelableProps,
LoadingState,
SingleSelection,
SpectrumFieldValidation,
SpectrumLabelableProps,
SpectrumTextInputBase,
StyleProps,
TextInputBase,
Validation
} from '@react-types/shared';
export type MenuTriggerAction = 'focus' | 'input' | 'manual';
export interface ComboBoxProps<T> extends CollectionBase<T>, SingleSelection, InputBase, TextInputBase, DOMProps, Validation, FocusableProps, LabelableProps {
export interface ComboBoxValidationValue {
/** The selected key in the ComboBox. */
selectedKey: Key | null,
/** The value of the ComboBox input. */
inputValue: string
}
export interface ComboBoxProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'>, InputBase, TextInputBase, Validation<ComboBoxValidationValue>, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
/** The list of ComboBox items (uncontrolled). */

@@ -25,2 +52,4 @@ defaultItems?: Iterable<T>,

onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void,
/** Handler that is called when the selection changes. */
onSelectionChange?: (key: Key | null) => void,
/** The value of the ComboBox input (controlled). */

@@ -39,10 +68,15 @@ inputValue?: string,

// completionMode?: 'suggest' | 'complete',
/**
* The interaction required to display the ComboBox menu.
* @default 'input'
*/
/**
* The interaction required to display the ComboBox menu.
* @default 'input'
*/
menuTrigger?: MenuTriggerAction
}
export interface SpectrumComboBoxProps<T> extends Omit<ComboBoxProps<T>, 'menuTrigger'>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
export interface AriaComboBoxProps<T> extends ComboBoxProps<T>, DOMProps, InputDOMProps, AriaLabelingProps {
/** Whether keyboard navigation is circular. */
shouldFocusWrap?: boolean
}
export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
/**

@@ -55,2 +89,6 @@ * The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience.

isQuiet?: boolean,
/** Alignment of the menu relative to the input target.
* @default 'end'
*/
align?: 'start' | 'end',
/**

@@ -67,3 +105,11 @@ * Direction the menu will render relative to the ComboBox.

*/
shouldFlip?: boolean
shouldFlip?: boolean,
/** Width of the menu. By default, matches width of the combobox. Note that the minimum width of the dropdown is always equal to the combobox's width. */
menuWidth?: DimensionValue,
/**
* Whether the text or key of the selected item is submitted as part of an HTML form.
* When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.
* @default 'text'
*/
formValue?: 'text' | 'key'
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc