downshift 9.3.4-alpha.0 → 9.3.4
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/dist/downshift.d.ts +66 -28
- package/dist/downshift.umd.js.map +1 -1
- package/dist/downshift.umd.min.js.map +1 -1
- package/dist/hooks/useCombobox/__tests__/utils/renderCombobox.d.ts +3 -2
- package/dist/hooks/useCombobox/index.types.d.ts +1 -0
- package/dist/hooks/useMultipleSelection/index.d.ts +21 -13
- package/dist/hooks/useMultipleSelection/utils.d.ts +9 -9
- package/dist/hooks/useSelect/__tests__/utils/renderSelect.d.ts +3 -2
- package/dist/hooks/useTagGroup/__tests__/utils/renderTagGroup.d.ts +1 -1
- package/dist/hooks/useTagGroup/index.types.d.ts +1 -0
- package/dist/hooks/utils/dropdownDefaultProps.d.ts +2 -2
- package/dist/utils/getHighlightedIndex.d.ts +1 -1
- package/dist/utils/getNonDisabledIndex.d.ts +1 -1
- package/package.json +9 -2
- package/preact/dist/downshift.umd.js.map +1 -1
- package/preact/dist/downshift.umd.min.js.map +1 -1
- package/dist/types.d.ts +0 -12
- package/preact/dist/downshift.cjs.js +0 -4265
- package/preact/dist/downshift.esm.js +0 -4238
package/dist/downshift.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
106
106
|
getStateAndHelpers(): {
|
|
107
107
|
getRootProps: ({ refKey, ref, ...rest }?: {
|
|
108
108
|
refKey?: string | undefined;
|
|
109
|
+
ref: any;
|
|
109
110
|
}, { suppressRefError }?: {
|
|
110
111
|
suppressRefError?: boolean | undefined;
|
|
111
112
|
}) => {
|
|
@@ -115,7 +116,13 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
115
116
|
'aria-owns': any;
|
|
116
117
|
'aria-labelledby': any;
|
|
117
118
|
};
|
|
118
|
-
getToggleButtonProps: ({ onClick, onPress, onKeyDown, onKeyUp, onBlur, ...rest }?: {
|
|
119
|
+
getToggleButtonProps: ({ onClick, onPress, onKeyDown, onKeyUp, onBlur, ...rest }?: {
|
|
120
|
+
onClick: any;
|
|
121
|
+
onPress: any;
|
|
122
|
+
onKeyDown: any;
|
|
123
|
+
onKeyUp: any;
|
|
124
|
+
onBlur: any;
|
|
125
|
+
}) => {
|
|
119
126
|
type: string;
|
|
120
127
|
role: string;
|
|
121
128
|
'aria-label': string;
|
|
@@ -125,6 +132,7 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
125
132
|
getLabelProps: (props: any) => any;
|
|
126
133
|
getMenuProps: ({ refKey, ref, ...props }?: {
|
|
127
134
|
refKey?: string | undefined;
|
|
135
|
+
ref: any;
|
|
128
136
|
}, { suppressRefError }?: {
|
|
129
137
|
suppressRefError?: boolean | undefined;
|
|
130
138
|
}) => {
|
|
@@ -132,7 +140,13 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
132
140
|
'aria-labelledby': any;
|
|
133
141
|
id: any;
|
|
134
142
|
};
|
|
135
|
-
getInputProps: ({ onKeyDown, onBlur, onChange, onInput, onChangeText, ...rest }?: {
|
|
143
|
+
getInputProps: ({ onKeyDown, onBlur, onChange, onInput, onChangeText, ...rest }?: {
|
|
144
|
+
onKeyDown: any;
|
|
145
|
+
onBlur: any;
|
|
146
|
+
onChange: any;
|
|
147
|
+
onInput: any;
|
|
148
|
+
onChangeText: any;
|
|
149
|
+
}) => {
|
|
136
150
|
'aria-autocomplete': string;
|
|
137
151
|
'aria-activedescendant': any;
|
|
138
152
|
'aria-controls': any;
|
|
@@ -142,28 +156,33 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
142
156
|
id: any;
|
|
143
157
|
};
|
|
144
158
|
getItemProps: ({ onMouseMove, onMouseDown, onClick, onPress, index, item, ...rest }?: {
|
|
159
|
+
onMouseMove: any;
|
|
160
|
+
onMouseDown: any;
|
|
161
|
+
onClick: any;
|
|
162
|
+
onPress: any;
|
|
163
|
+
index: any;
|
|
145
164
|
item?: void | undefined;
|
|
146
165
|
}) => {
|
|
147
|
-
onMouseMove: (event:
|
|
148
|
-
preventDownshiftDefault?: boolean;
|
|
166
|
+
onMouseMove: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
167
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
149
168
|
nativeEvent: {
|
|
150
|
-
preventDownshiftDefault?: boolean;
|
|
169
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
151
170
|
};
|
|
152
171
|
}, ...args: unknown[]) => boolean;
|
|
153
|
-
onMouseDown: (event:
|
|
154
|
-
preventDownshiftDefault?: boolean;
|
|
172
|
+
onMouseDown: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
173
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
155
174
|
nativeEvent: {
|
|
156
|
-
preventDownshiftDefault?: boolean;
|
|
175
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
157
176
|
};
|
|
158
177
|
}, ...args: unknown[]) => boolean;
|
|
159
178
|
id: any;
|
|
160
179
|
role: string;
|
|
161
180
|
'aria-selected': boolean;
|
|
162
181
|
} | {
|
|
163
|
-
onMouseDown: (event:
|
|
164
|
-
preventDownshiftDefault?: boolean;
|
|
182
|
+
onMouseDown: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
183
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
165
184
|
nativeEvent: {
|
|
166
|
-
preventDownshiftDefault?: boolean;
|
|
185
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
167
186
|
};
|
|
168
187
|
}, ...args: unknown[]) => boolean;
|
|
169
188
|
id: any;
|
|
@@ -194,6 +213,7 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
194
213
|
_rootNode: any;
|
|
195
214
|
getRootProps: ({ refKey, ref, ...rest }?: {
|
|
196
215
|
refKey?: string | undefined;
|
|
216
|
+
ref: any;
|
|
197
217
|
}, { suppressRefError }?: {
|
|
198
218
|
suppressRefError?: boolean | undefined;
|
|
199
219
|
}) => {
|
|
@@ -224,7 +244,13 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
224
244
|
Enter(event: any): void;
|
|
225
245
|
Escape(event: any): void;
|
|
226
246
|
};
|
|
227
|
-
getToggleButtonProps: ({ onClick, onPress, onKeyDown, onKeyUp, onBlur, ...rest }?: {
|
|
247
|
+
getToggleButtonProps: ({ onClick, onPress, onKeyDown, onKeyUp, onBlur, ...rest }?: {
|
|
248
|
+
onClick: any;
|
|
249
|
+
onPress: any;
|
|
250
|
+
onKeyDown: any;
|
|
251
|
+
onKeyUp: any;
|
|
252
|
+
onBlur: any;
|
|
253
|
+
}) => {
|
|
228
254
|
type: string;
|
|
229
255
|
role: string;
|
|
230
256
|
'aria-label': string;
|
|
@@ -236,7 +262,13 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
236
262
|
buttonHandleClick: (event: any) => void;
|
|
237
263
|
buttonHandleBlur: (event: any) => void;
|
|
238
264
|
getLabelProps: (props: any) => any;
|
|
239
|
-
getInputProps: ({ onKeyDown, onBlur, onChange, onInput, onChangeText, ...rest }?: {
|
|
265
|
+
getInputProps: ({ onKeyDown, onBlur, onChange, onInput, onChangeText, ...rest }?: {
|
|
266
|
+
onKeyDown: any;
|
|
267
|
+
onBlur: any;
|
|
268
|
+
onChange: any;
|
|
269
|
+
onInput: any;
|
|
270
|
+
onChangeText: any;
|
|
271
|
+
}) => {
|
|
240
272
|
'aria-autocomplete': string;
|
|
241
273
|
'aria-activedescendant': any;
|
|
242
274
|
'aria-controls': any;
|
|
@@ -252,6 +284,7 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
252
284
|
_menuNode: any;
|
|
253
285
|
getMenuProps: ({ refKey, ref, ...props }?: {
|
|
254
286
|
refKey?: string | undefined;
|
|
287
|
+
ref: any;
|
|
255
288
|
}, { suppressRefError }?: {
|
|
256
289
|
suppressRefError?: boolean | undefined;
|
|
257
290
|
}) => {
|
|
@@ -260,28 +293,33 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
260
293
|
id: any;
|
|
261
294
|
};
|
|
262
295
|
getItemProps: ({ onMouseMove, onMouseDown, onClick, onPress, index, item, ...rest }?: {
|
|
296
|
+
onMouseMove: any;
|
|
297
|
+
onMouseDown: any;
|
|
298
|
+
onClick: any;
|
|
299
|
+
onPress: any;
|
|
300
|
+
index: any;
|
|
263
301
|
item?: void | undefined;
|
|
264
302
|
}) => {
|
|
265
|
-
onMouseMove: (event:
|
|
266
|
-
preventDownshiftDefault?: boolean;
|
|
303
|
+
onMouseMove: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
304
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
267
305
|
nativeEvent: {
|
|
268
|
-
preventDownshiftDefault?: boolean;
|
|
306
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
269
307
|
};
|
|
270
308
|
}, ...args: unknown[]) => boolean;
|
|
271
|
-
onMouseDown: (event:
|
|
272
|
-
preventDownshiftDefault?: boolean;
|
|
309
|
+
onMouseDown: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
310
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
273
311
|
nativeEvent: {
|
|
274
|
-
preventDownshiftDefault?: boolean;
|
|
312
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
275
313
|
};
|
|
276
314
|
}, ...args: unknown[]) => boolean;
|
|
277
315
|
id: any;
|
|
278
316
|
role: string;
|
|
279
317
|
'aria-selected': boolean;
|
|
280
318
|
} | {
|
|
281
|
-
onMouseDown: (event:
|
|
282
|
-
preventDownshiftDefault?: boolean;
|
|
319
|
+
onMouseDown: (event: import("react").SyntheticEvent<Element, Event> & {
|
|
320
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
283
321
|
nativeEvent: {
|
|
284
|
-
preventDownshiftDefault?: boolean;
|
|
322
|
+
preventDownshiftDefault?: boolean | undefined;
|
|
285
323
|
};
|
|
286
324
|
}, ...args: unknown[]) => boolean;
|
|
287
325
|
id: any;
|
|
@@ -306,9 +344,9 @@ declare class Downshift extends Component<any, any, any> {
|
|
|
306
344
|
componentWillUnmount(): void;
|
|
307
345
|
render(): any;
|
|
308
346
|
}
|
|
309
|
-
import { Component } from
|
|
310
|
-
import PropTypes from
|
|
311
|
-
import { getA11yStatusMessage } from
|
|
312
|
-
import { noop } from
|
|
313
|
-
import { scrollIntoView } from
|
|
314
|
-
import * as stateChangeTypes from
|
|
347
|
+
import { Component } from "react";
|
|
348
|
+
import PropTypes from "prop-types";
|
|
349
|
+
import { getA11yStatusMessage } from "./utils.legacy";
|
|
350
|
+
import { noop } from "./utils";
|
|
351
|
+
import { scrollIntoView } from "./utils";
|
|
352
|
+
import * as stateChangeTypes from "./stateChangeTypes";
|