downshift 6.1.3 → 6.1.5

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.
@@ -64,10 +64,7 @@
64
64
  _setPrototypeOf(subClass, superClass);
65
65
  }
66
66
 
67
- function createCommonjsModule(fn) {
68
- var module = { exports: {} };
69
- return fn(module, module.exports), module.exports;
70
- }
67
+ var reactIs = {exports: {}};
71
68
 
72
69
  /** @license React v17.0.2
73
70
  * react-is.production.min.js
@@ -77,27 +74,9 @@
77
74
  * This source code is licensed under the MIT license found in the
78
75
  * LICENSE file in the root directory of this source tree.
79
76
  */
77
+ if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;x("react.element");x("react.portal");x("react.fragment");x("react.strict_mode");x("react.profiler");x("react.provider");x("react.context");x("react.forward_ref");x("react.suspense");x("react.suspense_list");x("react.memo");x("react.lazy");x("react.block");x("react.server.block");x("react.fundamental");x("react.debug_trace_mode");x("react.legacy_hidden");}
80
78
 
81
- if ("function" === typeof Symbol && Symbol.for) {
82
- var x = Symbol.for;
83
- x("react.element");
84
- x("react.portal");
85
- x("react.fragment");
86
- x("react.strict_mode");
87
- x("react.profiler");
88
- x("react.provider");
89
- x("react.context");
90
- x("react.forward_ref");
91
- x("react.suspense");
92
- x("react.suspense_list");
93
- x("react.memo");
94
- x("react.lazy");
95
- x("react.block");
96
- x("react.server.block");
97
- x("react.fundamental");
98
- x("react.debug_trace_mode");
99
- x("react.legacy_hidden");
100
- }
79
+ var reactIs_development = {};
101
80
 
102
81
  /** @license React v17.0.2
103
82
  * react-is.development.js
@@ -107,326 +86,225 @@
107
86
  * This source code is licensed under the MIT license found in the
108
87
  * LICENSE file in the root directory of this source tree.
109
88
  */
