@react-aria/tag 3.0.0-beta.0 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1,71 +1,61 @@
1
- import {GridKeyboardDelegate as $aIvin$GridKeyboardDelegate, useGridRow as $aIvin$useGridRow, useGridCell as $aIvin$useGridCell} from "@react-aria/grid";
2
- import {useId as $aIvin$useId, filterDOMProps as $aIvin$filterDOMProps, mergeProps as $aIvin$mergeProps} from "@react-aria/utils";
3
- import {useLocalizedStringFormatter as $aIvin$useLocalizedStringFormatter} from "@react-aria/i18n";
1
+ import {useId as $aIvin$useId, chain as $aIvin$chain, filterDOMProps as $aIvin$filterDOMProps, mergeProps as $aIvin$mergeProps} from "@react-aria/utils";
2
+ import {useGridListItem as $aIvin$useGridListItem, useGridList as $aIvin$useGridList} from "@react-aria/gridlist";
3
+ import {useLocalizedStringFormatter as $aIvin$useLocalizedStringFormatter, useLocale as $aIvin$useLocale} from "@react-aria/i18n";
4
4
  import {useState as $aIvin$useState} from "react";
5
+ import {useField as $aIvin$useField} from "@react-aria/label";
5
6
  import {useFocusWithin as $aIvin$useFocusWithin} from "@react-aria/interactions";
6
7
 
7
8
  function $parcel$interopDefault(a) {
8
9
  return a && a.__esModule ? a.default : a;
9
10
  }
10
-
11
- class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDelegate {
11
+ /*
12
+ * Copyright 2020 Adobe. All rights reserved.
13
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License. You may obtain a copy
15
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software distributed under
18
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
+ * OF ANY KIND, either express or implied. See the License for the specific language
20
+ * governing permissions and limitations under the License.
21
+ */ /*
22
+ * Copyright 2020 Adobe. All rights reserved.
23
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
+ * you may not use this file except in compliance with the License. You may obtain a copy
25
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
+ *
27
+ * Unless required by applicable law or agreed to in writing, software distributed under
28
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
+ * OF ANY KIND, either express or implied. See the License for the specific language
30
+ * governing permissions and limitations under the License.
31
+ */ class $542448901dbd2c36$export$b00754732e683b92 {
12
32
  getFirstKey() {
13
- let key = this.collection.getFirstKey();
14
- let item = this.collection.getItem(key);
15
- return [
16
- ...item.childNodes
17
- ][0].key;
33
+ return this.collection.getFirstKey();
18
34
  }
19
35
  getLastKey() {
20
- let key = this.collection.getLastKey();
21
- let item = this.collection.getItem(key);
22
- return [
23
- ...item.childNodes
24
- ][0].key;
36
+ return this.collection.getLastKey();
25
37
  }
26
38
  getKeyRightOf(key) {
27
- return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);
39
+ return this.direction === "rtl" ? this.getKeyAbove(key) : this.getKeyBelow(key);
28
40
  }
29
41
  getKeyLeftOf(key) {
30
- return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);
42
+ return this.direction === "rtl" ? this.getKeyBelow(key) : this.getKeyAbove(key);
31
43
  }
32
44
  getKeyBelow(key) {
33
45
  let startItem = this.collection.getItem(key);
34
46
  if (!startItem) return;
35
- // If focus was on a cell, start searching from the parent row
36
- if (this.isCell(startItem)) key = startItem.parentKey;
37
47
  // Find the next item
38
- key = this.findNextKey(key);
39
- if (key != null) {
40
- // If focus was on a cell, focus the cell with the same index in the next row.
41
- if (this.isCell(startItem)) {
42
- let item = this.collection.getItem(key);
43
- return [
44
- ...item.childNodes
45
- ][startItem.index].key;
46
- }
47
- // Otherwise, focus the next row
48
- if (this.focusMode === 'row') return key;
49
- } else return this.getFirstKey();
48
+ key = this.collection.getKeyAfter(key);
49
+ if (key != null) return key;
50
+ else return this.collection.getFirstKey();
50
51
  }
51
52
  getKeyAbove(key) {
52
53
  let startItem = this.collection.getItem(key);
53
54
  if (!startItem) return;
54
- // If focus is on a cell, start searching from the parent row
55
- if (this.isCell(startItem)) key = startItem.parentKey;
56
55
  // Find the previous item
57
- key = this.findPreviousKey(key);
58
- if (key != null) {
59
- // If focus was on a cell, focus the cell with the same index in the previous row.
60
- if (this.isCell(startItem)) {
61
- let item = this.collection.getItem(key);
62
- return [
63
- ...item.childNodes
64
- ][startItem.index].key;
65
- }
66
- // Otherwise, focus the previous row
67
- if (this.focusMode === 'row') return key;
68
- } else return this.getLastKey();
56
+ key = this.collection.getKeyBefore(key);
57
+ if (key != null) return key;
58
+ else return this.collection.getLastKey();
69
59
  }
