@react-types/combobox 3.8.2-nightly.4230 → 3.8.2-nightly.4245

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +10 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/combobox",
3
- "version": "3.8.2-nightly.4230+192e66d11",
3
+ "version": "3.8.2-nightly.4245+403ec27bf",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "3.0.0-nightly.2519+192e66d11"
12
+ "@react-types/shared": "3.0.0-nightly.2534+403ec27bf"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "192e66d11e2f49caba5194e2094bfd1534db7cda"
20
+ "gitHead": "403ec27bf8f5af6e19529b78782526f680c171ca"
21
21
  }
package/src/index.d.ts CHANGED
@@ -11,10 +11,18 @@
11
11
  */
12
12
 
13
13
  import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, FocusableProps, HelpTextProps, InputBase, InputDOMProps, LabelableProps, LoadingState, SingleSelection, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps, TextInputBase, Validation} from '@react-types/shared';
14
+ import {Key} from 'react';
14
15
 
15
16
  export type MenuTriggerAction = 'focus' | 'input' | 'manual';
16
17
 
17
- export interface ComboBoxProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection'>, InputBase, TextInputBase, Validation, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
18
+ export interface ComboBoxValidationValue {
19
+ /** The selected key in the ComboBox. */
20
+ selectedKey: Key,
21
+ /** The value of the ComboBox input. */
22
+ inputValue: string
23
+ }
24
+
25
+ export interface ComboBoxProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection'>, InputBase, TextInputBase, Validation<ComboBoxValidationValue>, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
18
26
  /** The list of ComboBox items (uncontrolled). */
19
27
  defaultItems?: Iterable<T>,
20
28
  /** The list of ComboBox items (controlled). */
@@ -46,7 +54,7 @@ export interface AriaComboBoxProps<T> extends ComboBoxProps<T>, DOMProps, InputD
46
54
  shouldFocusWrap?: boolean
47
55
  }
48
56
 
49
- export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
57
+ export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
50
58
  /**
51
59
  * The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience.
52
60
  * @default 'input'