110
- var reactIs_development = createCommonjsModule(function (module, exports) {
111
-
112
- {
113
- (function () {
114
- // When adding new symbols to this file,
115
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
116
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
117
- // nor polyfill, then a plain number is used for performance.
118
-
119
- var REACT_ELEMENT_TYPE = 0xeac7;
120
- var REACT_PORTAL_TYPE = 0xeaca;
121
- var REACT_FRAGMENT_TYPE = 0xeacb;
122
- var REACT_STRICT_MODE_TYPE = 0xeacc;
123
- var REACT_PROFILER_TYPE = 0xead2;
124
- var REACT_PROVIDER_TYPE = 0xeacd;
125
- var REACT_CONTEXT_TYPE = 0xeace;
126
- var REACT_FORWARD_REF_TYPE = 0xead0;
127
- var REACT_SUSPENSE_TYPE = 0xead1;
128
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
129
- var REACT_MEMO_TYPE = 0xead3;
130
- var REACT_LAZY_TYPE = 0xead4;
131
- var REACT_BLOCK_TYPE = 0xead9;
132
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
133
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
134
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
135
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
136
-
137
- if (typeof Symbol === 'function' && Symbol.for) {
138
- var symbolFor = Symbol.for;
139
- REACT_ELEMENT_TYPE = symbolFor('react.element');
140
- REACT_PORTAL_TYPE = symbolFor('react.portal');
141
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
142
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
143
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
144
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
145
- REACT_CONTEXT_TYPE = symbolFor('react.context');
146
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
147
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
148
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
149
- REACT_MEMO_TYPE = symbolFor('react.memo');
150
- REACT_LAZY_TYPE = symbolFor('react.lazy');
151
- REACT_BLOCK_TYPE = symbolFor('react.block');
152
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
153
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
154
- symbolFor('react.scope');
155
- symbolFor('react.opaque.id');
156
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
157
- symbolFor('react.offscreen');
158
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
159
- } // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
160
-
161
-
162
- var enableScopeAPI = false; // Experimental Create Event Handle API.
163
-
164
- function isValidElementType(type) {
165
- if (typeof type === 'string' || typeof type === 'function') {
166
- return true;
167
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
168
-
169
-
170
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
171
- return true;
172
- }
173
-
174
- if (typeof type === 'object' && type !== null) {
175
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
176
- return true;
177
- }
178
- }
179
-
180
- return false;
181
- }
182
-
183
- function typeOf(object) {
184
- if (typeof object === 'object' && object !== null) {
185
- var $$typeof = object.$$typeof;
186
-
187
- switch ($$typeof) {
188
- case REACT_ELEMENT_TYPE:
189
- var type = object.type;
190
-
191
- switch (type) {
192
- case REACT_FRAGMENT_TYPE:
193
- case REACT_PROFILER_TYPE:
194
- case REACT_STRICT_MODE_TYPE:
195
- case REACT_SUSPENSE_TYPE:
196
- case REACT_SUSPENSE_LIST_TYPE:
197
- return type;
198
-
199
- default:
200
- var $$typeofType = type && type.$$typeof;
201
-
202
- switch ($$typeofType) {
203
- case REACT_CONTEXT_TYPE:
204
- case REACT_FORWARD_REF_TYPE:
205
- case REACT_LAZY_TYPE:
206
- case REACT_MEMO_TYPE:
207
- case REACT_PROVIDER_TYPE:
208
- return $$typeofType;
209
-
210
- default:
211
- return $$typeof;
212
- }
213
-
214
- }
215
-
216
- case REACT_PORTAL_TYPE:
217
- return $$typeof;
218
- }
219
- }
220
-
221
- return undefined;
222
- }
223
-
224
- var ContextConsumer = REACT_CONTEXT_TYPE;
225
- var ContextProvider = REACT_PROVIDER_TYPE;
226
- var Element = REACT_ELEMENT_TYPE;
227
- var ForwardRef = REACT_FORWARD_REF_TYPE;
228
- var Fragment = REACT_FRAGMENT_TYPE;
229
- var Lazy = REACT_LAZY_TYPE;
230
- var Memo = REACT_MEMO_TYPE;
231
- var Portal = REACT_PORTAL_TYPE;
232
- var Profiler = REACT_PROFILER_TYPE;
233
- var StrictMode = REACT_STRICT_MODE_TYPE;
234
- var Suspense = REACT_SUSPENSE_TYPE;
235
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
236
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
237
-
238
- function isAsyncMode(object) {
239
- {
240
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
241
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
242
-
243
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
244
- }
245
- }
246
- return false;
247
- }
248
-
249
- function isConcurrentMode(object) {
250
- {
251
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
252
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
253
-
254
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
255
- }
256
- }
257
- return false;
258
- }
259
-
260
- function isContextConsumer(object) {
261
- return typeOf(object) === REACT_CONTEXT_TYPE;
262
- }
263
-
264
- function isContextProvider(object) {
265
- return typeOf(object) === REACT_PROVIDER_TYPE;
266
- }
267
-
268
- function isElement(object) {
269
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
270
- }
271
-
272
- function isForwardRef(object) {
273
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
274
- }
275
-
276
- function isFragment(object) {
277
- return typeOf(object) === REACT_FRAGMENT_TYPE;
278
- }
279
-
280
- function isLazy(object) {
281
- return typeOf(object) === REACT_LAZY_TYPE;
282
- }
283
89
 
284
- function isMemo(object) {
285
- return typeOf(object) === REACT_MEMO_TYPE;
286
- }
90
+ {
91
+ (function() {
92
+
93
+ // ATTENTION
94
+ // When adding new symbols to this file,
95
+ // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
96
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
97
+ // nor polyfill, then a plain number is used for performance.
98
+ var REACT_ELEMENT_TYPE = 0xeac7;
99
+ var REACT_PORTAL_TYPE = 0xeaca;
100
+ var REACT_FRAGMENT_TYPE = 0xeacb;
101
+ var REACT_STRICT_MODE_TYPE = 0xeacc;
102
+ var REACT_PROFILER_TYPE = 0xead2;
103
+ var REACT_PROVIDER_TYPE = 0xeacd;
104
+ var REACT_CONTEXT_TYPE = 0xeace;
105
+ var REACT_FORWARD_REF_TYPE = 0xead0;
106
+ var REACT_SUSPENSE_TYPE = 0xead1;
107
+ var REACT_SUSPENSE_LIST_TYPE = 0xead8;
108
+ var REACT_MEMO_TYPE = 0xead3;
109
+ var REACT_LAZY_TYPE = 0xead4;
110
+ var REACT_BLOCK_TYPE = 0xead9;
111
+ var REACT_SERVER_BLOCK_TYPE = 0xeada;
112
+ var REACT_FUNDAMENTAL_TYPE = 0xead5;
113
+ var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
114
+ var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
115
+
116
+ if (typeof Symbol === 'function' && Symbol.for) {
117
+ var symbolFor = Symbol.for;
118
+ REACT_ELEMENT_TYPE = symbolFor('react.element');
119
+ REACT_PORTAL_TYPE = symbolFor('react.portal');
120
+ REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
121
+ REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
122
+ REACT_PROFILER_TYPE = symbolFor('react.profiler');
123
+ REACT_PROVIDER_TYPE = symbolFor('react.provider');
124
+ REACT_CONTEXT_TYPE = symbolFor('react.context');
125
+ REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
126
+ REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
127
+ REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
128
+ REACT_MEMO_TYPE = symbolFor('react.memo');
129
+ REACT_LAZY_TYPE = symbolFor('react.lazy');
130
+ REACT_BLOCK_TYPE = symbolFor('react.block');
131
+ REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
132
+ REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
133
+ symbolFor('react.scope');
134
+ symbolFor('react.opaque.id');
135
+ REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
136
+ symbolFor('react.offscreen');
137
+ REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
138
+ }
287
139
 
288
- function isPortal(object) {
289
- return typeOf(object) === REACT_PORTAL_TYPE;
290
- }
140
+ // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
291
141
 
292
- function isProfiler(object) {
293
- return typeOf(object) === REACT_PROFILER_TYPE;
294
- }
142
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
295
143
 
296
- function isStrictMode(object) {
297
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
298
- }
144
+ function isValidElementType(type) {
145
+ if (typeof type === 'string' || typeof type === 'function') {
146
+ return true;
147
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
299
148
 
300
- function isSuspense(object) {
301
- return typeOf(object) === REACT_SUSPENSE_TYPE;
302
- }
303
149
 
304
- exports.ContextConsumer = ContextConsumer;
305
- exports.ContextProvider = ContextProvider;
306
- exports.Element = Element;
307
- exports.ForwardRef = ForwardRef;
308
- exports.Fragment = Fragment;
309
- exports.Lazy = Lazy;
310
- exports.Memo = Memo;
311
- exports.Portal = Portal;
312
- exports.Profiler = Profiler;
313
- exports.StrictMode = StrictMode;
314
- exports.Suspense = Suspense;
315
- exports.isAsyncMode = isAsyncMode;
316
- exports.isConcurrentMode = isConcurrentMode;
317
- exports.isContextConsumer = isContextConsumer;
318
- exports.isContextProvider = isContextProvider;
319
- exports.isElement = isElement;
320
- exports.isForwardRef = isForwardRef;
321
- exports.isFragment = isFragment;
322
- exports.isLazy = isLazy;
323
- exports.isMemo = isMemo;
324
- exports.isPortal = isPortal;
325
- exports.isProfiler = isProfiler;
326
- exports.isStrictMode = isStrictMode;
327
- exports.isSuspense = isSuspense;
328
- exports.isValidElementType = isValidElementType;
329
- exports.typeOf = typeOf;
330
- })();
150
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
151
+ return true;
331
152
  }
332
- });
333
-
334
- var reactIs = createCommonjsModule(function (module) {
335
153
 
336
- {
337
- module.exports = reactIs_development;
154
+ if (typeof type === 'object' && type !== null) {
155
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
156
+ return true;
157
+ }
338
158
  }
339
- });
340
159
 
341
- function t(t) {
342
- return "object" == typeof t && null != t && 1 === t.nodeType;
160
+ return false;
343
161
  }
344
162
 
345
- function e(t, e) {
346
- return (!e || "hidden" !== t) && "visible" !== t && "clip" !== t;
347
- }
163
+ function typeOf(object) {
164
+ if (typeof object === 'object' && object !== null) {
165
+ var $$typeof = object.$$typeof;
166
+
167
+ switch ($$typeof) {
168
+ case REACT_ELEMENT_TYPE:
169
+ var type = object.type;
170
+
171
+ switch (type) {
172
+ case REACT_FRAGMENT_TYPE:
173
+ case REACT_PROFILER_TYPE:
174
+ case REACT_STRICT_MODE_TYPE:
175
+ case REACT_SUSPENSE_TYPE:
176
+ case REACT_SUSPENSE_LIST_TYPE:
177
+ return type;
178
+
179
+ default:
180
+ var $$typeofType = type && type.$$typeof;
181
+
182
+ switch ($$typeofType) {
183
+ case REACT_CONTEXT_TYPE:
184
+ case REACT_FORWARD_REF_TYPE:
185
+ case REACT_LAZY_TYPE:
186
+ case REACT_MEMO_TYPE:
187
+ case REACT_PROVIDER_TYPE:
188
+ return $$typeofType;
189
+
190
+ default:
191
+ return $$typeof;
192
+ }
348
193
 
349
- function n(t, n) {
350
- if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
351
- var r = getComputedStyle(t, null);
352
- return e(r.overflowY, n) || e(r.overflowX, n) || function (t) {
353
- var e = function (t) {
354
- if (!t.ownerDocument || !t.ownerDocument.defaultView) return null;
355
-
356
- try {
357
- return t.ownerDocument.defaultView.frameElement;
358
- } catch (t) {
359
- return null;
360
194
  }
361
- }(t);
362
195
 
363
- return !!e && (e.clientHeight < t.scrollHeight || e.clientWidth < t.scrollWidth);
364
- }(t);
196
+ case REACT_PORTAL_TYPE:
197
+ return $$typeof;
198
+ }
365
199
  }
366
200
 
367
- return !1;
368
- }
369
-
370
- function r(t, e, n, r, i, o, l, d) {
371
- return o < t && l > e || o > t && l < e ? 0 : o <= t && d <= n || l >= e && d >= n ? o - t - r : l > e && d < n || o < t && d > n ? l - e + i : 0;
201
+ return undefined;
372
202
  }
203
+ var ContextConsumer = REACT_CONTEXT_TYPE;
204
+ var ContextProvider = REACT_PROVIDER_TYPE;
205
+ var Element = REACT_ELEMENT_TYPE;
206
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
207
+ var Fragment = REACT_FRAGMENT_TYPE;
208
+ var Lazy = REACT_LAZY_TYPE;
209
+ var Memo = REACT_MEMO_TYPE;
210
+ var Portal = REACT_PORTAL_TYPE;
211
+ var Profiler = REACT_PROFILER_TYPE;
212
+ var StrictMode = REACT_STRICT_MODE_TYPE;
213
+ var Suspense = REACT_SUSPENSE_TYPE;
214
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
215
+ var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
216
+
217
+ function isAsyncMode(object) {
218
+ {
219
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
220
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
373
221
 
374
- function computeScrollIntoView (e, i) {
375
- var o = window,
376
- l = i.scrollMode,
377
- d = i.block,
378
- u = i.inline,
379
- h = i.boundary,
380
- a = i.skipOverflowHiddenElements,
381
- c = "function" == typeof h ? h : function (t) {
382
- return t !== h;
383
- };
384
- if (!t(e)) throw new TypeError("Invalid target");
385
-
386
- for (var f = document.scrollingElement || document.documentElement, s = [], p = e; t(p) && c(p);) {
387
- if ((p = p.parentElement) === f) {
388
- s.push(p);
389
- break;
222
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
390
223
  }
391
-
392
- null != p && p === document.body && n(p) && !n(document.documentElement) || null != p && n(p, a) && s.push(p);
393
224
  }
394
225
 
395
- for (var m = o.visualViewport ? o.visualViewport.width : innerWidth, g = o.visualViewport ? o.visualViewport.height : innerHeight, w = window.scrollX || pageXOffset, v = window.scrollY || pageYOffset, W = e.getBoundingClientRect(), b = W.height, H = W.width, y = W.top, E = W.right, M = W.bottom, V = W.left, x = "start" === d || "nearest" === d ? y : "end" === d ? M : y + b / 2, I = "center" === u ? V + H / 2 : "end" === u ? E : V, C = [], T = 0; T < s.length; T++) {
396
- var k = s[T],
397
- B = k.getBoundingClientRect(),
398
- D = B.height,
399
- O = B.width,
400
- R = B.top,
401
- X = B.right,
402
- Y = B.bottom,
403
- L = B.left;
404
- if ("if-needed" === l && y >= 0 && V >= 0 && M <= g && E <= m && y >= R && M <= Y && V >= L && E <= X) return C;
405
- var S = getComputedStyle(k),
406
- j = parseInt(S.borderLeftWidth, 10),
407
- q = parseInt(S.borderTopWidth, 10),
408
- z = parseInt(S.borderRightWidth, 10),
409
- A = parseInt(S.borderBottomWidth, 10),
410
- F = 0,
411
- G = 0,
412
- J = "offsetWidth" in k ? k.offsetWidth - k.clientWidth - j - z : 0,
413
- K = "offsetHeight" in k ? k.offsetHeight - k.clientHeight - q - A : 0;
414
- if (f === k) F = "start" === d ? x : "end" === d ? x - g : "nearest" === d ? r(v, v + g, g, q, A, v + x, v + x + b, b) : x - g / 2, G = "start" === u ? I : "center" === u ? I - m / 2 : "end" === u ? I - m : r(w, w + m, m, j, z, w + I, w + I + H, H), F = Math.max(0, F + v), G = Math.max(0, G + w);else {
415
- F = "start" === d ? x - R - q : "end" === d ? x - Y + A + K : "nearest" === d ? r(R, Y, D, q, A + K, x, x + b, b) : x - (R + D / 2) + K / 2, G = "start" === u ? I - L - j : "center" === u ? I - (L + O / 2) + J / 2 : "end" === u ? I - X + z + J : r(L, X, O, j, z + J, I, I + H, H);
416
- var N = k.scrollLeft,
417
- P = k.scrollTop;
418
- x += P - (F = Math.max(0, Math.min(P + F, k.scrollHeight - D + K))), I += N - (G = Math.max(0, Math.min(N + G, k.scrollWidth - O + J)));
226
+ return false;
227
+ }
228
+ function isConcurrentMode(object) {
229
+ {
230
+ if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
231
+ hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
232
+
233
+ console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
419
234
  }
420
- C.push({
421
- el: k,
422
- top: F,
423
- left: G
424
- });
425
235
  }
426
236
 
427
- return C;
237
+ return false;
238
+ }
239
+ function isContextConsumer(object) {
240
+ return typeOf(object) === REACT_CONTEXT_TYPE;
241
+ }
242
+ function isContextProvider(object) {
243
+ return typeOf(object) === REACT_PROVIDER_TYPE;
244
+ }
245
+ function isElement(object) {
246
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
247
+ }
248
+ function isForwardRef(object) {
249
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
250
+ }
251
+ function isFragment(object) {
252
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
253
+ }
254
+ function isLazy(object) {
255
+ return typeOf(object) === REACT_LAZY_TYPE;
256
+ }
257
+ function isMemo(object) {
258
+ return typeOf(object) === REACT_MEMO_TYPE;
259
+ }
260
+ function isPortal(object) {
261
+ return typeOf(object) === REACT_PORTAL_TYPE;
262
+ }
263
+ function isProfiler(object) {
264
+ return typeOf(object) === REACT_PROFILER_TYPE;
265
+ }
266
+ function isStrictMode(object) {
267
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
268
+ }
269
+ function isSuspense(object) {
270
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
271
+ }
272
+
273
+ reactIs_development.ContextConsumer = ContextConsumer;
274
+ reactIs_development.ContextProvider = ContextProvider;
275
+ reactIs_development.Element = Element;
276
+ reactIs_development.ForwardRef = ForwardRef;
277
+ reactIs_development.Fragment = Fragment;
278
+ reactIs_development.Lazy = Lazy;
279
+ reactIs_development.Memo = Memo;
280
+ reactIs_development.Portal = Portal;
281
+ reactIs_development.Profiler = Profiler;
282
+ reactIs_development.StrictMode = StrictMode;
283
+ reactIs_development.Suspense = Suspense;
284
+ reactIs_development.isAsyncMode = isAsyncMode;
285
+ reactIs_development.isConcurrentMode = isConcurrentMode;
286
+ reactIs_development.isContextConsumer = isContextConsumer;
287
+ reactIs_development.isContextProvider = isContextProvider;
288
+ reactIs_development.isElement = isElement;
289
+ reactIs_development.isForwardRef = isForwardRef;
290
+ reactIs_development.isFragment = isFragment;
291
+ reactIs_development.isLazy = isLazy;
292
+ reactIs_development.isMemo = isMemo;
293
+ reactIs_development.isPortal = isPortal;
294
+ reactIs_development.isProfiler = isProfiler;
295
+ reactIs_development.isStrictMode = isStrictMode;
296
+ reactIs_development.isSuspense = isSuspense;
297
+ reactIs_development.isValidElementType = isValidElementType;
298
+ reactIs_development.typeOf = typeOf;
299
+ })();
428
300
  }
429
301
 
302
+ {
303
+ reactIs.exports = reactIs_development;
304
+ }
305
+
306
+ function t(t){return "object"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return (!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t}function n(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e(r.overflowY,n)||e(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return !!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return !1}function r(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}function computeScrollIntoView(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c="function"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p);}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x="start"===d||"nearest"===d?y:"end"===d?M:y+b/2,I="center"===u?V+H/2:"end"===u?E:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if("if-needed"===l&&y>=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J="offsetWidth"in k?k.offsetWidth-k.clientWidth-j-z:0,K="offsetHeight"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F="start"===d?x:"end"===d?x-g:"nearest"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G="start"===u?I:"center"===u?I-m/2:"end"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else {F="start"===d?x-R-q:"end"===d?x-Y+A+K:"nearest"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G="start"===u?I-L-j:"center"===u?I-(L+O/2)+J/2:"end"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)));}C.push({el:k,top:F,left:G});}return C}
307
+
430
308
  var idCounter = 0;
431
309
  /**
432
310
  * Accepts a parameter and returns it if it's a function
@@ -576,7 +454,7 @@
576
454
  }
577
455
  /**
578
456
  * Default implementation for status message. Only added when menu is open.
579
- * Will specift if there are results in the list, and if so, how many,
457
+ * Will specify if there are results in the list, and if so, how many,
580
458
  * and what keys are relevant.
581
459
  *
582
460
  * @param {Object} param the downshift state and other relevant properties
@@ -961,6 +839,12 @@
961
839
  touchEnd: touchEnd
962
840
  });
963
841
 
842
+ var _excluded$4 = ["refKey", "ref"],
843
+ _excluded2$3 = ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"],
844
+ _excluded3$2 = ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"],
845
+ _excluded4$1 = ["refKey", "ref"],
846
+ _excluded5$1 = ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"];
847
+
964
848
  var Downshift = /*#__PURE__*/function () {
965
849
  var Downshift = /*#__PURE__*/function (_Component) {
966
850
  _inheritsLoose(Downshift, _Component);
@@ -1080,6 +964,8 @@
1080
964
  isItemSelected = newStateToSet.hasOwnProperty('selectedItem'); // this keeps track of the object we want to call with setState
1081
965
 
1082
966
  var nextState = {}; // this is just used to tell whether the state changed
967
+
968
+ var nextFullState = {}; // we need to call on change if the outside world is controlling any of our state
1083
969
  // and we're trying to update that state. OR if the selection has changed and we're
1084
970
  // trying to update the selection
1085
971
 
@@ -1105,7 +991,7 @@
1105
991
  return;
1106
992
  }
1107
993
 
1108
- newStateToSet[key]; // if it's coming from props, then we don't care to set it internally
994
+ nextFullState[key] = newStateToSet[key]; // if it's coming from props, then we don't care to set it internally
1109
995
 
1110
996
  if (!isControlledProp(_this.props, key)) {
1111
997
  nextState[key] = newStateToSet[key];
@@ -1154,7 +1040,7 @@
1154
1040
  _ref$refKey = _ref.refKey,
1155
1041
  refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,
1156
1042
  ref = _ref.ref,
1157
- rest = _objectWithoutPropertiesLoose(_ref, ["refKey", "ref"]);
1043
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);
1158
1044
 
1159
1045
  var _ref2 = _temp2 === void 0 ? {} : _temp2,
1160
1046
  _ref2$suppressRefErro = _ref2.suppressRefError,
@@ -1338,7 +1224,7 @@
1338
1224
  var onKeyDown = _ref3.onKeyDown,
1339
1225
  onKeyUp = _ref3.onKeyUp,
1340
1226
  onBlur = _ref3.onBlur,
1341
- rest = _objectWithoutPropertiesLoose(_ref3, ["onClick", "onPress", "onKeyDown", "onKeyUp", "onBlur"]);
1227
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);
1342
1228
 
1343
1229
  var _this$getState5 = _this.getState(),
1344
1230
  isOpen = _this$getState5.isOpen;
@@ -1402,10 +1288,10 @@
1402
1288
  _this.internalSetTimeout(function () {
1403
1289
  if (!_this.isMouseDown && (_this.props.environment.document.activeElement == null || _this.props.environment.document.activeElement.id !== _this.inputId) && _this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)
1404
1290
  ) {
1405
- _this.reset({
1406
- type: blurButton
1407
- });
1408
- }
1291
+ _this.reset({
1292
+ type: blurButton
1293
+ });
1294
+ }
1409
1295
  });