70
60
  getKeyPageAbove(key) {
71
61
  return this.getKeyAbove(key);
@@ -73,212 +63,226 @@ class $542448901dbd2c36$export$b00754732e683b92 extends $aIvin$GridKeyboardDeleg
73
63
  getKeyPageBelow(key) {
74
64
  return this.getKeyBelow(key);
75
65
  }
66
+ constructor(collection, direction){
67
+ this.collection = collection;
68
+ this.direction = direction;
69
+ }
76
70
  }
77
71
 
78
72
 
79
-
73
+ /*
74
+ * Copyright 2020 Adobe. All rights reserved.
75
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
76
+ * you may not use this file except in compliance with the License. You may obtain a copy
77
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
78
+ *
79
+ * Unless required by applicable law or agreed to in writing, software distributed under
80
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
81
+ * OF ANY KIND, either express or implied. See the License for the specific language
82
+ * governing permissions and limitations under the License.
83
+ */
80
84
  var $4d1b62e0e67c00a4$exports = {};
81
85
  var $84925f526f90eebd$exports = {};
82
86
  $84925f526f90eebd$exports = {
83
- "remove": `إزالة`
87
+ "remove": `اضغط على زر Space أو Delete لإزالة العلامة.`
84
88
  };
85
89
 
86
90
 
87
91
  var $c0650163dc1b6f9d$exports = {};
88
92
  $c0650163dc1b6f9d$exports = {
89
- "remove": `Премахване`
93
+ "remove": `Натиснете интервал или Delete, за да премахнете маркера.`
90
94
  };
91
95
 
92
96
 
93
97
  var $b2b55661291de587$exports = {};
94
98
  $b2b55661291de587$exports = {
95
- "remove": `Odebrat`
99
+ "remove": `Stisknutím mezerníku nebo klávesy Delete odeberte značku.`
96
100
  };
97
101
 
98
102
 
99
103
  var $deb83970956f6d5b$exports = {};
100
104
  $deb83970956f6d5b$exports = {
101
- "remove": `Fjern`
105
+ "remove": `Tryk på mellemrum eller Slet for at fjerne tag.`
102
106
  };
103
107
 
104
108
 
105
109
  var $aea1cb4c7ec97e1c$exports = {};
106
110
  $aea1cb4c7ec97e1c$exports = {
107
- "remove": `Entfernen`
111
+ "remove": `Drücken Sie Leertaste oder Löschen, um das Tag zu entfernen.`
108
112
  };
109
113
 
110
114
 
111
115
  var $3618d917e503a8d3$exports = {};
112
116
  $3618d917e503a8d3$exports = {
113
- "remove": `Κατάργηση`
117
+ "remove": `Πατήστε το πλήκτρο διαστήματος ή το πλήκτρο Delete για να καταργήσετε την ετικέτα.`
114
118
  };
115
119
 
116
120
 
117
121
  var $9eb56bbbe8e31294$exports = {};
118
122
  $9eb56bbbe8e31294$exports = {
119
- "remove": `Remove`
123
+ "remove": `Press Space or Delete to remove tag.`
120
124
  };
121
125
 
122
126
 
123
127
  var $361c604b0fc269a3$exports = {};
124
128
  $361c604b0fc269a3$exports = {
125
- "remove": `Quitar`
129
+ "remove": `Pulse Espacio o Eliminar para quitar la etiqueta.`
126
130
  };
127
131
 
128
132
 
129
133
  var $2f00170f4ee3ca01$exports = {};
130
134
  $2f00170f4ee3ca01$exports = {
131
- "remove": `Eemalda`
135
+ "remove": `Sildi eemaldamiseks vajutage tühikuklahvi või kustutusklahvi Delete.`
132
136
  };
133
137
 
134
138
 
135
139
  var $80ee16b64fab9fb5$exports = {};
136
140
  $80ee16b64fab9fb5$exports = {
137
- "remove": `Poista`
141
+ "remove": `Poista tunniste painamalla Välilyönti tai Poista.`
138
142
  };
139
143
 
140
144
 
141
145
  var $be9d354476c08087$exports = {};
142
146
  $be9d354476c08087$exports = {
143
- "remove": `Supprimer`
147
+ "remove": `Appuyez sur Espace ou Supprimer pour supprimer la balise.`
144
148
  };
145
149
 
146
150
 
147
151
  var $ffeb903ba092eb35$exports = {};
148
152
  $ffeb903ba092eb35$exports = {
149
- "remove": `הסר`
153
+ "remove": `הקש על רווח או מחק כדי להסיר תג.`
150
154
  };
151
155
 
152
156
 
153
157
  var $1df6722c6f19728b$exports = {};
154
158
  $1df6722c6f19728b$exports = {
155
- "remove": `Ukloni`
159
+ "remove": `Pritisnite Space ili Delete za uklanjanje oznake.`
156
160
  };
157
161
 
158
162
 
159
163
  var $093d57e325bc9071$exports = {};
160
164
  $093d57e325bc9071$exports = {
161
- "remove": `Eltávolítás`
165
+ "remove": `Nyomja meg a szóköz vagy a Delete billentyűt a címke eltávolításához.`
162
166
  };
163
167
 
164
168
 
165
169
  var $609dbdfbcad85bdb$exports = {};
166
170
  $609dbdfbcad85bdb$exports = {
167
- "remove": `Rimuovi`
171
+ "remove": `Premi la barra spaziatrice o CANC per rimuovere il tag.`
168
172
  };
