@react-aria/combobox 3.2.2-nightly.3036 → 3.2.2-nightly.3047

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 CHANGED
@@ -1,467 +1,448 @@
1
- var {
2
- useTextField
3
- } = require("@react-aria/textfield");
1
+ var $fgbV4$reactarialiveannouncer = require("@react-aria/live-announcer");
2
+ var $fgbV4$reactariaoverlays = require("@react-aria/overlays");
3
+ var $fgbV4$reactarialistbox = require("@react-aria/listbox");
4
+ var $fgbV4$reactariautils = require("@react-aria/utils");
5
+ var $fgbV4$react = require("react");
6
+ var $fgbV4$reactstatelycollections = require("@react-stately/collections");
7
+ var $fgbV4$reactariaselection = require("@react-aria/selection");
8
+ var $fgbV4$reactariamenu = require("@react-aria/menu");
9
+ var $fgbV4$reactariai18n = require("@react-aria/i18n");
10
+ var $fgbV4$reactariatextfield = require("@react-aria/textfield");
11
+
12
+ function $parcel$exportWildcard(dest, source) {
13
+ Object.keys(source).forEach(function(key) {
14
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
15
+ return;
16
+ }
4
17
 
5
- var {
6
- useMessageFormatter
7
- } = require("@react-aria/i18n");
18
+ Object.defineProperty(dest, key, {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return source[key];
22
+ }
23
+ });
24
+ });
8
25
 
9
- var {
10
- useMenuTrigger
11
- } = require("@react-aria/menu");
26
+ return dest;
27
+ }
28
+ function $parcel$interopDefault(a) {
29
+ return a && a.__esModule ? a.default : a;
30
+ }
31
+ function $parcel$export(e, n, v, s) {
32
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
33
+ }
34
+ var $1a707b51686ebf70$exports = {};
12
35
 
13
- var {
14
- ListKeyboardDelegate,
15
- useSelectableCollection
16
- } = require("@react-aria/selection");
36
+ $parcel$export($1a707b51686ebf70$exports, "useComboBox", () => $1a707b51686ebf70$export$8c18d1b4f7232bbf);
17
37
 
18
- var {
19
- getItemCount
20
- } = require("@react-stately/collections");
21
38
 
22
- var {
23
- useEffect,
24
- useMemo,
25
- useRef
26
- } = require("react");
27
39
 
28
- var {
29
- chain,
30
- isAppleDevice,
31
- mergeProps,
32
- useLabels
33
- } = require("@react-aria/utils");
34
40
 
35
- var {
36
- getItemId,
37
- listData
38
- } = require("@react-aria/listbox");
39
41
 
40
- var {
41
- ariaHideOutside
42
- } = require("@react-aria/overlays");
43
42
 
44
- var {
45
- announce
46
- } = require("@react-aria/live-announcer");
43
+ var $3bd3973e51e6b26d$exports = {};
44
+ var $b83e8d27ada1ca06$exports = {};
45
+ $b83e8d27ada1ca06$exports = JSON.parse("{\"buttonLabel\":\"عرض المقترحات\",\"countAnnouncement\":\"{optionCount, plural, one {# خيار} other {# خيارات}} متاحة.\",\"focusAnnouncement\":\"{isGroupChange, select, true {المجموعة المدخلة {groupTitle}, مع {groupCount, plural, one {# خيار} other {# خيارات}}. } other {}}{optionText}{isSelected, select, true {, محدد} other {}}\",\"listboxLabel\":\"مقترحات\",\"selectedAnnouncement\":\"{optionText}، محدد\"}");
47
46
 
48
- var _babelRuntimeHelpersInteropRequireDefault = $parcel$interopDefault(require("@babel/runtime/helpers/interopRequireDefault"));
49
47
 
50
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
48
+ var $250bbc713dad1120$exports = {};
49
+ $250bbc713dad1120$exports = JSON.parse("{\"buttonLabel\":\"Покажи предложения\",\"countAnnouncement\":\"{optionCount, plural, one {# опция} other {# опции}} на разположение.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Въведена група {groupTitle}, с {groupCount, plural, one {# опция} other {# опции}}. } other {}}{optionText}{isSelected, select, true {, избрани} other {}}\",\"listboxLabel\":\"Предложения\",\"selectedAnnouncement\":\"{optionText}, избрани\"}");
51
50
 
52
- function $parcel$interopDefault(a) {
53
- return a && a.__esModule ? a.default : a;
54
- }
55
51
 
