@react-types/autocomplete 3.0.0-alpha.17 → 3.0.0-alpha.19
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.
- package/package.json +5 -5
- package/src/index.d.ts +11 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/autocomplete",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.19",
|
|
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.
|
|
13
|
-
"@react-types/searchfield": "^3.5.
|
|
14
|
-
"@react-types/shared": "^3.
|
|
12
|
+
"@react-types/combobox": "^3.10.0",
|
|
13
|
+
"@react-types/searchfield": "^3.5.2",
|
|
14
|
+
"@react-types/shared": "^3.22.0"
|
|
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": "
|
|
22
|
+
"gitHead": "86b38c87868ce7f262e0df905e5ac4eb2653791d"
|
|
23
23
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, LoadingState, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';
|
|
14
|
-
import {
|
|
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
15
|
import {MenuTriggerAction} from '@react-types/combobox';
|
|
16
|
-
import {
|
|
16
|
+
import {ReactElement} from 'react';
|
|
17
17
|
|
|
18
18
|
export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<SearchFieldProps, 'onSubmit' | 'defaultValue' | 'value'> {
|
|
19
19
|
/** The list of SearchAutocomplete items (uncontrolled). */
|
|
@@ -44,9 +44,9 @@ export interface SearchAutocompleteProps<T> extends CollectionBase<T>, Omit<Sear
|
|
|
44
44
|
onSubmit?: (value: string | null, key: Key | null) => void
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export interface AriaSearchAutocompleteProps<T> extends SearchAutocompleteProps<T>, DOMProps, AriaLabelingProps {}
|
|
47
|
+
export interface AriaSearchAutocompleteProps<T> extends SearchAutocompleteProps<T>, Omit<AriaSearchFieldProps, 'onSubmit' | 'defaultValue' | 'value'>, DOMProps, AriaLabelingProps {}
|
|
48
48
|
|
|
49
|
-
export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<AriaSearchAutocompleteProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation
|
|
49
|
+
export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBase, Omit<AriaSearchAutocompleteProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'validate'>, SpectrumFieldValidation<string>, 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'
|
|
@@ -54,6 +54,10 @@ export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBas
|
|
|
54
54
|
menuTrigger?: MenuTriggerAction,
|
|
55
55
|
/** Whether the SearchAutocomplete should be displayed with a quiet style. */
|
|
56
56
|
isQuiet?: boolean,
|
|
57
|
+
/** Alignment of the menu relative to the input target.
|
|
58
|
+
* @default 'start'
|
|
59
|
+
*/
|
|
60
|
+
align?: 'start' | 'end',
|
|
57
61
|
/**
|
|
58
62
|
* Direction the menu will render relative to the SearchAutocomplete.
|
|
59
63
|
* @default 'bottom'
|
|
@@ -66,6 +70,8 @@ export interface SpectrumSearchAutocompleteProps<T> extends SpectrumTextInputBas
|
|
|
66
70
|
* @default true
|
|
67
71
|
*/
|
|
68
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,
|
|
69
75
|
onLoadMore?: () => void,
|
|
70
76
|
/** An icon to display at the start of the input. */
|
|
71
77
|
icon?: ReactElement | null
|