1410
1296
  };
1411
1297
 
@@ -1423,7 +1309,7 @@
1423
1309
  onChange = _ref4.onChange,
1424
1310
  onInput = _ref4.onInput;
1425
1311
  _ref4.onChangeText;
1426
- var rest = _objectWithoutPropertiesLoose(_ref4, ["onKeyDown", "onBlur", "onChange", "onInput", "onChangeText"]);
1312
+ var rest = _objectWithoutPropertiesLoose(_ref4, _excluded3$2);
1427
1313
 
1428
1314
  var onChangeKey;
1429
1315
  var eventHandlers = {};
@@ -1498,7 +1384,7 @@
1498
1384
  _ref5$refKey = _ref5.refKey,
1499
1385
  refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,
1500
1386
  ref = _ref5.ref,
1501
- props = _objectWithoutPropertiesLoose(_ref5, ["refKey", "ref"]);
1387
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded4$1);
1502
1388
 
1503
1389
  var _ref6 = _temp6 === void 0 ? {} : _temp6,
1504
1390
  _ref6$suppressRefErro = _ref6.suppressRefError,
@@ -1521,7 +1407,7 @@
1521
1407
  var index = _ref7.index,
1522
1408
  _ref7$item = _ref7.item,
1523
1409
  item = _ref7$item === void 0 ? requiredProp('getItemProps', 'item') : _ref7$item,