169
173
 
170
174
 
171
175
  var $c08e84f882644048$exports = {};
172
176
  $c08e84f882644048$exports = {
173
- "remove": `削除`
177
+ "remove": `タグを削除するには、スペースまたは削除を押します。`
174
178
  };
175
179
 
176
180
 
177
181
  var $5cd130489822fa21$exports = {};
178
182
  $5cd130489822fa21$exports = {
179
- "remove": `제거`
183
+ "remove": `태그를 제거하려면 Space 또는 Delete 키를 누르십시오.`
180
184
  };
181
185
 
182
186
 
183
187
  var $ab5183739b6c5e7e$exports = {};
184
188
  $ab5183739b6c5e7e$exports = {
185
- "remove": `Pašalinti`
189
+ "remove": `Norėdami pašalinti žymą, paspauskite tarpo arba „Delete“ klavišą.`
186
190
  };
187
191
 
188
192
 
189
193
  var $dd84a0b574be3f23$exports = {};
190
194
  $dd84a0b574be3f23$exports = {
191
- "remove": `Noņemt`
195
+ "remove": `Nospiediet atstarpes taustiņu vai taustiņu Delete, lai noņemtu tagu.`
192
196
  };
193
197
 
194
198
 
195
199
  var $85eee97d14eef7b5$exports = {};
196
200
  $85eee97d14eef7b5$exports = {
197
- "remove": `Fjern`
201
+ "remove": `Trykk på mellomrom eller Slett for å fjerne taggen.`
198
202
  };
199
203
 
200
204
 
201
205
  var $18781839f93b0314$exports = {};
202
206
  $18781839f93b0314$exports = {
203
- "remove": `Verwijderen`
207
+ "remove": `Druk op Spatie of Verwijderen om de tag te verwijderen.`
204
208
  };
205
209
 
206
210
 
207
211
  var $1c40ffbbfe9f3bda$exports = {};
208
212
  $1c40ffbbfe9f3bda$exports = {
209
- "remove": `Usuń`
213
+ "remove": `Naciśnij Spację lub przycisk Usuń, aby usunąć znacznik.`
210
214
  };
211
215
 
212
216
 
213
217
  var $156880e329b1c717$exports = {};
214
218
  $156880e329b1c717$exports = {
215
- "remove": `Remover`
219
+ "remove": `Pressione a barra de espaço ou Delete para remover a tag.`
216
220
  };
217
221
 
218
222
 
219
223
  var $b6d50b1d20768ce4$exports = {};
220
224
  $b6d50b1d20768ce4$exports = {
221
- "remove": `Eliminar`
225
+ "remove": `Pressione Espaço ou Eliminar para remover a etiqueta.`
222
226
  };
223
227
 
224
228
 
225
229
  var $d8c38c691b006187$exports = {};
226
230
  $d8c38c691b006187$exports = {
227
- "remove": `Îndepărtaţi`
231
+ "remove": `Apăsați pe Space (Spațiu) sau pe Delete (Ștergere) pentru a elimina eticheta.`
228
232
  };
229
233
 
230
234
 
231
235
  var $ed9b4bf7ce1fb1d7$exports = {};
232
236
  $ed9b4bf7ce1fb1d7$exports = {
233
- "remove": `Удалить`
237
+ "remove": `Нажмите клавишу пробел или Delete, чтобы удалить тег.`
234
238
  };
235
239
 
236
240
 
237
241
  var $51d8721afda4d678$exports = {};
238
242
  $51d8721afda4d678$exports = {
239
- "remove": `Odstrániť`
243
+ "remove": `Ak chcete odstrániť značku, stlačte medzerník alebo kláves Delete.`
240
244
  };
241
245
 
242
246
 
243
247
  var $fd37a27baae493e8$exports = {};
244
248
  $fd37a27baae493e8$exports = {
245
- "remove": `Odstrani`
249
+ "remove": `Pritisnite presledek ali Izbriši, da odstranite oznako.`
246
250
  };
247
251
 
248
252
 
249
253
  var $5505a1ca71ffd6f4$exports = {};
250
254
  $5505a1ca71ffd6f4$exports = {
251
- "remove": `Ukloni`
255
+ "remove": `Pritisnite Space ili Delete da biste uklonili oznaku.`
252
256
  };
253
257
 
254
258
 
255
259
  var $33670e148c84ad02$exports = {};
256
260
  $33670e148c84ad02$exports = {
257
- "remove": `Ta bort`
261
+ "remove": `Tryck på blanksteg eller radera för att ta bort taggen.`
258
262
  };
259
263
 
260
264
 
261
265
  var $0bf46fdcdd7cb5f6$exports = {};
262
266
  $0bf46fdcdd7cb5f6$exports = {
263
- "remove": `Kaldır`
267
+ "remove": `Etiketi kaldırmak için Boşluk veya Sil tuşlarından birine basın.`
264
268
  };
265
269
 
266
270
 
267
271
  var $9d9765222bc08ca2$exports = {};
268
272
  $9d9765222bc08ca2$exports = {
269
- "remove": `Видалити`
273
+ "remove": `Натисніть пробіл або Delete, щоб видалити тег.`
270
274
  };
