@react-aria/combobox 3.8.5-nightly.4555 → 3.8.5-nightly.4560

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.
Files changed (50) hide show
  1. package/dist/ar-AE.mjs +1 -1
  2. package/dist/bg-BG.mjs +1 -1
  3. package/dist/cs-CZ.mjs +1 -1
  4. package/dist/da-DK.mjs +1 -1
  5. package/dist/de-DE.mjs +1 -1
  6. package/dist/el-GR.mjs +1 -1
  7. package/dist/en-US.mjs +1 -1
  8. package/dist/es-ES.mjs +1 -1
  9. package/dist/et-EE.mjs +1 -1
  10. package/dist/fi-FI.mjs +1 -1
  11. package/dist/fr-FR.mjs +1 -1
  12. package/dist/he-IL.mjs +1 -1
  13. package/dist/hr-HR.mjs +1 -1
  14. package/dist/hu-HU.mjs +1 -1
  15. package/dist/import.mjs +1 -388
  16. package/dist/intlStrings.main.js +108 -0
  17. package/dist/intlStrings.main.js.map +1 -0
  18. package/dist/intlStrings.mjs +110 -0
  19. package/dist/intlStrings.module.js +110 -0
  20. package/dist/intlStrings.module.js.map +1 -0
  21. package/dist/it-IT.mjs +1 -1
  22. package/dist/ja-JP.mjs +1 -1
  23. package/dist/ko-KR.mjs +1 -1
  24. package/dist/lt-LT.mjs +1 -1
  25. package/dist/lv-LV.mjs +1 -1
  26. package/dist/main.js +2 -389
  27. package/dist/main.js.map +1 -1
  28. package/dist/module.js +1 -388
  29. package/dist/module.js.map +1 -1
  30. package/dist/nb-NO.mjs +1 -1
  31. package/dist/nl-NL.mjs +1 -1
  32. package/dist/pl-PL.mjs +1 -1
  33. package/dist/pt-BR.mjs +1 -1
  34. package/dist/pt-PT.mjs +1 -1
  35. package/dist/ro-RO.mjs +1 -1
  36. package/dist/ru-RU.mjs +1 -1
  37. package/dist/sk-SK.mjs +1 -1
  38. package/dist/sl-SI.mjs +1 -1
  39. package/dist/sr-SP.mjs +1 -1
  40. package/dist/sv-SE.mjs +1 -1
  41. package/dist/tr-TR.mjs +1 -1
  42. package/dist/uk-UA.mjs +1 -1
  43. package/dist/useComboBox.main.js +292 -0
  44. package/dist/useComboBox.main.js.map +1 -0
  45. package/dist/useComboBox.mjs +287 -0
  46. package/dist/useComboBox.module.js +287 -0
  47. package/dist/useComboBox.module.js.map +1 -0
  48. package/dist/zh-CN.mjs +1 -1
  49. package/dist/zh-TW.mjs +1 -1
  50. package/package.json +16 -16
