@react-spectrum/autocomplete 3.0.0-alpha.23 → 3.0.0-alpha.24
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/import.mjs +157 -102
- package/dist/main.css +1 -1
- package/dist/main.js +154 -99
- package/dist/main.js.map +1 -1
- package/dist/module.js +157 -102
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +26 -27
- package/src/MobileSearchAutocomplete.tsx +56 -12
- package/src/SearchAutocomplete.tsx +12 -4
package/dist/main.js
CHANGED
|
@@ -13,6 +13,7 @@ var $aWXRc$react = require("react");
|
|
|
13
13
|
var $aWXRc$reactspectrumtextfield = require("@react-spectrum/textfield");
|
|
14
14
|
var $aWXRc$reactstatelycombobox = require("@react-stately/combobox");
|
|
15
15
|
var $aWXRc$reactariai18n = require("@react-aria/i18n");
|
|
16
|
+
var $aWXRc$reactspectrumform = require("@react-spectrum/form");
|
|
16
17
|
var $aWXRc$reactariainteractions = require("@react-aria/interactions");
|
|
17
18
|
var $aWXRc$reactspectrumprovider = require("@react-spectrum/provider");
|
|
18
19
|
var $aWXRc$reactariaautocomplete = require("@react-aria/autocomplete");
|
|
@@ -22,10 +23,13 @@ var $aWXRc$reactariaoverlays = require("@react-aria/overlays");
|
|
|
22
23
|
var $aWXRc$reactariabutton = require("@react-aria/button");
|
|
23
24
|
var $aWXRc$reactariadialog = require("@react-aria/dialog");
|
|
24
25
|
var $aWXRc$reactarialabel = require("@react-aria/label");
|
|
26
|
+
var $aWXRc$reactariaform = require("@react-aria/form");
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
function $parcel$export(e, n, v, s) {
|
|
27
30
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
28
31
|
}
|
|
32
|
+
|
|
29
33
|
function $parcel$interopDefault(a) {
|
|
30
34
|
return a && a.__esModule ? a.default : a;
|
|
31
35
|
}
|
|
@@ -62,28 +66,28 @@ $parcel$export(module.exports, "Section", () => $aWXRc$reactstatelycollections.S
|
|
|
62
66
|
var $e32120882142a69f$exports = {};
|
|
63
67
|
var $30f25a2842ddccb3$exports = {};
|
|
64
68
|
$30f25a2842ddccb3$exports = {
|
|
65
|
-
"clear":
|
|
66
|
-
"invalid": `(
|
|
67
|
-
"loading":
|
|
68
|
-
"noResults":
|
|
69
|
+
"clear": `\u{645}\u{633}\u{62D}`,
|
|
70
|
+
"invalid": `(\u{63A}\u{64A}\u{631} \u{635}\u{627}\u{644}\u{62D})`,
|
|
71
|
+
"loading": `\u{62C}\u{627}\u{631}\u{64D} \u{627}\u{644}\u{62A}\u{62D}\u{645}\u{64A}\u{644}...`,
|
|
72
|
+
"noResults": `\u{644}\u{627} \u{62A}\u{648}\u{62C}\u{62F} \u{646}\u{62A}\u{627}\u{626}\u{62C}`
|
|
69
73
|
};
|
|
70
74
|
|
|
71
75
|
|
|
72
76
|
var $cac3fa002dc020e4$exports = {};
|
|
73
77
|
$cac3fa002dc020e4$exports = {
|
|
74
|
-
"clear":
|
|
75
|
-
"invalid": `(
|
|
76
|
-
"loading":
|
|
77
|
-
"noResults":
|
|
78
|
+
"clear": `\u{418}\u{437}\u{447}\u{438}\u{441}\u{442}\u{438}`,
|
|
79
|
+
"invalid": `(\u{43D}\u{435}\u{432}\u{430}\u{43B}\u{438}\u{434}\u{435}\u{43D})`,
|
|
80
|
+
"loading": `\u{417}\u{430}\u{440}\u{435}\u{436}\u{434}\u{430}\u{43D}\u{435}...`,
|
|
81
|
+
"noResults": `\u{41D}\u{44F}\u{43C}\u{430} \u{440}\u{435}\u{437}\u{443}\u{43B}\u{442}\u{430}\u{442}\u{438}`
|
|
78
82
|
};
|
|
79
83
|
|
|
80
84
|
|
|
81
85
|
var $e04b5fd2abea86b9$exports = {};
|
|
82
86
|
$e04b5fd2abea86b9$exports = {
|
|
83
87
|
"clear": `Vymazat`,
|
|
84
|
-
"invalid": `(
|
|
85
|
-
"loading": `
|
|
86
|
-
"noResults":
|
|
88
|
+
"invalid": `(neplatn\xe9)`,
|
|
89
|
+
"loading": `Na\u{10D}\xedt\xe1n\xed...`,
|
|
90
|
+
"noResults": `\u{17D}\xe1dn\xe9 v\xfdsledky`
|
|
87
91
|
};
|
|
88
92
|
|
|
89
93
|
|
|
@@ -91,15 +95,15 @@ var $3d2af4ea163335d6$exports = {};
|
|
|
91
95
|
$3d2af4ea163335d6$exports = {
|
|
92
96
|
"clear": `Ryd`,
|
|
93
97
|
"invalid": `(ugyldig)`,
|
|
94
|
-
"loading": `
|
|
98
|
+
"loading": `Indl\xe6ser...`,
|
|
95
99
|
"noResults": `Ingen resultater`
|
|
96
100
|
};
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
var $ff8a3f2ebad8ae77$exports = {};
|
|
100
104
|
$ff8a3f2ebad8ae77$exports = {
|
|
101
|
-
"clear": `
|
|
102
|
-
"invalid": `(
|
|
105
|
+
"clear": `L\xf6schen`,
|
|
106
|
+
"invalid": `(ung\xfcltig)`,
|
|
103
107
|
"loading": `Wird geladen...`,
|
|
104
108
|
"noResults": `Keine Ergebnisse`
|
|
105
109
|
};
|
|
@@ -107,10 +111,10 @@ $ff8a3f2ebad8ae77$exports = {
|
|
|
107
111
|
|
|
108
112
|
var $0883dc5de0143a5f$exports = {};
|
|
109
113
|
$0883dc5de0143a5f$exports = {
|
|
110
|
-
"clear":
|
|
111
|
-
"invalid": `(
|
|
112
|
-
"loading":
|
|
113
|
-
"noResults":
|
|
114
|
+
"clear": `\u{39A}\u{3B1}\u{3B8}\u{3B1}\u{3C1}\u{3B9}\u{3C3}\u{3BC}\u{3CC}\u{3C2}`,
|
|
115
|
+
"invalid": `(\u{3B4}\u{3B5}\u{3BD} \u{3B9}\u{3C3}\u{3C7}\u{3CD}\u{3B5}\u{3B9})`,
|
|
116
|
+
"loading": `\u{3A6}\u{3CC}\u{3C1}\u{3C4}\u{3C9}\u{3C3}\u{3B7}...`,
|
|
117
|
+
"noResults": `\u{3A7}\u{3C9}\u{3C1}\u{3AF}\u{3C2} \u{3B1}\u{3C0}\u{3BF}\u{3C4}\u{3AD}\u{3BB}\u{3B5}\u{3C3}\u{3BC}\u{3B1}`
|
|
114
118
|
};
|
|
115
119
|
|
|
116
120
|
|
|
@@ -126,7 +130,7 @@ $ffb5a79a666ee5f4$exports = {
|
|
|
126
130
|
var $b1888d86831eae7b$exports = {};
|
|
127
131
|
$b1888d86831eae7b$exports = {
|
|
128
132
|
"clear": `Borrar`,
|
|
129
|
-
"invalid": `(no
|
|
133
|
+
"invalid": `(no v\xe1lido)`,
|
|
130
134
|
"loading": `Cargando...`,
|
|
131
135
|
"noResults": `Sin resultados`
|
|
132
136
|
};
|
|
@@ -144,7 +148,7 @@ $256eaae10133a7dd$exports = {
|
|
|
144
148
|
var $fffacc8467d6f45d$exports = {};
|
|
145
149
|
$fffacc8467d6f45d$exports = {
|
|
146
150
|
"clear": `Kirkas`,
|
|
147
|
-
"invalid": `(
|
|
151
|
+
"invalid": `(ep\xe4kelpo)`,
|
|
148
152
|
"loading": `Ladataan...`,
|
|
149
153
|
"noResults": `Ei tuloksia`
|
|
150
154
|
};
|
|
@@ -154,35 +158,35 @@ var $ceff60bacac3f813$exports = {};
|
|
|
154
158
|
$ceff60bacac3f813$exports = {
|
|
155
159
|
"clear": `Effacer`,
|
|
156
160
|
"invalid": `(non valide)`,
|
|
157
|
-
"loading": `Chargement en cours
|
|
158
|
-
"noResults": `Aucun
|
|
161
|
+
"loading": `Chargement en cours\u{2026}`,
|
|
162
|
+
"noResults": `Aucun r\xe9sultat`
|
|
159
163
|
};
|
|
160
164
|
|
|
161
165
|
|
|
162
166
|
var $a3efa3338ae30884$exports = {};
|
|
163
167
|
$a3efa3338ae30884$exports = {
|
|
164
|
-
"clear":
|
|
165
|
-
"invalid": `(
|
|
166
|
-
"loading":
|
|
167
|
-
"noResults":
|
|
168
|
+
"clear": `\u{5E0}\u{5E7}\u{5D4}`,
|
|
169
|
+
"invalid": `(\u{5DC}\u{5D0} \u{5D7}\u{5D5}\u{5E7}\u{5D9})`,
|
|
170
|
+
"loading": `\u{5D8}\u{5D5}\u{5E2}\u{5DF}...`,
|
|
171
|
+
"noResults": `\u{5D0}\u{5D9}\u{5DF} \u{5EA}\u{5D5}\u{5E6}\u{5D0}\u{5D5}\u{5EA}`
|
|
168
172
|
};
|
|
169
173
|
|
|
170
174
|
|
|
171
175
|
var $27c9d17e7436a9c6$exports = {};
|
|
172
176
|
$27c9d17e7436a9c6$exports = {
|
|
173
|
-
"clear": `
|
|
174
|
-
"invalid": `(
|
|
175
|
-
"loading": `
|
|
177
|
+
"clear": `Izbri\u{161}i`,
|
|
178
|
+
"invalid": `(neva\u{17E}e\u{107}e)`,
|
|
179
|
+
"loading": `U\u{10D}itavam...`,
|
|
176
180
|
"noResults": `Nema rezultata`
|
|
177
181
|
};
|
|
178
182
|
|
|
179
183
|
|
|
180
184
|
var $2e5ccf84fdce50a1$exports = {};
|
|
181
185
|
$2e5ccf84fdce50a1$exports = {
|
|
182
|
-
"clear": `
|
|
183
|
-
"invalid": `(
|
|
184
|
-
"loading": `
|
|
185
|
-
"noResults": `Nincsenek
|
|
186
|
+
"clear": `T\xf6rl\xe9s`,
|
|
187
|
+
"invalid": `(\xe9rv\xe9nytelen)`,
|
|
188
|
+
"loading": `Bet\xf6lt\xe9s folyamatban\u{2026}`,
|
|
189
|
+
"noResults": `Nincsenek tal\xe1latok`
|
|
186
190
|
};
|
|
187
191
|
|
|
188
192
|
|
|
@@ -197,43 +201,43 @@ $ec3368142e92ed69$exports = {
|
|
|
197
201
|
|
|
198
202
|
var $ec5956e20e8a9e87$exports = {};
|
|
199
203
|
$ec5956e20e8a9e87$exports = {
|
|
200
|
-
"clear":
|
|
201
|
-
"invalid": `(
|
|
202
|
-
"loading":
|
|
203
|
-
"noResults":
|
|
204
|
+
"clear": `\u{30AF}\u{30EA}\u{30A2}`,
|
|
205
|
+
"invalid": `(\u{7121}\u{52B9})`,
|
|
206
|
+
"loading": `\u{8AAD}\u{307F}\u{8FBC}\u{307F}\u{4E2D}...`,
|
|
207
|
+
"noResults": `\u{7D50}\u{679C}\u{306A}\u{3057}`
|
|
204
208
|
};
|
|
205
209
|
|
|
206
210
|
|
|
207
211
|
var $5bab18039270ed42$exports = {};
|
|
208
212
|
$5bab18039270ed42$exports = {
|
|
209
|
-
"clear":
|
|
210
|
-
"invalid": `(
|
|
211
|
-
"loading":
|
|
212
|
-
"noResults":
|
|
213
|
+
"clear": `\u{C9C0}\u{C6B0}\u{AE30}`,
|
|
214
|
+
"invalid": `(\u{C720}\u{D6A8}\u{D558}\u{C9C0} \u{C54A}\u{C74C})`,
|
|
215
|
+
"loading": `\u{B85C}\u{B4DC} \u{C911}...`,
|
|
216
|
+
"noResults": `\u{ACB0}\u{ACFC} \u{C5C6}\u{C74C}`
|
|
213
217
|
};
|
|
214
218
|
|
|
215
219
|
|
|
216
220
|
var $e1c74f3398a74c92$exports = {};
|
|
217
221
|
$e1c74f3398a74c92$exports = {
|
|
218
|
-
"clear": `
|
|
222
|
+
"clear": `I\u{161}valyti`,
|
|
219
223
|
"invalid": `(netinkama)`,
|
|
220
|
-
"loading":
|
|
221
|
-
"noResults": `
|
|
224
|
+
"loading": `\u{12E}keliama...`,
|
|
225
|
+
"noResults": `Rezultat\u{173} n\u{117}ra`
|
|
222
226
|
};
|
|
223
227
|
|
|
224
228
|
|
|
225
229
|
var $f0b13093747e2840$exports = {};
|
|
226
230
|
$f0b13093747e2840$exports = {
|
|
227
|
-
"clear": `
|
|
228
|
-
"invalid": `(
|
|
229
|
-
"loading": `Notiek
|
|
230
|
-
"noResults": `Nav
|
|
231
|
+
"clear": `Not\u{12B}r\u{12B}t`,
|
|
232
|
+
"invalid": `(neder\u{12B}gs)`,
|
|
233
|
+
"loading": `Notiek iel\u{101}de...`,
|
|
234
|
+
"noResults": `Nav rezult\u{101}tu`
|
|
231
235
|
};
|
|
232
236
|
|
|
233
237
|
|
|
234
238
|
var $53eed8628e04e423$exports = {};
|
|
235
239
|
$53eed8628e04e423$exports = {
|
|
236
|
-
"clear": `
|
|
240
|
+
"clear": `T\xf8m`,
|
|
237
241
|
"invalid": `(ugyldig)`,
|
|
238
242
|
"loading": `Laster inn...`,
|
|
239
243
|
"noResults": `Ingen resultater`
|
|
@@ -251,17 +255,17 @@ $c53a14e3c7e194ff$exports = {
|
|
|
251
255
|
|
|
252
256
|
var $31dd4c4cfef7991f$exports = {};
|
|
253
257
|
$31dd4c4cfef7991f$exports = {
|
|
254
|
-
"clear": `Wyczy
|
|
255
|
-
"invalid": `(
|
|
258
|
+
"clear": `Wyczy\u{15B}\u{107}`,
|
|
259
|
+
"invalid": `(nieprawid\u{142}owy)`,
|
|
256
260
|
"loading": `Wczytywanie...`,
|
|
257
|
-
"noResults": `Brak
|
|
261
|
+
"noResults": `Brak wynik\xf3w`
|
|
258
262
|
};
|
|
259
263
|
|
|
260
264
|
|
|
261
265
|
var $ee5f8cd44d30767f$exports = {};
|
|
262
266
|
$ee5f8cd44d30767f$exports = {
|
|
263
267
|
"clear": `Limpar`,
|
|
264
|
-
"invalid": `(
|
|
268
|
+
"invalid": `(inv\xe1lido)`,
|
|
265
269
|
"loading": `Carregando...`,
|
|
266
270
|
"noResults": `Nenhum resultado`
|
|
267
271
|
};
|
|
@@ -270,7 +274,7 @@ $ee5f8cd44d30767f$exports = {
|
|
|
270
274
|
var $e1e81ac532f43ec3$exports = {};
|
|
271
275
|
$e1e81ac532f43ec3$exports = {
|
|
272
276
|
"clear": `Limpar`,
|
|
273
|
-
"invalid": `(
|
|
277
|
+
"invalid": `(inv\xe1lido)`,
|
|
274
278
|
"loading": `A carregar...`,
|
|
275
279
|
"noResults": `Sem resultados`
|
|
276
280
|
};
|
|
@@ -280,32 +284,32 @@ var $84833449245ceb5d$exports = {};
|
|
|
280
284
|
$84833449245ceb5d$exports = {
|
|
281
285
|
"clear": `Golire`,
|
|
282
286
|
"invalid": `(nevalid)`,
|
|
283
|
-
"loading": `Se
|
|
287
|
+
"loading": `Se \xeencarc\u{103}...`,
|
|
284
288
|
"noResults": `Niciun rezultat`
|
|
285
289
|
};
|
|
286
290
|
|
|
287
291
|
|
|
288
292
|
var $e61aebc75bb4053d$exports = {};
|
|
289
293
|
$e61aebc75bb4053d$exports = {
|
|
290
|
-
"clear":
|
|
291
|
-
"invalid": `(
|
|
292
|
-
"loading":
|
|
293
|
-
"noResults":
|
|
294
|
+
"clear": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{44C}`,
|
|
295
|
+
"invalid": `(\u{43D}\u{435}\u{434}\u{435}\u{439}\u{441}\u{442}\u{432}\u{438}\u{442}\u{435}\u{43B}\u{44C}\u{43D}\u{43E})`,
|
|
296
|
+
"loading": `\u{417}\u{430}\u{433}\u{440}\u{443}\u{437}\u{43A}\u{430}...`,
|
|
297
|
+
"noResults": `\u{420}\u{435}\u{437}\u{443}\u{43B}\u{44C}\u{442}\u{430}\u{442}\u{44B} \u{43E}\u{442}\u{441}\u{443}\u{442}\u{441}\u{442}\u{432}\u{443}\u{44E}\u{442}`
|
|
294
298
|
};
|
|
295
299
|
|
|
296
300
|
|
|
297
301
|
var $9fb3fa59d7a387b5$exports = {};
|
|
298
302
|
$9fb3fa59d7a387b5$exports = {
|
|
299
|
-
"clear": `Vymaza
|
|
300
|
-
"invalid": `(
|
|
301
|
-
"loading": `
|
|
302
|
-
"noResults":
|
|
303
|
+
"clear": `Vymaza\u{165}`,
|
|
304
|
+
"invalid": `(neplatn\xe9)`,
|
|
305
|
+
"loading": `Na\u{10D}\xedtava sa...`,
|
|
306
|
+
"noResults": `\u{17D}iadne v\xfdsledky`
|
|
303
307
|
};
|
|
304
308
|
|
|
305
309
|
|
|
306
310
|
var $b1f7c524b12894ba$exports = {};
|
|
307
311
|
$b1f7c524b12894ba$exports = {
|
|
308
|
-
"clear": `
|
|
312
|
+
"clear": `Pobri\u{161}ite`,
|
|
309
313
|
"invalid": `(neveljavno)`,
|
|
310
314
|
"loading": `Nalaganje...`,
|
|
311
315
|
"noResults": `Ni rezultatov`
|
|
@@ -314,9 +318,9 @@ $b1f7c524b12894ba$exports = {
|
|
|
314
318
|
|
|
315
319
|
var $351ddac352253927$exports = {};
|
|
316
320
|
$351ddac352253927$exports = {
|
|
317
|
-
"clear": `
|
|
318
|
-
"invalid": `(
|
|
319
|
-
"loading": `
|
|
321
|
+
"clear": `Izbri\u{161}i`,
|
|
322
|
+
"invalid": `(neva\u{17E}e\u{107}e)`,
|
|
323
|
+
"loading": `U\u{10D}itavam...`,
|
|
320
324
|
"noResults": `Nema rezultata`
|
|
321
325
|
};
|
|
322
326
|
|
|
@@ -325,7 +329,7 @@ var $0b2327cdf441a2f3$exports = {};
|
|
|
325
329
|
$0b2327cdf441a2f3$exports = {
|
|
326
330
|
"clear": `Rensa`,
|
|
327
331
|
"invalid": `(ogiltigt)`,
|
|
328
|
-
"loading": `
|
|
332
|
+
"loading": `L\xe4ser in...`,
|
|
329
333
|
"noResults": `Inga resultat`
|
|
330
334
|
};
|
|
331
335
|
|
|
@@ -333,36 +337,36 @@ $0b2327cdf441a2f3$exports = {
|
|
|
333
337
|
var $e76d948ffa14db88$exports = {};
|
|
334
338
|
$e76d948ffa14db88$exports = {
|
|
335
339
|
"clear": `Temizle`,
|
|
336
|
-
"invalid": `(
|
|
337
|
-
"loading": `
|
|
338
|
-
"noResults": `
|
|
340
|
+
"invalid": `(ge\xe7ersiz)`,
|
|
341
|
+
"loading": `Y\xfckleniyor...`,
|
|
342
|
+
"noResults": `Sonu\xe7 yok`
|
|
339
343
|
};
|
|
340
344
|
|
|
341
345
|
|
|
342
346
|
var $24da432165d9ae1d$exports = {};
|
|
343
347
|
$24da432165d9ae1d$exports = {
|
|
344
|
-
"clear":
|
|
345
|
-
"invalid": `(
|
|
346
|
-
"loading":
|
|
347
|
-
"noResults":
|
|
348
|
+
"clear": `\u{41E}\u{447}\u{438}\u{441}\u{442}\u{438}\u{442}\u{438}`,
|
|
349
|
+
"invalid": `(\u{43D}\u{435}\u{434}\u{456}\u{439}\u{441}\u{43D}\u{435})`,
|
|
350
|
+
"loading": `\u{417}\u{430}\u{432}\u{430}\u{43D}\u{442}\u{430}\u{436}\u{435}\u{43D}\u{43D}\u{44F}...`,
|
|
351
|
+
"noResults": `\u{420}\u{435}\u{437}\u{443}\u{43B}\u{44C}\u{442}\u{430}\u{442}\u{456}\u{432} \u{43D}\u{435}\u{43C}\u{430}\u{454}`
|
|
348
352
|
};
|
|
349
353
|
|
|
350
354
|
|
|
351
355
|
var $ff524249124594a8$exports = {};
|
|
352
356
|
$ff524249124594a8$exports = {
|
|
353
|
-
"clear":
|
|
354
|
-
"invalid":
|
|
355
|
-
"loading":
|
|
356
|
-
"noResults":
|
|
357
|
+
"clear": `\u{6E05}\u{9664}`,
|
|
358
|
+
"invalid": `\u{FF08}\u{65E0}\u{6548}\u{FF09}`,
|
|
359
|
+
"loading": `\u{6B63}\u{5728}\u{52A0}\u{8F7D}...`,
|
|
360
|
+
"noResults": `\u{65E0}\u{7ED3}\u{679C}`
|
|
357
361
|
};
|
|
358
362
|
|
|
359
363
|
|
|
360
364
|
var $dc179c328f3f5ad3$exports = {};
|
|
361
365
|
$dc179c328f3f5ad3$exports = {
|
|
362
|
-
"clear":
|
|
363
|
-
"invalid": `(
|
|
364
|
-
"loading":
|
|
365
|
-
"noResults":
|
|
366
|
+
"clear": `\u{6E05}\u{9664}`,
|
|
367
|
+
"invalid": `(\u{7121}\u{6548})`,
|
|
368
|
+
"loading": `\u{6B63}\u{5728}\u{8F09}\u{5165}...`,
|
|
369
|
+
"noResults": `\u{7121}\u{4EFB}\u{4F55}\u{7D50}\u{679C}`
|
|
366
370
|
};
|
|
367
371
|
|
|
368
372
|
|
|
@@ -674,9 +678,10 @@ $40cb3a00c193680f$export$9fcb3d6af94a9d12 = `YO3Nla_spectrum-Textfield-wrapper--
|
|
|
674
678
|
|
|
675
679
|
|
|
676
680
|
|
|
681
|
+
|
|
677
682
|
function $a9f98e219df0b64d$var$_MobileSearchAutocomplete(props, ref) {
|
|
678
683
|
props = (0, $aWXRc$reactspectrumprovider.useProviderProps)(props);
|
|
679
|
-
let { isQuiet: isQuiet, isDisabled: isDisabled,
|
|
684
|
+
let { isQuiet: isQuiet, isDisabled: isDisabled, isRequired: isRequired, validationBehavior: validationBehavior, validate: validate, name: name, isReadOnly: isReadOnly, onSubmit: onSubmit = ()=>{} } = props;
|
|
680
685
|
let { contains: contains } = (0, $aWXRc$reactariai18n.useFilter)({
|
|
681
686
|
sensitivity: "base"
|
|
682
687
|
});
|
|
@@ -691,16 +696,33 @@ function $a9f98e219df0b64d$var$_MobileSearchAutocomplete(props, ref) {
|
|
|
691
696
|
allowsCustomValue: true,
|
|
692
697
|
onSelectionChange: (key)=>key !== null && onSubmit(null, key),
|
|
693
698
|
selectedKey: undefined,
|
|
694
|
-
defaultSelectedKey: undefined
|
|
699
|
+
defaultSelectedKey: undefined,
|
|
700
|
+
validate: (0, $aWXRc$react.useCallback)((v)=>validate === null || validate === void 0 ? void 0 : validate(v.inputValue), [
|
|
701
|
+
validate
|
|
702
|
+
])
|
|
695
703
|
});
|
|
696
704
|
let buttonRef = (0, $aWXRc$react.useRef)(null);
|
|
697
705
|
let domRef = (0, $aWXRc$reactspectrumutils.useFocusableRef)(ref, buttonRef);
|
|
698
706
|
let { triggerProps: triggerProps, overlayProps: overlayProps } = (0, $aWXRc$reactariaoverlays.useOverlayTrigger)({
|
|
699
707
|
type: "listbox"
|
|
700
708
|
}, state, buttonRef);
|
|
701
|
-
let
|
|
709
|
+
let inputRef = (0, $aWXRc$react.useRef)(null);
|
|
710
|
+
(0, $aWXRc$reactariaform.useFormValidation)({
|
|
702
711
|
...props,
|
|
703
|
-
|
|
712
|
+
focus: ()=>{
|
|
713
|
+
var _buttonRef_current;
|
|
714
|
+
return (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.focus();
|
|
715
|
+
}
|
|
716
|
+
}, state, inputRef);
|
|
717
|
+
let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;
|
|
718
|
+
let validationState = props.validationState || (isInvalid ? "invalid" : undefined);
|
|
719
|
+
var _props_errorMessage;
|
|
720
|
+
let errorMessage = (_props_errorMessage = props.errorMessage) !== null && _props_errorMessage !== void 0 ? _props_errorMessage : validationErrors.join(" ");
|
|
721
|
+
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $aWXRc$reactarialabel.useField)({
|
|
722
|
+
...props,
|
|
723
|
+
labelElementType: "span",
|
|
724
|
+
isInvalid: isInvalid,
|
|
725
|
+
errorMessage: errorMessage
|
|
704
726
|
});
|
|
705
727
|
// Focus the button and show focus ring when clicking on the label
|
|
706
728
|
labelProps.onClick = ()=>{
|
|
@@ -709,9 +731,29 @@ function $a9f98e219df0b64d$var$_MobileSearchAutocomplete(props, ref) {
|
|
|
709
731
|
(0, $aWXRc$reactariainteractions.setInteractionModality)("keyboard");
|
|
710
732
|
}
|
|
711
733
|
};
|
|
734
|
+
let inputProps = {
|
|
735
|
+
type: "hidden",
|
|
736
|
+
name: name,
|
|
737
|
+
value: state.inputValue
|
|
738
|
+
};
|
|
739
|
+
if (validationBehavior === "native") {
|
|
740
|
+
// Use a hidden <input type="text"> rather than <input type="hidden">
|
|
741
|
+
// so that an empty value blocks HTML form submission when the field is required.
|
|
742
|
+
inputProps.type = "text";
|
|
743
|
+
inputProps.hidden = true;
|
|
744
|
+
inputProps.required = isRequired;
|
|
745
|
+
// Ignore react warning.
|
|
746
|
+
inputProps.onChange = ()=>{};
|
|
747
|
+
}
|
|
748
|
+
(0, $aWXRc$reactariautils.useFormReset)(inputRef, state.inputValue, state.setInputValue);
|
|
712
749
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement((0, ($parcel$interopDefault($aWXRc$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement((0, $aWXRc$reactspectrumlabel.Field), {
|
|
713
750
|
...props,
|
|
714
751
|
labelProps: labelProps,
|
|
752
|
+
descriptionProps: descriptionProps,
|
|
753
|
+
errorMessageProps: errorMessageProps,
|
|
754
|
+
isInvalid: isInvalid,
|
|
755
|
+
validationErrors: validationErrors,
|
|
756
|
+
validationDetails: validationDetails,
|
|
715
757
|
elementType: "span",
|
|
716
758
|
ref: domRef,
|
|
717
759
|
includeNecessityIndicatorInAccessibilityName: true
|
|
@@ -729,7 +771,10 @@ function $a9f98e219df0b64d$var$_MobileSearchAutocomplete(props, ref) {
|
|
|
729
771
|
inputValue: state.inputValue,
|
|
730
772
|
clearInput: ()=>state.setInputValue(""),
|
|
731
773
|
onPress: ()=>!isReadOnly && state.open(null, "manual")
|
|
732
|
-
}, state.inputValue || props.placeholder || "")), /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement(
|
|
774
|
+
}, state.inputValue || props.placeholder || "")), /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement("input", {
|
|
775
|
+
...inputProps,
|
|
776
|
+
ref: inputRef
|
|
777
|
+
}), /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement((0, $aWXRc$reactspectrumoverlays.Tray), {
|
|
733
778
|
state: state,
|
|
734
779
|
isFixedHeight: true,
|
|
735
780
|
...overlayProps
|
|
@@ -846,19 +891,20 @@ function $a9f98e219df0b64d$var$SearchAutocompleteTray(props) {
|
|
|
846
891
|
keyboardDelegate: layout,
|
|
847
892
|
popoverRef: popoverRef,
|
|
848
893
|
listBoxRef: listBoxRef,
|
|
849
|
-
inputRef: inputRef
|
|
894
|
+
inputRef: inputRef,
|
|
895
|
+
// Handled outside the tray.
|
|
896
|
+
name: undefined
|
|
850
897
|
}, state);
|
|
851
898
|
(0, ($parcel$interopDefault($aWXRc$react))).useEffect(()=>{
|
|
852
899
|
if (inputRef.current) (0, $aWXRc$reactariafocus.focusSafely)(inputRef.current);
|
|
853
|
-
|
|
900
|
+
}, []);
|
|
901
|
+
(0, ($parcel$interopDefault($aWXRc$react))).useEffect(()=>{
|
|
902
|
+
// When the tray closes, set state.isFocused (i.e. the tray input's focus tracker) to false.
|
|
854
903
|
// This is to prevent state.isFocused from being set to true when the tray closes via tapping on the underlay
|
|
855
904
|
// (FocusScope attempts to restore focus to the tray input when tapping outside the tray due to "contain")
|
|
856
905
|
// Have to do this manually since React doesn't call onBlur when a component is unmounted: https://github.com/facebook/react/issues/12363
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
};
|
|
860
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
861
|
-
}, []);
|
|
906
|
+
if (!state.isOpen && state.isFocused) state.setFocused(false);
|
|
907
|
+
});
|
|
862
908
|
let { dialogProps: dialogProps } = (0, $aWXRc$reactariadialog.useDialog)({
|
|
863
909
|
"aria-labelledby": (0, $aWXRc$reactariautils.useId)(labelProps.id)
|
|
864
910
|
}, popoverRef);
|
|
@@ -1013,8 +1059,10 @@ function $a9f98e219df0b64d$var$SearchAutocompleteTray(props) {
|
|
|
1013
1059
|
|
|
1014
1060
|
|
|
1015
1061
|
|
|
1062
|
+
|
|
1016
1063
|
function $dcf500d58a031ca6$var$SearchAutocomplete(props, ref) {
|
|
1017
1064
|
props = (0, $aWXRc$reactspectrumprovider.useProviderProps)(props);
|
|
1065
|
+
props = (0, $aWXRc$reactspectrumform.useFormProps)(props);
|
|
1018
1066
|
if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead.");
|
|
1019
1067
|
let isMobile = (0, $aWXRc$reactspectrumutils.useIsMobileDevice)();
|
|
1020
1068
|
if (isMobile) // menuTrigger=focus/manual don't apply to mobile searchwithin
|
|
@@ -1030,7 +1078,7 @@ function $dcf500d58a031ca6$var$SearchAutocomplete(props, ref) {
|
|
|
1030
1078
|
}
|
|
1031
1079
|
function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
|
|
1032
1080
|
props = (0, $aWXRc$reactspectrumprovider.useProviderProps)(props);
|
|
1033
|
-
let { menuTrigger: menuTrigger = "input", shouldFlip: shouldFlip = true, direction: direction = "bottom", isQuiet: isQuiet, loadingState: loadingState, onLoadMore: onLoadMore, onSubmit: onSubmit = ()=>{} } = props;
|
|
1081
|
+
let { menuTrigger: menuTrigger = "input", shouldFlip: shouldFlip = true, direction: direction = "bottom", isQuiet: isQuiet, loadingState: loadingState, onLoadMore: onLoadMore, onSubmit: onSubmit = ()=>{}, validate: validate } = props;
|
|
1034
1082
|
let stringFormatter = (0, $aWXRc$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($e32120882142a69f$exports))));
|
|
1035
1083
|
let isAsync = loadingState != null;
|
|
1036
1084
|
let popoverRef = (0, $aWXRc$react.useRef)(null);
|
|
@@ -1048,10 +1096,13 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
|
|
|
1048
1096
|
allowsCustomValue: true,
|
|
1049
1097
|
onSelectionChange: (key)=>key !== null && onSubmit(null, key),
|
|
1050
1098
|
selectedKey: undefined,
|
|
1051
|
-
defaultSelectedKey: undefined
|
|
1099
|
+
defaultSelectedKey: undefined,
|
|
1100
|
+
validate: (0, $aWXRc$react.useCallback)((v)=>validate === null || validate === void 0 ? void 0 : validate(v.inputValue), [
|
|
1101
|
+
validate
|
|
1102
|
+
])
|
|
1052
1103
|
});
|
|
1053
1104
|
let layout = (0, $aWXRc$reactspectrumlistbox.useListBoxLayout)(state, loadingState === "loadingMore");
|
|
1054
|
-
let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $aWXRc$reactariaautocomplete.useSearchAutocomplete)({
|
|
1105
|
+
let { inputProps: inputProps, listBoxProps: listBoxProps, labelProps: labelProps, clearButtonProps: clearButtonProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $aWXRc$reactariaautocomplete.useSearchAutocomplete)({
|
|
1055
1106
|
...props,
|
|
1056
1107
|
keyboardDelegate: layout,
|
|
1057
1108
|
popoverRef: unwrappedPopoverRef,
|
|
@@ -1088,6 +1139,9 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
|
|
|
1088
1139
|
descriptionProps: descriptionProps,
|
|
1089
1140
|
errorMessageProps: errorMessageProps,
|
|
1090
1141
|
labelProps: labelProps,
|
|
1142
|
+
isInvalid: isInvalid,
|
|
1143
|
+
validationErrors: validationErrors,
|
|
1144
|
+
validationDetails: validationDetails,
|
|
1091
1145
|
ref: domRef
|
|
1092
1146
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement($dcf500d58a031ca6$var$SearchAutocompleteInput, {
|
|
1093
1147
|
...props,
|
|
@@ -1095,7 +1149,8 @@ function $dcf500d58a031ca6$var$_SearchAutocompleteBase(props, ref) {
|
|
|
1095
1149
|
loadingState: loadingState,
|
|
1096
1150
|
inputProps: inputProps,
|
|
1097
1151
|
inputRef: inputRef,
|
|
1098
|
-
clearButtonProps: clearButtonProps
|
|
1152
|
+
clearButtonProps: clearButtonProps,
|
|
1153
|
+
validationState: props.validationState || (isInvalid ? "invalid" : undefined)
|
|
1099
1154
|
})), /*#__PURE__*/ (0, ($parcel$interopDefault($aWXRc$react))).createElement((0, $aWXRc$reactspectrumoverlays.Popover), {
|
|
1100
1155
|
state: state,
|
|
1101
1156
|
UNSAFE_style: style,
|