56
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/ar-AE.json
57
- var $d3abd1c94a8091e6bea5d25566d34f3b$exports = {};
58
- $d3abd1c94a8091e6bea5d25566d34f3b$exports = JSON.parse("{\"buttonLabel\":\"عرض المقترحات\",\"countAnnouncement\":\"{optionCount, plural, one {# خيار} other {# خيارات}} متاحة.\",\"focusAnnouncement\":\"{isGroupChange, select, true {المجموعة المدخلة {groupTitle}, مع {groupCount, plural, one {# خيار} other {# خيارات}}. } other {}}{optionText}{isSelected, select, true {, محدد} other {}}\",\"listboxLabel\":\"مقترحات\",\"selectedAnnouncement\":\"{optionText}، محدد\"}");
59
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/bg-BG.json
60
- var $e68f714a4c0d09d95c33770e06f8$exports = {};
61
- $e68f714a4c0d09d95c33770e06f8$exports = JSON.parse("{\"buttonLabel\":\"Покажи предложения\",\"countAnnouncement\":\"{optionCount, plural, one {# опция} other {# опции}} на разположение.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Въведена група {groupTitle}, с {groupCount, plural, one {# опция} other {# опции}}. } other {}}{optionText}{isSelected, select, true {, избрани} other {}}\",\"listboxLabel\":\"Предложения\",\"selectedAnnouncement\":\"{optionText}, избрани\"}");
62
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/cs-CZ.json
63
- var $a500a0b3a3619656e27bf5600e433c24$exports = {};
64
- $a500a0b3a3619656e27bf5600e433c24$exports = JSON.parse("{\"buttonLabel\":\"Zobrazit doporučení\",\"countAnnouncement\":\"K dispozici {optionCount, plural, one {je # možnost} other {jsou/je # možnosti/-í}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Zadaná skupina „{groupTitle}“ {groupCount, plural, one {s # možností} other {se # možnostmi}}. } other {}}{optionText}{isSelected, select, true { (vybráno)} other {}}\",\"listboxLabel\":\"Návrhy\",\"selectedAnnouncement\":\"{optionText}, vybráno\"}");
65
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/da-DK.json
66
- var $e49da863b7bd600c177b6a36f118$exports = {};
67
- $e49da863b7bd600c177b6a36f118$exports = JSON.parse("{\"buttonLabel\":\"Vis forslag\",\"countAnnouncement\":\"{optionCount, plural, one {# mulighed tilgængelig} other {# muligheder tilgængelige}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Angivet gruppe {groupTitle}, med {groupCount, plural, one {# mulighed} other {# muligheder}}. } other {}}{optionText}{isSelected, select, true {, valgt} other {}}\",\"listboxLabel\":\"Forslag\",\"selectedAnnouncement\":\"{optionText}, valgt\"}");
68
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/de-DE.json
69
- var $ee8337d033bc8022023cbd1e81c99e0f$exports = {};
70
- $ee8337d033bc8022023cbd1e81c99e0f$exports = JSON.parse("{\"buttonLabel\":\"Empfehlungen anzeigen\",\"countAnnouncement\":\"{optionCount, plural, one {# Option} other {# Optionen}} verfügbar.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Eingetretene Gruppe {groupTitle}, mit {groupCount, plural, one {# Option} other {# Optionen}}. } other {}}{optionText}{isSelected, select, true {, ausgewählt} other {}}\",\"listboxLabel\":\"Empfehlungen\",\"selectedAnnouncement\":\"{optionText}, ausgewählt\"}");
71
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/el-GR.json
72
- var $b80f3d468ed1c259fafa109ac82f$exports = {};
73
- $b80f3d468ed1c259fafa109ac82f$exports = JSON.parse("{\"buttonLabel\":\"Προβολή προτάσεων\",\"countAnnouncement\":\"{optionCount, plural, one {# επιλογή} other {# επιλογές }} διαθέσιμες.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Εισαγμένη ομάδα {groupTitle}, με {groupCount, plural, one {# επιλογή} other {# επιλογές}}. } other {}}{optionText}{isSelected, select, true {, επιλεγμένο} other {}}\",\"listboxLabel\":\"Προτάσεις\",\"selectedAnnouncement\":\"{optionText}, επιλέχθηκε\"}");
74
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/en-US.json
75
- var $bf7e6d52e99e0a0de8c556ddb07fc5a$exports = {};
76
- $bf7e6d52e99e0a0de8c556ddb07fc5a$exports = JSON.parse("{\"focusAnnouncement\":\"{isGroupChange, select, true {Entered group {groupTitle}, with {groupCount, plural, one {# option} other {# options}}. } other {}}{optionText}{isSelected, select, true {, selected} other {}}\",\"countAnnouncement\":\"{optionCount, plural, one {# option} other {# options}} available.\",\"selectedAnnouncement\":\"{optionText}, selected\",\"buttonLabel\":\"Show suggestions\",\"listboxLabel\":\"Suggestions\"}");
77
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/es-ES.json
78
- var $a10df97a05936d5ade08a757b8203$exports = {};
79
- $a10df97a05936d5ade08a757b8203$exports = JSON.parse("{\"buttonLabel\":\"Mostrar sugerencias\",\"countAnnouncement\":\"{optionCount, plural, one {# opción} other {# opciones}} disponible(s).\",\"focusAnnouncement\":\"{isGroupChange, select, true {Se ha unido al grupo {groupTitle}, con {groupCount, plural, one {# opción} other {# opciones}}. } other {}}{optionText}{isSelected, select, true {, seleccionado} other {}}\",\"listboxLabel\":\"Sugerencias\",\"selectedAnnouncement\":\"{optionText}, seleccionado\"}");
80
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/et-EE.json
81
- var $f3ceb8fdb1d42883b88768afca1419$exports = {};
82
- $f3ceb8fdb1d42883b88768afca1419$exports = JSON.parse("{\"buttonLabel\":\"Kuva soovitused\",\"countAnnouncement\":\"{optionCount, plural, one {# valik} other {# valikud}} saadaval.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Sisestatud rühm {groupTitle}, valikuga {groupCount, plural, one {# valik} other {# valikud}}. } other {}}{optionText}{isSelected, select, true {, valitud} other {}}\",\"listboxLabel\":\"Soovitused\",\"selectedAnnouncement\":\"{optionText}, valitud\"}");
83
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/fi-FI.json
84
- var $f1743c0157b8801e8cb7483c8ad$exports = {};
85
- $f1743c0157b8801e8cb7483c8ad$exports = JSON.parse("{\"buttonLabel\":\"Näytä ehdotukset\",\"countAnnouncement\":\"{optionCount, plural, one {# vaihtoehto} other {# vaihtoehdot}} saatavilla.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Mentiin ryhmään {groupTitle}, {groupCount, plural, one {# vaihtoehdon} other {# vaihtoehdon}} kanssa.} other {}}{optionText}{isSelected, select, true {, valittu} other {}}\",\"listboxLabel\":\"Ehdotukset\",\"selectedAnnouncement\":\"{optionText}, valittu\"}");
86
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/fr-FR.json
87
- var $dc583336acdeed35267661d22$exports = {};
88
- $dc583336acdeed35267661d22$exports = JSON.parse("{\"buttonLabel\":\"Afficher les suggestions\",\"countAnnouncement\":\"{optionCount, plural, one {# option} other {# options}} disponible(s).\",\"focusAnnouncement\":\"{isGroupChange, select, true {Groupe {groupTitle} saisi, avec {groupCount, plural, one {# option} other {# options}}. } other {}}{optionText}{isSelected, select, true {, sélectionné(s)} other {}}\",\"listboxLabel\":\"Suggestions\",\"selectedAnnouncement\":\"{optionText}, sélectionné\"}");
89
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/he-IL.json
90
- var $e8d5cdaf06bc2fff1bfdce0b70eaee1$exports = {};
91
- $e8d5cdaf06bc2fff1bfdce0b70eaee1$exports = JSON.parse("{\"buttonLabel\":\"הצג הצעות\",\"countAnnouncement\":\"{optionCount, plural, one {אפשרות #} other {# אפשרויות}} במצב זמין.\",\"focusAnnouncement\":\"{isGroupChange, select, true {נכנס לקבוצה {groupTitle}, עם {groupCount, plural, one {אפשרות #} other {# אפשרויות}}. } other {}}{optionText}{isSelected, select, true {, נבחר} other {}}\",\"listboxLabel\":\"הצעות\",\"selectedAnnouncement\":\"{optionText}, נבחר\"}");
92
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/hr-HR.json
93
- var $a09462ff6f02eb4bf7658204c3f6e15$exports = {};
94
- $a09462ff6f02eb4bf7658204c3f6e15$exports = JSON.parse("{\"buttonLabel\":\"Prikaži prijedloge\",\"countAnnouncement\":\"Dostupno još: {optionCount, plural, one {# opcija} other {# opcije/a}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Unesena skupina {groupTitle}, s {groupCount, plural, one {# opcijom} other {# opcije/a}}. } other {}}{optionText}{isSelected, select, true {, odabranih} other {}}\",\"listboxLabel\":\"Prijedlozi\",\"selectedAnnouncement\":\"{optionText}, odabrano\"}");
95
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/hu-HU.json
96
- var $a51a94bb99ac070324d83d28741ff6a3$exports = {};
97
- $a51a94bb99ac070324d83d28741ff6a3$exports = JSON.parse("{\"buttonLabel\":\"Javaslatok megjelenítése\",\"countAnnouncement\":\"{optionCount, plural, one {# lehetőség} other {# lehetőség}} áll rendelkezésre.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Belépett a(z) {groupTitle} csoportba, amely {groupCount, plural, one {# lehetőséget} other {# lehetőséget}} tartalmaz. } other {}}{optionText}{isSelected, select, true {, kijelölve} other {}}\",\"listboxLabel\":\"Javaslatok\",\"selectedAnnouncement\":\"{optionText}, kijelölve\"}");
98
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/it-IT.json
99
- var $dc21b3c22ee0c88b8141ebe9086768be$exports = {};
100
- $dc21b3c22ee0c88b8141ebe9086768be$exports = JSON.parse("{\"buttonLabel\":\"Mostra suggerimenti\",\"countAnnouncement\":\"{optionCount, plural, one {# opzione disponibile} other {# opzioni disponibili}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ingresso nel gruppo {groupTitle}, con {groupCount, plural, one {# opzione} other {# opzioni}}. } other {}}{optionText}{isSelected, select, true {, selezionato} other {}}\",\"listboxLabel\":\"Suggerimenti\",\"selectedAnnouncement\":\"{optionText}, selezionato\"}");
101
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/ja-JP.json
102
- var $a4da3b639472f5f28d54905e8d8b311$exports = {};
103
- $a4da3b639472f5f28d54905e8d8b311$exports = JSON.parse("{\"buttonLabel\":\"候補を表示\",\"countAnnouncement\":\"{optionCount, plural, one {# 個のオプション} other {# 個のオプション}}を利用できます。\",\"focusAnnouncement\":\"{isGroupChange, select, true {入力されたグループ {groupTitle}、{groupCount, plural, one {# 個のオプション} other {# 個のオプション}}を含む。} other {}}{optionText}{isSelected, select, true {、選択済み} other {}}\",\"listboxLabel\":\"候補\",\"selectedAnnouncement\":\"{optionText}、選択済み\"}");
104
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/ko-KR.json
105
- var $fcdb1200b0b078125505411250b3da8$exports = {};
106
- $fcdb1200b0b078125505411250b3da8$exports = JSON.parse("{\"buttonLabel\":\"제안 사항 표시\",\"countAnnouncement\":\"{optionCount, plural, one {#개 옵션} other {#개 옵션}}을 사용할 수 있습니다.\",\"focusAnnouncement\":\"{isGroupChange, select, true {입력한 그룹 {groupTitle}, {groupCount, plural, one {#개 옵션} other {#개 옵션}}. } other {}}{optionText}{isSelected, select, true {, 선택됨} other {}}\",\"listboxLabel\":\"제안\",\"selectedAnnouncement\":\"{optionText}, 선택됨\"}");
107
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/lt-LT.json
108
- var $ae7d46453e48caf5831bf917e3f7f4$exports = {};
109
- $ae7d46453e48caf5831bf917e3f7f4$exports = JSON.parse("{\"buttonLabel\":\"Rodyti pasiūlymus\",\"countAnnouncement\":\"Yra {optionCount, plural, one {# parinktis} other {# parinktys (-ių)}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Įvesta grupė {groupTitle}, su {groupCount, plural, one {# parinktimi} other {# parinktimis (-ių)}}. } other {}}{optionText}{isSelected, select, true {, pasirinkta} other {}}\",\"listboxLabel\":\"Pasiūlymai\",\"selectedAnnouncement\":\"{optionText}, pasirinkta\"}");
110
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/lv-LV.json
111
- var $d008ca76e03db31d004b0e4f3f5574a$exports = {};
112
- $d008ca76e03db31d004b0e4f3f5574a$exports = JSON.parse("{\"buttonLabel\":\"Rādīt ieteikumus\",\"countAnnouncement\":\"Pieejamo opciju skaits: {optionCount, plural, one {# opcija} other {# opcijas}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ievadīta grupa {groupTitle}, ar {groupCount, plural, one {# opciju} other {# opcijām}}. } other {}}{optionText}{isSelected, select, true {, atlasīta} other {}}\",\"listboxLabel\":\"Ieteikumi\",\"selectedAnnouncement\":\"{optionText}, atlasīta\"}");
113
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/nb-NO.json
114
- var $dcaa72b3e8623f0d734c2b2e58a$exports = {};
115
- $dcaa72b3e8623f0d734c2b2e58a$exports = JSON.parse("{\"buttonLabel\":\"Vis forslag\",\"countAnnouncement\":\"{optionCount, plural, one {# alternativ} other {# alternativer}} finnes.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Angitt gruppe {groupTitle}, med {groupCount, plural, one {# alternativ} other {# alternativer}}. } other {}}{optionText}{isSelected, select, true {, valgt} other {}}\",\"listboxLabel\":\"Forslag\",\"selectedAnnouncement\":\"{optionText}, valgt\"}");
116
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/nl-NL.json
117
- var $a7a8fb75c57944677d9c6bf80bbe$exports = {};
118
- $a7a8fb75c57944677d9c6bf80bbe$exports = JSON.parse("{\"buttonLabel\":\"Suggesties weergeven\",\"countAnnouncement\":\"{optionCount, plural, one {# optie} other {# opties}} beschikbaar.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Groep {groupTitle} ingevoerd met {groupCount, plural, one {# optie} other {# opties}}. } other {}}{optionText}{isSelected, select, true {, geselecteerd} other {}}\",\"listboxLabel\":\"Suggesties\",\"selectedAnnouncement\":\"{optionText}, geselecteerd\"}");
119
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/pl-PL.json
120
- var $ed7527596f583bb2411b6e63181c828$exports = {};
121
- $ed7527596f583bb2411b6e63181c828$exports = JSON.parse("{\"buttonLabel\":\"Wyświetlaj sugestie\",\"countAnnouncement\":\"dostępna/dostępne(-nych) {optionCount, plural, one {# opcja} other {# opcje(-i)}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Dołączono do grupy {groupTitle}, z {groupCount, plural, one {# opcją} other {# opcjami}}. } other {}}{optionText}{isSelected, select, true {, wybrano} other {}}\",\"listboxLabel\":\"Sugestie\",\"selectedAnnouncement\":\"{optionText}, wybrano\"}");
122
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/pt-BR.json
123
- var $df7ce3597cba6c589fe1547e9398a1$exports = {};
124
- $df7ce3597cba6c589fe1547e9398a1$exports = JSON.parse("{\"buttonLabel\":\"Mostrar sugestões\",\"countAnnouncement\":\"{optionCount, plural, one {# opção} other {# opções}} disponível.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grupo inserido {groupTitle}, com {groupCount, plural, one {# opção} other {# opções}}. } other {}}{optionText}{isSelected, select, true {, selecionado} other {}}\",\"listboxLabel\":\"Sugestões\",\"selectedAnnouncement\":\"{optionText}, selecionado\"}");
125
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/pt-PT.json
126
- var $af7a1745d38e51c65b0133f60a0$exports = {};
127
- $af7a1745d38e51c65b0133f60a0$exports = JSON.parse("{\"buttonLabel\":\"Apresentar sugestões\",\"countAnnouncement\":\"{optionCount, plural, one {# opção} other {# opções}} disponível.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grupo introduzido {groupTitle}, com {groupCount, plural, one {# opção} other {# opções}}. } other {}}{optionText}{isSelected, select, true {, selecionado} other {}}\",\"listboxLabel\":\"Sugestões\",\"selectedAnnouncement\":\"{optionText}, selecionado\"}");
128
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/ro-RO.json
129
- var $a05b7681dd40a3dd5d6e247465fb2$exports = {};
130
- $a05b7681dd40a3dd5d6e247465fb2$exports = JSON.parse("{\"buttonLabel\":\"Afișare sugestii\",\"countAnnouncement\":\"{optionCount, plural, one {# opțiune} other {# opțiuni}} disponibile.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grup {groupTitle} introdus, cu {groupCount, plural, one {# opțiune} other {# opțiuni}}. } other {}}{optionText}{isSelected, select, true {, selectat} other {}}\",\"listboxLabel\":\"Sugestii\",\"selectedAnnouncement\":\"{optionText}, selectat\"}");
131
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/ru-RU.json
132
- var $a3e6ad485d388d34644c7738b17894$exports = {};
133
- $a3e6ad485d388d34644c7738b17894$exports = JSON.parse("{\"buttonLabel\":\"Показать предложения\",\"countAnnouncement\":\"{optionCount, plural, one {# параметр} other {# параметров}} доступно.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Введенная группа {groupTitle}, с {groupCount, plural, one {# параметром} other {# параметрами}}. } other {}}{optionText}{isSelected, select, true {, выбранными} other {}}\",\"listboxLabel\":\"Предложения\",\"selectedAnnouncement\":\"{optionText}, выбрано\"}");
134
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/sk-SK.json
135
- var $e0b1ab042642593eb7294132e50b46b$exports = {};
136
- $e0b1ab042642593eb7294132e50b46b$exports = JSON.parse("{\"buttonLabel\":\"Zobraziť návrhy\",\"countAnnouncement\":\"{optionCount, plural, one {# možnosť} other {# možnosti/-í}} k dispozícii.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Zadaná skupina {groupTitle}, s {groupCount, plural, one {# možnosťou} other {# možnosťami}}. } other {}}{optionText}{isSelected, select, true {, vybraté} other {}}\",\"listboxLabel\":\"Návrhy\",\"selectedAnnouncement\":\"{optionText}, vybraté\"}");
137
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/sl-SI.json
138
- var $bf5ec183b7bd0eecdc06625a9a73fa9d$exports = {};
139
- $bf5ec183b7bd0eecdc06625a9a73fa9d$exports = JSON.parse("{\"buttonLabel\":\"Prikaži predloge\",\"countAnnouncement\":\"Na voljo je {optionCount, plural, one {# opcija} other {# opcije}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Vnesena skupina {groupTitle}, z {groupCount, plural, one {# opcija} other {# opcije}}. } other {}}{optionText}{isSelected, select, true {, izbrano} other {}}\",\"listboxLabel\":\"Predlogi\",\"selectedAnnouncement\":\"{optionText}, izbrano\"}");
140
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/sr-SP.json
141
- var $aa293a3771d0b4cc15832591bc00b93d$exports = {};
142
- $aa293a3771d0b4cc15832591bc00b93d$exports = JSON.parse("{\"buttonLabel\":\"Prikaži predloge\",\"countAnnouncement\":\"Dostupno još: {optionCount, plural, one {# opcija} other {# opcije/a}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Unesena grupa {groupTitle}, s {groupCount, plural, one {# opcijom} other {# optione/a}}. } other {}}{optionText}{isSelected, select, true {, izabranih} other {}}\",\"listboxLabel\":\"Predlozi\",\"selectedAnnouncement\":\"{optionText}, izabrano\"}");
143
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/sv-SE.json
144
- var $d15eef346cfbe2e9dc1d93abc4c6e5a$exports = {};
145
- $d15eef346cfbe2e9dc1d93abc4c6e5a$exports = JSON.parse("{\"buttonLabel\":\"Visa förslag\",\"countAnnouncement\":\"{optionCount, plural, one {# alternativ} other {# alternativ}} tillgängliga.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ingick i gruppen {groupTitle} med {groupCount, plural, one {# alternativ} other {# alternativ}}. } other {}}{optionText}{isSelected, select, true {, valda} other {}}\",\"listboxLabel\":\"Förslag\",\"selectedAnnouncement\":\"{optionText}, valda\"}");
146
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/tr-TR.json
147
- var $d70b2a82645d0b4b2c9cef7d29890$exports = {};
148
- $d70b2a82645d0b4b2c9cef7d29890$exports = JSON.parse("{\"buttonLabel\":\"Önerileri göster\",\"countAnnouncement\":\"{optionCount, plural, one {# seçenek} other {# seçenekler}} kullanılabilir.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Girilen grup {groupTitle}, ile {groupCount, plural, one {# seçenek} other {# seçenekler}}. } other {}}{optionText}{isSelected, select, true {, seçildi} other {}}\",\"listboxLabel\":\"Öneriler\",\"selectedAnnouncement\":\"{optionText}, seçildi\"}");
149
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/uk-UA.json
150
- var $ab1fe27a4f39549d797837c26e78fd16$exports = {};
151
- $ab1fe27a4f39549d797837c26e78fd16$exports = JSON.parse("{\"buttonLabel\":\"Показати пропозиції\",\"countAnnouncement\":\"{optionCount, plural, one {# параметр} other {# параметри(-ів)}} доступно.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Введена група {groupTitle}, з {groupCount, plural, one {# параметр} other {# параметри(-ів)}}. } other {}}{optionText}{isSelected, select, true {, вибрано} other {}}\",\"listboxLabel\":\"Пропозиції\",\"selectedAnnouncement\":\"{optionText}, вибрано\"}");
152
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/zh-CN.json
153
- var $fe62c244e0490ab4a42af68a4b80$exports = {};
154
- $fe62c244e0490ab4a42af68a4b80$exports = JSON.parse("{\"buttonLabel\":\"显示建议\",\"countAnnouncement\":\"有 {optionCount, plural, one {# 个选项} other {# 个选项}}可用。\",\"focusAnnouncement\":\"{isGroupChange, select, true {进入了 {groupTitle} 组,其中有 {groupCount, plural, one {# 个选项} other {# 个选项}}. } other {}}{optionText}{isSelected, select, true {, 已选择} other {}}\",\"listboxLabel\":\"建议\",\"selectedAnnouncement\":\"{optionText}, 已选择\"}");
155
- // ASSET: /home/circleci/react-spectrum/packages/@react-aria/combobox/intl/zh-TW.json
156
- var $fa0b480f785921c54bbc13041b14dc$exports = {};
157
- $fa0b480f785921c54bbc13041b14dc$exports = JSON.parse("{\"buttonLabel\":\"顯示建議\",\"countAnnouncement\":\"{optionCount, plural, one {# 選項} other {# 選項}} 可用。\",\"focusAnnouncement\":\"{isGroupChange, select, true {輸入的群組 {groupTitle}, 有 {groupCount, plural, one {# 選項} other {# 選項}}. } other {}}{optionText}{isSelected, select, true {, 已選取} other {}}\",\"listboxLabel\":\"建議\",\"selectedAnnouncement\":\"{optionText}, 已選取\"}");
158
- // @ts-ignore
159
- const $fa71f27c5feed757eb58cfe0179b$var$intlMessages = {
160
- "ar-AE": _babelRuntimeHelpersInteropRequireDefault($d3abd1c94a8091e6bea5d25566d34f3b$exports).default,
161
- "bg-BG": _babelRuntimeHelpersInteropRequireDefault($e68f714a4c0d09d95c33770e06f8$exports).default,
162
- "cs-CZ": _babelRuntimeHelpersInteropRequireDefault($a500a0b3a3619656e27bf5600e433c24$exports).default,
163
- "da-DK": _babelRuntimeHelpersInteropRequireDefault($e49da863b7bd600c177b6a36f118$exports).default,
164
- "de-DE": _babelRuntimeHelpersInteropRequireDefault($ee8337d033bc8022023cbd1e81c99e0f$exports).default,
165
- "el-GR": _babelRuntimeHelpersInteropRequireDefault($b80f3d468ed1c259fafa109ac82f$exports).default,
166
- "en-US": _babelRuntimeHelpersInteropRequireDefault($bf7e6d52e99e0a0de8c556ddb07fc5a$exports).default,
167
- "es-ES": _babelRuntimeHelpersInteropRequireDefault($a10df97a05936d5ade08a757b8203$exports).default,
168
- "et-EE": _babelRuntimeHelpersInteropRequireDefault($f3ceb8fdb1d42883b88768afca1419$exports).default,
169
- "fi-FI": _babelRuntimeHelpersInteropRequireDefault($f1743c0157b8801e8cb7483c8ad$exports).default,
170
- "fr-FR": _babelRuntimeHelpersInteropRequireDefault($dc583336acdeed35267661d22$exports).default,
171
- "he-IL": _babelRuntimeHelpersInteropRequireDefault($e8d5cdaf06bc2fff1bfdce0b70eaee1$exports).default,
172
- "hr-HR": _babelRuntimeHelpersInteropRequireDefault($a09462ff6f02eb4bf7658204c3f6e15$exports).default,
173
- "hu-HU": _babelRuntimeHelpersInteropRequireDefault($a51a94bb99ac070324d83d28741ff6a3$exports).default,
174
- "it-IT": _babelRuntimeHelpersInteropRequireDefault($dc21b3c22ee0c88b8141ebe9086768be$exports).default,
175
- "ja-JP": _babelRuntimeHelpersInteropRequireDefault($a4da3b639472f5f28d54905e8d8b311$exports).default,
176
- "ko-KR": _babelRuntimeHelpersInteropRequireDefault($fcdb1200b0b078125505411250b3da8$exports).default,
177
- "lt-LT": _babelRuntimeHelpersInteropRequireDefault($ae7d46453e48caf5831bf917e3f7f4$exports).default,
178
- "lv-LV": _babelRuntimeHelpersInteropRequireDefault($d008ca76e03db31d004b0e4f3f5574a$exports).default,
179
- "nb-NO": _babelRuntimeHelpersInteropRequireDefault($dcaa72b3e8623f0d734c2b2e58a$exports).default,
180
- "nl-NL": _babelRuntimeHelpersInteropRequireDefault($a7a8fb75c57944677d9c6bf80bbe$exports).default,
181
- "pl-PL": _babelRuntimeHelpersInteropRequireDefault($ed7527596f583bb2411b6e63181c828$exports).default,
182
- "pt-BR": _babelRuntimeHelpersInteropRequireDefault($df7ce3597cba6c589fe1547e9398a1$exports).default,
183
- "pt-PT": _babelRuntimeHelpersInteropRequireDefault($af7a1745d38e51c65b0133f60a0$exports).default,
184
- "ro-RO": _babelRuntimeHelpersInteropRequireDefault($a05b7681dd40a3dd5d6e247465fb2$exports).default,
185
- "ru-RU": _babelRuntimeHelpersInteropRequireDefault($a3e6ad485d388d34644c7738b17894$exports).default,
186
- "sk-SK": _babelRuntimeHelpersInteropRequireDefault($e0b1ab042642593eb7294132e50b46b$exports).default,
187
- "sl-SI": _babelRuntimeHelpersInteropRequireDefault($bf5ec183b7bd0eecdc06625a9a73fa9d$exports).default,
188
- "sr-SP": _babelRuntimeHelpersInteropRequireDefault($aa293a3771d0b4cc15832591bc00b93d$exports).default,
189
- "sv-SE": _babelRuntimeHelpersInteropRequireDefault($d15eef346cfbe2e9dc1d93abc4c6e5a$exports).default,
190
- "tr-TR": _babelRuntimeHelpersInteropRequireDefault($d70b2a82645d0b4b2c9cef7d29890$exports).default,
191
- "uk-UA": _babelRuntimeHelpersInteropRequireDefault($ab1fe27a4f39549d797837c26e78fd16$exports).default,
192
- "zh-CN": _babelRuntimeHelpersInteropRequireDefault($fe62c244e0490ab4a42af68a4b80$exports).default,
193
- "zh-TW": _babelRuntimeHelpersInteropRequireDefault($fa0b480f785921c54bbc13041b14dc$exports).default
194
- };
52
+ var $97e8f122a585245a$exports = {};
53
+ $97e8f122a585245a$exports = JSON.parse("{\"buttonLabel\":\"Zobrazit doporučení\",\"countAnnouncement\":\"K dispozici {optionCount, plural, one {je # možnost} other {jsou/je # možnosti/-í}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Zadaná skupina „{groupTitle}“ {groupCount, plural, one {s # možností} other {se # možnostmi}}. } other {}}{optionText}{isSelected, select, true { (vybráno)} other {}}\",\"listboxLabel\":\"Návrhy\",\"selectedAnnouncement\":\"{optionText}, vybráno\"}");
195
54
 