package/dist/ar-AE.mjs CHANGED
@@ -21,4 +21,4 @@ $02cb4c75c506befe$exports = {
21
21
 
22
22
 
23
23
  export {$02cb4c75c506befe$exports as default};
24
- //# sourceMappingURL=ar-AE.module.js.map
24
+ //# sourceMappingURL=ar-AE.mjs.map
package/dist/bg-BG.mjs CHANGED
@@ -21,4 +21,4 @@ $568b8163f1e56faf$exports = {
21
21
 
22
22
 
23
23
  export {$568b8163f1e56faf$exports as default};
24
- //# sourceMappingURL=bg-BG.module.js.map
24
+ //# sourceMappingURL=bg-BG.mjs.map
package/dist/cs-CZ.mjs CHANGED
@@ -21,4 +21,4 @@ $87581c0202d106b8$exports = {
21
21
 
22
22
 
23
23
  export {$87581c0202d106b8$exports as default};
24
- //# sourceMappingURL=cs-CZ.module.js.map
24
+ //# sourceMappingURL=cs-CZ.mjs.map
package/dist/da-DK.mjs CHANGED
@@ -21,4 +21,4 @@ $a10a0369f5433ed1$exports = {
21
21
 
22
22
 
23
23
  export {$a10a0369f5433ed1$exports as default};
24
- //# sourceMappingURL=da-DK.module.js.map
24
+ //# sourceMappingURL=da-DK.mjs.map
package/dist/de-DE.mjs CHANGED
@@ -21,4 +21,4 @@ $bfd288727d5cb166$exports = {
21
21
 
22
22
 
23
23
  export {$bfd288727d5cb166$exports as default};
24
- //# sourceMappingURL=de-DE.module.js.map
24
+ //# sourceMappingURL=de-DE.mjs.map
package/dist/el-GR.mjs CHANGED
@@ -21,4 +21,4 @@ $ca177778f9a74e3c$exports = {
21
21
 
22
22
 
23
23
  export {$ca177778f9a74e3c$exports as default};
24
- //# sourceMappingURL=el-GR.module.js.map
24
+ //# sourceMappingURL=el-GR.mjs.map
package/dist/en-US.mjs CHANGED
@@ -21,4 +21,4 @@ $9b5aa79ef84beb6c$exports = {
21
21
 
22
22
 
23
23
  export {$9b5aa79ef84beb6c$exports as default};
24
- //# sourceMappingURL=en-US.module.js.map
24
+ //# sourceMappingURL=en-US.mjs.map
package/dist/es-ES.mjs CHANGED
@@ -21,4 +21,4 @@ $57968e8209de2557$exports = {
21
21
 
22
22
 
23
23
  export {$57968e8209de2557$exports as default};
24
- //# sourceMappingURL=es-ES.module.js.map
24
+ //# sourceMappingURL=es-ES.mjs.map
package/dist/et-EE.mjs CHANGED
@@ -21,4 +21,4 @@ $60690790bf4c1c6a$exports = {
21
21
 
22
22
 
23
23
  export {$60690790bf4c1c6a$exports as default};
24
- //# sourceMappingURL=et-EE.module.js.map
24
+ //# sourceMappingURL=et-EE.mjs.map
package/dist/fi-FI.mjs CHANGED
@@ -21,4 +21,4 @@ $1101246e8c7d9357$exports = {
21
21
 
22
22
 
23
23
  export {$1101246e8c7d9357$exports as default};
24
- //# sourceMappingURL=fi-FI.module.js.map
24
+ //# sourceMappingURL=fi-FI.mjs.map
package/dist/fr-FR.mjs CHANGED
@@ -21,4 +21,4 @@ $6404b5cb5b241730$exports = {
21
21
 
22
22
 
23
23
  export {$6404b5cb5b241730$exports as default};
24
- //# sourceMappingURL=fr-FR.module.js.map
24
+ //# sourceMappingURL=fr-FR.mjs.map
package/dist/he-IL.mjs CHANGED
@@ -21,4 +21,4 @@ $dfeafa702e92e31f$exports = {
21
21
 
22
22
 
23
23
  export {$dfeafa702e92e31f$exports as default};
24
- //# sourceMappingURL=he-IL.module.js.map
24
+ //# sourceMappingURL=he-IL.mjs.map
package/dist/hr-HR.mjs CHANGED
@@ -21,4 +21,4 @@ $2d125e0b34676352$exports = {
21
21
 
22
22
 
23
23
  export {$2d125e0b34676352$exports as default};
24
- //# sourceMappingURL=hr-HR.module.js.map
24
+ //# sourceMappingURL=hr-HR.mjs.map
package/dist/hu-HU.mjs CHANGED
@@ -21,4 +21,4 @@ $ea029611d7634059$exports = {
21
21
 
22
22
 
23
23
  export {$ea029611d7634059$exports as default};
24
- //# sourceMappingURL=hu-HU.module.js.map
24
+ //# sourceMappingURL=hu-HU.mjs.map
package/dist/import.mjs CHANGED
@@ -1,64 +1,6 @@
1
- import $02cb4c75c506befe$exports from "./ar-AE.mjs";
2
- import $568b8163f1e56faf$exports from "./bg-BG.mjs";
3
- import $87581c0202d106b8$exports from "./cs-CZ.mjs";
4
- import $a10a0369f5433ed1$exports from "./da-DK.mjs";
5
- import $bfd288727d5cb166$exports from "./de-DE.mjs";
6
- import $ca177778f9a74e3c$exports from "./el-GR.mjs";
7
- import $9b5aa79ef84beb6c$exports from "./en-US.mjs";
8
- import $57968e8209de2557$exports from "./es-ES.mjs";
9
- import $60690790bf4c1c6a$exports from "./et-EE.mjs";
10
- import $1101246e8c7d9357$exports from "./fi-FI.mjs";
11
- import $6404b5cb5b241730$exports from "./fr-FR.mjs";
12
- import $dfeafa702e92e31f$exports from "./he-IL.mjs";
13
- import $2d125e0b34676352$exports from "./hr-HR.mjs";
14
- import $ea029611d7634059$exports from "./hu-HU.mjs";
15
- import $77f075bb86ad7091$exports from "./it-IT.mjs";
16
- import $6e87462e84907983$exports from "./ja-JP.mjs";
17
- import $9246f2c6edc6b232$exports from "./ko-KR.mjs";
18
- import $e587accc6c0a434c$exports from "./lt-LT.mjs";
19
- import $03a1900e7400b5ab$exports from "./lv-LV.mjs";
20
- import $1387676441be6cf6$exports from "./nb-NO.mjs";
21
- import $17e82ebf0f8ab91f$exports from "./nl-NL.mjs";
22
- import $2f5377d3471630e5$exports from "./pl-PL.mjs";
23
- import $dee9868b6fa95ffe$exports from "./pt-BR.mjs";
24
- import $f8b2e63637cbb5a6$exports from "./pt-PT.mjs";
25
- import $46a885db3b44ea95$exports from "./ro-RO.mjs";
26
- import $50d8a8f0afa9dee5$exports from "./ru-RU.mjs";
27
- import $2867ee6173245507$exports from "./sk-SK.mjs";
28
- import $0631b65beeb09b50$exports from "./sl-SI.mjs";
29
- import $65fc749265dcd686$exports from "./sr-SP.mjs";
30
- import $69ba655c7853c08e$exports from "./sv-SE.mjs";
31
- import $a79794784d61577c$exports from "./tr-TR.mjs";
32
- import $c2845791417ebaf4$exports from "./uk-UA.mjs";
33
- import $29b642d0025cc7a4$exports from "./zh-CN.mjs";
34
- import $cd36dd33f9d46936$exports from "./zh-TW.mjs";
35
- import {announce as $3yVy0$announce} from "@react-aria/live-announcer";
36
- import {ariaHideOutside as $3yVy0$ariaHideOutside} from "@react-aria/overlays";
37
- import {listData as $3yVy0$listData, getItemId as $3yVy0$getItemId} from "@react-aria/listbox";
38
- import {useRouter as $3yVy0$useRouter, chain as $3yVy0$chain, useLabels as $3yVy0$useLabels, isAppleDevice as $3yVy0$isAppleDevice, mergeProps as $3yVy0$mergeProps} from "@react-aria/utils";
39
- import {useMemo as $3yVy0$useMemo, useRef as $3yVy0$useRef, useEffect as $3yVy0$useEffect} from "react";
40
- import {getChildNodes as $3yVy0$getChildNodes, getItemCount as $3yVy0$getItemCount} from "@react-stately/collections";
41
- import {ListKeyboardDelegate as $3yVy0$ListKeyboardDelegate, useSelectableCollection as $3yVy0$useSelectableCollection} from "@react-aria/selection";
42
- import {privateValidationStateProp as $3yVy0$privateValidationStateProp} from "@react-stately/form";
43
- import {useLocalizedStringFormatter as $3yVy0$useLocalizedStringFormatter} from "@react-aria/i18n";
44
- import {useMenuTrigger as $3yVy0$useMenuTrigger} from "@react-aria/menu";
45
- import {useTextField as $3yVy0$useTextField} from "@react-aria/textfield";
1
+ import {useComboBox as $c350ade66beef0af$export$8c18d1b4f7232bbf} from "./useComboBox.mjs";
46
2
 
47
-
48
- function $parcel$interopDefault(a) {
49
- return a && a.__esModule ? a.default : a;
50
- }
51
3
  /*
52
- * Copyright 2020 Adobe. All rights reserved.
53
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
54
- * you may not use this file except in compliance with the License. You may obtain a copy
55
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
56
- *
57
- * Unless required by applicable law or agreed to in writing, software distributed under
58
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
59
- * OF ANY KIND, either express or implied. See the License for the specific language
60
- * governing permissions and limitations under the License.
61
- */ /*
62
4
  * Copyright 2020 Adobe. All rights reserved.
63
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
64
6
  * you may not use this file except in compliance with the License. You may obtain a copy
@@ -71,334 +13,5 @@ function $parcel$interopDefault(a) {
71
13
  */
72
14
 
73
15
 
74
-
75
-
76
-
77
- var $de5926a92e8ebc5b$exports = {};
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
- $de5926a92e8ebc5b$exports = {
113
- "ar-AE": $02cb4c75c506befe$exports,
114
- "bg-BG": $568b8163f1e56faf$exports,
115
- "cs-CZ": $87581c0202d106b8$exports,
116
- "da-DK": $a10a0369f5433ed1$exports,
117
- "de-DE": $bfd288727d5cb166$exports,
118
- "el-GR": $ca177778f9a74e3c$exports,
119
- "en-US": $9b5aa79ef84beb6c$exports,
120
- "es-ES": $57968e8209de2557$exports,
121
- "et-EE": $60690790bf4c1c6a$exports,
122
- "fi-FI": $1101246e8c7d9357$exports,
123
- "fr-FR": $6404b5cb5b241730$exports,
124
- "he-IL": $dfeafa702e92e31f$exports,
125
- "hr-HR": $2d125e0b34676352$exports,
126
- "hu-HU": $ea029611d7634059$exports,
127
- "it-IT": $77f075bb86ad7091$exports,
128
- "ja-JP": $6e87462e84907983$exports,
129
- "ko-KR": $9246f2c6edc6b232$exports,
130
- "lt-LT": $e587accc6c0a434c$exports,
131
- "lv-LV": $03a1900e7400b5ab$exports,
132
- "nb-NO": $1387676441be6cf6$exports,
133
- "nl-NL": $17e82ebf0f8ab91f$exports,
134
- "pl-PL": $2f5377d3471630e5$exports,
135
- "pt-BR": $dee9868b6fa95ffe$exports,
136
- "pt-PT": $f8b2e63637cbb5a6$exports,
137
- "ro-RO": $46a885db3b44ea95$exports,
138
- "ru-RU": $50d8a8f0afa9dee5$exports,
139
- "sk-SK": $2867ee6173245507$exports,
140
- "sl-SI": $0631b65beeb09b50$exports,
141
- "sr-SP": $65fc749265dcd686$exports,
142
- "sv-SE": $69ba655c7853c08e$exports,
143
- "tr-TR": $a79794784d61577c$exports,
144
- "uk-UA": $c2845791417ebaf4$exports,
145
- "zh-CN": $29b642d0025cc7a4$exports,
146
- "zh-TW": $cd36dd33f9d46936$exports
147
- };
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- function $c350ade66beef0af$export$8c18d1b4f7232bbf(props, state) {
156
- let { buttonRef: buttonRef, popoverRef: popoverRef, inputRef: inputRef, listBoxRef: listBoxRef, keyboardDelegate: keyboardDelegate, shouldFocusWrap: // completionMode = 'suggest',
157
- shouldFocusWrap, isReadOnly: isReadOnly, isDisabled: isDisabled } = props;
158
- let stringFormatter = (0, $3yVy0$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($de5926a92e8ebc5b$exports))), "@react-aria/combobox");
159
- let { menuTriggerProps: menuTriggerProps, menuProps: menuProps } = (0, $3yVy0$useMenuTrigger)({
160
- type: "listbox",
161
- isDisabled: isDisabled || isReadOnly
162
- }, state, buttonRef);
163
- // Set listbox id so it can be used when calling getItemId later
164
- (0, $3yVy0$listData).set(state, {
165
- id: menuProps.id
166
- });
167
- // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
168
- // When virtualized, the layout object will be passed in as a prop and override this.
169
- let delegate = (0, $3yVy0$useMemo)(()=>keyboardDelegate || new (0, $3yVy0$ListKeyboardDelegate)(state.collection, state.disabledKeys, listBoxRef), [
170
- keyboardDelegate,
171
- state.collection,
172
- state.disabledKeys,
173
- listBoxRef
174
- ]);
175
- // Use useSelectableCollection to get the keyboard handlers to apply to the textfield
176
- let { collectionProps: collectionProps } = (0, $3yVy0$useSelectableCollection)({
177
- selectionManager: state.selectionManager,
178
- keyboardDelegate: delegate,
179
- disallowTypeAhead: true,
180
- disallowEmptySelection: true,
181
- shouldFocusWrap: shouldFocusWrap,
182
- ref: inputRef,
183
- // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
184
- isVirtualized: true
185
- });
186
- let router = (0, $3yVy0$useRouter)();
187
- // For textfield specific keydown operations
188
- let onKeyDown = (e)=>{
189
- switch(e.key){
190
- case "Enter":
191
- case "Tab":
192
- // Prevent form submission if menu is open since we may be selecting a option
193
- if (state.isOpen && e.key === "Enter") e.preventDefault();
194
- // If the focused item is a link, trigger opening it. Items that are links are not selectable.
195
- if (state.isOpen && state.selectionManager.focusedKey != null && state.selectionManager.isLink(state.selectionManager.focusedKey)) {
196
- if (e.key === "Enter") {
197
- let item = listBoxRef.current.querySelector(`[data-key="${CSS.escape(state.selectionManager.focusedKey.toString())}"]`);
198
- if (item instanceof HTMLAnchorElement) {
199
- let collectionItem = state.collection.getItem(state.selectionManager.focusedKey);
200
- router.open(item, e, collectionItem.props.href, collectionItem.props.routerOptions);
201
- }
202
- }
203
- state.close();
204
- } else state.commit();
205
- break;
206
- case "Escape":
207
- if (state.selectedKey !== null || state.inputValue === "" || props.allowsCustomValue) e.continuePropagation();
208
- state.revert();
209
- break;
210
- case "ArrowDown":
211
- state.open("first", "manual");
212
- break;
213
- case "ArrowUp":
214
- state.open("last", "manual");
215
- break;
216
- case "ArrowLeft":
217
- case "ArrowRight":
218
- state.selectionManager.setFocusedKey(null);
219
- break;
220
- }
221
- };
222
- let onBlur = (e)=>{
223
- var _popoverRef_current;
224
- let blurFromButton = (buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) && buttonRef.current === e.relatedTarget;
225
- let blurIntoPopover = (_popoverRef_current = popoverRef.current) === null || _popoverRef_current === void 0 ? void 0 : _popoverRef_current.contains(e.relatedTarget);
226
- // Ignore blur if focused moved to the button(if exists) or into the popover.
227
- if (blurFromButton || blurIntoPopover) return;
228
- if (props.onBlur) props.onBlur(e);
229
- state.setFocused(false);
230
- };
231
- let onFocus = (e)=>{
232
- if (state.isFocused) return;
233
- if (props.onFocus) props.onFocus(e);
234
- state.setFocused(true);
235
- };
236
- let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;
237
- let { labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $3yVy0$useTextField)({
238
- ...props,
239
- onChange: state.setInputValue,
240
- onKeyDown: !isReadOnly ? (0, $3yVy0$chain)(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown) : props.onKeyDown,
241
- onBlur: onBlur,
242
- value: state.inputValue,
243
- onFocus: onFocus,
244
- autoComplete: "off",
245
- validate: undefined,
246
- [(0, $3yVy0$privateValidationStateProp)]: state
247
- }, inputRef);
248
- // Press handlers for the ComboBox button
249
- let onPress = (e)=>{
250
- if (e.pointerType === "touch") {
251
- // Focus the input field in case it isn't focused yet
252
- inputRef.current.focus();
253
- state.toggle(null, "manual");
254
- }
255
- };
256
- let onPressStart = (e)=>{
257
- if (e.pointerType !== "touch") {
258
- inputRef.current.focus();
259
- state.toggle(e.pointerType === "keyboard" || e.pointerType === "virtual" ? "first" : null, "manual");
260
- }
261
- };
262
- let triggerLabelProps = (0, $3yVy0$useLabels)({
263
- id: menuTriggerProps.id,
264
- "aria-label": stringFormatter.format("buttonLabel"),
265
- "aria-labelledby": props["aria-labelledby"] || labelProps.id
266
- });
267
- let listBoxProps = (0, $3yVy0$useLabels)({
268
- id: menuProps.id,
269
- "aria-label": stringFormatter.format("listboxLabel"),
270
- "aria-labelledby": props["aria-labelledby"] || labelProps.id
271
- });
272
- // If a touch happens on direct center of ComboBox input, might be virtual click from iPad so open ComboBox menu
273
- let lastEventTime = (0, $3yVy0$useRef)(0);
274
- let onTouchEnd = (e)=>{
275
- if (isDisabled || isReadOnly) return;
276
- // Sometimes VoiceOver on iOS fires two touchend events in quick succession. Ignore the second one.
277
- if (e.timeStamp - lastEventTime.current < 500) {
278
- e.preventDefault();
279
- inputRef.current.focus();
280
- return;
281
- }
282
- let rect = e.target.getBoundingClientRect();
283
- let touch = e.changedTouches[0];
284
- let centerX = Math.ceil(rect.left + .5 * rect.width);
285
- let centerY = Math.ceil(rect.top + .5 * rect.height);
286
- if (touch.clientX === centerX && touch.clientY === centerY) {
287
- e.preventDefault();
288
- inputRef.current.focus();
289
- state.toggle(null, "manual");
290
- lastEventTime.current = e.timeStamp;
291
- }
292
- };
293
- // VoiceOver has issues with announcing aria-activedescendant properly on change
294
- // (especially on iOS). We use a live region announcer to announce focus changes
295
- // manually. In addition, section titles are announced when navigating into a new section.
296
- let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : undefined;
297
- var _focusedItem_parentKey;
298
- let sectionKey = (_focusedItem_parentKey = focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) !== null && _focusedItem_parentKey !== void 0 ? _focusedItem_parentKey : null;
299
- var _state_selectionManager_focusedKey;
300
- let itemKey = (_state_selectionManager_focusedKey = state.selectionManager.focusedKey) !== null && _state_selectionManager_focusedKey !== void 0 ? _state_selectionManager_focusedKey : null;
301
- let lastSection = (0, $3yVy0$useRef)(sectionKey);
302
- let lastItem = (0, $3yVy0$useRef)(itemKey);
303
- (0, $3yVy0$useEffect)(()=>{
304
- if ((0, $3yVy0$isAppleDevice)() && focusedItem != null && itemKey !== lastItem.current) {
305
- let isSelected = state.selectionManager.isSelected(itemKey);
306
- let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
307
- let sectionTitle = (section === null || section === void 0 ? void 0 : section["aria-label"]) || (typeof (section === null || section === void 0 ? void 0 : section.rendered) === "string" ? section.rendered : "") || "";
308
- let announcement = stringFormatter.format("focusAnnouncement", {
309
- isGroupChange: section && sectionKey !== lastSection.current,
310
- groupTitle: sectionTitle,
311
- groupCount: section ? [
312
- ...(0, $3yVy0$getChildNodes)(section, state.collection)
313
- ].length : 0,
314
- optionText: focusedItem["aria-label"] || focusedItem.textValue || "",
315
- isSelected: isSelected
316
- });
317
- (0, $3yVy0$announce)(announcement);
318
- }
319
- lastSection.current = sectionKey;
320
- lastItem.current = itemKey;
321
- });
322
- // Announce the number of available suggestions when it changes
323
- let optionCount = (0, $3yVy0$getItemCount)(state.collection);
324
- let lastSize = (0, $3yVy0$useRef)(optionCount);
325
- let lastOpen = (0, $3yVy0$useRef)(state.isOpen);
326
- (0, $3yVy0$useEffect)(()=>{
327
- // Only announce the number of options available when the menu opens if there is no
328
- // focused item, otherwise screen readers will typically read e.g. "1 of 6".
329
- // The exception is VoiceOver since this isn't included in the message above.
330
- let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || (0, $3yVy0$isAppleDevice)());
331
- if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
332
- let announcement = stringFormatter.format("countAnnouncement", {
333
- optionCount: optionCount
334
- });
335
- (0, $3yVy0$announce)(announcement);
336
- }
337
- lastSize.current = optionCount;
338
- lastOpen.current = state.isOpen;
339
- });
340
- // Announce when a selection occurs for VoiceOver. Other screen readers typically do this automatically.
341
- let lastSelectedKey = (0, $3yVy0$useRef)(state.selectedKey);
342
- (0, $3yVy0$useEffect)(()=>{
343
- if ((0, $3yVy0$isAppleDevice)() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
344
- let optionText = state.selectedItem["aria-label"] || state.selectedItem.textValue || "";
345
- let announcement = stringFormatter.format("selectedAnnouncement", {
346
- optionText: optionText
347
- });
348
- (0, $3yVy0$announce)(announcement);
349
- }
350
- lastSelectedKey.current = state.selectedKey;
351
- });
352
- (0, $3yVy0$useEffect)(()=>{
353
- if (state.isOpen) return (0, $3yVy0$ariaHideOutside)([
354
- inputRef.current,
355
- popoverRef.current
356
- ]);
357
- }, [
358
- state.isOpen,
359
- inputRef,
360
- popoverRef
361
- ]);
362
- return {
363
- labelProps: labelProps,
364
- buttonProps: {
365
- ...menuTriggerProps,
366
- ...triggerLabelProps,
367
- excludeFromTabOrder: true,
368
- onPress: onPress,
369
- onPressStart: onPressStart,
370
- isDisabled: isDisabled || isReadOnly
371
- },
372
- inputProps: (0, $3yVy0$mergeProps)(inputProps, {
373
- role: "combobox",
374
- "aria-expanded": menuTriggerProps["aria-expanded"],
375
- "aria-controls": state.isOpen ? menuProps.id : undefined,
376
- // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
377
- "aria-autocomplete": "list",
378
- "aria-activedescendant": focusedItem ? (0, $3yVy0$getItemId)(state, focusedItem.key) : undefined,
379
- onTouchEnd: onTouchEnd,
380
- // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
381
- autoCorrect: "off",
382
- // This disable's the macOS Safari spell check auto corrections.
383
- spellCheck: "false"
384
- }),
385
- listBoxProps: (0, $3yVy0$mergeProps)(menuProps, listBoxProps, {
386
- autoFocus: state.focusStrategy,
387
- shouldUseVirtualFocus: true,
388
- shouldSelectOnPressUp: true,
389
- shouldFocusOnHover: true,
390
- linkBehavior: "selection"
391
- }),
392
- descriptionProps: descriptionProps,
393
- errorMessageProps: errorMessageProps,
394
- isInvalid: isInvalid,
395
- validationErrors: validationErrors,
396
- validationDetails: validationDetails
397
- };
398
- }
399
-
400
-
401
-
402
-
403
16
  export {$c350ade66beef0af$export$8c18d1b4f7232bbf as useComboBox};
404
17
  //# sourceMappingURL=module.js.map
@@ -0,0 +1,108 @@
1
+ var $a756282ae45b5180$exports = require("./ar-AE.main.js");
2
+ var $50569559b1387c57$exports = require("./bg-BG.main.js");
3
+ var $bff243ee21f5616f$exports = require("./cs-CZ.main.js");
4
+ var $1508d10b8eb2180a$exports = require("./da-DK.main.js");
5
+ var $aa4e6d422b8a72e9$exports = require("./de-DE.main.js");
6
+ var $b88e038b0dd4dc0a$exports = require("./el-GR.main.js");
7
+ var $dbcec05b5ddcd323$exports = require("./en-US.main.js");
8
+ var $3a762c75d410ecfe$exports = require("./es-ES.main.js");
9
+ var $345540ad7e1ca6bf$exports = require("./et-EE.main.js");
10
+ var $f314257d456879ad$exports = require("./fi-FI.main.js");
11
+ var $ebebc2f5e8da1157$exports = require("./fr-FR.main.js");
12
+ var $3dda6220a904406b$exports = require("./he-IL.main.js");
13
+ var $21178dd033a9f6f2$exports = require("./hr-HR.main.js");
14
+ var $f12e9cac54fcde83$exports = require("./hu-HU.main.js");
15
+ var $c7ad5d19d847ae9c$exports = require("./it-IT.main.js");
16
+ var $2cd660cb05523578$exports = require("./ja-JP.main.js");
17
+ var $854156a4c27f569c$exports = require("./ko-KR.main.js");
18
+ var $dabe6c727809b774$exports = require("./lt-LT.main.js");
19
+ var $7810eacb77cdba0d$exports = require("./lv-LV.main.js");
20
+ var $5e329fda39bb6d70$exports = require("./nb-NO.main.js");
21
+ var $29be2a564837167c$exports = require("./nl-NL.main.js");
22
+ var $7c0ffa214495a56b$exports = require("./pl-PL.main.js");
23
+ var $e8665834548c9563$exports = require("./pt-BR.main.js");
24
+ var $3f614fe48e86ff5a$exports = require("./pt-PT.main.js");
25
+ var $e7efe9ced5993d70$exports = require("./ro-RO.main.js");
26
+ var $d56743931b3be207$exports = require("./ru-RU.main.js");
27
+ var $68a40ce74b5b67bf$exports = require("./sk-SK.main.js");
28
+ var $58f7d43d88008c7d$exports = require("./sl-SI.main.js");
29
+ var $914aa7442fad912d$exports = require("./sr-SP.main.js");
30
+ var $85af38f91b727899$exports = require("./sv-SE.main.js");
31
+ var $72a40ca4dde96679$exports = require("./tr-TR.main.js");
32
+ var $300dce19c9e0d13f$exports = require("./uk-UA.main.js");
33
+ var $015ff4188b7f78eb$exports = require("./zh-CN.main.js");
34
+ var $713552ac3e0ac749$exports = require("./zh-TW.main.js");
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+ module.exports = {
71
+ "ar-AE": $a756282ae45b5180$exports,
72
+ "bg-BG": $50569559b1387c57$exports,
73
+ "cs-CZ": $bff243ee21f5616f$exports,
74
+ "da-DK": $1508d10b8eb2180a$exports,
75
+ "de-DE": $aa4e6d422b8a72e9$exports,
76
+ "el-GR": $b88e038b0dd4dc0a$exports,
77
+ "en-US": $dbcec05b5ddcd323$exports,
78
+ "es-ES": $3a762c75d410ecfe$exports,
79
+ "et-EE": $345540ad7e1ca6bf$exports,
80
+ "fi-FI": $f314257d456879ad$exports,
81
+ "fr-FR": $ebebc2f5e8da1157$exports,
82
+ "he-IL": $3dda6220a904406b$exports,
83
+ "hr-HR": $21178dd033a9f6f2$exports,
84
+ "hu-HU": $f12e9cac54fcde83$exports,
85
+ "it-IT": $c7ad5d19d847ae9c$exports,
86
+ "ja-JP": $2cd660cb05523578$exports,
87
+ "ko-KR": $854156a4c27f569c$exports,
88
+ "lt-LT": $dabe6c727809b774$exports,
89
+ "lv-LV": $7810eacb77cdba0d$exports,
90
+ "nb-NO": $5e329fda39bb6d70$exports,
91
+ "nl-NL": $29be2a564837167c$exports,
92
+ "pl-PL": $7c0ffa214495a56b$exports,
93
+ "pt-BR": $e8665834548c9563$exports,
94
+ "pt-PT": $3f614fe48e86ff5a$exports,
95
+ "ro-RO": $e7efe9ced5993d70$exports,
96
+ "ru-RU": $d56743931b3be207$exports,
97
+ "sk-SK": $68a40ce74b5b67bf$exports,
98
+ "sl-SI": $58f7d43d88008c7d$exports,
99
+ "sr-SP": $914aa7442fad912d$exports,
100
+ "sv-SE": $85af38f91b727899$exports,
101
+ "tr-TR": $72a40ca4dde96679$exports,
102
+ "uk-UA": $300dce19c9e0d13f$exports,
103
+ "zh-CN": $015ff4188b7f78eb$exports,
104
+ "zh-TW": $713552ac3e0ac749$exports
105
+ };
106
+
107
+
108
+ //# sourceMappingURL=intlStrings.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,iBAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;AACX","sources":["packages/@react-aria/combobox/src/*.js"],"sourcesContent":["const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}"],"names":[],"version":3,"file":"intlStrings.main.js.map"}