@react-aria/tag 3.0.0-beta.1 → 3.0.0-beta.3

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