196
- /**
197
- * Provides the behavior and accessibility implementation for a combo box component.
198
- * A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.
199
- * @param props - Props for the combo box.
200
- * @param state - State for the select, as returned by `useComboBoxState`.
201
- */
202
- function useComboBox(props, state) {
203
- var _focusedItem$parentKe, _state$selectionManag;
204
-
205
- let {
206
- buttonRef,
207
- popoverRef,
208
- inputRef,
209
- listBoxRef,
210
- keyboardDelegate,
211
- // completionMode = 'suggest',
212
- shouldFocusWrap,
213
- isReadOnly,
214
- isDisabled
215
- } = props;
216
- let formatMessage = useMessageFormatter($fa71f27c5feed757eb58cfe0179b$var$intlMessages);
217
- let {
218
- menuTriggerProps,
219
- menuProps
220
- } = useMenuTrigger({
221
- type: 'listbox',
222
- isDisabled: isDisabled || isReadOnly
223
- }, state, buttonRef); // Set listbox id so it can be used when calling getItemId later
224
-
225
- listData.set(state, {
226
- id: menuProps.id
227
- }); // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
228
- // When virtualized, the layout object will be passed in as a prop and override this.
229
-
230
- let delegate = useMemo(() => keyboardDelegate || new ListKeyboardDelegate(state.collection, state.disabledKeys, listBoxRef), [keyboardDelegate, state.collection, state.disabledKeys, listBoxRef]); // Use useSelectableCollection to get the keyboard handlers to apply to the textfield
231
-
232
- let {
233
- collectionProps
234
- } = useSelectableCollection({
235
- selectionManager: state.selectionManager,
236
- keyboardDelegate: delegate,
237
- disallowTypeAhead: true,
238
- disallowEmptySelection: true,
239
- shouldFocusWrap,
240
- ref: inputRef,
241
- // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
242
- isVirtualized: true
243
- }); // For textfield specific keydown operations
244
-
245
- let onKeyDown = e => {
246
- switch (e.key) {
247
- case 'Enter':
248
- case 'Tab':
249
- // Prevent form submission if menu is open since we may be selecting a option
250
- if (state.isOpen && e.key === 'Enter') {
251
- e.preventDefault();
252
- }
253
55
 
254
- state.commit();
255
- break;
56
+ var $6d1535c272ab19a7$exports = {};
57
+ $6d1535c272ab19a7$exports = JSON.parse("{\"buttonLabel\":\"Vis forslag\",\"countAnnouncement\":\"{optionCount, plural, one {# mulighed tilgængelig} other {# muligheder tilgængelige}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Angivet gruppe {groupTitle}, med {groupCount, plural, one {# mulighed} other {# muligheder}}. } other {}}{optionText}{isSelected, select, true {, valgt} other {}}\",\"listboxLabel\":\"Forslag\",\"selectedAnnouncement\":\"{optionText}, valgt\"}");
256
58
 
257
- case 'Escape':
258
- state.revert();
259
- break;
260
59
 
261
- case 'ArrowDown':
262
- state.open('first', 'manual');
263
- break;
60
+ var $48fd693b32c4b30a$exports = {};
61
+ $48fd693b32c4b30a$exports = JSON.parse("{\"buttonLabel\":\"Empfehlungen anzeigen\",\"countAnnouncement\":\"{optionCount, plural, one {# Option} other {# Optionen}} verfügbar.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Eingetretene Gruppe {groupTitle}, mit {groupCount, plural, one {# Option} other {# Optionen}}. } other {}}{optionText}{isSelected, select, true {, ausgewählt} other {}}\",\"listboxLabel\":\"Empfehlungen\",\"selectedAnnouncement\":\"{optionText}, ausgewählt\"}");
264
62
 
265
- case 'ArrowUp':
266
- state.open('last', 'manual');
267
- break;
268
63
 
269
- case 'ArrowLeft':
270
- case 'ArrowRight':
271
- state.selectionManager.setFocusedKey(null);
272
- break;
273
- }
274
- };
64
+ var $862ccc74a38d1e1f$exports = {};
65
+ $862ccc74a38d1e1f$exports = JSON.parse("{\"buttonLabel\":\"Προβολή προτάσεων\",\"countAnnouncement\":\"{optionCount, plural, one {# επιλογή} other {# επιλογές }} διαθέσιμες.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Εισαγμένη ομάδα {groupTitle}, με {groupCount, plural, one {# επιλογή} other {# επιλογές}}. } other {}}{optionText}{isSelected, select, true {, επιλεγμένο} other {}}\",\"listboxLabel\":\"Προτάσεις\",\"selectedAnnouncement\":\"{optionText}, επιλέχθηκε\"}");
275
66
 
276
- let onBlur = e => {
277
- var _popoverRef$current;
278
67
 
279
- // Ignore blur if focused moved to the button or into the popover.
280
- if (e.relatedTarget === (buttonRef == null ? void 0 : buttonRef.current) || (_popoverRef$current = popoverRef.current) != null && _popoverRef$current.contains(e.relatedTarget)) {
281
- return;
282
- }
68
+ var $323595725b3cbbff$exports = {};
69
+ $323595725b3cbbff$exports = JSON.parse("{\"focusAnnouncement\":\"{isGroupChange, select, true {Entered group {groupTitle}, with {groupCount, plural, one {# option} other {# options}}. } other {}}{optionText}{isSelected, select, true {, selected} other {}}\",\"countAnnouncement\":\"{optionCount, plural, one {# option} other {# options}} available.\",\"selectedAnnouncement\":\"{optionText}, selected\",\"buttonLabel\":\"Show suggestions\",\"listboxLabel\":\"Suggestions\"}");
283
70
 
284
- if (props.onBlur) {
285
- props.onBlur(e);
286
- }
287
71
 
288
- state.setFocused(false);
289
- };
72
+ var $3367f15548ffbdd3$exports = {};
73
+ $3367f15548ffbdd3$exports = JSON.parse("{\"buttonLabel\":\"Mostrar sugerencias\",\"countAnnouncement\":\"{optionCount, plural, one {# opción} other {# opciones}} disponible(s).\",\"focusAnnouncement\":\"{isGroupChange, select, true {Se ha unido al grupo {groupTitle}, con {groupCount, plural, one {# opción} other {# opciones}}. } other {}}{optionText}{isSelected, select, true {, seleccionado} other {}}\",\"listboxLabel\":\"Sugerencias\",\"selectedAnnouncement\":\"{optionText}, seleccionado\"}");
290
74
 
291
- let onFocus = e => {
292
- if (state.isFocused) {
293
- return;
294
- }
295
75
 
296
- if (props.onFocus) {
297
- props.onFocus(e);
298
- }
76
+ var $7189209c3d74b86a$exports = {};
77
+ $7189209c3d74b86a$exports = JSON.parse("{\"buttonLabel\":\"Kuva soovitused\",\"countAnnouncement\":\"{optionCount, plural, one {# valik} other {# valikud}} saadaval.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Sisestatud rühm {groupTitle}, valikuga {groupCount, plural, one {# valik} other {# valikud}}. } other {}}{optionText}{isSelected, select, true {, valitud} other {}}\",\"listboxLabel\":\"Soovitused\",\"selectedAnnouncement\":\"{optionText}, valitud\"}");
299
78
 
300
- state.setFocused(true);
301
- };
302
-
303
- let {
304
- labelProps,
305
- inputProps,
306
- descriptionProps,
307
- errorMessageProps
308
- } = useTextField(_babelRuntimeHelpersExtends({}, props, {
309
- onChange: state.setInputValue,
310
- onKeyDown: !isReadOnly && chain(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown),
311
- onBlur,
312
- value: state.inputValue,
313
- onFocus,
314
- autoComplete: 'off'
315
- }), inputRef); // Press handlers for the ComboBox button
316
-
317
- let onPress = e => {
318
- if (e.pointerType === 'touch') {
319
- // Focus the input field in case it isn't focused yet
320
- inputRef.current.focus();
321
- state.toggle(null, 'manual');
322
- }
323
- };
324
79
 
325
- let onPressStart = e => {
326
- if (e.pointerType !== 'touch') {
327
- inputRef.current.focus();
328
- state.toggle(e.pointerType === 'keyboard' || e.pointerType === 'virtual' ? 'first' : null, 'manual');
329
- }
330
- };
80
+ var $7e2992b394a1cbc7$exports = {};
81
+ $7e2992b394a1cbc7$exports = JSON.parse("{\"buttonLabel\":\"Näytä ehdotukset\",\"countAnnouncement\":\"{optionCount, plural, one {# vaihtoehto} other {# vaihtoehdot}} saatavilla.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Mentiin ryhmään {groupTitle}, {groupCount, plural, one {# vaihtoehdon} other {# vaihtoehdon}} kanssa.} other {}}{optionText}{isSelected, select, true {, valittu} other {}}\",\"listboxLabel\":\"Ehdotukset\",\"selectedAnnouncement\":\"{optionText}, valittu\"}");
331
82
 
332
- let triggerLabelProps = useLabels({
333
- id: menuTriggerProps.id,
334
- 'aria-label': formatMessage('buttonLabel'),
335
- 'aria-labelledby': props['aria-labelledby'] || labelProps.id
336
- });
337
- let listBoxProps = useLabels({
338
- id: menuProps.id,
339
- 'aria-label': formatMessage('listboxLabel'),
340
- 'aria-labelledby': props['aria-labelledby'] || labelProps.id
341
- }); // If a touch happens on direct center of ComboBox input, might be virtual click from iPad so open ComboBox menu
342
83
 
343
- let lastEventTime = useRef(0);
84
+ var $72c541874a7265b7$exports = {};
85
+ $72c541874a7265b7$exports = JSON.parse("{\"buttonLabel\":\"Afficher les suggestions\",\"countAnnouncement\":\"{optionCount, plural, one {# option} other {# options}} disponible(s).\",\"focusAnnouncement\":\"{isGroupChange, select, true {Groupe {groupTitle} saisi, avec {groupCount, plural, one {# option} other {# options}}. } other {}}{optionText}{isSelected, select, true {, sélectionné(s)} other {}}\",\"listboxLabel\":\"Suggestions\",\"selectedAnnouncement\":\"{optionText}, sélectionné\"}");
344
86
 
345
- let onTouchEnd = e => {
346
- if (isDisabled || isReadOnly) {
347
- return;
348
- } // Sometimes VoiceOver on iOS fires two touchend events in quick succession. Ignore the second one.
349
87
 
88
+ var $53d86515965fba18$exports = {};
89
+ $53d86515965fba18$exports = JSON.parse("{\"buttonLabel\":\"הצג הצעות\",\"countAnnouncement\":\"{optionCount, plural, one {אפשרות #} other {# אפשרויות}} במצב זמין.\",\"focusAnnouncement\":\"{isGroupChange, select, true {נכנס לקבוצה {groupTitle}, עם {groupCount, plural, one {אפשרות #} other {# אפשרויות}}. } other {}}{optionText}{isSelected, select, true {, נבחר} other {}}\",\"listboxLabel\":\"הצעות\",\"selectedAnnouncement\":\"{optionText}, נבחר\"}");
350
90
 
351
- if (e.timeStamp - lastEventTime.current < 500) {
352
- e.preventDefault();
353
- inputRef.current.focus();
354
- return;
355
- }
356
91
 
357
- let rect = e.target.getBoundingClientRect();
358
- let touch = e.changedTouches[0];
359
- let centerX = Math.ceil(rect.left + .5 * rect.width);
360
- let centerY = Math.ceil(rect.top + .5 * rect.height);
92
+ var $4d9f0ce002ca8bec$exports = {};
93
+ $4d9f0ce002ca8bec$exports = JSON.parse("{\"buttonLabel\":\"Prikaži prijedloge\",\"countAnnouncement\":\"Dostupno još: {optionCount, plural, one {# opcija} other {# opcije/a}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Unesena skupina {groupTitle}, s {groupCount, plural, one {# opcijom} other {# opcije/a}}. } other {}}{optionText}{isSelected, select, true {, odabranih} other {}}\",\"listboxLabel\":\"Prijedlozi\",\"selectedAnnouncement\":\"{optionText}, odabrano\"}");
361
94
 
362
- if (touch.clientX === centerX && touch.clientY === centerY) {
363
- e.preventDefault();
364
- inputRef.current.focus();
365
- state.toggle(null, 'manual');
366
- lastEventTime.current = e.timeStamp;
367
- }
368
- }; // VoiceOver has issues with announcing aria-activedescendant properly on change
369
- // (especially on iOS). We use a live region announcer to announce focus changes
370
- // manually. In addition, section titles are announced when navigating into a new section.
371
-
372
-
373
- let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : undefined;
374
- let sectionKey = (_focusedItem$parentKe = focusedItem == null ? void 0 : focusedItem.parentKey) != null ? _focusedItem$parentKe : null;
375
- let itemKey = (_state$selectionManag = state.selectionManager.focusedKey) != null ? _state$selectionManag : null;
376
- let lastSection = useRef(sectionKey);
377
- let lastItem = useRef(itemKey);
378
- useEffect(() => {
379
- if (isAppleDevice() && focusedItem != null && itemKey !== lastItem.current) {
380
- let isSelected = state.selectionManager.isSelected(itemKey);
381
- let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
382
- let sectionTitle = (section == null ? void 0 : section['aria-label']) || (typeof (section == null ? void 0 : section.rendered) === 'string' ? section.rendered : '') || '';
383
- let announcement = formatMessage('focusAnnouncement', {
384
- isGroupChange: section && sectionKey !== lastSection.current,
385
- groupTitle: sectionTitle,
386
- groupCount: section ? [...section.childNodes].length : 0,
387
- optionText: focusedItem['aria-label'] || focusedItem.textValue || '',
388
- isSelected
389
- });
390
- announce(announcement);
391
- }
392
95
 
393
- lastSection.current = sectionKey;
394
- lastItem.current = itemKey;
395
- }); // Announce the number of available suggestions when it changes
396
-
397
- let optionCount = getItemCount(state.collection);
398
- let lastSize = useRef(optionCount);
399
- let lastOpen = useRef(state.isOpen);
400
- useEffect(() => {
401
- // Only announce the number of options available when the menu opens if there is no
402
- // focused item, otherwise screen readers will typically read e.g. "1 of 6".
403
- // The exception is VoiceOver since this isn't included in the message above.
404
- let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || isAppleDevice());
405
-
406
- if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
407
- let announcement = formatMessage('countAnnouncement', {
408
- optionCount
409
- });
410
- announce(announcement);
411
- }
96
+ var $9cd38c4312eea987$exports = {};
97
+ $9cd38c4312eea987$exports = JSON.parse("{\"buttonLabel\":\"Javaslatok megjelenítése\",\"countAnnouncement\":\"{optionCount, plural, one {# lehetőség} other {# lehetőség}} áll rendelkezésre.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Belépett a(z) {groupTitle} csoportba, amely {groupCount, plural, one {# lehetőséget} other {# lehetőséget}} tartalmaz. } other {}}{optionText}{isSelected, select, true {, kijelölve} other {}}\",\"listboxLabel\":\"Javaslatok\",\"selectedAnnouncement\":\"{optionText}, kijelölve\"}");
412
98
 
413
- lastSize.current = optionCount;
414
- lastOpen.current = state.isOpen;
415
- }); // Announce when a selection occurs for VoiceOver. Other screen readers typically do this automatically.
416
-
417
- let lastSelectedKey = useRef(state.selectedKey);
418
- useEffect(() => {
419
- if (isAppleDevice() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
420
- let optionText = state.selectedItem['aria-label'] || state.selectedItem.textValue || '';
421
- let announcement = formatMessage('selectedAnnouncement', {
422
- optionText
423
- });
424
- announce(announcement);
425
- }
426
99
 
427
- lastSelectedKey.current = state.selectedKey;
428
- });
429
- useEffect(() => {
430
- if (state.isOpen) {
431
- return ariaHideOutside([inputRef.current, popoverRef.current]);
432
- }
433
- }, [state.isOpen, inputRef, popoverRef]);
434
- return {
435
- labelProps,
436
- buttonProps: _babelRuntimeHelpersExtends({}, menuTriggerProps, triggerLabelProps, {
437
- excludeFromTabOrder: true,
438
- onPress,
439
- onPressStart,
440
- isDisabled: isDisabled || isReadOnly
441
- }),
442
- inputProps: mergeProps(inputProps, {
443
- role: 'combobox',
444
- 'aria-expanded': menuTriggerProps['aria-expanded'],
445
- 'aria-controls': state.isOpen ? menuProps.id : undefined,
446
- // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
447
- 'aria-autocomplete': 'list',
448
- 'aria-activedescendant': focusedItem ? getItemId(state, focusedItem.key) : undefined,
449
- onTouchEnd,
450
- // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
451
- autoCorrect: 'off',
452
- // This disable's the macOS Safari spell check auto corrections.
453
- spellCheck: 'false'
454
- }),
455
- listBoxProps: mergeProps(menuProps, listBoxProps, {
456
- autoFocus: state.focusStrategy,
457
- shouldUseVirtualFocus: true,
458
- shouldSelectOnPressUp: true,
459
- shouldFocusOnHover: true
460
- }),
461
- descriptionProps,
462
- errorMessageProps
463
- };
100
+ var $4f06a52736eab0df$exports = {};
101
+ $4f06a52736eab0df$exports = JSON.parse("{\"buttonLabel\":\"Mostra suggerimenti\",\"countAnnouncement\":\"{optionCount, plural, one {# opzione disponibile} other {# opzioni disponibili}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ingresso nel gruppo {groupTitle}, con {groupCount, plural, one {# opzione} other {# opzioni}}. } other {}}{optionText}{isSelected, select, true {, selezionato} other {}}\",\"listboxLabel\":\"Suggerimenti\",\"selectedAnnouncement\":\"{optionText}, selezionato\"}");
102
+
103
+
104
+ var $cc4e2e7f7797c574$exports = {};
105
+ $cc4e2e7f7797c574$exports = JSON.parse("{\"buttonLabel\":\"候補を表示\",\"countAnnouncement\":\"{optionCount, plural, one {# 個のオプション} other {# 個のオプション}}を利用できます。\",\"focusAnnouncement\":\"{isGroupChange, select, true {入力されたグループ {groupTitle}、{groupCount, plural, one {# 個のオプション} other {# 個のオプション}}を含む。} other {}}{optionText}{isSelected, select, true {、選択済み} other {}}\",\"listboxLabel\":\"候補\",\"selectedAnnouncement\":\"{optionText}、選択済み\"}");
106
+
107
+
108
+ var $d5da1536e4368014$exports = {};
109
+ $d5da1536e4368014$exports = JSON.parse("{\"buttonLabel\":\"제안 사항 표시\",\"countAnnouncement\":\"{optionCount, plural, one {#개 옵션} other {#개 옵션}}을 사용할 수 있습니다.\",\"focusAnnouncement\":\"{isGroupChange, select, true {입력한 그룹 {groupTitle}, {groupCount, plural, one {#개 옵션} other {#개 옵션}}. } other {}}{optionText}{isSelected, select, true {, 선택됨} other {}}\",\"listboxLabel\":\"제안\",\"selectedAnnouncement\":\"{optionText}, 선택됨\"}");
110
+
111
+
112
+ var $4bdc90ca07202831$exports = {};
113
+ $4bdc90ca07202831$exports = JSON.parse("{\"buttonLabel\":\"Rodyti pasiūlymus\",\"countAnnouncement\":\"Yra {optionCount, plural, one {# parinktis} other {# parinktys (-ių)}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Įvesta grupė {groupTitle}, su {groupCount, plural, one {# parinktimi} other {# parinktimis (-ių)}}. } other {}}{optionText}{isSelected, select, true {, pasirinkta} other {}}\",\"listboxLabel\":\"Pasiūlymai\",\"selectedAnnouncement\":\"{optionText}, pasirinkta\"}");
114
+
115
+
116
+ var $bea9afc0b53bd069$exports = {};
117
+ $bea9afc0b53bd069$exports = JSON.parse("{\"buttonLabel\":\"Rādīt ieteikumus\",\"countAnnouncement\":\"Pieejamo opciju skaits: {optionCount, plural, one {# opcija} other {# opcijas}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ievadīta grupa {groupTitle}, ar {groupCount, plural, one {# opciju} other {# opcijām}}. } other {}}{optionText}{isSelected, select, true {, atlasīta} other {}}\",\"listboxLabel\":\"Ieteikumi\",\"selectedAnnouncement\":\"{optionText}, atlasīta\"}");
118
+
119
+
120
+ var $2b8d7f24a8494c5f$exports = {};
121
+ $2b8d7f24a8494c5f$exports = JSON.parse("{\"buttonLabel\":\"Vis forslag\",\"countAnnouncement\":\"{optionCount, plural, one {# alternativ} other {# alternativer}} finnes.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Angitt gruppe {groupTitle}, med {groupCount, plural, one {# alternativ} other {# alternativer}}. } other {}}{optionText}{isSelected, select, true {, valgt} other {}}\",\"listboxLabel\":\"Forslag\",\"selectedAnnouncement\":\"{optionText}, valgt\"}");
122
+
123
+
124
+ var $4ab8580f4b7afc3d$exports = {};
125
+ $4ab8580f4b7afc3d$exports = JSON.parse("{\"buttonLabel\":\"Suggesties weergeven\",\"countAnnouncement\":\"{optionCount, plural, one {# optie} other {# opties}} beschikbaar.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Groep {groupTitle} ingevoerd met {groupCount, plural, one {# optie} other {# opties}}. } other {}}{optionText}{isSelected, select, true {, geselecteerd} other {}}\",\"listboxLabel\":\"Suggesties\",\"selectedAnnouncement\":\"{optionText}, geselecteerd\"}");
126
+
127
+
128
+ var $4f1960387c9732b0$exports = {};
129
+ $4f1960387c9732b0$exports = JSON.parse("{\"buttonLabel\":\"Wyświetlaj sugestie\",\"countAnnouncement\":\"dostępna/dostępne(-nych) {optionCount, plural, one {# opcja} other {# opcje(-i)}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Dołączono do grupy {groupTitle}, z {groupCount, plural, one {# opcją} other {# opcjami}}. } other {}}{optionText}{isSelected, select, true {, wybrano} other {}}\",\"listboxLabel\":\"Sugestie\",\"selectedAnnouncement\":\"{optionText}, wybrano\"}");
130
+
131
+
132
+ var $0e1975fb651d278b$exports = {};
133
+ $0e1975fb651d278b$exports = JSON.parse("{\"buttonLabel\":\"Mostrar sugestões\",\"countAnnouncement\":\"{optionCount, plural, one {# opção} other {# opções}} disponível.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grupo inserido {groupTitle}, com {groupCount, plural, one {# opção} other {# opções}}. } other {}}{optionText}{isSelected, select, true {, selecionado} other {}}\",\"listboxLabel\":\"Sugestões\",\"selectedAnnouncement\":\"{optionText}, selecionado\"}");
134
+
135
+
136
+ var $710db41efb26dcdb$exports = {};
137
+ $710db41efb26dcdb$exports = JSON.parse("{\"buttonLabel\":\"Apresentar sugestões\",\"countAnnouncement\":\"{optionCount, plural, one {# opção} other {# opções}} disponível.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grupo introduzido {groupTitle}, com {groupCount, plural, one {# opção} other {# opções}}. } other {}}{optionText}{isSelected, select, true {, selecionado} other {}}\",\"listboxLabel\":\"Sugestões\",\"selectedAnnouncement\":\"{optionText}, selecionado\"}");
138
+
139
+
140
+ var $50f1a37784d45978$exports = {};
141
+ $50f1a37784d45978$exports = JSON.parse("{\"buttonLabel\":\"Afișare sugestii\",\"countAnnouncement\":\"{optionCount, plural, one {# opțiune} other {# opțiuni}} disponibile.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Grup {groupTitle} introdus, cu {groupCount, plural, one {# opțiune} other {# opțiuni}}. } other {}}{optionText}{isSelected, select, true {, selectat} other {}}\",\"listboxLabel\":\"Sugestii\",\"selectedAnnouncement\":\"{optionText}, selectat\"}");
142
+
143
+
144
+ var $90c5736691f4bc77$exports = {};
145
+ $90c5736691f4bc77$exports = JSON.parse("{\"buttonLabel\":\"Показать предложения\",\"countAnnouncement\":\"{optionCount, plural, one {# параметр} other {# параметров}} доступно.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Введенная группа {groupTitle}, с {groupCount, plural, one {# параметром} other {# параметрами}}. } other {}}{optionText}{isSelected, select, true {, выбранными} other {}}\",\"listboxLabel\":\"Предложения\",\"selectedAnnouncement\":\"{optionText}, выбрано\"}");
146
+
147
+
148
+ var $98bd8eb77c8b56eb$exports = {};
149
+ $98bd8eb77c8b56eb$exports = JSON.parse("{\"buttonLabel\":\"Zobraziť návrhy\",\"countAnnouncement\":\"{optionCount, plural, one {# možnosť} other {# možnosti/-í}} k dispozícii.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Zadaná skupina {groupTitle}, s {groupCount, plural, one {# možnosťou} other {# možnosťami}}. } other {}}{optionText}{isSelected, select, true {, vybraté} other {}}\",\"listboxLabel\":\"Návrhy\",\"selectedAnnouncement\":\"{optionText}, vybraté\"}");
150
+
151
+
152
+ var $2522c58fc1b97ee5$exports = {};
153
+ $2522c58fc1b97ee5$exports = JSON.parse("{\"buttonLabel\":\"Prikaži predloge\",\"countAnnouncement\":\"Na voljo je {optionCount, plural, one {# opcija} other {# opcije}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Vnesena skupina {groupTitle}, z {groupCount, plural, one {# opcija} other {# opcije}}. } other {}}{optionText}{isSelected, select, true {, izbrano} other {}}\",\"listboxLabel\":\"Predlogi\",\"selectedAnnouncement\":\"{optionText}, izbrano\"}");
154
+
155
+
156
+ var $1bbac84315054079$exports = {};
157
+ $1bbac84315054079$exports = JSON.parse("{\"buttonLabel\":\"Prikaži predloge\",\"countAnnouncement\":\"Dostupno još: {optionCount, plural, one {# opcija} other {# opcije/a}}.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Unesena grupa {groupTitle}, s {groupCount, plural, one {# opcijom} other {# optione/a}}. } other {}}{optionText}{isSelected, select, true {, izabranih} other {}}\",\"listboxLabel\":\"Predlozi\",\"selectedAnnouncement\":\"{optionText}, izabrano\"}");
158
+
159
+
160
+ var $708db5fc65d6f886$exports = {};
161
+ $708db5fc65d6f886$exports = JSON.parse("{\"buttonLabel\":\"Visa förslag\",\"countAnnouncement\":\"{optionCount, plural, one {# alternativ} other {# alternativ}} tillgängliga.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Ingick i gruppen {groupTitle} med {groupCount, plural, one {# alternativ} other {# alternativ}}. } other {}}{optionText}{isSelected, select, true {, valda} other {}}\",\"listboxLabel\":\"Förslag\",\"selectedAnnouncement\":\"{optionText}, valda\"}");
162
+
163
+
164
+ var $c26b0d3dbc838c60$exports = {};
165
+ $c26b0d3dbc838c60$exports = JSON.parse("{\"buttonLabel\":\"Önerileri göster\",\"countAnnouncement\":\"{optionCount, plural, one {# seçenek} other {# seçenekler}} kullanılabilir.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Girilen grup {groupTitle}, ile {groupCount, plural, one {# seçenek} other {# seçenekler}}. } other {}}{optionText}{isSelected, select, true {, seçildi} other {}}\",\"listboxLabel\":\"Öneriler\",\"selectedAnnouncement\":\"{optionText}, seçildi\"}");
166
+
167
+
168
+ var $5d503e95d8ff1d4f$exports = {};
169
+ $5d503e95d8ff1d4f$exports = JSON.parse("{\"buttonLabel\":\"Показати пропозиції\",\"countAnnouncement\":\"{optionCount, plural, one {# параметр} other {# параметри(-ів)}} доступно.\",\"focusAnnouncement\":\"{isGroupChange, select, true {Введена група {groupTitle}, з {groupCount, plural, one {# параметр} other {# параметри(-ів)}}. } other {}}{optionText}{isSelected, select, true {, вибрано} other {}}\",\"listboxLabel\":\"Пропозиції\",\"selectedAnnouncement\":\"{optionText}, вибрано\"}");
170
+
171
+
172
+ var $b2dcd0c702df3398$exports = {};
173
+ $b2dcd0c702df3398$exports = JSON.parse("{\"buttonLabel\":\"显示建议\",\"countAnnouncement\":\"有 {optionCount, plural, one {# 个选项} other {# 个选项}}可用。\",\"focusAnnouncement\":\"{isGroupChange, select, true {进入了 {groupTitle} 组,其中有 {groupCount, plural, one {# 个选项} other {# 个选项}}. } other {}}{optionText}{isSelected, select, true {, 已选择} other {}}\",\"listboxLabel\":\"建议\",\"selectedAnnouncement\":\"{optionText}, 已选择\"}");
174
+
175
+
176
+ var $368202a43331effb$exports = {};
177
+ $368202a43331effb$exports = JSON.parse("{\"buttonLabel\":\"顯示建議\",\"countAnnouncement\":\"{optionCount, plural, one {# 選項} other {# 選項}} 可用。\",\"focusAnnouncement\":\"{isGroupChange, select, true {輸入的群組 {groupTitle}, 有 {groupCount, plural, one {# 選項} other {# 選項}}. } other {}}{optionText}{isSelected, select, true {, 已選取} other {}}\",\"listboxLabel\":\"建議\",\"selectedAnnouncement\":\"{optionText}, 已選取\"}");
178
+
179
+
180
+ $3bd3973e51e6b26d$exports = {
181
+ "ar-AE": $b83e8d27ada1ca06$exports,
182
+ "bg-BG": $250bbc713dad1120$exports,
183
+ "cs-CZ": $97e8f122a585245a$exports,
184
+ "da-DK": $6d1535c272ab19a7$exports,
185
+ "de-DE": $48fd693b32c4b30a$exports,
186
+ "el-GR": $862ccc74a38d1e1f$exports,
187
+ "en-US": $323595725b3cbbff$exports,
188
+ "es-ES": $3367f15548ffbdd3$exports,
189
+ "et-EE": $7189209c3d74b86a$exports,
190
+ "fi-FI": $7e2992b394a1cbc7$exports,
191
+ "fr-FR": $72c541874a7265b7$exports,
192
+ "he-IL": $53d86515965fba18$exports,
193
+ "hr-HR": $4d9f0ce002ca8bec$exports,
194
+ "hu-HU": $9cd38c4312eea987$exports,
195
+ "it-IT": $4f06a52736eab0df$exports,
196
+ "ja-JP": $cc4e2e7f7797c574$exports,
197
+ "ko-KR": $d5da1536e4368014$exports,
198
+ "lt-LT": $4bdc90ca07202831$exports,
199
+ "lv-LV": $bea9afc0b53bd069$exports,
200
+ "nb-NO": $2b8d7f24a8494c5f$exports,
201
+ "nl-NL": $4ab8580f4b7afc3d$exports,
202
+ "pl-PL": $4f1960387c9732b0$exports,
203
+ "pt-BR": $0e1975fb651d278b$exports,
204
+ "pt-PT": $710db41efb26dcdb$exports,
205
+ "ro-RO": $50f1a37784d45978$exports,
206
+ "ru-RU": $90c5736691f4bc77$exports,
207
+ "sk-SK": $98bd8eb77c8b56eb$exports,
208
+ "sl-SI": $2522c58fc1b97ee5$exports,
209
+ "sr-SP": $1bbac84315054079$exports,
210
+ "sv-SE": $708db5fc65d6f886$exports,
211
+ "tr-TR": $c26b0d3dbc838c60$exports,
212
+ "uk-UA": $5d503e95d8ff1d4f$exports,
213
+ "zh-CN": $b2dcd0c702df3398$exports,
214
+ "zh-TW": $368202a43331effb$exports
215
+ };
216
+
217
+
218
+
219
+
220
+
221
+
222
+ function $1a707b51686ebf70$export$8c18d1b4f7232bbf(props, state) {
223
+ let { buttonRef: buttonRef , popoverRef: popoverRef , inputRef: inputRef , listBoxRef: listBoxRef , keyboardDelegate: keyboardDelegate , shouldFocusWrap: // completionMode = 'suggest',
224
+ shouldFocusWrap , isReadOnly: isReadOnly , isDisabled: isDisabled } = props;
225
+ let formatMessage = $fgbV4$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($3bd3973e51e6b26d$exports)));
226
+ let { menuTriggerProps: menuTriggerProps , menuProps: menuProps } = $fgbV4$reactariamenu.useMenuTrigger({
227
+ type: 'listbox',
228
+ isDisabled: isDisabled || isReadOnly
229
+ }, state, buttonRef);
230
+ // Set listbox id so it can be used when calling getItemId later
231
+ $fgbV4$reactarialistbox.listData.set(state, {
232
+ id: menuProps.id
233
+ });
234
+ // By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
235
+ // When virtualized, the layout object will be passed in as a prop and override this.
236
+ let delegate = $fgbV4$react.useMemo(()=>keyboardDelegate || new $fgbV4$reactariaselection.ListKeyboardDelegate(state.collection, state.disabledKeys, listBoxRef)
237
+ , [
238
+ keyboardDelegate,
239
+ state.collection,
240
+ state.disabledKeys,
241
+ listBoxRef
242
+ ]);
243
+ // Use useSelectableCollection to get the keyboard handlers to apply to the textfield
244
+ let { collectionProps: collectionProps } = $fgbV4$reactariaselection.useSelectableCollection({
245
+ selectionManager: state.selectionManager,
246
+ keyboardDelegate: delegate,
247
+ disallowTypeAhead: true,
248
+ disallowEmptySelection: true,
249
+ shouldFocusWrap: shouldFocusWrap,
250
+ ref: inputRef,
251
+ // Prevent item scroll behavior from being applied here, should be handled in the user's Popover + ListBox component
252
+ isVirtualized: true
253
+ });
254
+ // For textfield specific keydown operations
255
+ let onKeyDown = (e)=>{
256
+ switch(e.key){
257
+ case 'Enter':
258
+ case 'Tab':
259
+ // Prevent form submission if menu is open since we may be selecting a option
260
+ if (state.isOpen && e.key === 'Enter') e.preventDefault();
261
+ state.commit();
262
+ break;
263
+ case 'Escape':
264
+ state.revert();
265
+ break;
266
+ case 'ArrowDown':
267
+ state.open('first', 'manual');
268
+ break;
269
+ case 'ArrowUp':
270
+ state.open('last', 'manual');
271
+ break;
272
+ case 'ArrowLeft':
273
+ case 'ArrowRight':
274
+ state.selectionManager.setFocusedKey(null);
275
+ break;
276
+ }
277
+ };
278
+ let onBlur = (e)=>{
279
+ // Ignore blur if focused moved to the button or into the popover.
280
+ if (e.relatedTarget === buttonRef?.current || popoverRef.current?.contains(e.relatedTarget)) return;
281
+ if (props.onBlur) props.onBlur(e);
282
+ state.setFocused(false);
283
+ };
284
+ let onFocus = (e)=>{
285
+ if (state.isFocused) return;
286
+ if (props.onFocus) props.onFocus(e);
287
+ state.setFocused(true);
288
+ };
289
+ let { labelProps: labelProps , inputProps: inputProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $fgbV4$reactariatextfield.useTextField({
290
+ ...props,
291
+ onChange: state.setInputValue,
292
+ onKeyDown: !isReadOnly && $fgbV4$reactariautils.chain(state.isOpen && collectionProps.onKeyDown, onKeyDown, props.onKeyDown),
293
+ onBlur: onBlur,
294
+ value: state.inputValue,
295
+ onFocus: onFocus,
296
+ autoComplete: 'off'
297
+ }, inputRef);
298
+ // Press handlers for the ComboBox button
299
+ let onPress = (e)=>{
300
+ if (e.pointerType === 'touch') {
301
+ // Focus the input field in case it isn't focused yet
302
+ inputRef.current.focus();
303
+ state.toggle(null, 'manual');
304
+ }
305
+ };
306
+ let onPressStart = (e)=>{
307
+ if (e.pointerType !== 'touch') {
308
+ inputRef.current.focus();
309
+ state.toggle(e.pointerType === 'keyboard' || e.pointerType === 'virtual' ? 'first' : null, 'manual');
310
+ }
311
+ };
312
+ let triggerLabelProps = $fgbV4$reactariautils.useLabels({
313
+ id: menuTriggerProps.id,
314
+ 'aria-label': formatMessage('buttonLabel'),
315
+ 'aria-labelledby': props['aria-labelledby'] || labelProps.id
316
+ });
317
+ let listBoxProps = $fgbV4$reactariautils.useLabels({
318
+ id: menuProps.id,
319
+ 'aria-label': formatMessage('listboxLabel'),
320
+ 'aria-labelledby': props['aria-labelledby'] || labelProps.id
321
+ });
322
+ // If a touch happens on direct center of ComboBox input, might be virtual click from iPad so open ComboBox menu
323
+ let lastEventTime = $fgbV4$react.useRef(0);
324
+ let onTouchEnd = (e)=>{
325
+ if (isDisabled || isReadOnly) return;
326
+ // Sometimes VoiceOver on iOS fires two touchend events in quick succession. Ignore the second one.
327
+ if (e.timeStamp - lastEventTime.current < 500) {
328
+ e.preventDefault();
329
+ inputRef.current.focus();
330
+ return;
331
+ }
332
+ let rect = e.target.getBoundingClientRect();
333
+ let touch = e.changedTouches[0];
334
+ let centerX = Math.ceil(rect.left + 0.5 * rect.width);
335
+ let centerY = Math.ceil(rect.top + 0.5 * rect.height);
336
+ if (touch.clientX === centerX && touch.clientY === centerY) {
337
+ e.preventDefault();
338
+ inputRef.current.focus();
339
+ state.toggle(null, 'manual');
340
+ lastEventTime.current = e.timeStamp;
341
+ }
342
+ };
343
+ // VoiceOver has issues with announcing aria-activedescendant properly on change
344
+ // (especially on iOS). We use a live region announcer to announce focus changes
345
+ // manually. In addition, section titles are announced when navigating into a new section.
346
+ let focusedItem = state.selectionManager.focusedKey != null && state.isOpen ? state.collection.getItem(state.selectionManager.focusedKey) : undefined;
347
+ let sectionKey = focusedItem?.parentKey ?? null;
348
+ let itemKey = state.selectionManager.focusedKey ?? null;
349
+ let lastSection = $fgbV4$react.useRef(sectionKey);
350
+ let lastItem = $fgbV4$react.useRef(itemKey);
351
+ $fgbV4$react.useEffect(()=>{
352
+ if ($fgbV4$reactariautils.isAppleDevice() && focusedItem != null && itemKey !== lastItem.current) {
353
+ let isSelected = state.selectionManager.isSelected(itemKey);
354
+ let section = sectionKey != null ? state.collection.getItem(sectionKey) : null;
355
+ let sectionTitle = section?.['aria-label'] || (typeof section?.rendered === 'string' ? section.rendered : '') || '';
356
+ let announcement = formatMessage('focusAnnouncement', {
357
+ isGroupChange: section && sectionKey !== lastSection.current,
358
+ groupTitle: sectionTitle,
359
+ groupCount: section ? [
360
+ ...section.childNodes
361
+ ].length : 0,
362
+ optionText: focusedItem['aria-label'] || focusedItem.textValue || '',
363
+ isSelected: isSelected
364
+ });
365
+ $fgbV4$reactarialiveannouncer.announce(announcement);
366
+ }
367
+ lastSection.current = sectionKey;
368
+ lastItem.current = itemKey;
369
+ });
370
+ // Announce the number of available suggestions when it changes
371
+ let optionCount = $fgbV4$reactstatelycollections.getItemCount(state.collection);
372
+ let lastSize = $fgbV4$react.useRef(optionCount);
373
+ let lastOpen = $fgbV4$react.useRef(state.isOpen);
374
+ $fgbV4$react.useEffect(()=>{
375
+ // Only announce the number of options available when the menu opens if there is no
376
+ // focused item, otherwise screen readers will typically read e.g. "1 of 6".
377
+ // The exception is VoiceOver since this isn't included in the message above.
378
+ let didOpenWithoutFocusedItem = state.isOpen !== lastOpen.current && (state.selectionManager.focusedKey == null || $fgbV4$reactariautils.isAppleDevice());
379
+ if (state.isOpen && (didOpenWithoutFocusedItem || optionCount !== lastSize.current)) {
380
+ let announcement = formatMessage('countAnnouncement', {
381
+ optionCount: optionCount
382
+ });
383
+ $fgbV4$reactarialiveannouncer.announce(announcement);
384
+ }
385
+ lastSize.current = optionCount;
386
+ lastOpen.current = state.isOpen;
387
+ });
388
+ // Announce when a selection occurs for VoiceOver. Other screen readers typically do this automatically.
389
+ let lastSelectedKey = $fgbV4$react.useRef(state.selectedKey);
390
+ $fgbV4$react.useEffect(()=>{
391
+ if ($fgbV4$reactariautils.isAppleDevice() && state.isFocused && state.selectedItem && state.selectedKey !== lastSelectedKey.current) {
392
+ let optionText = state.selectedItem['aria-label'] || state.selectedItem.textValue || '';
393
+ let announcement = formatMessage('selectedAnnouncement', {
394
+ optionText: optionText
395
+ });
396
+ $fgbV4$reactarialiveannouncer.announce(announcement);
397
+ }
398
+ lastSelectedKey.current = state.selectedKey;
399
+ });
400
+ $fgbV4$react.useEffect(()=>{
401
+ if (state.isOpen) return $fgbV4$reactariaoverlays.ariaHideOutside([
402
+ inputRef.current,
403
+ popoverRef.current
404
+ ]);
405
+ }, [
406
+ state.isOpen,
407
+ inputRef,
408
+ popoverRef
409
+ ]);
410
+ return {
411
+ labelProps: labelProps,
412
+ buttonProps: {
413
+ ...menuTriggerProps,
414
+ ...triggerLabelProps,
415
+ excludeFromTabOrder: true,
416
+ onPress: onPress,
417
+ onPressStart: onPressStart,
418
+ isDisabled: isDisabled || isReadOnly
419
+ },
420
+ inputProps: $fgbV4$reactariautils.mergeProps(inputProps, {
421
+ role: 'combobox',
422
+ 'aria-expanded': menuTriggerProps['aria-expanded'],
423
+ 'aria-controls': state.isOpen ? menuProps.id : undefined,
424
+ // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
425
+ 'aria-autocomplete': 'list',
426
+ 'aria-activedescendant': focusedItem ? $fgbV4$reactarialistbox.getItemId(state, focusedItem.key) : undefined,
427
+ onTouchEnd: onTouchEnd,
428
+ // This disable's iOS's autocorrect suggestions, since the combo box provides its own suggestions.
429
+ autoCorrect: 'off',
430
+ // This disable's the macOS Safari spell check auto corrections.
431
+ spellCheck: 'false'
432
+ }),
433
+ listBoxProps: $fgbV4$reactariautils.mergeProps(menuProps, listBoxProps, {
434
+ autoFocus: state.focusStrategy,
435
+ shouldUseVirtualFocus: true,
436
+ shouldSelectOnPressUp: true,
437
+ shouldFocusOnHover: true
438
+ }),
439
+ descriptionProps: descriptionProps,
440
+ errorMessageProps: errorMessageProps
441
+ };
464
442
  }
465
443
 
466
- exports.useComboBox = useComboBox;
444
+
445
+ $parcel$exportWildcard(module.exports, $1a707b51686ebf70$exports);
446
+
447
+
467
448
  //# sourceMappingURL=main.js.map