@react-types/combobox
Advanced tools
Comparing version 3.0.0-nightly.2813 to 3.0.0-nightly-086ad3115-240911
{ | ||
"name": "@react-types/combobox", | ||
"version": "3.0.0-nightly.2813+a05cbb945", | ||
"version": "3.0.0-nightly-086ad3115-240911", | ||
"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-086ad3115-240911" | ||
}, | ||
"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' | ||
} |
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
104
0
5134
3
+ Added@react-types/shared@3.24.1(transitive)
+ Addedreact@18.3.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)