1524
- rest = _objectWithoutPropertiesLoose(_ref7, ["onMouseMove", "onMouseDown", "onClick", "onPress", "index", "item"]);
1410
+ rest = _objectWithoutPropertiesLoose(_ref7, _excluded5$1);
1525
1411
 
1526
1412
  if (index === undefined) {
1527
1413
  _this.items.push(item);
@@ -2025,9 +1911,9 @@
2025
1911
  selectedItemChanged: function selectedItemChanged(prevItem, item) {
2026
1912
  return prevItem !== item;
2027
1913
  },
2028
- environment: typeof window === 'undefined'
1914
+ environment:
2029
1915
  /* istanbul ignore next (ssr) */
2030
- ? {} : window,
1916
+ typeof window === 'undefined' ? {} : window,
2031
1917
  stateReducer: function stateReducer(state, stateToSet) {
2032
1918
  return stateToSet;
2033
1919
  },
@@ -2038,6 +1924,8 @@
2038
1924
  return Downshift;
2039
1925
  }();
2040
1926
 
1927
+ var Downshift$1 = Downshift;
1928
+
2041
1929
  function validateGetMenuPropsCalledCorrectly(node, _ref12) {
2042
1930
  var refKey = _ref12.refKey;
2043
1931
 
@@ -2052,7 +1940,7 @@
2052
1940
  var refKeySpecified = refKey !== 'ref';
2053
1941
  var isComposite = !isDOMElement(element);
2054
1942
 
2055
- if (isComposite && !refKeySpecified && !reactIs.isForwardRef(element)) {
1943
+ if (isComposite && !refKeySpecified && !reactIs.exports.isForwardRef(element)) {
2056
1944
  // eslint-disable-next-line no-console
2057
1945
  console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');
2058
1946
  } else if (!isComposite && refKeySpecified) {
@@ -2060,12 +1948,13 @@
2060
1948
  console.error("downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"" + refKey + "\"");
2061
1949
  }
2062
1950
 
2063
- if (!reactIs.isForwardRef(element) && !getElementProps(element)[refKey]) {
1951
+ if (!reactIs.exports.isForwardRef(element) && !getElementProps(element)[refKey]) {
2064
1952
  // eslint-disable-next-line no-console
2065
1953
  console.error("downshift: You must apply the ref prop \"" + refKey + "\" from getRootProps onto your root element.");
2066
1954
  }
2067
1955
  }
2068
1956
 
1957
+ var _excluded$3 = ["isInitialMount", "highlightedIndex", "items", "environment"];
2069
1958
  var dropdownDefaultStateValues = {
2070
1959
  highlightedIndex: -1,
2071
1960
  isOpen: false,
@@ -2263,9 +2152,9 @@
2263
2152
  getA11ySelectionMessage: getA11ySelectionMessage,
2264
2153
  scrollIntoView: scrollIntoView,
2265
2154
  circularNavigation: false,
2266
- environment: typeof window === 'undefined'
2155
+ environment:
2267
2156
  /* istanbul ignore next (ssr) */
2268
- ? {} : window
2157
+ typeof window === 'undefined' ? {} : window
2269
2158
  };
2270
2159
 
2271
2160
  function getDefaultValue$1(props, propKey, defaultStateValues) {
@@ -2479,11 +2368,11 @@
2479
2368
  highlightedIndex = _ref2.highlightedIndex,
2480
2369
  items = _ref2.items,
2481
2370
  environment = _ref2.environment,
2482
- rest = _objectWithoutPropertiesLoose(_ref2, ["isInitialMount", "highlightedIndex", "items", "environment"]);
2371
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
2483
2372
 
2484
2373
  // Sets a11y status message on changes in state.
2485
2374
  preact.useEffect(function () {
2486
- if (isInitialMount) {
2375
+ if (isInitialMount || false) {
2487
2376
  return;
2488
2377
  }
2489
2378
 
@@ -2614,58 +2503,84 @@
2614
2503
  }
2615
2504
  /* eslint-enable complexity */
2616
2505
 
2617
- function getItemIndexByCharacterKey(keysSoFar, highlightedIndex, items, itemToString, getItemNodeFromIndex) {
2618
- var lowerCasedKeysSoFar = keysSoFar.toLowerCase();
2619
-
2620
- for (var index = 0; index < items.length; index++) {
2621
- var offsetIndex = (index + highlightedIndex + 1) % items.length;
2622
-
2623
- if (itemToString(items[offsetIndex]).toLowerCase().startsWith(lowerCasedKeysSoFar)) {
2624
- var element = getItemNodeFromIndex(offsetIndex);
2506
+ /*! *****************************************************************************
2507
+ Copyright (c) Microsoft Corporation.
2508
+
2509
+ Permission to use, copy, modify, and/or distribute this software for any
2510
+ purpose with or without fee is hereby granted.
2511
+
2512
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2513
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2514
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2515
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2516
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2517
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2518
+ PERFORMANCE OF THIS SOFTWARE.
2519
+ ***************************************************************************** */
2520
+
2521
+ var __assign = function() {
2522
+ __assign = Object.assign || function __assign(t) {
2523
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
2524
+ s = arguments[i];
2525
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
2526
+ }
2527
+ return t;
2528
+ };
2529
+ return __assign.apply(this, arguments);
2530
+ };
2625
2531
 
2626
- if (!(element && element.hasAttribute('disabled'))) {
2627
- return offsetIndex;
2628
- }
2532
+ function getItemIndexByCharacterKey(_a) {
2533
+ var keysSoFar = _a.keysSoFar, highlightedIndex = _a.highlightedIndex, items = _a.items, itemToString = _a.itemToString, getItemNodeFromIndex = _a.getItemNodeFromIndex;
2534
+ var lowerCasedKeysSoFar = keysSoFar.toLowerCase();
2535
+ for (var index = 0; index < items.length; index++) {
2536
+ var offsetIndex = (index + highlightedIndex + 1) % items.length;
2537
+ var item = items[offsetIndex];
2538
+ if (item !== undefined &&
2539
+ itemToString(item)
2540
+ .toLowerCase()
2541
+ .startsWith(lowerCasedKeysSoFar)) {
2542
+ var element = getItemNodeFromIndex(offsetIndex);
2543
+ if (!(element === null || element === void 0 ? void 0 : element.hasAttribute('disabled'))) {
2544
+ return offsetIndex;
2545
+ }
2546
+ }
2629
2547
  }
2630
- }
2631
-
2632
- return highlightedIndex;
2548
+ return highlightedIndex;
2633
2549
  }
2634
-
2635
2550
  var propTypes$2 = {
2636
- items: PropTypes__default['default'].array.isRequired,
2637
- itemToString: PropTypes__default['default'].func,
2638
- getA11yStatusMessage: PropTypes__default['default'].func,
2639
- getA11ySelectionMessage: PropTypes__default['default'].func,
2640
- circularNavigation: PropTypes__default['default'].bool,
2641
- highlightedIndex: PropTypes__default['default'].number,
2642
- defaultHighlightedIndex: PropTypes__default['default'].number,
2643
- initialHighlightedIndex: PropTypes__default['default'].number,
2644
- isOpen: PropTypes__default['default'].bool,
2645
- defaultIsOpen: PropTypes__default['default'].bool,
2646
- initialIsOpen: PropTypes__default['default'].bool,
2647
- selectedItem: PropTypes__default['default'].any,
2648
- initialSelectedItem: PropTypes__default['default'].any,
2649
- defaultSelectedItem: PropTypes__default['default'].any,
2650
- id: PropTypes__default['default'].string,
2651
- labelId: PropTypes__default['default'].string,
2652
- menuId: PropTypes__default['default'].string,
2653
- getItemId: PropTypes__default['default'].func,
2654
- toggleButtonId: PropTypes__default['default'].string,
2655
- stateReducer: PropTypes__default['default'].func,
2656
- onSelectedItemChange: PropTypes__default['default'].func,
2657
- onHighlightedIndexChange: PropTypes__default['default'].func,
2658
- onStateChange: PropTypes__default['default'].func,
2659
- onIsOpenChange: PropTypes__default['default'].func,
2660
- environment: PropTypes__default['default'].shape({
2661
- addEventListener: PropTypes__default['default'].func,
2662
- removeEventListener: PropTypes__default['default'].func,
2663
- document: PropTypes__default['default'].shape({
2664
- getElementById: PropTypes__default['default'].func,
2665
- activeElement: PropTypes__default['default'].any,
2666
- body: PropTypes__default['default'].any
2551
+ items: PropTypes__default['default'].array.isRequired,
2552
+ itemToString: PropTypes__default['default'].func,
2553
+ getA11yStatusMessage: PropTypes__default['default'].func,
2554
+ getA11ySelectionMessage: PropTypes__default['default'].func,
2555
+ circularNavigation: PropTypes__default['default'].bool,
2556
+ highlightedIndex: PropTypes__default['default'].number,
2557
+ defaultHighlightedIndex: PropTypes__default['default'].number,
2558
+ initialHighlightedIndex: PropTypes__default['default'].number,
2559
+ isOpen: PropTypes__default['default'].bool,
2560
+ defaultIsOpen: PropTypes__default['default'].bool,
2561
+ initialIsOpen: PropTypes__default['default'].bool,
2562
+ selectedItem: PropTypes__default['default'].any,
2563
+ initialSelectedItem: PropTypes__default['default'].any,
2564
+ defaultSelectedItem: PropTypes__default['default'].any,
2565
+ id: PropTypes__default['default'].string,
2566
+ labelId: PropTypes__default['default'].string,
2567
+ menuId: PropTypes__default['default'].string,
2568
+ getItemId: PropTypes__default['default'].func,
2569
+ toggleButtonId: PropTypes__default['default'].string,
2570
+ stateReducer: PropTypes__default['default'].func,
2571
+ onSelectedItemChange: PropTypes__default['default'].func,
2572
+ onHighlightedIndexChange: PropTypes__default['default'].func,
2573
+ onStateChange: PropTypes__default['default'].func,
2574
+ onIsOpenChange: PropTypes__default['default'].func,
2575
+ environment: PropTypes__default['default'].shape({
2576
+ addEventListener: PropTypes__default['default'].func,
2577
+ removeEventListener: PropTypes__default['default'].func,
2578
+ document: PropTypes__default['default'].shape({
2579
+ getElementById: PropTypes__default['default'].func,
2580
+ activeElement: PropTypes__default['default'].any,
2581
+ body: PropTypes__default['default'].any
2582
+ })
2667
2583
  })
2668
- })
2669
2584
  };
2670
2585
  /**
2671
2586
  * Default implementation for status message. Only added when menu is open.
@@ -2675,39 +2590,27 @@
2675
2590
  * @param {Object} param the downshift state and other relevant properties
2676
2591
  * @return {String} the a11y status message
2677
2592
  */
2678
-
2679
- function getA11yStatusMessage(_ref) {
2680
- var isOpen = _ref.isOpen,
2681
- resultCount = _ref.resultCount,
2682
- previousResultCount = _ref.previousResultCount;
2683
-
2684
- if (!isOpen) {
2593
+ function getA11yStatusMessage(_a) {
2594
+ var isOpen = _a.isOpen, resultCount = _a.resultCount, previousResultCount = _a.previousResultCount;
2595
+ if (!isOpen) {
2596
+ return '';
2597
+ }
2598
+ if (!resultCount) {
2599
+ return 'No results are available.';
2600
+ }
2601
+ if (resultCount !== previousResultCount) {
2602
+ return resultCount + " result" + (resultCount === 1 ? ' is' : 's are') + " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.";
2603
+ }
2685
2604
  return '';
2686
- }
2687
-
2688
- if (!resultCount) {
2689
- return 'No results are available.';
2690
- }
2691
-
2692
- if (resultCount !== previousResultCount) {
2693
- return resultCount + " result" + (resultCount === 1 ? ' is' : 's are') + " available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.";
2694
- }
2695
-
2696
- return '';
2697
2605
  }
2698
-
2699
- var defaultProps$2 = _extends({}, defaultProps$3, {
2700
- getA11yStatusMessage: getA11yStatusMessage
2701
- }); // eslint-disable-next-line import/no-mutable-exports
2702
-
2703
-
2606
+ var defaultProps$2 = __assign(__assign({}, defaultProps$3), { getA11yStatusMessage: getA11yStatusMessage });
2607
+ // eslint-disable-next-line import/no-mutable-exports
2704
2608
  var validatePropTypes$2 = noop;
2705
2609
  /* istanbul ignore next */
2706
-
2707
2610
  {
2708
- validatePropTypes$2 = function validatePropTypes(options, caller) {
2709
- PropTypes__default['default'].checkPropTypes(propTypes$2, options, 'prop', caller.name);
2710
- };
2611
+ validatePropTypes$2 = function (options, caller) {
2612
+ PropTypes__default['default'].checkPropTypes(propTypes$2, options, 'prop', caller.name);
2613
+ };
2711
2614
  }
2712
2615
 
2713
2616
  var MenuKeyDownArrowDown = '__menu_keydown_arrow_down__' ;
@@ -2782,7 +2685,13 @@
2782
2685
  {
2783
2686
  var lowercasedKey = action.key;
2784
2687
  var inputValue = "" + state.inputValue + lowercasedKey;
2785
- var itemIndex = getItemIndexByCharacterKey(inputValue, state.selectedItem ? props.items.indexOf(state.selectedItem) : -1, props.items, props.itemToString, action.getItemNodeFromIndex);
2688
+ var itemIndex = getItemIndexByCharacterKey({
2689
+ keysSoFar: inputValue,
2690
+ highlightedIndex: state.selectedItem ? props.items.indexOf(state.selectedItem) : -1,
2691
+ items: props.items,
2692
+ itemToString: props.itemToString,
2693
+ getItemNodeFromIndex: action.getItemNodeFromIndex
2694
+ });
2786
2695
  changes = _extends({
2787
2696
  inputValue: inputValue
2788
2697
  }, itemIndex >= 0 && {
@@ -2847,7 +2756,13 @@
2847
2756
 
2848
2757
  var _inputValue = "" + state.inputValue + _lowercasedKey;
2849
2758
 
2850
- var highlightedIndex = getItemIndexByCharacterKey(_inputValue, state.highlightedIndex, props.items, props.itemToString, action.getItemNodeFromIndex);
2759
+ var highlightedIndex = getItemIndexByCharacterKey({
2760
+ keysSoFar: _inputValue,
2761
+ highlightedIndex: state.highlightedIndex,
2762
+ items: props.items,
2763
+ itemToString: props.itemToString,
2764
+ getItemNodeFromIndex: action.getItemNodeFromIndex
2765
+ });
2851
2766
  changes = _extends({
2852
2767
  inputValue: _inputValue
2853
2768
  }, highlightedIndex >= 0 && {
@@ -2882,6 +2797,9 @@
2882
2797
  }
2883
2798
  /* eslint-enable complexity */
2884
2799
 
2800
+ var _excluded$2 = ["onMouseLeave", "refKey", "onKeyDown", "onBlur", "ref"],
2801
+ _excluded2$2 = ["onClick", "onKeyDown", "refKey", "ref"],
2802
+ _excluded3$1 = ["item", "index", "onMouseMove", "onClick", "refKey", "ref"];
2885
2803
  useSelect.stateChangeTypes = stateChangeTypes$2;
2886
2804
 
2887
2805
  function useSelect(userProps) {
@@ -3172,7 +3090,7 @@
3172
3090
  onKeyDown = _ref.onKeyDown,
3173
3091
  onBlur = _ref.onBlur,
3174
3092
  ref = _ref.ref,
3175
- rest = _objectWithoutPropertiesLoose(_ref, ["onMouseLeave", "refKey", "onKeyDown", "onBlur", "ref"]);
3093
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
3176
3094
 
3177
3095
  var _ref2 = _temp2 === void 0 ? {} : _temp2,
3178
3096
  _ref2$suppressRefErro = _ref2.suppressRefError,
@@ -3237,7 +3155,7 @@
3237
3155
  _ref3$refKey = _ref3.refKey,
3238
3156
  refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,
3239
3157
  ref = _ref3.ref,
3240
- rest = _objectWithoutPropertiesLoose(_ref3, ["onClick", "onKeyDown", "refKey", "ref"]);
3158
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
3241
3159
 
3242
3160
  var _ref4 = _temp4 === void 0 ? {} : _temp4,
3243
3161
  _ref4$suppressRefErro = _ref4.suppressRefError,
@@ -3286,7 +3204,7 @@
3286
3204
  _ref5$refKey = _ref5.refKey,
3287
3205
  refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,
3288
3206
  ref = _ref5.ref,
3289
- rest = _objectWithoutPropertiesLoose(_ref5, ["item", "index", "onMouseMove", "onClick", "refKey", "ref"]);
3207
+ rest = _objectWithoutPropertiesLoose(_ref5, _excluded3$1);
3290
3208
 
3291
3209
  var _latest$current = latest.current,
3292
3210
  latestState = _latest$current.state,
@@ -3622,6 +3540,11 @@
3622
3540
  }
3623
3541
  /* eslint-enable complexity */
3624
3542
 
3543
+ var _excluded$1 = ["onMouseLeave", "refKey", "ref"],
3544
+ _excluded2$1 = ["item", "index", "refKey", "ref", "onMouseMove", "onClick", "onPress"],
3545
+ _excluded3 = ["onClick", "onPress", "refKey", "ref"],
3546
+ _excluded4 = ["onKeyDown", "onChange", "onInput", "onBlur", "onChangeText", "refKey", "ref"],
3547
+ _excluded5 = ["refKey", "ref"];
3625
3548
  useCombobox.stateChangeTypes = stateChangeTypes$1;
3626
3549
 
3627
3550
  function useCombobox(userProps) {
@@ -3792,8 +3715,8 @@
3792
3715
 
3793
3716
  if (!latestState.isOpen || latestState.highlightedIndex < 0 || event.which === 229 // if IME composing, wait for next Enter keydown event.
3794
3717
  ) {
3795
- return;
3796
- }
3718
+ return;
3719
+ }
3797
3720
 
3798
3721
  event.preventDefault();
3799
3722
  dispatch({
@@ -3818,7 +3741,7 @@
3818
3741
  _ref$refKey = _ref.refKey,
3819
3742
  refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,
3820
3743
  ref = _ref.ref,
3821
- rest = _objectWithoutPropertiesLoose(_ref, ["onMouseLeave", "refKey", "ref"]);
3744
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
3822
3745
 
3823
3746
  var _ref2 = _temp2 === void 0 ? {} : _temp2,
3824
3747
  _ref2$suppressRefErro = _ref2.suppressRefError,
@@ -3845,7 +3768,7 @@
3845
3768
  onMouseMove = _ref3.onMouseMove,
3846
3769
  onClick = _ref3.onClick;
3847
3770
  _ref3.onPress;
3848
- var rest = _objectWithoutPropertiesLoose(_ref3, ["item", "index", "refKey", "ref", "onMouseMove", "onClick", "onPress"]);
3771
+ var rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);
3849
3772
 
3850
3773
  var _latest$current = latest.current,
3851
3774
  latestProps = _latest$current.props,
@@ -3899,7 +3822,7 @@
3899
3822
  var _ref5$refKey = _ref5.refKey,
3900
3823
  refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,
3901
3824
  ref = _ref5.ref,
3902
- rest = _objectWithoutPropertiesLoose(_ref5, ["onClick", "onPress", "refKey", "ref"]);
3825
+ rest = _objectWithoutPropertiesLoose(_ref5, _excluded3);
3903
3826
 
3904
3827
  var toggleButtonHandleClick = function toggleButtonHandleClick() {
3905
3828
  dispatch({
@@ -3929,7 +3852,7 @@
3929
3852
  var _ref6$refKey = _ref6.refKey,
3930
3853
  refKey = _ref6$refKey === void 0 ? 'ref' : _ref6$refKey,
3931
3854
  ref = _ref6.ref,
3932
- rest = _objectWithoutPropertiesLoose(_ref6, ["onKeyDown", "onChange", "onInput", "onBlur", "onChangeText", "refKey", "ref"]);
3855
+ rest = _objectWithoutPropertiesLoose(_ref6, _excluded4);
3933
3856
 
3934
3857
  var _ref7 = _temp6 === void 0 ? {} : _temp6,
3935
3858
  _ref7$suppressRefErro = _ref7.suppressRefError,
@@ -3993,7 +3916,7 @@
3993
3916
  _ref8$refKey = _ref8.refKey,
3994
3917
  refKey = _ref8$refKey === void 0 ? 'ref' : _ref8$refKey,
3995
3918
  ref = _ref8.ref,
3996
- rest = _objectWithoutPropertiesLoose(_ref8, ["refKey", "ref"]);
3919
+ rest = _objectWithoutPropertiesLoose(_ref8, _excluded5);
3997
3920
 
3998
3921
  var _ref9 = _temp8 === void 0 ? {} : _temp8,
3999
3922
  _ref9$suppressRefErro = _ref9.suppressRefError,
@@ -4133,9 +4056,7 @@
4133
4056
  var element = event.target;
4134
4057
 
4135
4058
  if (element instanceof HTMLInputElement && // if element is a text input
4136
- element.value !== '' && ( // and we have text in it
4137
- // and cursor is either not at the start or is currently highlighting text.
4138
- element.selectionStart !== 0 || element.selectionEnd !== 0)) {
4059
+ element.value !== '' && (element.selectionStart !== 0 || element.selectionEnd !== 0)) {
4139
4060
  return false;
4140
4061
  }
4141
4062
 
@@ -4352,6 +4273,8 @@
4352
4273
  return _extends({}, state, changes);
4353
4274
  }
4354
4275
 
4276
+ var _excluded = ["refKey", "ref", "onClick", "onKeyDown", "selectedItem", "index"],
4277
+ _excluded2 = ["refKey", "ref", "onKeyDown", "onClick", "preventKeyAction"];
4355
4278
  useMultipleSelection.stateChangeTypes = stateChangeTypes;
4356
4279
 
4357
4280
  function useMultipleSelection(userProps) {
@@ -4481,7 +4404,7 @@
4481
4404
  onKeyDown = _ref3.onKeyDown,
4482
4405
  selectedItem = _ref3.selectedItem,
4483
4406
  index = _ref3.index,
4484
- rest = _objectWithoutPropertiesLoose(_ref3, ["refKey", "ref", "onClick", "onKeyDown", "selectedItem", "index"]);
4407
+ rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
4485
4408
 
4486
4409
  var latestState = latest.current.state;
4487
4410
  var itemIndex = getItemIndex(index, selectedItem, latestState.selectedItems);
@@ -4522,7 +4445,7 @@
4522
4445
  onClick = _ref4.onClick,
4523
4446
  _ref4$preventKeyActio = _ref4.preventKeyAction,
4524
4447
  preventKeyAction = _ref4$preventKeyActio === void 0 ? false : _ref4$preventKeyActio,
4525
- rest = _objectWithoutPropertiesLoose(_ref4, ["refKey", "ref", "onKeyDown", "onClick", "preventKeyAction"]);
4448
+ rest = _objectWithoutPropertiesLoose(_ref4, _excluded2);
4526
4449
 
4527
4450
  var _ref5 = _temp3 === void 0 ? {} : _temp3,
4528
4451
  _ref5$suppressRefErro = _ref5.suppressRefError,
@@ -4596,7 +4519,7 @@
4596
4519
  };
4597
4520
  }
4598
4521
 
4599
- exports.default = Downshift;
4522
+ exports['default'] = Downshift$1;
4600
4523
  exports.resetIdCounter = resetIdCounter;
4601
4524
  exports.useCombobox = useCombobox;
4602
4525
  exports.useMultipleSelection = useMultipleSelection;