271
275
 
272
276
 
273
277
  var $d737296cedcdee9f$exports = {};
274
278
  $d737296cedcdee9f$exports = {
275
- "remove": `删除`
279
+ "remove": `按下“空格”或“删除”键删除标记。`
276
280
  };
277
281
 
278
282
 
279
283
  var $09cd168ab18773f4$exports = {};
280
284
  $09cd168ab18773f4$exports = {
281
- "remove": `移除`
285
+ "remove": `按空格鍵或 Delete 鍵以移除標記。`
282
286
  };
283
287
 
284
288
 
@@ -322,74 +326,94 @@ $4d1b62e0e67c00a4$exports = {
322
326
 
323
327
 
324
328
 
325
- function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state) {
326
- let { isFocused: isFocused } = props;
327
- const { allowsRemoving: allowsRemoving , onRemove: onRemove , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
328
- const stringFormatter = $aIvin$useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($4d1b62e0e67c00a4$exports)));
329
- const removeString = stringFormatter.format('remove');
330
- const labelId = $aIvin$useId();
331
- const buttonId = $aIvin$useId();
332
- let { rowProps: rowProps } = $aIvin$useGridRow({
329
+ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
330
+ let { isFocused: isFocused , allowsRemoving: allowsRemoving , item: item } = props;
331
+ let stringFormatter = (0, $aIvin$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($4d1b62e0e67c00a4$exports))));
332
+ let removeString = stringFormatter.format("remove");
333
+ let labelId = (0, $aIvin$useId)();
334
+ let buttonId = (0, $aIvin$useId)();
335
+ let { rowProps: rowProps , gridCellProps: gridCellProps } = (0, $aIvin$useGridListItem)({
333
336
  node: item
334
- }, state, tagRowRef);
335
- // Don't want the row to be focusable or accessible via keyboard
336
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
337
- let { tabIndex: tabIndex , ...otherRowProps } = rowProps;
338
- let { gridCellProps: gridCellProps } = $aIvin$useGridCell({
339
- node: [
340
- ...item.childNodes
341
- ][0],
342
- focusMode: 'cell'
343
- }, state, tagRef);
344
- function onKeyDown(e) {
345
- if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {
346
- onRemove(item.childNodes[0].key);
337
+ }, state, ref);
338
+ // We want the group to handle keyboard navigation between tags.
339
+ delete rowProps.onKeyDownCapture;
340
+ let onRemove = (0, $aIvin$chain)(props.onRemove, state.onRemove);
341
+ let onKeyDown = (e)=>{
342
+ if (e.key === "Delete" || e.key === "Backspace" || e.key === " ") {
343
+ onRemove(item.key);
347
344
  e.preventDefault();
348
345
  }
349
- }
350
- const pressProps = {
351
- onPress: ()=>{
352
- return onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.childNodes[0].key);
353
- }
354
346
  };
