@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/main.js CHANGED
@@ -1,7 +1,8 @@
1
- var $bSzeT$reactariagrid = require("@react-aria/grid");
2
1
  var $bSzeT$reactariautils = require("@react-aria/utils");
2
+ var $bSzeT$reactariagridlist = require("@react-aria/gridlist");
3
3
  var $bSzeT$reactariai18n = require("@react-aria/i18n");
4
4
  var $bSzeT$react = require("react");
5
+ var $bSzeT$reactarialabel = require("@react-aria/label");
5
6
  var $bSzeT$reactariainteractions = require("@react-aria/interactions");
6
7
 
7
8
  function $parcel$export(e, n, v, s) {
@@ -14,65 +15,54 @@ function $parcel$interopDefault(a) {
14
15
  $parcel$export(module.exports, "TagKeyboardDelegate", () => $d3d7c73f2e3f4edb$export$b00754732e683b92);
15
16
  $parcel$export(module.exports, "useTag", () => $a442534c81d8ad16$export$3f568fff7dff2f03);
16
17
  $parcel$export(module.exports, "useTagGroup", () => $09704b0efefe5140$export$4f8b5cda58b7e8ff);
17
-
18
- class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.GridKeyboardDelegate {
18
+ /*
19
+ * Copyright 2020 Adobe. All rights reserved.
20
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
21
+ * you may not use this file except in compliance with the License. You may obtain a copy
22
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
23
+ *
24
+ * Unless required by applicable law or agreed to in writing, software distributed under
25
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
26
+ * OF ANY KIND, either express or implied. See the License for the specific language
27
+ * governing permissions and limitations under the License.
28
+ */ /*
29
+ * Copyright 2020 Adobe. All rights reserved.
30
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
31
+ * you may not use this file except in compliance with the License. You may obtain a copy
32
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
33
+ *
34
+ * Unless required by applicable law or agreed to in writing, software distributed under
35
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
36
+ * OF ANY KIND, either express or implied. See the License for the specific language
37
+ * governing permissions and limitations under the License.
38
+ */ class $d3d7c73f2e3f4edb$export$b00754732e683b92 {
19
39
  getFirstKey() {
20
- let key = this.collection.getFirstKey();
21
- let item = this.collection.getItem(key);
22
- return [
23
- ...item.childNodes
24
- ][0].key;
40
+ return this.collection.getFirstKey();
25
41
  }
26
42
  getLastKey() {
27
- let key = this.collection.getLastKey();
28
- let item = this.collection.getItem(key);
29
- return [
30
- ...item.childNodes
31
- ][0].key;
43
+ return this.collection.getLastKey();
32
44
  }
33
45
  getKeyRightOf(key) {
34
- return this.direction === 'rtl' ? this.getKeyAbove(key) : this.getKeyBelow(key);
46
+ return this.direction === "rtl" ? this.getKeyAbove(key) : this.getKeyBelow(key);
35
47
  }
36
48
  getKeyLeftOf(key) {
37
- return this.direction === 'rtl' ? this.getKeyBelow(key) : this.getKeyAbove(key);
49
+ return this.direction === "rtl" ? this.getKeyBelow(key) : this.getKeyAbove(key);
38
50
  }
39
51
  getKeyBelow(key) {
40
52
  let startItem = this.collection.getItem(key);
41
53
  if (!startItem) return;
42
- // If focus was on a cell, start searching from the parent row
43
- if (this.isCell(startItem)) key = startItem.parentKey;
44
54
  // Find the next item
45
- key = this.findNextKey(key);
46
- if (key != null) {
47
- // If focus was on a cell, focus the cell with the same index in the next row.
48
- if (this.isCell(startItem)) {
49
- let item = this.collection.getItem(key);
50
- return [
51
- ...item.childNodes
52
- ][startItem.index].key;
53
- }
54
- // Otherwise, focus the next row
55
- if (this.focusMode === 'row') return key;
56
- } else return this.getFirstKey();
55
+ key = this.collection.getKeyAfter(key);
56
+ if (key != null) return key;
57
+ else return this.collection.getFirstKey();
57
58
  }
58
59
  getKeyAbove(key) {
59
60
  let startItem = this.collection.getItem(key);
60
61
  if (!startItem) return;
61
- // If focus is on a cell, start searching from the parent row
62
- if (this.isCell(startItem)) key = startItem.parentKey;
63
62
  // Find the previous item
64
- key = this.findPreviousKey(key);
65
- if (key != null) {
66
- // If focus was on a cell, focus the cell with the same index in the previous row.
67
- if (this.isCell(startItem)) {
68
- let item = this.collection.getItem(key);
69
- return [
70
- ...item.childNodes
71
- ][startItem.index].key;
72
- }
73
- // Otherwise, focus the previous row
74
- if (this.focusMode === 'row') return key;
75
- } else return this.getLastKey();
63
+ key = this.collection.getKeyBefore(key);
64
+ if (key != null) return key;
65
+ else return this.collection.getLastKey();
76
66
  }
77
67
  getKeyPageAbove(key) {
78
68
  return this.getKeyAbove(key);
@@ -80,212 +70,226 @@ class $d3d7c73f2e3f4edb$export$b00754732e683b92 extends $bSzeT$reactariagrid.Gri
80
70
  getKeyPageBelow(key) {
81
71
  return this.getKeyBelow(key);
82
72
  }
73
+ constructor(collection, direction){
74
+ this.collection = collection;
75
+ this.direction = direction;
76
+ }
83
77
  }
84
78
 
85
79
 
86
-
80
+ /*
81
+ * Copyright 2020 Adobe. All rights reserved.
82
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
83
+ * you may not use this file except in compliance with the License. You may obtain a copy
84
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
85
+ *
86
+ * Unless required by applicable law or agreed to in writing, software distributed under
87
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
88
+ * OF ANY KIND, either express or implied. See the License for the specific language
89
+ * governing permissions and limitations under the License.
90
+ */
87
91
  var $29abb9209b62cd49$exports = {};
88
92
  var $6a4ddf1abe55d42a$exports = {};
89
93
  $6a4ddf1abe55d42a$exports = {
90
- "remove": `إزالة`
94
+ "remove": `اضغط على زر Space أو Delete لإزالة العلامة.`
91
95
  };
92
96
 
93
97
 
94
98
  var $1bdc82b10375b4a8$exports = {};
95
99
  $1bdc82b10375b4a8$exports = {
96
- "remove": `Премахване`
100
+ "remove": `Натиснете интервал или Delete, за да премахнете маркера.`
97
101
  };
98
102
 
99
103
 
100
104
  var $e3fdf009dfe14bbc$exports = {};
101
105
  $e3fdf009dfe14bbc$exports = {
102
- "remove": `Odebrat`
106
+ "remove": `Stisknutím mezerníku nebo klávesy Delete odeberte značku.`
103
107
  };
104
108
 
105
109
 
106
110
  var $8e3a8efadaa261b3$exports = {};
107
111
  $8e3a8efadaa261b3$exports = {
108
- "remove": `Fjern`
112
+ "remove": `Tryk på mellemrum eller Slet for at fjerne tag.`
109
113
  };
110
114
 
111
115
 
112
116
  var $405462110cf9cc8d$exports = {};
113
117
  $405462110cf9cc8d$exports = {
114
- "remove": `Entfernen`
118
+ "remove": `Drücken Sie Leertaste oder Löschen, um das Tag zu entfernen.`
115
119
  };
116
120
 
117
121
 
118
122
  var $9ec4c01646bfc149$exports = {};
119
123
  $9ec4c01646bfc149$exports = {
120
- "remove": `Κατάργηση`
124
+ "remove": `Πατήστε το πλήκτρο διαστήματος ή το πλήκτρο Delete για να καταργήσετε την ετικέτα.`
121
125
  };
122
126
 
123
127
 
124
128
  var $0b797b6d677cd5c7$exports = {};
125
129
  $0b797b6d677cd5c7$exports = {
126
- "remove": `Remove`
130
+ "remove": `Press Space or Delete to remove tag.`
127
131
  };
128
132
 
129
133
 
130
134
  var $bacdb4955d86e000$exports = {};
131
135
  $bacdb4955d86e000$exports = {
132
- "remove": `Quitar`
136
+ "remove": `Pulse Espacio o Eliminar para quitar la etiqueta.`
133
137
  };
134
138
 
135
139
 
136
140
  var $28e6b3e2003cb89e$exports = {};
137
141
  $28e6b3e2003cb89e$exports = {
138
- "remove": `Eemalda`
142
+ "remove": `Sildi eemaldamiseks vajutage tühikuklahvi või kustutusklahvi Delete.`
139
143
  };
140
144
 
141
145
 
142
146
  var $080ec9a9a4197fc3$exports = {};
143
147
  $080ec9a9a4197fc3$exports = {
144
- "remove": `Poista`
148
+ "remove": `Poista tunniste painamalla Välilyönti tai Poista.`
145
149
  };
146
150
 
147
151
 
148
152
  var $d186548cad5da12b$exports = {};
149
153
  $d186548cad5da12b$exports = {
150
- "remove": `Supprimer`
154
+ "remove": `Appuyez sur Espace ou Supprimer pour supprimer la balise.`
151
155
  };
152
156
 
153
157
 
154
158
  var $58694cb16d86dce9$exports = {};
155
159
  $58694cb16d86dce9$exports = {
156
- "remove": `הסר`
160
+ "remove": `הקש על רווח או מחק כדי להסיר תג.`
157
161
  };
158
162
 
159
163
 
160
164
  var $3622620b71bc3eed$exports = {};
161
165
  $3622620b71bc3eed$exports = {
162
- "remove": `Ukloni`
166
+ "remove": `Pritisnite Space ili Delete za uklanjanje oznake.`
163
167
  };
164
168
 
165
169
 
166
170
  var $25f88eb7a72b76e1$exports = {};
167
171
  $25f88eb7a72b76e1$exports = {
168
- "remove": `Eltávolítás`
172
+ "remove": `Nyomja meg a szóköz vagy a Delete billentyűt a címke eltávolításához.`
169
173
  };
170
174
 
171
175
 
172
176
  var $ac7f4b0e2cb68452$exports = {};
173
177
  $ac7f4b0e2cb68452$exports = {
174
- "remove": `Rimuovi`
178
+ "remove": `Premi la barra spaziatrice o CANC per rimuovere il tag.`
175
179
  };
176
180
 
177
181
 
178
182
  var $eb1a168dda0e2196$exports = {};
179
183
  $eb1a168dda0e2196$exports = {
180
- "remove": `削除`
184
+ "remove": `タグを削除するには、スペースまたは削除を押します。`
181
185
  };
182
186
 
183
187
 
184
188
  var $eee5df414cc6e698$exports = {};
185
189
  $eee5df414cc6e698$exports = {
186
- "remove": `제거`
190
+ "remove": `태그를 제거하려면 Space 또는 Delete 키를 누르십시오.`
187
191
  };
188
192
 
189
193
 
190
194
  var $89b3b12fbd9b247d$exports = {};
191
195
  $89b3b12fbd9b247d$exports = {
192
- "remove": `Pašalinti`
196
+ "remove": `Norėdami pašalinti žymą, paspauskite tarpo arba „Delete“ klavišą.`
193
197
  };
194
198
 
195
199
 
196
200
  var $1919b5d1d79b472a$exports = {};
197
201
  $1919b5d1d79b472a$exports = {
198
- "remove": `Noņemt`
202
+ "remove": `Nospiediet atstarpes taustiņu vai taustiņu Delete, lai noņemtu tagu.`
199
203
  };
200
204
 
201
205
 
202
206
  var $19c1a9b6c040fcbd$exports = {};
203
207
  $19c1a9b6c040fcbd$exports = {
204
- "remove": `Fjern`
208
+ "remove": `Trykk på mellomrom eller Slett for å fjerne taggen.`
205
209
  };
206
210
 
207
211
 
208
212
  var $be2ec555d5f5fd09$exports = {};
209
213
  $be2ec555d5f5fd09$exports = {
210
- "remove": `Verwijderen`
214
+ "remove": `Druk op Spatie of Verwijderen om de tag te verwijderen.`
211
215
  };
212
216
 
213
217
 
214
218
  var $949a33b7200b0e13$exports = {};
215
219
  $949a33b7200b0e13$exports = {
216
- "remove": `Usuń`
220
+ "remove": `Naciśnij Spację lub przycisk Usuń, aby usunąć znacznik.`
217
221
  };
218
222
 
219
223
 
220
224
  var $ae5f6174df72ed0e$exports = {};
221
225
  $ae5f6174df72ed0e$exports = {
222
- "remove": `Remover`
226
+ "remove": `Pressione a barra de espaço ou Delete para remover a tag.`
223
227
  };
224
228
 
225
229
 
226
230
  var $f93b2eb3a2267af4$exports = {};
227
231
  $f93b2eb3a2267af4$exports = {
228
- "remove": `Eliminar`
232
+ "remove": `Pressione Espaço ou Eliminar para remover a etiqueta.`
229
233
  };
230
234
 
231
235
 
232
236
  var $0986e262b15bfc91$exports = {};
233
237
  $0986e262b15bfc91$exports = {
234
- "remove": `Îndepărtaţi`
238
+ "remove": `Apăsați pe Space (Spațiu) sau pe Delete (Ștergere) pentru a elimina eticheta.`
235
239
  };
236
240
 
237
241
 
238
242
  var $1fc455c3f981c785$exports = {};
239
243
  $1fc455c3f981c785$exports = {
240
- "remove": `Удалить`
244
+ "remove": `Нажмите клавишу пробел или Delete, чтобы удалить тег.`
241
245
  };
242
246
 
243
247
 
244
248
  var $93e0f346215d9446$exports = {};
245
249
  $93e0f346215d9446$exports = {
246
- "remove": `Odstrániť`
250
+ "remove": `Ak chcete odstrániť značku, stlačte medzerník alebo kláves Delete.`
247
251
  };
248
252
 
249
253
 
250
254
  var $fef8a51090f12761$exports = {};
251
255
  $fef8a51090f12761$exports = {
252
- "remove": `Odstrani`
256
+ "remove": `Pritisnite presledek ali Izbriši, da odstranite oznako.`
253
257
  };
254
258
 
255
259
 
256
260
  var $04502b7a450fc878$exports = {};
257
261
  $04502b7a450fc878$exports = {
258
- "remove": `Ukloni`
262
+ "remove": `Pritisnite Space ili Delete da biste uklonili oznaku.`
259
263
  };
260
264
 
261
265
 
262
266
  var $95460d4e4c3e3778$exports = {};
263
267
  $95460d4e4c3e3778$exports = {
264
- "remove": `Ta bort`
268
+ "remove": `Tryck på blanksteg eller radera för att ta bort taggen.`
265
269
  };
266
270
 
267
271
 
268
272
  var $818e5758c72a695c$exports = {};
269
273
  $818e5758c72a695c$exports = {
270
- "remove": `Kaldır`
274
+ "remove": `Etiketi kaldırmak için Boşluk veya Sil tuşlarından birine basın.`
271
275
  };
272
276
 
273
277
 
274
278
  var $5c17d07165fb1742$exports = {};
275
279
  $5c17d07165fb1742$exports = {
276
- "remove": `Видалити`
280
+ "remove": `Натисніть пробіл або Delete, щоб видалити тег.`
277
281
  };
278
282
 
279
283
 
280
284
  var $c6666cc31aa025e0$exports = {};
281
285
  $c6666cc31aa025e0$exports = {
282
- "remove": `删除`
286
+ "remove": `按下“空格”或“删除”键删除标记。`
283
287
  };
284
288
 
285
289
 
286
290
  var $a34b8398aee73e0f$exports = {};
287
291
  $a34b8398aee73e0f$exports = {
288
- "remove": `移除`
292
+ "remove": `按空格鍵或 Delete 鍵以移除標記。`
289
293
  };
290
294
 
291
295
 
@@ -329,74 +333,94 @@ $29abb9209b62cd49$exports = {
329
333
 
330
334
 
331
335
 
332
- function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state) {
333
- let { isFocused: isFocused } = props;
334
- const { allowsRemoving: allowsRemoving , onRemove: onRemove , item: item , tagRef: tagRef , tagRowRef: tagRowRef } = props;
335
- const stringFormatter = $bSzeT$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($29abb9209b62cd49$exports)));
336
- const removeString = stringFormatter.format('remove');
337
- const labelId = $bSzeT$reactariautils.useId();
338
- const buttonId = $bSzeT$reactariautils.useId();
339
- let { rowProps: rowProps } = $bSzeT$reactariagrid.useGridRow({
336
+ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
337
+ let { isFocused: isFocused , allowsRemoving: allowsRemoving , item: item } = props;
338
+ let stringFormatter = (0, $bSzeT$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($29abb9209b62cd49$exports))));
339
+ let removeString = stringFormatter.format("remove");
340
+ let labelId = (0, $bSzeT$reactariautils.useId)();
341
+ let buttonId = (0, $bSzeT$reactariautils.useId)();
342
+ let { rowProps: rowProps , gridCellProps: gridCellProps } = (0, $bSzeT$reactariagridlist.useGridListItem)({
340
343
  node: item
341
- }, state, tagRowRef);
342
- // Don't want the row to be focusable or accessible via keyboard
343
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
344
- let { tabIndex: tabIndex , ...otherRowProps } = rowProps;
345
- let { gridCellProps: gridCellProps } = $bSzeT$reactariagrid.useGridCell({
346
- node: [
347
- ...item.childNodes
348
- ][0],
349
- focusMode: 'cell'
350
- }, state, tagRef);
351
- function onKeyDown(e) {
352
- if (e.key === 'Delete' || e.key === 'Backspace' || e.key === ' ') {
353
- onRemove(item.childNodes[0].key);
344
+ }, state, ref);
345
+ // We want the group to handle keyboard navigation between tags.
346
+ delete rowProps.onKeyDownCapture;
347
+ let onRemove = (0, $bSzeT$reactariautils.chain)(props.onRemove, state.onRemove);
348
+ let onKeyDown = (e)=>{
349
+ if (e.key === "Delete" || e.key === "Backspace" || e.key === " ") {
350
+ onRemove(item.key);
354
351
  e.preventDefault();
355
352
  }
356
- }
357
- const pressProps = {
358
- onPress: ()=>{
359
- return onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.childNodes[0].key);
360
- }
361
353
  };
362
- isFocused = isFocused || state.selectionManager.focusedKey === item.childNodes[0].key;
363
- let domProps = $bSzeT$reactariautils.filterDOMProps(props);
354
+ isFocused = isFocused || state.selectionManager.focusedKey === item.key;
355
+ let domProps = (0, $bSzeT$reactariautils.filterDOMProps)(props);
364
356
  return {
365
- clearButtonProps: $bSzeT$reactariautils.mergeProps(pressProps, {
366
- 'aria-label': removeString,
367
- 'aria-labelledby': `${buttonId} ${labelId}`,
368
- id: buttonId
369
- }),
357
+ clearButtonProps: {
358
+ "aria-label": removeString,
359
+ "aria-labelledby": `${buttonId} ${labelId}`,
360
+ id: buttonId,
361
+ onPress: ()=>allowsRemoving && onRemove ? onRemove(item.key) : null
362
+ },
370
363
  labelProps: {
371
364
  id: labelId
372
365
  },
373
- tagRowProps: otherRowProps,
374
- tagProps: $bSzeT$reactariautils.mergeProps(domProps, gridCellProps, {
375
- 'aria-errormessage': props['aria-errormessage'],
376
- 'aria-label': props['aria-label'],
377
- onKeyDown: allowsRemoving ? onKeyDown : null,
378
- tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1
366
+ tagRowProps: {
367
+ ...rowProps,
368
+ tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
369
+ onKeyDown: allowsRemoving ? onKeyDown : null
370
+ },
371
+ tagProps: (0, $bSzeT$reactariautils.mergeProps)(domProps, gridCellProps, {
372
+ "aria-errormessage": props["aria-errormessage"],
373
+ "aria-label": props["aria-label"]
379
374
  })
380
375
  };
381
376
  }
382
377
 
383
378
 
379
+ /*
380
+ * Copyright 2020 Adobe. All rights reserved.
381
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
382
+ * you may not use this file except in compliance with the License. You may obtain a copy
383
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
384
+ *
385
+ * Unless required by applicable law or agreed to in writing, software distributed under
386
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
387
+ * OF ANY KIND, either express or implied. See the License for the specific language
388
+ * governing permissions and limitations under the License.
389
+ */
390
+
391
+
384
392
 
385
393
 
386
394
 
387
- function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props) {
388
- let [isFocusWithin, setFocusWithin] = $bSzeT$react.useState(false);
389
- let { focusWithinProps: focusWithinProps } = $bSzeT$reactariainteractions.useFocusWithin({
395
+
396
+ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
397
+ let { direction: direction } = (0, $bSzeT$reactariai18n.useLocale)();
398
+ let keyboardDelegate = props.keyboardDelegate || new (0, $d3d7c73f2e3f4edb$export$b00754732e683b92)(state.collection, direction);
399
+ let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $bSzeT$reactarialabel.useField)(props);
400
+ let { gridProps: gridProps } = (0, $bSzeT$reactariagridlist.useGridList)({
401
+ ...props,
402
+ ...fieldProps,
403
+ keyboardDelegate: keyboardDelegate
404
+ }, state, ref);
405
+ // Don't want the grid to be focusable or accessible via keyboard
406
+ delete gridProps.tabIndex;
407
+ let [isFocusWithin, setFocusWithin] = (0, $bSzeT$react.useState)(false);
408
+ let { focusWithinProps: focusWithinProps } = (0, $bSzeT$reactariainteractions.useFocusWithin)({
390
409
  onFocusWithinChange: setFocusWithin
391
410
  });
392
- let domProps = $bSzeT$reactariautils.filterDOMProps(props);
411
+ let domProps = (0, $bSzeT$reactariautils.filterDOMProps)(props);
393
412
  return {
394
- tagGroupProps: $bSzeT$reactariautils.mergeProps(domProps, {
395
- 'aria-atomic': false,
396
- 'aria-relevant': 'additions',
397
- 'aria-live': isFocusWithin ? 'polite' : 'off',
398
- ...focusWithinProps
399
- })
413
+ tagGroupProps: (0, $bSzeT$reactariautils.mergeProps)(gridProps, domProps, {
414
+ role: state.collection.size ? "grid" : null,
415
+ "aria-atomic": false,
416
+ "aria-relevant": "additions",
417
+ "aria-live": isFocusWithin ? "polite" : "off",
418
+ ...focusWithinProps,
419
+ ...fieldProps
420
+ }),
421
+ labelProps: labelProps,
422
+ descriptionProps: descriptionProps,
423
+ errorMessageProps: errorMessagePro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/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":"main.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;QA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EAAE,KAAK;IACpD,IAAI,oBAAC,iBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAc,AAAD,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAC9B,OAAO;QACL,eAAe,CAAA,GAAA,gCAAU,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":"main.js.map"}