@react-aria/selection 3.7.3 → 3.8.2
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/main.js +75 -67
- package/dist/main.js.map +1 -1
- package/dist/module.js +71 -63
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/useSelectableItem.ts +27 -7
package/dist/module.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {useRef as $
|
|
2
|
-
import {getFocusableTreeWalker as $
|
|
3
|
-
import {focusWithoutScrolling as $
|
|
4
|
-
import {useLocale as $
|
|
5
|
-
import {usePress as $
|
|
1
|
+
import {useRef as $eCAIO$useRef, useEffect as $eCAIO$useEffect, useMemo as $eCAIO$useMemo} from "react";
|
|
2
|
+
import {getFocusableTreeWalker as $eCAIO$getFocusableTreeWalker, focusSafely as $eCAIO$focusSafely} from "@react-aria/focus";
|
|
3
|
+
import {focusWithoutScrolling as $eCAIO$focusWithoutScrolling, useEvent as $eCAIO$useEvent, scrollIntoView as $eCAIO$scrollIntoView, mergeProps as $eCAIO$mergeProps, isAppleDevice as $eCAIO$isAppleDevice, isMac as $eCAIO$isMac} from "@react-aria/utils";
|
|
4
|
+
import {useLocale as $eCAIO$useLocale, useCollator as $eCAIO$useCollator} from "@react-aria/i18n";
|
|
5
|
+
import {usePress as $eCAIO$usePress, useLongPress as $eCAIO$useLongPress} from "@react-aria/interactions";
|
|
6
6
|
|
|
7
7
|
function $parcel$export(e, n, v, s) {
|
|
8
8
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
9
|
}
|
|
10
|
-
var $
|
|
10
|
+
var $ae20dd8cbca75726$exports = {};
|
|
11
11
|
|
|
12
|
-
$parcel$export($
|
|
12
|
+
$parcel$export($ae20dd8cbca75726$exports, "useSelectableCollection", () => $ae20dd8cbca75726$export$d6daf82dcd84e87c);
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
function $
|
|
18
|
+
function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
|
|
19
19
|
// Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.
|
|
20
20
|
// On Windows and Ubuntu, Alt + Space has a system wide meaning.
|
|
21
|
-
return $
|
|
21
|
+
return $eCAIO$isAppleDevice() ? e.altKey : e.ctrlKey;
|
|
22
22
|
}
|
|
23
|
-
function $
|
|
24
|
-
if ($
|
|
23
|
+
function $feb5ffebff200149$export$16792effe837dba3(e) {
|
|
24
|
+
if ($eCAIO$isMac()) return e.metaKey;
|
|
25
25
|
return e.ctrlKey;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var $
|
|
30
|
+
var $fb3050f43d946246$exports = {};
|
|
31
31
|
|
|
32
|
-
$parcel$export($
|
|
32
|
+
$parcel$export($fb3050f43d946246$exports, "useTypeSelect", () => $fb3050f43d946246$export$e32c88dfddc6e1d8);
|
|
33
33
|
|
|
34
|
-
function $
|
|
34
|
+
function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
|
|
35
35
|
let { keyboardDelegate: keyboardDelegate , selectionManager: selectionManager , onTypeSelect: onTypeSelect } = options;
|
|
36
|
-
let state = $
|
|
36
|
+
let state = $eCAIO$useRef({
|
|
37
37
|
search: '',
|
|
38
38
|
timeout: null
|
|
39
39
|
}).current;
|
|
40
40
|
let onKeyDown = (e)=>{
|
|
41
|
-
let character = $
|
|
41
|
+
let character = $fb3050f43d946246$var$getStringForKey(e.key);
|
|
42
42
|
if (!character || e.ctrlKey || e.metaKey) return;
|
|
43
43
|
// Do not propagate the Spacebar event if it's meant to be part of the search.
|
|
44
44
|
// When we time out, the search term becomes empty, hence the check on length.
|
|
@@ -71,7 +71,7 @@ function $a6f03d1cafa48b51$export$e32c88dfddc6e1d8(options) {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
function $
|
|
74
|
+
function $fb3050f43d946246$var$getStringForKey(key) {
|
|
75
75
|
// If the key is of length 1, it is an ASCII value.
|
|
76
76
|
// Otherwise, if there are no ASCII characters in the key name,
|
|
77
77
|
// it is a Unicode character.
|
|
@@ -81,10 +81,10 @@ function $a6f03d1cafa48b51$var$getStringForKey(key) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
|
|
84
|
-
function $
|
|
84
|
+
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
|
|
85
85
|
let { selectionManager: manager , keyboardDelegate: delegate , ref: ref , autoFocus: autoFocus = false , shouldFocusWrap: shouldFocusWrap = false , disallowEmptySelection: disallowEmptySelection = false , disallowSelectAll: disallowSelectAll = false , selectOnFocus: selectOnFocus = manager.selectionBehavior === 'replace' , disallowTypeAhead: disallowTypeAhead = false , shouldUseVirtualFocus: shouldUseVirtualFocus , allowsTabNavigation: allowsTabNavigation = false , isVirtualized: isVirtualized , scrollRef: // If no scrollRef is provided, assume the collection ref is the scrollable region
|
|
86
86
|
scrollRef = ref } = options;
|
|
87
|
-
let { direction: direction } = $
|
|
87
|
+
let { direction: direction } = $eCAIO$useLocale();
|
|
88
88
|
let onKeyDown = (e)=>{
|
|
89
89
|
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
|
|
90
90
|
if (e.altKey && e.key === 'Tab') e.preventDefault();
|
|
@@ -95,7 +95,7 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
95
95
|
if (key != null) {
|
|
96
96
|
manager.setFocusedKey(key, childFocus);
|
|
97
97
|
if (e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(key);
|
|
98
|
-
else if (selectOnFocus && !$
|
|
98
|
+
else if (selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
switch(e.key){
|
|
@@ -134,18 +134,18 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
134
134
|
case 'Home':
|
|
135
135
|
if (delegate.getFirstKey) {
|
|
136
136
|
e.preventDefault();
|
|
137
|
-
let firstKey = delegate.getFirstKey(manager.focusedKey, $
|
|
137
|
+
let firstKey = delegate.getFirstKey(manager.focusedKey, $feb5ffebff200149$export$16792effe837dba3(e));
|
|
138
138
|
manager.setFocusedKey(firstKey);
|
|
139
|
-
if ($
|
|
139
|
+
if ($feb5ffebff200149$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
|
|
140
140
|
else if (selectOnFocus) manager.replaceSelection(firstKey);
|
|
141
141
|
}
|
|
142
142
|
break;
|
|
143
143
|
case 'End':
|
|
144
144
|
if (delegate.getLastKey) {
|
|
145
145
|
e.preventDefault();
|
|
146
|
-
let lastKey = delegate.getLastKey(manager.focusedKey, $
|
|
146
|
+
let lastKey = delegate.getLastKey(manager.focusedKey, $feb5ffebff200149$export$16792effe837dba3(e));
|
|
147
147
|
manager.setFocusedKey(lastKey);
|
|
148
|
-
if ($
|
|
148
|
+
if ($feb5ffebff200149$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
|
|
149
149
|
else if (selectOnFocus) manager.replaceSelection(lastKey);
|
|
150
150
|
}
|
|
151
151
|
break;
|
|
@@ -164,7 +164,7 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
164
164
|
}
|
|
165
165
|
break;
|
|
166
166
|
case 'a':
|
|
167
|
-
if ($
|
|
167
|
+
if ($feb5ffebff200149$export$16792effe837dba3(e) && manager.selectionMode === 'multiple' && disallowSelectAll !== true) {
|
|
168
168
|
e.preventDefault();
|
|
169
169
|
manager.selectAll();
|
|
170
170
|
}
|
|
@@ -183,7 +183,7 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
183
183
|
// rather than the currently focused one.
|
|
184
184
|
if (e.shiftKey) ref.current.focus();
|
|
185
185
|
else {
|
|
186
|
-
let walker = $
|
|
186
|
+
let walker = $eCAIO$getFocusableTreeWalker(ref.current, {
|
|
187
187
|
tabbable: true
|
|
188
188
|
});
|
|
189
189
|
let next;
|
|
@@ -192,18 +192,18 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
192
192
|
last = walker.lastChild();
|
|
193
193
|
if (last) next = last;
|
|
194
194
|
}while (last)
|
|
195
|
-
if (next && !next.contains(document.activeElement)) $
|
|
195
|
+
if (next && !next.contains(document.activeElement)) $eCAIO$focusWithoutScrolling(next);
|
|
196
196
|
}
|
|
197
197
|
break;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
// Store the scroll position so we can restore it later.
|
|
202
|
-
let scrollPos = $
|
|
202
|
+
let scrollPos = $eCAIO$useRef({
|
|
203
203
|
top: 0,
|
|
204
204
|
left: 0
|
|
205
205
|
});
|
|
206
|
-
$
|
|
206
|
+
$eCAIO$useEvent(scrollRef, 'scroll', isVirtualized ? null : ()=>{
|
|
207
207
|
scrollPos.current = {
|
|
208
208
|
top: scrollRef.current.scrollTop,
|
|
209
209
|
left: scrollRef.current.scrollLeft
|
|
@@ -240,8 +240,8 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
240
240
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
241
241
|
if (element) {
|
|
242
242
|
// This prevents a flash of focus on the first/last element in the collection
|
|
243
|
-
$
|
|
244
|
-
$
|
|
243
|
+
$eCAIO$focusWithoutScrolling(element);
|
|
244
|
+
$eCAIO$scrollIntoView(scrollRef.current, element);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
};
|
|
@@ -249,8 +249,8 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
249
249
|
// Don't set blurred and then focused again if moving focus within the collection.
|
|
250
250
|
if (!e.currentTarget.contains(e.relatedTarget)) manager.setFocused(false);
|
|
251
251
|
};
|
|
252
|
-
const autoFocusRef = $
|
|
253
|
-
$
|
|
252
|
+
const autoFocusRef = $eCAIO$useRef(autoFocus);
|
|
253
|
+
$eCAIO$useEffect(()=>{
|
|
254
254
|
if (autoFocusRef.current) {
|
|
255
255
|
let focusedKey = null;
|
|
256
256
|
// Check focus strategy to determine which item to focus
|
|
@@ -262,17 +262,17 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
262
262
|
manager.setFocused(true);
|
|
263
263
|
manager.setFocusedKey(focusedKey);
|
|
264
264
|
// If no default focus key is selected, focus the collection itself.
|
|
265
|
-
if (focusedKey == null && !shouldUseVirtualFocus) $
|
|
265
|
+
if (focusedKey == null && !shouldUseVirtualFocus) $eCAIO$focusSafely(ref.current);
|
|
266
266
|
}
|
|
267
267
|
autoFocusRef.current = false;
|
|
268
268
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
269
269
|
}, []);
|
|
270
270
|
// If not virtualized, scroll the focused element into view when the focusedKey changes.
|
|
271
271
|
// When virtualized, Virtualizer handles this internally.
|
|
272
|
-
$
|
|
272
|
+
$eCAIO$useEffect(()=>{
|
|
273
273
|
if (!isVirtualized && manager.focusedKey && (scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current)) {
|
|
274
274
|
let element = scrollRef.current.querySelector(`[data-key="${manager.focusedKey}"]`);
|
|
275
|
-
if (element) $
|
|
275
|
+
if (element) $eCAIO$scrollIntoView(scrollRef.current, element);
|
|
276
276
|
}
|
|
277
277
|
}, [
|
|
278
278
|
isVirtualized,
|
|
@@ -289,11 +289,11 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
289
289
|
e.preventDefault();
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
let { typeSelectProps: typeSelectProps } = $
|
|
292
|
+
let { typeSelectProps: typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
|
|
293
293
|
keyboardDelegate: delegate,
|
|
294
294
|
selectionManager: manager
|
|
295
295
|
});
|
|
296
|
-
if (!disallowTypeAhead) handlers = $
|
|
296
|
+
if (!disallowTypeAhead) handlers = $eCAIO$mergeProps(typeSelectProps, handlers);
|
|
297
297
|
// If nothing is focused within the collection, make the collection itself tabbable.
|
|
298
298
|
// This will be marshalled to either the first or last item depending on where focus came from.
|
|
299
299
|
// If using virtual focus, don't set a tabIndex at all so that VoiceOver on iOS 14 doesn't try
|
|
@@ -309,35 +309,35 @@ function $52ac987c016884e9$export$d6daf82dcd84e87c(options) {
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
|
|
312
|
-
var $
|
|
312
|
+
var $880e95eb8b93ba9a$exports = {};
|
|
313
313
|
|
|
314
|
-
$parcel$export($
|
|
314
|
+
$parcel$export($880e95eb8b93ba9a$exports, "useSelectableItem", () => $880e95eb8b93ba9a$export$ecf600387e221c37);
|
|
315
315
|
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
|
|
319
319
|
|
|
320
|
-
function $
|
|
321
|
-
let { selectionManager: manager , key: key , ref: ref , shouldSelectOnPressUp: shouldSelectOnPressUp , isVirtualized: isVirtualized , shouldUseVirtualFocus: shouldUseVirtualFocus , focus: focus , isDisabled: isDisabled , onAction: onAction } = options;
|
|
320
|
+
function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
|
|
321
|
+
let { selectionManager: manager , key: key , ref: ref , shouldSelectOnPressUp: shouldSelectOnPressUp , isVirtualized: isVirtualized , shouldUseVirtualFocus: shouldUseVirtualFocus , focus: focus , isDisabled: isDisabled , onAction: onAction , allowsDifferentPressOrigin: allowsDifferentPressOrigin } = options;
|
|
322
322
|
let onSelect = (e)=>{
|
|
323
|
-
if (e.pointerType === 'keyboard' && $
|
|
323
|
+
if (e.pointerType === 'keyboard' && $feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
|
|
324
324
|
else {
|
|
325
325
|
if (manager.selectionMode === 'none') return;
|
|
326
326
|
if (manager.selectionMode === 'single') {
|
|
327
327
|
if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
|
|
328
328
|
else manager.replaceSelection(key);
|
|
329
329
|
} else if (e && e.shiftKey) manager.extendSelection(key);
|
|
330
|
-
else if (manager.selectionBehavior === 'toggle' || e && ($
|
|
330
|
+
else if (manager.selectionBehavior === 'toggle' || e && ($feb5ffebff200149$export$16792effe837dba3(e) || e.pointerType === 'touch' || e.pointerType === 'virtual')) // if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys
|
|
331
331
|
manager.toggleSelection(key);
|
|
332
332
|
else manager.replaceSelection(key);
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
335
|
// Focus the associated DOM node when this item becomes the focusedKey
|
|
336
336
|
let isFocused = key === manager.focusedKey;
|
|
337
|
-
$
|
|
337
|
+
$eCAIO$useEffect(()=>{
|
|
338
338
|
if (isFocused && manager.isFocused && !shouldUseVirtualFocus && document.activeElement !== ref.current) {
|
|
339
339
|
if (focus) focus();
|
|
340
|
-
else $
|
|
340
|
+
else $eCAIO$focusSafely(ref.current);
|
|
341
341
|
}
|
|
342
342
|
}, [
|
|
343
343
|
ref,
|
|
@@ -358,7 +358,7 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
358
358
|
if (e.target === ref.current) manager.setFocusedKey(key);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
let modality = $
|
|
361
|
+
let modality = $eCAIO$useRef(null);
|
|
362
362
|
let hasPrimaryAction = onAction && manager.selectionMode === 'none';
|
|
363
363
|
let hasSecondaryAction = onAction && manager.selectionMode !== 'none' && manager.selectionBehavior === 'replace';
|
|
364
364
|
let allowsSelection = !isDisabled && manager.canSelectItem(key);
|
|
@@ -376,11 +376,19 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
376
376
|
modality.current = e.pointerType;
|
|
377
377
|
if (e.pointerType === 'keyboard') onSelect(e);
|
|
378
378
|
};
|
|
379
|
-
|
|
379
|
+
// If allowsDifferentPressOrigin, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
|
|
380
|
+
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)
|
|
381
|
+
if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e)=>{
|
|
380
382
|
if (e.pointerType !== 'keyboard') onSelect(e);
|
|
383
|
+
if (hasPrimaryAction) onAction();
|
|
381
384
|
};
|
|
382
|
-
|
|
383
|
-
|
|
385
|
+
else {
|
|
386
|
+
itemPressProps.onPressUp = (e)=>{
|
|
387
|
+
if (e.pointerType !== 'keyboard') onSelect(e);
|
|
388
|
+
};
|
|
389
|
+
itemPressProps.onPress = hasPrimaryAction ? ()=>onAction()
|
|
390
|
+
: null;
|
|
391
|
+
}
|
|
384
392
|
} else {
|
|
385
393
|
// On touch, it feels strange to select on touch down, so we special case this.
|
|
386
394
|
itemPressProps.onPressStart = (e)=>{
|
|
@@ -398,7 +406,7 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
398
406
|
}
|
|
399
407
|
if (!isVirtualized) itemProps['data-key'] = key;
|
|
400
408
|
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
|
|
401
|
-
let { pressProps: pressProps , isPressed: isPressed } = $
|
|
409
|
+
let { pressProps: pressProps , isPressed: isPressed } = $eCAIO$usePress(itemPressProps);
|
|
402
410
|
// Double clicking with a mouse with selectionBehavior = 'replace' performs an action.
|
|
403
411
|
let onDoubleClick = hasSecondaryAction ? (e)=>{
|
|
404
412
|
if (modality.current === 'mouse') {
|
|
@@ -411,7 +419,7 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
411
419
|
// to 'toggle'. This changes the single tap behavior from performing an action (i.e. navigating) to
|
|
412
420
|
// selecting, and may toggle the appearance of a UI affordance like checkboxes on each item.
|
|
413
421
|
// TODO: what about when drag and drop is also enabled??
|
|
414
|
-
let { longPressProps: longPressProps } = $
|
|
422
|
+
let { longPressProps: longPressProps } = $eCAIO$useLongPress({
|
|
415
423
|
isDisabled: !hasSecondaryAction,
|
|
416
424
|
onLongPress (e) {
|
|
417
425
|
if (e.pointerType === 'touch') {
|
|
@@ -425,7 +433,7 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
425
433
|
if (e.key === 'Enter') onAction();
|
|
426
434
|
} : undefined;
|
|
427
435
|
return {
|
|
428
|
-
itemProps: $
|
|
436
|
+
itemProps: $eCAIO$mergeProps(itemProps, allowsSelection || hasPrimaryAction ? pressProps : {
|
|
429
437
|
}, hasSecondaryAction ? longPressProps : {
|
|
430
438
|
}, {
|
|
431
439
|
onKeyUp: onKeyUp,
|
|
@@ -436,14 +444,14 @@ function $5ec5a493f6042709$export$ecf600387e221c37(options) {
|
|
|
436
444
|
}
|
|
437
445
|
|
|
438
446
|
|
|
439
|
-
var $
|
|
447
|
+
var $982254629710d113$exports = {};
|
|
440
448
|
|
|
441
|
-
$parcel$export($
|
|
449
|
+
$parcel$export($982254629710d113$exports, "useSelectableList", () => $982254629710d113$export$b95089534ab7c1fd);
|
|
442
450
|
|
|
443
|
-
var $
|
|
451
|
+
var $2a25aae57d74318e$exports = {};
|
|
444
452
|
|
|
445
|
-
$parcel$export($
|
|
446
|
-
class $
|
|
453
|
+
$parcel$export($2a25aae57d74318e$exports, "ListKeyboardDelegate", () => $2a25aae57d74318e$export$a05409b8bb224a5a);
|
|
454
|
+
class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
447
455
|
getKeyBelow(key) {
|
|
448
456
|
key = this.collection.getKeyAfter(key);
|
|
449
457
|
while(key != null){
|
|
@@ -524,15 +532,15 @@ class $8dd8d9b0d53d6ca8$export$a05409b8bb224a5a {
|
|
|
524
532
|
|
|
525
533
|
|
|
526
534
|
|
|
527
|
-
function $
|
|
535
|
+
function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
528
536
|
let { selectionManager: selectionManager , collection: collection , disabledKeys: disabledKeys , ref: ref , keyboardDelegate: keyboardDelegate , autoFocus: autoFocus , shouldFocusWrap: shouldFocusWrap , isVirtualized: isVirtualized , disallowEmptySelection: disallowEmptySelection , selectOnFocus: selectOnFocus = false , disallowTypeAhead: disallowTypeAhead , shouldUseVirtualFocus: shouldUseVirtualFocus , allowsTabNavigation: allowsTabNavigation } = props;
|
|
529
537
|
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
|
|
530
538
|
// When virtualized, the layout object will be passed in as a prop and override this.
|
|
531
|
-
let collator = $
|
|
539
|
+
let collator = $eCAIO$useCollator({
|
|
532
540
|
usage: 'search',
|
|
533
541
|
sensitivity: 'base'
|
|
534
542
|
});
|
|
535
|
-
let delegate = $
|
|
543
|
+
let delegate = $eCAIO$useMemo(()=>keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a(collection, disabledKeys, ref, collator)
|
|
536
544
|
, [
|
|
537
545
|
keyboardDelegate,
|
|
538
546
|
collection,
|
|
@@ -540,7 +548,7 @@ function $38e0ab555fbd8768$export$b95089534ab7c1fd(props) {
|
|
|
540
548
|
ref,
|
|
541
549
|
collator
|
|
542
550
|
]);
|
|
543
|
-
let { collectionProps: collectionProps } = $
|
|
551
|
+
let { collectionProps: collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
544
552
|
ref: ref,
|
|
545
553
|
selectionManager: selectionManager,
|
|
546
554
|
keyboardDelegate: delegate,
|
|
@@ -564,5 +572,5 @@ function $38e0ab555fbd8768$export$b95089534ab7c1fd(props) {
|
|
|
564
572
|
|
|
565
573
|
|
|
566
574
|
|
|
567
|
-
export {$
|
|
575
|
+
export {$ae20dd8cbca75726$export$d6daf82dcd84e87c as useSelectableCollection, $880e95eb8b93ba9a$export$ecf600387e221c37 as useSelectableItem, $982254629710d113$export$b95089534ab7c1fd as useSelectableList, $2a25aae57d74318e$export$a05409b8bb224a5a as ListKeyboardDelegate, $fb3050f43d946246$export$e32c88dfddc6e1d8 as useTypeSelect};
|
|
568
576
|
//# sourceMappingURL=module.js.map
|