@react-types/autocomplete 3.0.0-nightly-796738501-260310 → 3.0.0-nightly-6a0d13c57-260322

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 +6 -5
  2. package/src/index.d.ts +2 -66
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/autocomplete",
3
- "version": "3.0.0-nightly-796738501-260310",
3
+ "version": "3.0.0-nightly-6a0d13c57-260322",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,12 +9,13 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/combobox": "3.0.0-nightly-796738501-260310",
13
- "@react-types/searchfield": "3.0.0-nightly-796738501-260310",
14
- "@react-types/shared": "3.0.0-nightly-796738501-260310"
12
+ "@react-aria/autocomplete": "3.0.0-nightly-6a0d13c57-260322",
13
+ "@react-spectrum/autocomplete": "3.0.0-nightly-6a0d13c57-260322"
15
14
  },
16
15
  "peerDependencies": {
17
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
16
+ "@react-spectrum/provider": "3.0.0-nightly-6a0d13c57-260322",
17
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
18
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
18
19
  },
19
20
  "publishConfig": {
20
21
  "access": "public"
package/src/index.d.ts CHANGED
@@ -10,69 +10,5 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {AriaLabelingProps, AsyncLoadable, CollectionBase, DimensionValue, DOMProps, Key, LoadingState, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';
14
- import {AriaSearchFieldProps, SearchFieldProps} from '@react-types/searchfield';
15
- import {MenuTriggerAction} from '@react-types/combobox';
16
- import {ReactElement} from 'react';
17
-
18
- export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<SearchFieldProps, 'onChange' | 'onSubmit' | 'defaultValue' | 'value'> {
19
- /** The list of SearchAutocomplete items (uncontrolled). */
20
- defaultItems?: Iterable<T>,
21
- /** The list of SearchAutocomplete items (controlled). */
22
- items?: Iterable<T>,
23
- /** Method that is called when the open state of the menu changes. Returns the new open state and the action that caused the opening of the menu. */
24
- onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void,
25
- /** The value of the SearchAutocomplete input (controlled). */
26
- inputValue?: string,
27
- /** The default value of the SearchAutocomplete input (uncontrolled). */
28
- defaultInputValue?: string,
29
- /** Handler that is called when the SearchAutocomplete input value changes. */
30
- onInputChange?: (value: string) => void,
31
- /**
32
- * The interaction required to display the SearchAutocomplete menu.
33
- * @default 'input'
34
- */
35
- menuTrigger?: MenuTriggerAction,
36
- /** Handler that is called when the SearchAutocomplete is submitted.
37
- *
38
- * A `value` will be passed if the submission is a custom value (e.g. a user types then presses enter).
39
- * If the input is a selected item, `value` will be null.
40
- *
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
- * If the input is a custom value, `key` will be null.
43
- */
44
- onSubmit?: (value: string | null, key: Key | null) => void
45
- }
46
-
47
- export interface AriaSearchAutocompleteProps<T> extends SearchAutocompleteProps<T>, Omit<AriaSearchFieldProps, 'onChange' | 'onSubmit' | 'defaultValue' | 'value'>, DOMProps, AriaLabelingProps {}
48
-
49
- export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<AriaSearchAutocompleteProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'validate'>, SpectrumFieldValidation<string>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
50
- /**
51
- * The interaction required to display the SearchAutocomplete menu. Note that this prop has no effect on the mobile SearchAutocomplete experience.
52
- * @default 'input'
53
- */
54
- menuTrigger?: MenuTriggerAction,
55
- /** Whether the SearchAutocomplete should be displayed with a quiet style. */
56
- isQuiet?: boolean,
57
- /** Alignment of the menu relative to the input target.
58
- * @default 'start'
59
- */
60
- align?: 'start' | 'end',
61
- /**
62
- * Direction the menu will render relative to the SearchAutocomplete.
63
- * @default 'bottom'
64
- */
65
- direction?: 'bottom' | 'top',
66
- /** The current loading state of the SearchAutocomplete. Determines whether or not the progress circle should be shown. */
67
- loadingState?: LoadingState,
68
- /**
69
- * Whether the menu should automatically flip direction when space is limited.
70
- * @default true
71
- */
72
- shouldFlip?: boolean,
73
- /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */
74
- menuWidth?: DimensionValue,
75
- onLoadMore?: () => void,
76
- /** An icon to display at the start of the input. */
77
- icon?: ReactElement | null
78
- }
13
+ export {SearchAutocompleteProps, AriaSearchAutocompleteProps} from '@react-aria/autocomplete';
14
+ export {SpectrumSearchAutocompleteProps} from '@react-spectrum/autocomplete';