355
- isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;
356
- let domProps = $aIvin$filterDOMProps(props);
347
+ isFocused = isFocused || state.selectionManager.focusedKey === item.key;
348
+ let domProps = (0, $aIvin$filterDOMProps)(props);
357
349
  return {
358
- clearButtonProps: $aIvin$mergeProps(pressProps, {
359
- 'aria-label': removeString,
360
- 'aria-labelledby': `${buttonId} ${labelId}`,
361
- id: buttonId
362
- }),
350
+ clearButtonProps: {
351
+ "aria-label": removeString,
352
+ "aria-labelledby": `${buttonId} ${labelId}`,
353
+ id: buttonId,
354
+ onPress: ()=>allowsRemoving && onRemove ? onRemove(item.key) : null
355
+ },
363
356
  labelProps: {
364
357
  id: labelId
365
358
  },
366
- tagRowProps: otherRowProps,
367
- tagProps: $aIvin$mergeProps(domProps, gridCellProps, {
368
- 'aria-errormessage': props['aria-errormessage'],
369
- 'aria-label': props['aria-label'],
370
- onKeyDown: allowsRemoving ? onKeyDown : null,
371
- tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1
359
+ tagRowProps: {
360
+ ...rowProps,
361
+ tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
362
+ onKeyDown: allowsRemoving ? onKeyDown : null
363
+ },
364
+ tagProps: (0, $aIvin$mergeProps)(domProps, gridCellProps, {
365
+ "aria-errormessage": props["aria-errormessage"],
366
+ "aria-label": props["aria-label"]
372
367
  })
373
368
  };
374
369
  }
375
370
 
376
371
 
372
+ /*
373
+ * Copyright 2020 Adobe. All rights reserved.
374
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
375
+ * you may not use this file except in compliance with the License. You may obtain a copy
376
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
377
+ *
378
+ * Unless required by applicable law or agreed to in writing, software distributed under
379
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
380
+ * OF ANY KIND, either express or implied. See the License for the specific language
381
+ * governing permissions and limitations under the License.
382
+ */
383
+
384
+
377
385
 
378
386
 
379
387
 
380
- function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props) {
381
- let [isFocusWithin, setFocusWithin] = $aIvin$useState(false);
382
- let { focusWithinProps: focusWithinProps } = $aIvin$useFocusWithin({
388
+
389
+ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
390
+ let { direction: direction } = (0, $aIvin$useLocale)();
391
+ let keyboardDelegate = props.keyboardDelegate || new (0, $542448901dbd2c36$export$b00754732e683b92)(state.collection, direction);
392
+ let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $aIvin$useField)(props);
393
+ let { gridProps: gridProps } = (0, $aIvin$useGridList)({
394
+ ...props,
395
+ ...fieldProps,
396
+ keyboardDelegate: keyboardDelegate
397
+ }, state, ref);
398
+ // Don't want the grid to be focusable or accessible via keyboard
399
+ delete gridProps.tabIndex;
400
+ let [isFocusWithin, setFocusWithin] = (0, $aIvin$useState)(false);
401
+ let { focusWithinProps: focusWithinProps } = (0, $aIvin$useFocusWithin)({
383
402
  onFocusWithinChange: setFocusWithin
384
403
  });
385
- let domProps = $aIvin$filterDOMProps(props);
404
+ let domProps = (0, $aIvin$filterDOMProps)(props);
386
405
  return {
387
- tagGroupProps: $aIvin$mergeProps(domProps, {
388
- 'aria-atomic': false,
389
- 'aria-relevant': 'additions',
390
- 'aria-live': isFocusWithin ? 'polite' : 'off',
391
- ...focusWithinProps
392
- })
406
+ tagGroupProps: (0, $aIvin$mergeProps)(gridProps, domProps, {
407
+ role: state.collection.size ? "grid" : null,
408
+ "aria-atomic": false,
409
+ "aria-relevant": "additions",
410
+ "aria-live": isFocusWithin ? "polite" : "off",
411
+ ...focusWithinProps,
412
+ ...fieldProps
413
+ }),
414
+ labelProps: labelProps,
415
+ descriptionProps: descriptionProps,
416
+ errorMessageProps: errorMessageProps
393
417
  };
394
418
  }
395
419
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;MCgBa,yCAAmB,SAAY,2BAAoB;IAC9D,WAAW,GAAG,CAA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BAAU,CAAC,UAAU,EAAE,CAAC;YACxC,CAAY,aAAE,YAAY;YAC1B,CAAiB,qBAAK,QAAQ,CAAC,CAAC,EAAE,OAAO;YACzC,EAAE,EAAE,QAAQ;QACd,CAAC;QACD,UAAU,EAAE,CAAC;YACX,EAAE,EAAE,OAAO;QACb,CAAC;QACD,WAAW,EAAE,aAAa;QAC1B,QAAQ,EAAE,iBAAU,CAAC,QAAQ,EAAE,aAAa,EAAE,CAAC;YAC7C,CAAmB,oBAAE,KAAK,CAAC,CAAmB;YAC9C,CAAY,aAAE,KAAK,CAAC,CAAY;YAChC,SAAS,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI;YAC5C,QAAQ,EAAG,SAAS,IAAI,KAAK,CAAC,gBAAgB,CAAC,UAAU,IAAI,IAAI,GAAI,CAAC,GAAG,EAAE;QAC7E,CAAC;IACH,CAAC;AACH,CAAC;;;;;;SoC1De,yCAAW,CAAC,KAAwB,EAAgB,CAAC;IACnE,GAAG,EAAE,aAAa,EAAE,cAAc,IAAI,eAAQ,CAAC,KAAK;IACpD,GAAG,CAAC,CAAC,mBAAA,gBAAgB,EAAA,CAAC,GAAG,qBAAc,CAAC,CAAC;QACvC,mBAAmB,EAAE,cAAc;IACrC,CAAC;IACD,GAAG,CAAC,QAAQ,GAAG,qBAAc,CAAC,KAAK;IACnC,MAAM,CAAC,CAAC;QACN,aAAa,EAAE,iBAAU,CAAC,QAAQ,EAAE,CAAC;YACnC,CAAa,cAAE,KAAK;YACpB,CAAe,gBAAE,CAAW;YAC5B,CAAW,YAAE,aAAa,GAAG,CAAQ,UAAG,CAAK;eAC1C,gBAAgB;QACrB,CAAC;IACH,CAAC;AACH,CAAC;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {AriaTagGroupProps, TagGroupAria} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {GridCollection} from '@react-types/grid';\nimport {GridKeyboardDelegate} from '@react-aria/grid';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> extends GridKeyboardDelegate<T, GridCollection<T>> {\n getFirstKey() {\n let key = this.collection.getFirstKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getLastKey() {\n let key = this.collection.getLastKey();\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][0].key;\n }\n\n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus was on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the next item\n key = this.findNextKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the next row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the next row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // If focus is on a cell, start searching from the parent row\n if (this.isCell(startItem)) {\n key = startItem.parentKey;\n }\n\n // Find the previous item\n key = this.findPreviousKey(key);\n if (key != null) {\n // If focus was on a cell, focus the cell with the same index in the previous row.\n if (this.isCell(startItem)) {\n let item = this.collection.getItem(key);\n return [...item.childNodes][startItem.index].key;\n }\n\n // Otherwise, focus the previous row\n if (this.focusMode === 'row') {\n return key;\n }\n } else {\n return this.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ButtonHTMLAttributes, KeyboardEvent} from 'react';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {GridState} from '@react-stately/grid';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {TagProps} from '@react-types/tag';\nimport {useGridCell, useGridRow} from '@react-aria/grid';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n labelProps: DOMAttributes,\n tagProps: DOMAttributes,\n tagRowProps: DOMAttributes,\n clearButtonProps: ButtonHTMLAttributes<HTMLButtonElement>\n}\n\nexport function useTag(props: TagProps<any>, state: GridState<any, any>): TagAria {\n let {isFocused} = props;\n const {\n allowsRemoving,\n onRemove,\n item,\n tagRef,\n tagRowRef\n } = props;\n const stringFormatter = useLocalizedStringFormatter(intlMessages);\n const removeString = stringFormatter.format('remove');\n const labelId = useId();\n const buttonId = useId();\n\n let {rowProps} = useGridRow({\n node: item\n }, state, tagRowRef);\n // Don't want the row to be focusable or accessible via keyboard\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let {tabIndex, ...otherRowProps} = rowProps;\n\n let {gridCellProps} = useGridCell({\n node: [...item.childNodes][0],\n focusMode: 'cell'\n }, state, tagRef);\n\n function onKeyDown(e: KeyboardEvent) {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(item.childNodes[0].key);\n e.preventDefault();\n }\n }\n const pressProps = {\n onPress: () => onRemove?.(item.childNodes[0].key)\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: mergeProps(pressProps, {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId\n }),\n labelProps: {\n id: labelId\n },\n tagRowProps: otherRowProps,\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label'],\n onKeyDown: allowsRemoving ? onKeyDown : null,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"إزالة\"\n}\n","{\n \"remove\": \"Премахване\"\n}\n","{\n \"remove\": \"Odebrat\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Entfernen\"\n}\n","{\n \"remove\": \"Κατάργηση\"\n}\n","{\n \"remove\": \"Remove\"\n}\n","{\n \"remove\": \"Quitar\"\n}\n","{\n \"remove\": \"Eemalda\"\n}\n","{\n \"remove\": \"Poista\"\n}\n","{\n \"remove\": \"Supprimer\"\n}\n","{\n \"remove\": \"הסר\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Eltávolítás\"\n}\n","{\n \"remove\": \"Rimuovi\"\n}\n","{\n \"remove\": \"削除\"\n}\n","{\n \"remove\": \"제거\"\n}\n","{\n \"remove\": \"Pašalinti\"\n}\n","{\n \"remove\": \"Noņemt\"\n}\n","{\n \"remove\": \"Fjern\"\n}\n","{\n \"remove\": \"Verwijderen\"\n}\n","{\n \"remove\": \"Usuń\"\n}\n","{\n \"remove\": \"Remover\"\n}\n","{\n \"remove\": \"Eliminar\"\n}\n","{\n \"remove\": \"Îndepărtaţi\"\n}\n","{\n \"remove\": \"Удалить\"\n}\n","{\n \"remove\": \"Odstrániť\"\n}\n","{\n \"remove\": \"Odstrani\"\n}\n","{\n \"remove\": \"Ukloni\"\n}\n","{\n \"remove\": \"Ta bort\"\n}\n","{\n \"remove\": \"Kaldır\"\n}\n","{\n \"remove\": \"Видалити\"\n}\n","{\n \"remove\": \"删除\"\n}\n","{\n \"remove\": \"移除\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {DOMAttributes, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {ReactNode, useState} from 'react';\nimport {useFocusWithin} from '@react-aria/interactions';\n\nexport interface AriaTagGroupProps extends DOMProps {\n children: ReactNode,\n isReadOnly?: boolean, // removes close button\n validationState?: 'valid' | 'invalid'\n}\n\nexport interface TagGroupAria {\n tagGroupProps: DOMAttributes\n}\n\nexport function useTagGroup(props: AriaTagGroupProps): TagGroupAria {\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(domProps, {\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps\n } as DOMAttributes)\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC,GAED,AAGO,MAAM;IASX,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW;IACpC;IAEA,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU;IACnC;IAEA,cAAc,GAAQ,EAAE;QACtB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,aAAa,GAAQ,EAAE;QACrB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI;IACjF;IAEA,YAAY,GAAG,EAAE;QACf,IAAI,YAAY,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,WACH;QAGF,qBAAqB;QACrB,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;QAElC,IAAI,OAAO,IAAI,EACb,OAAO;aAEP,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW;IAEtC;IAEA,YAAY,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,eAAe,CAAA,GAAA,iBAAU,AAAD,EAAE,WAAW,UAAU;YAC7C,MAAM,MAAM,UAAU,CAAC,IAAI,GAAG,SAAS,IAAI;YAC3C,eAAe,KAAK;YACpB,iBAAiB;YACjB,aAAa,gBAAgB,WAAW,KAAK;YAC7C,GAAG,gBAAgB;YACnB,GAAG,UAAU;QACf;oBACA;0BACA;2BACA;IACF;AACF;;","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/TagKeyboardDelegate.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/intl/*.js","packages/@react-aria/tag/intl/ar-AE.json","packages/@react-aria/tag/intl/bg-BG.json","packages/@react-aria/tag/intl/cs-CZ.json","packages/@react-aria/tag/intl/da-DK.json","packages/@react-aria/tag/intl/de-DE.json","packages/@react-aria/tag/intl/el-GR.json","packages/@react-aria/tag/intl/en-US.json","packages/@react-aria/tag/intl/es-ES.json","packages/@react-aria/tag/intl/et-EE.json","packages/@react-aria/tag/intl/fi-FI.json","packages/@react-aria/tag/intl/fr-FR.json","packages/@react-aria/tag/intl/he-IL.json","packages/@react-aria/tag/intl/hr-HR.json","packages/@react-aria/tag/intl/hu-HU.json","packages/@react-aria/tag/intl/it-IT.json","packages/@react-aria/tag/intl/ja-JP.json","packages/@react-aria/tag/intl/ko-KR.json","packages/@react-aria/tag/intl/lt-LT.json","packages/@react-aria/tag/intl/lv-LV.json","packages/@react-aria/tag/intl/nb-NO.json","packages/@react-aria/tag/intl/nl-NL.json","packages/@react-aria/tag/intl/pl-PL.json","packages/@react-aria/tag/intl/pt-BR.json","packages/@react-aria/tag/intl/pt-PT.json","packages/@react-aria/tag/intl/ro-RO.json","packages/@react-aria/tag/intl/ru-RU.json","packages/@react-aria/tag/intl/sk-SK.json","packages/@react-aria/tag/intl/sl-SI.json","packages/@react-aria/tag/intl/sr-SP.json","packages/@react-aria/tag/intl/sv-SE.json","packages/@react-aria/tag/intl/tr-TR.json","packages/@react-aria/tag/intl/uk-UA.json","packages/@react-aria/tag/intl/zh-CN.json","packages/@react-aria/tag/intl/zh-TW.json","packages/@react-aria/tag/src/useTagGroup.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nexport {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagProps} from '@react-types/tag';\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {TagAria} from './useTag';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Direction, KeyboardDelegate} from '@react-types/shared';\nimport {Key} from 'react';\n\nexport class TagKeyboardDelegate<T> implements KeyboardDelegate {\n private collection: Collection<T>;\n private direction: Direction;\n\n constructor(collection: Collection<T>, direction: Direction) {\n this.collection = collection;\n this.direction = direction;\n }\n\n getFirstKey() {\n return this.collection.getFirstKey();\n }\n\n getLastKey() {\n return this.collection.getLastKey();\n }\n \n getKeyRightOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);\n }\n\n getKeyLeftOf(key: Key) {\n return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);\n }\n\n getKeyBelow(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the next item\n key = this.collection.getKeyAfter(key);\n\n if (key != null) {\n return key;\n } else {\n return this.collection.getFirstKey();\n }\n }\n\n getKeyAbove(key) {\n let startItem = this.collection.getItem(key);\n if (!startItem) {\n return;\n }\n\n // Find the previous item\n key = this.collection.getKeyBefore(key);\n if (key != null) {\n return key;\n } else {\n return this.collection.getLastKey();\n }\n }\n\n getKeyPageAbove(key) {\n return this.getKeyAbove(key);\n }\n\n getKeyPageBelow(key) {\n return this.getKeyBelow(key);\n }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from '@react-types/button';\nimport {chain, filterDOMProps, mergeProps, useId} from '@react-aria/utils';\nimport {DOMAttributes, FocusableElement} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagProps} from '@react-types/tag';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria {\n /** Props for the tag visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag cell element. */\n tagProps: DOMAttributes,\n /** Props for the tag row element. */\n tagRowProps: DOMAttributes,\n /** Props for the tag clear button. */\n clearButtonProps: AriaButtonProps\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag component.\n * @param props - Props to be applied to the tag.\n * @param state - State for the tag group, as returned by `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: TagProps<T>, state: TagGroupState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {\n isFocused,\n allowsRemoving,\n item\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let removeString = stringFormatter.format('remove');\n let labelId = useId();\n let buttonId = useId();\n\n let {rowProps, gridCellProps} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n\n let onRemove = chain(props.onRemove, state.onRemove);\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {\n onRemove(item.key);\n e.preventDefault();\n }\n };\n\n isFocused = isFocused || state.selectionManager.focusedKey === item.key;\n let domProps = filterDOMProps(props);\n return {\n clearButtonProps: {\n 'aria-label': removeString,\n 'aria-labelledby': `${buttonId} ${labelId}`,\n id: buttonId,\n onPress: () => allowsRemoving && onRemove ? onRemove(item.key) : null\n },\n labelProps: {\n id: labelId\n },\n tagRowProps: {\n ...rowProps,\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: allowsRemoving ? onKeyDown : null\n },\n tagProps: mergeProps(domProps, gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n })\n };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"remove\": \"اضغط على زر Space أو Delete لإزالة العلامة.\"\n}\n","{\n \"remove\": \"Натиснете интервал или Delete, за да премахнете маркера.\"\n}\n","{\n \"remove\": \"Stisknutím mezerníku nebo klávesy Delete odeberte značku.\"\n}\n","{\n \"remove\": \"Tryk på mellemrum eller Slet for at fjerne tag.\"\n}\n","{\n \"remove\": \"Drücken Sie Leertaste oder Löschen, um das Tag zu entfernen.\"\n}\n","{\n \"remove\": \"Πατήστε το πλήκτρο διαστήματος ή το πλήκτρο Delete για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"remove\": \"Press Space or Delete to remove tag.\"\n}\n","{\n \"remove\": \"Pulse Espacio o Eliminar para quitar la etiqueta.\"\n}\n","{\n \"remove\": \"Sildi eemaldamiseks vajutage tühikuklahvi või kustutusklahvi Delete.\"\n}\n","{\n \"remove\": \"Poista tunniste painamalla Välilyönti tai Poista.\"\n}\n","{\n \"remove\": \"Appuyez sur Espace ou Supprimer pour supprimer la balise.\"\n}\n","{\n \"remove\": \"הקש על רווח או מחק כדי להסיר תג.\"\n}\n","{\n \"remove\": \"Pritisnite Space ili Delete za uklanjanje oznake.\"\n}\n","{\n \"remove\": \"Nyomja meg a szóköz vagy a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"remove\": \"Premi la barra spaziatrice o CANC per rimuovere il tag.\"\n}\n","{\n \"remove\": \"タグを削除するには、スペースまたは削除を押します。\"\n}\n","{\n \"remove\": \"태그를 제거하려면 Space 또는 Delete 키를 누르십시오.\"\n}\n","{\n \"remove\": \"Norėdami pašalinti žymą, paspauskite tarpo arba „Delete“ klavišą.\"\n}\n","{\n \"remove\": \"Nospiediet atstarpes taustiņu vai taustiņu Delete, lai noņemtu tagu.\"\n}\n","{\n \"remove\": \"Trykk på mellomrom eller Slett for å fjerne taggen.\"\n}\n","{\n \"remove\": \"Druk op Spatie of Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"remove\": \"Naciśnij Spację lub przycisk Usuń, aby usunąć znacznik.\"\n}\n","{\n \"remove\": \"Pressione a barra de espaço ou Delete para remover a tag.\"\n}\n","{\n \"remove\": \"Pressione Espaço ou Eliminar para remover a etiqueta.\"\n}\n","{\n \"remove\": \"Apăsați pe Space (Spațiu) sau pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"remove\": \"Нажмите клавишу пробел или Delete, чтобы удалить тег.\"\n}\n","{\n \"remove\": \"Ak chcete odstrániť značku, stlačte medzerník alebo kláves Delete.\"\n}\n","{\n \"remove\": \"Pritisnite presledek ali Izbriši, da odstranite oznako.\"\n}\n","{\n \"remove\": \"Pritisnite Space ili Delete da biste uklonili oznaku.\"\n}\n","{\n \"remove\": \"Tryck på blanksteg eller radera för att ta bort taggen.\"\n}\n","{\n \"remove\": \"Etiketi kaldırmak için Boşluk veya Sil tuşlarından birine basın.\"\n}\n","{\n \"remove\": \"Натисніть пробіл або Delete, щоб видалити тег.\"\n}\n","{\n \"remove\": \"按下“空格”或“删除”键删除标记。\"\n}\n","{\n \"remove\": \"按空格鍵或 Delete 鍵以移除標記。\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMAttributes, DOMProps, Validation} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {RefObject, useState} from 'react';\nimport {TagGroupProps} from '@react-types/tag';\nimport type {TagGroupState} from '@react-stately/tag';\nimport {TagKeyboardDelegate} from './TagKeyboardDelegate';\nimport {useField} from '@react-aria/label';\nimport {useFocusWithin} from '@react-aria/interactions';\nimport {useGridList} from '@react-aria/gridlist';\nimport {useLocale} from '@react-aria/i18n';\n\nexport interface TagGroupAria {\n /** Props for the tag grouping element. */\n tagGroupProps: DOMAttributes,\n /** Props for the tag group's visible label (if any). */\n labelProps: DOMAttributes,\n /** Props for the tag group description element, if any. */\n descriptionProps: DOMAttributes,\n /** Props for the tag group error message element, if any. */\n errorMessageProps: DOMAttributes\n}\n\nexport interface AriaTagGroupProps<T> extends TagGroupProps<T>, DOMProps, AriaLabelingProps, Validation {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: TagKeyboardDelegate<T>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useTagGroupState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupProps<T>, state: TagGroupState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new TagKeyboardDelegate(state.collection, direction);\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField(props);\n let {gridProps} = useGridList({...props, ...fieldProps, keyboardDelegate}, state, ref);\n\n // Don't want the grid to be focusable or accessible via keyboard\n delete gridProps.tabIndex;\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n return {\n tagGroupProps: mergeProps(gridProps, domProps, {\n role: state.collection.size ? 'grid' : null,\n 'aria-atomic': false,\n 'aria-relevant': 'additions',\n 'aria-live': isFocusWithin ? 'polite' : 'off',\n ...focusWithinProps,\n ...fieldProps\n }),\n labelProps,\n descriptionProps,\n errorMessageProps\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}