@react-types/autocomplete 3.0.0-nightly.3804 → 3.0.0-nightly.3810

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 +5 -5
  2. package/src/index.d.ts +10 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/autocomplete",
3
- "version": "3.0.0-nightly.3804+83677f944",
3
+ "version": "3.0.0-nightly.3810+7fa0a88e8",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,9 +9,9 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/combobox": "3.6.1-nightly.3804+83677f944",
13
- "@react-types/searchfield": "3.0.0-nightly.2104+83677f944",
14
- "@react-types/shared": "3.0.0-nightly.2104+83677f944"
12
+ "@react-types/combobox": "3.6.1-nightly.3810+7fa0a88e8",
13
+ "@react-types/searchfield": "3.0.0-nightly.2110+7fa0a88e8",
14
+ "@react-types/shared": "3.0.0-nightly.2110+7fa0a88e8"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
@@ -19,5 +19,5 @@
19
19
  "publishConfig": {
20
20
  "access": "public"
21
21
  },
22
- "gitHead": "83677f94489fdfa535fd511157f5292ad80b7b09"
22
+ "gitHead": "7fa0a88e8925f432fa50516044907c58aa7ec952"
23
23
  }
package/src/index.d.ts CHANGED
@@ -10,12 +10,12 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {AriaSearchFieldProps} from '@react-types/searchfield';
14
- import {AsyncLoadable, CollectionBase, LoadingState, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';
13
+ import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, LoadingState, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';
15
14
  import {Key, ReactElement} from 'react';
16
15
  import {MenuTriggerAction} from '@react-types/combobox';
16
+ import {SearchFieldProps} from '@react-types/searchfield';
17
17
 
18
- export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<AriaSearchFieldProps, 'onSubmit'> {
18
+ export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<SearchFieldProps, 'onSubmit' | 'defaultValue' | 'value'> {
19
19
  /** The list of SearchAutocomplete items (uncontrolled). */
20
20
  defaultItems?: Iterable<T>,
21
21
  /** The list of SearchAutocomplete items (controlled). */
@@ -41,12 +41,12 @@ export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<Aria
41
41
  * A `key` will be passed if the submission is a selected item (e.g. a user clicks or presses enter on an option).
42
42
  * If the input is a custom value, `key` will be null.
43
43
  */
44
- onSubmit?: (value: string | null, key: Key | null) => void,
45
- /** An icon to display at the start of the input. */
46
- icon?: ReactElement | null
44
+ onSubmit?: (value: string | null, key: Key | null) => void
47
45
  }
48
46
 
49
- export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<SearchAutocompleteProps<T>, 'menuTrigger'>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
47
+ export interface AriaSearchAutocompleteProps<T> extends SearchAutocompleteProps<T>, DOMProps, AriaLabelingProps {}
48
+
49
+ export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<AriaSearchAutocompleteProps<T>, 'menuTrigger'>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
50
50
  /**
51
51
  * The interaction required to display the SearchAutocomplete menu. Note that this prop has no effect on the mobile SearchAutocomplete experience.
52
52
  * @default 'input'
@@ -66,5 +66,7 @@ export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBas
66
66
  * @default true
67
67
  */
68
68
  shouldFlip?: boolean,
69
- onLoadMore?: () => void
69
+ onLoadMore?: () => void,
70
+ /** An icon to display at the start of the input. */
71
+ icon?: ReactElement | null
70
72
  }