@react-types/combobox 3.13.11 → 3.15.0
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 +8 -4
- package/src/index.d.ts +3 -98
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/combobox",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -9,13 +9,17 @@
|
|
|
9
9
|
"url": "https://github.com/adobe/react-spectrum"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@react-
|
|
12
|
+
"@react-aria/combobox": "^3.16.0",
|
|
13
|
+
"@react-spectrum/combobox": "^3.17.0",
|
|
14
|
+
"@react-stately/combobox": "^3.14.0"
|
|
13
15
|
},
|
|
14
16
|
"peerDependencies": {
|
|
15
|
-
"react": "^
|
|
17
|
+
"@react-spectrum/provider": "^3.0.0",
|
|
18
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
19
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
16
20
|
},
|
|
17
21
|
"publishConfig": {
|
|
18
22
|
"access": "public"
|
|
19
23
|
},
|
|
20
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
21
25
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,101 +10,6 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
CollectionBase,
|
|
17
|
-
DimensionValue,
|
|
18
|
-
DOMProps,
|
|
19
|
-
FocusableProps,
|
|
20
|
-
HelpTextProps,
|
|
21
|
-
InputBase,
|
|
22
|
-
InputDOMProps,
|
|
23
|
-
Key,
|
|
24
|
-
LabelableProps,
|
|
25
|
-
LoadingState,
|
|
26
|
-
SingleSelection,
|
|
27
|
-
SpectrumFieldValidation,
|
|
28
|
-
SpectrumLabelableProps,
|
|
29
|
-
SpectrumTextInputBase,
|
|
30
|
-
StyleProps,
|
|
31
|
-
TextInputBase,
|
|
32
|
-
Validation
|
|
33
|
-
} from '@react-types/shared';
|
|
34
|
-
|
|
35
|
-
export type MenuTriggerAction = 'focus' | 'input' | 'manual';
|
|
36
|
-
|
|
37
|
-
export interface ComboBoxValidationValue {
|
|
38
|
-
/** The selected key in the ComboBox. */
|
|
39
|
-
selectedKey: Key | null,
|
|
40
|
-
/** The value of the ComboBox input. */
|
|
41
|
-
inputValue: string
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface ComboBoxProps<T> extends CollectionBase<T>, Omit<SingleSelection, 'disallowEmptySelection' | 'onSelectionChange'>, InputBase, TextInputBase, Validation<ComboBoxValidationValue>, FocusableProps<HTMLInputElement>, LabelableProps, HelpTextProps {
|
|
45
|
-
/** The list of ComboBox items (uncontrolled). */
|
|
46
|
-
defaultItems?: Iterable<T>,
|
|
47
|
-
/** The list of ComboBox items (controlled). */
|
|
48
|
-
items?: Iterable<T>,
|
|
49
|
-
/** 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. */
|
|
50
|
-
onOpenChange?: (isOpen: boolean, menuTrigger?: MenuTriggerAction) => void,
|
|
51
|
-
/** Handler that is called when the selection changes. */
|
|
52
|
-
onSelectionChange?: (key: Key | null) => void,
|
|
53
|
-
/** The value of the ComboBox input (controlled). */
|
|
54
|
-
inputValue?: string,
|
|
55
|
-
/** The default value of the ComboBox input (uncontrolled). */
|
|
56
|
-
defaultInputValue?: string,
|
|
57
|
-
/** Handler that is called when the ComboBox input value changes. */
|
|
58
|
-
onInputChange?: (value: string) => void,
|
|
59
|
-
/** Whether the ComboBox allows a non-item matching input value to be set. */
|
|
60
|
-
allowsCustomValue?: boolean,
|
|
61
|
-
// /**
|
|
62
|
-
// * Whether the Combobox should only suggest matching options or autocomplete the field with the nearest matching option.
|
|
63
|
-
// * @default 'suggest'
|
|
64
|
-
// */
|
|
65
|
-
// completionMode?: 'suggest' | 'complete',
|
|
66
|
-
/**
|
|
67
|
-
* The interaction required to display the ComboBox menu.
|
|
68
|
-
* @default 'input'
|
|
69
|
-
*/
|
|
70
|
-
menuTrigger?: MenuTriggerAction
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface AriaComboBoxProps<T> extends ComboBoxProps<T>, DOMProps, InputDOMProps, AriaLabelingProps {
|
|
74
|
-
/** Whether keyboard navigation is circular. */
|
|
75
|
-
shouldFocusWrap?: boolean
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {
|
|
79
|
-
/**
|
|
80
|
-
* The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience.
|
|
81
|
-
* @default 'input'
|
|
82
|
-
*/
|
|
83
|
-
menuTrigger?: MenuTriggerAction,
|
|
84
|
-
/** Whether the ComboBox should be displayed with a quiet style. */
|
|
85
|
-
isQuiet?: boolean,
|
|
86
|
-
/** Alignment of the menu relative to the input target.
|
|
87
|
-
* @default 'start'
|
|
88
|
-
*/
|
|
89
|
-
align?: 'start' | 'end',
|
|
90
|
-
/**
|
|
91
|
-
* Direction the menu will render relative to the ComboBox.
|
|
92
|
-
* @default 'bottom'
|
|
93
|
-
*/
|
|
94
|
-
direction?: 'bottom' | 'top',
|
|
95
|
-
/** The current loading state of the ComboBox. Determines whether or not the progress circle should be shown. */
|
|
96
|
-
loadingState?: LoadingState,
|
|
97
|
-
/**
|
|
98
|
-
* Whether the menu should automatically flip direction when space is limited.
|
|
99
|
-
* @default true
|
|
100
|
-
*/
|
|
101
|
-
shouldFlip?: boolean,
|
|
102
|
-
/** 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. */
|
|
103
|
-
menuWidth?: DimensionValue,
|
|
104
|
-
/**
|
|
105
|
-
* Whether the text or key of the selected item is submitted as part of an HTML form.
|
|
106
|
-
* When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.
|
|
107
|
-
* @default 'text'
|
|
108
|
-
*/
|
|
109
|
-
formValue?: 'text' | 'key'
|
|
110
|
-
}
|
|
13
|
+
export {MenuTriggerAction, ComboBoxValidationValue, ComboBoxProps} from '@react-stately/combobox';
|
|
14
|
+
export {AriaComboBoxProps} from '@react-aria/combobox';
|
|
15
|
+
export {SpectrumComboBoxProps} from '@react-spectrum/combobox';
|