@react-aria/tag 3.2.1 → 3.3.1

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.
Files changed (180) hide show
  1. package/dist/ar-AE.main.js +7 -0
  2. package/dist/ar-AE.main.js.map +1 -0
  3. package/dist/ar-AE.mjs +9 -0
  4. package/dist/ar-AE.module.js +9 -0
  5. package/dist/ar-AE.module.js.map +1 -0
  6. package/dist/bg-BG.main.js +7 -0
  7. package/dist/bg-BG.main.js.map +1 -0
  8. package/dist/bg-BG.mjs +9 -0
  9. package/dist/bg-BG.module.js +9 -0
  10. package/dist/bg-BG.module.js.map +1 -0
  11. package/dist/cs-CZ.main.js +7 -0
  12. package/dist/cs-CZ.main.js.map +1 -0
  13. package/dist/cs-CZ.mjs +9 -0
  14. package/dist/cs-CZ.module.js +9 -0
  15. package/dist/cs-CZ.module.js.map +1 -0
  16. package/dist/da-DK.main.js +7 -0
  17. package/dist/da-DK.main.js.map +1 -0
  18. package/dist/da-DK.mjs +9 -0
  19. package/dist/da-DK.module.js +9 -0
  20. package/dist/da-DK.module.js.map +1 -0
  21. package/dist/de-DE.main.js +7 -0
  22. package/dist/de-DE.main.js.map +1 -0
  23. package/dist/de-DE.mjs +9 -0
  24. package/dist/de-DE.module.js +9 -0
  25. package/dist/de-DE.module.js.map +1 -0
  26. package/dist/el-GR.main.js +7 -0
  27. package/dist/el-GR.main.js.map +1 -0
  28. package/dist/el-GR.mjs +9 -0
  29. package/dist/el-GR.module.js +9 -0
  30. package/dist/el-GR.module.js.map +1 -0
  31. package/dist/en-US.main.js +7 -0
  32. package/dist/en-US.main.js.map +1 -0
  33. package/dist/en-US.mjs +9 -0
  34. package/dist/en-US.module.js +9 -0
  35. package/dist/en-US.module.js.map +1 -0
  36. package/dist/es-ES.main.js +7 -0
  37. package/dist/es-ES.main.js.map +1 -0
  38. package/dist/es-ES.mjs +9 -0
  39. package/dist/es-ES.module.js +9 -0
  40. package/dist/es-ES.module.js.map +1 -0
  41. package/dist/et-EE.main.js +7 -0
  42. package/dist/et-EE.main.js.map +1 -0
  43. package/dist/et-EE.mjs +9 -0
  44. package/dist/et-EE.module.js +9 -0
  45. package/dist/et-EE.module.js.map +1 -0
  46. package/dist/fi-FI.main.js +7 -0
  47. package/dist/fi-FI.main.js.map +1 -0
  48. package/dist/fi-FI.mjs +9 -0
  49. package/dist/fi-FI.module.js +9 -0
  50. package/dist/fi-FI.module.js.map +1 -0
  51. package/dist/fr-FR.main.js +7 -0
  52. package/dist/fr-FR.main.js.map +1 -0
  53. package/dist/fr-FR.mjs +9 -0
  54. package/dist/fr-FR.module.js +9 -0
  55. package/dist/fr-FR.module.js.map +1 -0
  56. package/dist/he-IL.main.js +7 -0
  57. package/dist/he-IL.main.js.map +1 -0
  58. package/dist/he-IL.mjs +9 -0
  59. package/dist/he-IL.module.js +9 -0
  60. package/dist/he-IL.module.js.map +1 -0
  61. package/dist/hr-HR.main.js +7 -0
  62. package/dist/hr-HR.main.js.map +1 -0
  63. package/dist/hr-HR.mjs +9 -0
  64. package/dist/hr-HR.module.js +9 -0
  65. package/dist/hr-HR.module.js.map +1 -0
  66. package/dist/hu-HU.main.js +7 -0
  67. package/dist/hu-HU.main.js.map +1 -0
  68. package/dist/hu-HU.mjs +9 -0
  69. package/dist/hu-HU.module.js +9 -0
  70. package/dist/hu-HU.module.js.map +1 -0
  71. package/dist/import.mjs +37 -206
  72. package/dist/it-IT.main.js +7 -0
  73. package/dist/it-IT.main.js.map +1 -0
  74. package/dist/it-IT.mjs +9 -0
  75. package/dist/it-IT.module.js +9 -0
  76. package/dist/it-IT.module.js.map +1 -0
  77. package/dist/ja-JP.main.js +7 -0
  78. package/dist/ja-JP.main.js.map +1 -0
  79. package/dist/ja-JP.mjs +9 -0
  80. package/dist/ja-JP.module.js +9 -0
  81. package/dist/ja-JP.module.js.map +1 -0
  82. package/dist/ko-KR.main.js +7 -0
  83. package/dist/ko-KR.main.js.map +1 -0
  84. package/dist/ko-KR.mjs +9 -0
  85. package/dist/ko-KR.module.js +9 -0
  86. package/dist/ko-KR.module.js.map +1 -0
  87. package/dist/lt-LT.main.js +7 -0
  88. package/dist/lt-LT.main.js.map +1 -0
  89. package/dist/lt-LT.mjs +9 -0
  90. package/dist/lt-LT.module.js +9 -0
  91. package/dist/lt-LT.module.js.map +1 -0
  92. package/dist/lv-LV.main.js +7 -0
  93. package/dist/lv-LV.main.js.map +1 -0
  94. package/dist/lv-LV.mjs +9 -0
  95. package/dist/lv-LV.module.js +9 -0
  96. package/dist/lv-LV.module.js.map +1 -0
  97. package/dist/main.js +38 -206
  98. package/dist/main.js.map +1 -1
  99. package/dist/module.js +37 -206
  100. package/dist/module.js.map +1 -1
  101. package/dist/nb-NO.main.js +7 -0
  102. package/dist/nb-NO.main.js.map +1 -0
  103. package/dist/nb-NO.mjs +9 -0
  104. package/dist/nb-NO.module.js +9 -0
  105. package/dist/nb-NO.module.js.map +1 -0
  106. package/dist/nl-NL.main.js +7 -0
  107. package/dist/nl-NL.main.js.map +1 -0
  108. package/dist/nl-NL.mjs +9 -0
  109. package/dist/nl-NL.module.js +9 -0
  110. package/dist/nl-NL.module.js.map +1 -0
  111. package/dist/pl-PL.main.js +7 -0
  112. package/dist/pl-PL.main.js.map +1 -0
  113. package/dist/pl-PL.mjs +9 -0
  114. package/dist/pl-PL.module.js +9 -0
  115. package/dist/pl-PL.module.js.map +1 -0
  116. package/dist/pt-BR.main.js +7 -0
  117. package/dist/pt-BR.main.js.map +1 -0
  118. package/dist/pt-BR.mjs +9 -0
  119. package/dist/pt-BR.module.js +9 -0
  120. package/dist/pt-BR.module.js.map +1 -0
  121. package/dist/pt-PT.main.js +7 -0
  122. package/dist/pt-PT.main.js.map +1 -0
  123. package/dist/pt-PT.mjs +9 -0
  124. package/dist/pt-PT.module.js +9 -0
  125. package/dist/pt-PT.module.js.map +1 -0
  126. package/dist/ro-RO.main.js +7 -0
  127. package/dist/ro-RO.main.js.map +1 -0
  128. package/dist/ro-RO.mjs +9 -0
  129. package/dist/ro-RO.module.js +9 -0
  130. package/dist/ro-RO.module.js.map +1 -0
  131. package/dist/ru-RU.main.js +7 -0
  132. package/dist/ru-RU.main.js.map +1 -0
  133. package/dist/ru-RU.mjs +9 -0
  134. package/dist/ru-RU.module.js +9 -0
  135. package/dist/ru-RU.module.js.map +1 -0
  136. package/dist/sk-SK.main.js +7 -0
  137. package/dist/sk-SK.main.js.map +1 -0
  138. package/dist/sk-SK.mjs +9 -0
  139. package/dist/sk-SK.module.js +9 -0
  140. package/dist/sk-SK.module.js.map +1 -0
  141. package/dist/sl-SI.main.js +7 -0
  142. package/dist/sl-SI.main.js.map +1 -0
  143. package/dist/sl-SI.mjs +9 -0
  144. package/dist/sl-SI.module.js +9 -0
  145. package/dist/sl-SI.module.js.map +1 -0
  146. package/dist/sr-SP.main.js +7 -0
  147. package/dist/sr-SP.main.js.map +1 -0
  148. package/dist/sr-SP.mjs +9 -0
  149. package/dist/sr-SP.module.js +9 -0
  150. package/dist/sr-SP.module.js.map +1 -0
  151. package/dist/sv-SE.main.js +7 -0
  152. package/dist/sv-SE.main.js.map +1 -0
  153. package/dist/sv-SE.mjs +9 -0
  154. package/dist/sv-SE.module.js +9 -0
  155. package/dist/sv-SE.module.js.map +1 -0
  156. package/dist/tr-TR.main.js +7 -0
  157. package/dist/tr-TR.main.js.map +1 -0
  158. package/dist/tr-TR.mjs +9 -0
  159. package/dist/tr-TR.module.js +9 -0
  160. package/dist/tr-TR.module.js.map +1 -0
  161. package/dist/types.d.ts +5 -3
  162. package/dist/types.d.ts.map +1 -1
  163. package/dist/uk-UA.main.js +7 -0
  164. package/dist/uk-UA.main.js.map +1 -0
  165. package/dist/uk-UA.mjs +9 -0
  166. package/dist/uk-UA.module.js +9 -0
  167. package/dist/uk-UA.module.js.map +1 -0
  168. package/dist/zh-CN.main.js +7 -0
  169. package/dist/zh-CN.main.js.map +1 -0
  170. package/dist/zh-CN.mjs +9 -0
  171. package/dist/zh-CN.module.js +9 -0
  172. package/dist/zh-CN.module.js.map +1 -0
  173. package/dist/zh-TW.main.js +7 -0
  174. package/dist/zh-TW.main.js.map +1 -0
  175. package/dist/zh-TW.mjs +9 -0
  176. package/dist/zh-TW.module.js +9 -0
  177. package/dist/zh-TW.module.js.map +1 -0
  178. package/package.json +11 -11
  179. package/src/useTag.ts +1 -1
  180. package/src/useTagGroup.ts +6 -4
package/dist/main.js CHANGED
@@ -1,14 +1,50 @@
1
+ var $6a4ddf1abe55d42a$exports = require("./ar-AE.main.js");
2
+ var $1bdc82b10375b4a8$exports = require("./bg-BG.main.js");
3
+ var $e3fdf009dfe14bbc$exports = require("./cs-CZ.main.js");
4
+ var $8e3a8efadaa261b3$exports = require("./da-DK.main.js");
5
+ var $405462110cf9cc8d$exports = require("./de-DE.main.js");
6
+ var $9ec4c01646bfc149$exports = require("./el-GR.main.js");
7
+ var $0b797b6d677cd5c7$exports = require("./en-US.main.js");
8
+ var $bacdb4955d86e000$exports = require("./es-ES.main.js");
9
+ var $28e6b3e2003cb89e$exports = require("./et-EE.main.js");
10
+ var $080ec9a9a4197fc3$exports = require("./fi-FI.main.js");
11
+ var $d186548cad5da12b$exports = require("./fr-FR.main.js");
12
+ var $58694cb16d86dce9$exports = require("./he-IL.main.js");
13
+ var $3622620b71bc3eed$exports = require("./hr-HR.main.js");
14
+ var $25f88eb7a72b76e1$exports = require("./hu-HU.main.js");
15
+ var $ac7f4b0e2cb68452$exports = require("./it-IT.main.js");
16
+ var $eb1a168dda0e2196$exports = require("./ja-JP.main.js");
17
+ var $eee5df414cc6e698$exports = require("./ko-KR.main.js");
18
+ var $89b3b12fbd9b247d$exports = require("./lt-LT.main.js");
19
+ var $1919b5d1d79b472a$exports = require("./lv-LV.main.js");
20
+ var $19c1a9b6c040fcbd$exports = require("./nb-NO.main.js");
21
+ var $be2ec555d5f5fd09$exports = require("./nl-NL.main.js");
22
+ var $949a33b7200b0e13$exports = require("./pl-PL.main.js");
23
+ var $ae5f6174df72ed0e$exports = require("./pt-BR.main.js");
24
+ var $f93b2eb3a2267af4$exports = require("./pt-PT.main.js");
25
+ var $0986e262b15bfc91$exports = require("./ro-RO.main.js");
26
+ var $1fc455c3f981c785$exports = require("./ru-RU.main.js");
27
+ var $93e0f346215d9446$exports = require("./sk-SK.main.js");
28
+ var $fef8a51090f12761$exports = require("./sl-SI.main.js");
29
+ var $04502b7a450fc878$exports = require("./sr-SP.main.js");
30
+ var $95460d4e4c3e3778$exports = require("./sv-SE.main.js");
31
+ var $818e5758c72a695c$exports = require("./tr-TR.main.js");
32
+ var $5c17d07165fb1742$exports = require("./uk-UA.main.js");
33
+ var $c6666cc31aa025e0$exports = require("./zh-CN.main.js");
34
+ var $a34b8398aee73e0f$exports = require("./zh-TW.main.js");
1
35
  var $bSzeT$reactariautils = require("@react-aria/utils");
2
36
  var $bSzeT$reactariagridlist = require("@react-aria/gridlist");
3
37
  var $bSzeT$reactariainteractions = require("@react-aria/interactions");
4
38
  var $bSzeT$reactariai18n = require("@react-aria/i18n");
5
- var $bSzeT$react = require("react");
6
39
  var $bSzeT$reactariaselection = require("@react-aria/selection");
40
+ var $bSzeT$react = require("react");
7
41
  var $bSzeT$reactarialabel = require("@react-aria/label");
8
42
 
43
+
9
44
  function $parcel$export(e, n, v, s) {
10
45
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
11
46
  }
47
+
12
48
  function $parcel$interopDefault(a) {
13
49
  return a && a.__esModule ? a.default : a;
14
50
  }
@@ -109,242 +145,38 @@ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
109
145
 
110
146
 
111
147
  var $b6a2538ff098a9ff$exports = {};
112
- var $6a4ddf1abe55d42a$exports = {};
113
- $6a4ddf1abe55d42a$exports = {
114
- "removeButtonLabel": `إزالة`,
115
- "removeDescription": `اضغط على مفتاح DELETE لإزالة علامة.`
116
- };
117
-
118
-
119
- var $1bdc82b10375b4a8$exports = {};
120
- $1bdc82b10375b4a8$exports = {
121
- "removeButtonLabel": `Премахване`,
122
- "removeDescription": `Натиснете Delete, за да премахнете маркера.`
123
- };
124
-
125
-
126
- var $e3fdf009dfe14bbc$exports = {};
127
- $e3fdf009dfe14bbc$exports = {
128
- "removeButtonLabel": `Odebrat`,
129
- "removeDescription": `Stisknutím klávesy Delete odeberete značku.`
130
- };
131
-
132
-
133
- var $8e3a8efadaa261b3$exports = {};
134
- $8e3a8efadaa261b3$exports = {
135
- "removeButtonLabel": `Fjern`,
136
- "removeDescription": `Tryk på Slet for at fjerne tag.`
137
- };
138
-
139
-
140
- var $405462110cf9cc8d$exports = {};
141
- $405462110cf9cc8d$exports = {
142
- "removeButtonLabel": `Entfernen`,
143
- "removeDescription": `Auf „Löschen“ drücken, um das Tag zu entfernen.`
144
- };
145
-
146
-
147
- var $9ec4c01646bfc149$exports = {};
148
- $9ec4c01646bfc149$exports = {
149
- "removeButtonLabel": `Κατάργηση`,
150
- "removeDescription": `Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.`
151
- };
152
-
153
-
154
- var $0b797b6d677cd5c7$exports = {};
155
- $0b797b6d677cd5c7$exports = {
156
- "removeDescription": `Press Delete to remove tag.`,
157
- "removeButtonLabel": `Remove`
158
- };
159
-
160
-
161
- var $bacdb4955d86e000$exports = {};
162
- $bacdb4955d86e000$exports = {
163
- "removeButtonLabel": `Quitar`,
164
- "removeDescription": `Pulse Eliminar para quitar la etiqueta.`
165
- };
166
-
167
-
168
- var $28e6b3e2003cb89e$exports = {};
169
- $28e6b3e2003cb89e$exports = {
170
- "removeButtonLabel": `Eemalda`,
171
- "removeDescription": `Sildi eemaldamiseks vajutage kustutusklahvi Delete.`
172
- };
173
-
174
-
175
- var $080ec9a9a4197fc3$exports = {};
176
- $080ec9a9a4197fc3$exports = {
177
- "removeButtonLabel": `Poista`,
178
- "removeDescription": `Poista tunniste painamalla Poista-painiketta.`
179
- };
180
-
181
-
182
- var $d186548cad5da12b$exports = {};
183
- $d186548cad5da12b$exports = {
184
- "removeButtonLabel": `Supprimer`,
185
- "removeDescription": `Appuyez sur Supprimer pour supprimer l’étiquette.`
186
- };
187
-
188
148
 
189
- var $58694cb16d86dce9$exports = {};
190
- $58694cb16d86dce9$exports = {
191
- "removeButtonLabel": `הסר`,
192
- "removeDescription": `לחץ על מחק כדי להסיר תג.`
193
- };
194
-
195
-
196
- var $3622620b71bc3eed$exports = {};
197
- $3622620b71bc3eed$exports = {
198
- "removeButtonLabel": `Ukloni`,
199
- "removeDescription": `Pritisnite Delete za uklanjanje oznake.`
200
- };
201
-
202
-
203
- var $25f88eb7a72b76e1$exports = {};
204
- $25f88eb7a72b76e1$exports = {
205
- "removeButtonLabel": `Eltávolítás`,
206
- "removeDescription": `Nyomja meg a Delete billentyűt a címke eltávolításához.`
207
- };
208
-
209
-
210
- var $ac7f4b0e2cb68452$exports = {};
211
- $ac7f4b0e2cb68452$exports = {
212
- "removeButtonLabel": `Rimuovi`,
213
- "removeDescription": `Premi Elimina per rimuovere il tag.`
214
- };
215
-
216
-
217
- var $eb1a168dda0e2196$exports = {};
218
- $eb1a168dda0e2196$exports = {
219
- "removeButtonLabel": `削除`,
220
- "removeDescription": `タグを削除するには、Delete キーを押します。`
221
- };
222
-
223
-
224
- var $eee5df414cc6e698$exports = {};
225
- $eee5df414cc6e698$exports = {
226
- "removeButtonLabel": `제거`,
227
- "removeDescription": `태그를 제거하려면 Delete 키를 누르십시오.`
228
- };
229
-
230
-
231
- var $89b3b12fbd9b247d$exports = {};
232
- $89b3b12fbd9b247d$exports = {
233
- "removeButtonLabel": `Pašalinti`,
234
- "removeDescription": `Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.`
235
- };
236
149
 
237
150
 
238
- var $1919b5d1d79b472a$exports = {};
239
- $1919b5d1d79b472a$exports = {
240
- "removeButtonLabel": `Noņemt`,
241
- "removeDescription": `Nospiediet Delete [Dzēst], lai noņemtu tagu.`
242
- };
243
151
 
244
152
 
245
- var $19c1a9b6c040fcbd$exports = {};
246
- $19c1a9b6c040fcbd$exports = {
247
- "removeButtonLabel": `Fjern`,
248
- "removeDescription": `Trykk på Slett for å fjerne taggen.`
249
- };
250
153
 
251
154
 
252
- var $be2ec555d5f5fd09$exports = {};
253
- $be2ec555d5f5fd09$exports = {
254
- "removeButtonLabel": `Verwijderen`,
255
- "removeDescription": `Druk op Verwijderen om de tag te verwijderen.`
256
- };
257
155
 
258
156
 
259
- var $949a33b7200b0e13$exports = {};
260
- $949a33b7200b0e13$exports = {
261
- "removeButtonLabel": `Usuń`,
262
- "removeDescription": `Naciśnij Usuń, aby usunąć znacznik.`
263
- };
264
157
 
265
158
 
266
- var $ae5f6174df72ed0e$exports = {};
267
- $ae5f6174df72ed0e$exports = {
268
- "removeButtonLabel": `Remover`,
269
- "removeDescription": `Pressione Delete para remover a tag.`
270
- };
271
-
272
159
 
273
- var $f93b2eb3a2267af4$exports = {};
274
- $f93b2eb3a2267af4$exports = {
275
- "removeButtonLabel": `Eliminar`,
276
- "removeDescription": `Prima Delete para eliminar a tag.`
277
- };
278
160
 
279
161
 
280
- var $0986e262b15bfc91$exports = {};
281
- $0986e262b15bfc91$exports = {
282
- "removeButtonLabel": `Îndepărtaţi`,
283
- "removeDescription": `Apăsați pe Delete (Ștergere) pentru a elimina eticheta.`
284
- };
285
162
 
286
163
 
287
- var $1fc455c3f981c785$exports = {};
288
- $1fc455c3f981c785$exports = {
289
- "removeButtonLabel": `Удалить`,
290
- "removeDescription": `Нажмите DELETE, чтобы удалить тег.`
291
- };
292
164
 
293
165
 
294
- var $93e0f346215d9446$exports = {};
295
- $93e0f346215d9446$exports = {
296
- "removeButtonLabel": `Odstrániť`,
297
- "removeDescription": `Ak chcete odstrániť značku, stlačte kláves Delete.`
298
- };
299
166
 
300
167
 
301
- var $fef8a51090f12761$exports = {};
302
- $fef8a51090f12761$exports = {
303
- "removeButtonLabel": `Odstrani`,
304
- "removeDescription": `Pritisnite Delete, da odstranite oznako.`
305
- };
306
168
 
307
169
 
308
- var $04502b7a450fc878$exports = {};
309
- $04502b7a450fc878$exports = {
310
- "removeButtonLabel": `Ukloni`,
311
- "removeDescription": `Pritisnite Obriši da biste uklonili oznaku.`
312
- };
313
170
 
314
171
 
315
- var $95460d4e4c3e3778$exports = {};
316
- $95460d4e4c3e3778$exports = {
317
- "removeButtonLabel": `Ta bort`,
318
- "removeDescription": `Tryck på Radera för att ta bort taggen.`
319
- };
320
172
 
321
173
 
322
- var $818e5758c72a695c$exports = {};
323
- $818e5758c72a695c$exports = {
324
- "removeButtonLabel": `Kaldır`,
325
- "removeDescription": `Etiketi kaldırmak için Sil tuşuna basın.`
326
- };
327
174
 
328
175
 
329
- var $5c17d07165fb1742$exports = {};
330
- $5c17d07165fb1742$exports = {
331
- "removeButtonLabel": `Вилучити`,
332
- "removeDescription": `Натисніть Delete, щоб вилучити тег.`
333
- };
334
176
 
335
177
 
336
- var $c6666cc31aa025e0$exports = {};
337
- $c6666cc31aa025e0$exports = {
338
- "removeButtonLabel": `删除`,
339
- "removeDescription": `按下“删除”以删除标记。`
340
- };
341
178
 
342
179
 
343
- var $a34b8398aee73e0f$exports = {};
344
- $a34b8398aee73e0f$exports = {
345
- "removeButtonLabel": `移除`,
346
- "removeDescription": `按 Delete 鍵以移除標記。`
347
- };
348
180
 
349
181
 
350
182
  $b6a2538ff098a9ff$exports = {
@@ -390,7 +222,7 @@ $b6a2538ff098a9ff$exports = {
390
222
 
391
223
  function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
392
224
  let { item: item } = props;
393
- let stringFormatter = (0, $bSzeT$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($b6a2538ff098a9ff$exports))));
225
+ let stringFormatter = (0, $bSzeT$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($b6a2538ff098a9ff$exports))), "@react-aria/tag");
394
226
  let buttonId = (0, $bSzeT$reactariautils.useId)();
395
227
  let { onRemove: onRemove } = (0, $09704b0efefe5140$export$653eddfc964b0f8a).get(state) || {};
396
228
  let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $bSzeT$reactariagridlist.useGridListItem)({
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;ACVD;;;;;;;;;;CAUC;;;;;;;AA0CM,MAAM,4CAAW,IAAI;AASrB,SAAS,0CAAe,KAA6B,EAAE,KAAmB,EAAE,GAA2B;IAC5G,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,mBAAmB,MAAM,oBAAoB,IAAI,CAAA,GAAA,8CAAmB,EAAE;QACxE,YAAY,MAAM;aAClB;QACA,aAAa;mBACb;QACA,cAAc,MAAM;IACtB;IACA,IAAI,cAAC,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,8BAAO,EAAE;QAC3E,GAAG,KAAK;QACR,kBAAkB;IACpB;IACA,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAU,EAAE;QAC5B,GAAG,KAAK;QACR,GAAG,UAAU;0BACb;QACA,iBAAiB;QACjB,cAAc;IAChB,GAAG,OAAO;IAEV,IAAI,CAAC,eAAe,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE;IAC/C,IAAI,oBAAC,gBAAgB,EAAC,GAAG,CAAA,GAAA,2CAAa,EAAE;QACtC,qBAAqB;IACvB;IACA,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE;IAE9B,mDAAmD;IACnD,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE,MAAM,WAAW;IACxC,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,UAAU,UAAU,KAAK,MAAM,WAAW,SAAS,KAAK,eAC1D,IAAI,QAAQ;QAEd,UAAU,UAAU,MAAM,WAAW;IACvC,GAAG;QAAC,MAAM,WAAW;QAAM;QAAe;KAAI;IAE9C,0CAAS,I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EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,CAAC;YAC/C,IAAI;YACJ,SAAS,IAAM,WAAW,SAAS,IAAI,IAAI;oBAAC,KAAK;iBAAI,KAAK;YAC1D,qBAAqB;QACvB;QACA,UAAU,CAAA,GAAA,gCAAS,EAAE,UAAU,UAAU,WAAW;YAClD,UAAU,AAAC,aAAa,MAAM,iBAAiB,cAAc,OAAQ,IAAI;YACzE,WAAW,WAAW,YAAY;YAClC,oBAAoB,SAAS,CAAC,mBAAmB;QACnD;QACA,eAAe,CAAA,GAAA,gCAAS,EAAE,eAAe;YACvC,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,MAAM;QACT,gBAAgB,CAAC,CAAC;IACpB;AACF;;CD9FC","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/*.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"],"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 {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, 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 {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, FocusableElement, Node} from '@react-types/shared';\nimport {filterDOMProps, getSyntheticLinkProps, mergeProps, useDescription, useId} from '@react-aria/utils';\nimport {hookData} from './useTagGroup';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {ListState} from '@react-stately/list';\nimport {SelectableItemStates} from '@react-aria/selection';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria extends Omit<SelectableItemStates, 'hasAction'> {\n /** Props for the tag row element. */\n rowProps: DOMAttributes,\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes,\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps,\n /** Whether the tag can be removed. */\n allowsRemoving: boolean\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>\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 `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: AriaTagProps<T>, state: ListState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages);\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n delete states.descriptionProps;\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace') {\n e.preventDefault();\n if (state.selectionManager.isSelected(item.key)) {\n onRemove(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove(new Set([item.key]));\n }\n }\n };\n\n let modality: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\n }\n let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';\n let descProps = useDescription(description);\n\n let isFocused = item.key === state.selectionManager.focusedKey;\n // @ts-ignore - data attributes are ok but TS doesn't know about them.\n let domProps = filterDOMProps(item.props);\n let linkProps = getSyntheticLinkProps(item.props);\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n id: buttonId,\n onPress: () => onRemove ? onRemove(new Set([item.key])) : null,\n excludeFromTabOrder: true\n },\n rowProps: mergeProps(rowProps, domProps, linkProps, {\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: onRemove ? onKeyDown : undefined,\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...states,\n allowsRemoving: !!onRemove\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 {AriaLabelingProps, CollectionBase, DOMAttributes, DOMProps, HelpTextProps, KeyboardDelegate, LabelableProps, MultipleSelection, SelectionBehavior} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {Key, RefObject, useEffect, useRef, useState} from 'react';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport type {ListState} from '@react-stately/list';\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 gridProps: 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 CollectionBase<T>, MultipleSelection, DOMProps, LabelableProps, AriaLabelingProps, HelpTextProps {\n /** How multiple selection should behave in the collection. */\n selectionBehavior?: SelectionBehavior,\n /** Handler that is called when a user deletes a tag. */\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport interface AriaTagGroupOptions<T> extends Omit<AriaTagGroupProps<T>, 'children'> {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\ninterface HookData {\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport const hookData = new WeakMap<ListState<any>, HookData>();\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new ListKeyboardDelegate({\n collection: state.collection,\n ref,\n orientation: 'horizontal',\n direction,\n disabledKeys: state.disabledKeys\n });\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span'\n });\n let {gridProps} = useGridList({\n ...props,\n ...fieldProps,\n keyboardDelegate,\n shouldFocusWrap: true,\n linkBehavior: 'override'\n }, state, ref);\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n\n // If the last tag is removed, focus the container.\n let prevCount = useRef(state.collection.size);\n useEffect(() => {\n if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) {\n ref.current.focus();\n }\n prevCount.current = state.collection.size;\n }, [state.collection.size, isFocusWithin, ref]);\n\n hookData.set(state, {onRemove: props.onRemove});\n\n return {\n gridProps: 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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/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 \"removeButtonLabel\": \"إزالة\",\n \"removeDescription\": \"اضغط على مفتاح DELETE لإزالة علامة.\"\n}\n","{\n \"removeButtonLabel\": \"Премахване\",\n \"removeDescription\": \"Натиснете Delete, за да премахнете маркера.\"\n}\n","{\n \"removeButtonLabel\": \"Odebrat\",\n \"removeDescription\": \"Stisknutím klávesy Delete odeberete značku.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Tryk på Slet for at fjerne tag.\"\n}\n","{\n \"removeButtonLabel\": \"Entfernen\",\n \"removeDescription\": \"Auf „Löschen“ drücken, um das Tag zu entfernen.\"\n}\n","{\n \"removeButtonLabel\": \"Κατάργηση\",\n \"removeDescription\": \"Πατήστε Διαγραφή για να καταργήσετε την ετικέτα.\"\n}\n","{ \n \"removeDescription\": \"Press Delete to remove tag.\",\n \"removeButtonLabel\": \"Remove\"\n}\n","{\n \"removeButtonLabel\": \"Quitar\",\n \"removeDescription\": \"Pulse Eliminar para quitar la etiqueta.\"\n}\n","{\n \"removeButtonLabel\": \"Eemalda\",\n \"removeDescription\": \"Sildi eemaldamiseks vajutage kustutusklahvi Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Poista\",\n \"removeDescription\": \"Poista tunniste painamalla Poista-painiketta.\"\n}\n","{\n \"removeButtonLabel\": \"Supprimer\",\n \"removeDescription\": \"Appuyez sur Supprimer pour supprimer l’étiquette.\"\n}\n","{\n \"removeButtonLabel\": \"הסר\",\n \"removeDescription\": \"לחץ על מחק כדי להסיר תג.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Delete za uklanjanje oznake.\"\n}\n","{\n \"removeButtonLabel\": \"Eltávolítás\",\n \"removeDescription\": \"Nyomja meg a Delete billentyűt a címke eltávolításához.\"\n}\n","{\n \"removeButtonLabel\": \"Rimuovi\",\n \"removeDescription\": \"Premi Elimina per rimuovere il tag.\"\n}\n","{\n \"removeButtonLabel\": \"削除\",\n \"removeDescription\": \"タグを削除するには、Delete キーを押します。\"\n}\n","{\n \"removeButtonLabel\": \"제거\",\n \"removeDescription\": \"태그를 제거하려면 Delete 키를 누르십시오.\"\n}\n","{\n \"removeButtonLabel\": \"Pašalinti\",\n \"removeDescription\": \"Norėdami pašalinti žymą, paspauskite „Delete“ klavišą.\"\n}\n","{\n \"removeButtonLabel\": \"Noņemt\",\n \"removeDescription\": \"Nospiediet Delete [Dzēst], lai noņemtu tagu.\"\n}\n","{\n \"removeButtonLabel\": \"Fjern\",\n \"removeDescription\": \"Trykk på Slett for å fjerne taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Verwijderen\",\n \"removeDescription\": \"Druk op Verwijderen om de tag te verwijderen.\"\n}\n","{\n \"removeButtonLabel\": \"Usuń\",\n \"removeDescription\": \"Naciśnij Usuń, aby usunąć znacznik.\"\n}\n","{\n \"removeButtonLabel\": \"Remover\",\n \"removeDescription\": \"Pressione Delete para remover a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Eliminar\",\n \"removeDescription\": \"Prima Delete para eliminar a tag.\"\n}\n","{\n \"removeButtonLabel\": \"Îndepărtaţi\",\n \"removeDescription\": \"Apăsați pe Delete (Ștergere) pentru a elimina eticheta.\"\n}\n","{\n \"removeButtonLabel\": \"Удалить\",\n \"removeDescription\": \"Нажмите DELETE, чтобы удалить тег.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrániť\",\n \"removeDescription\": \"Ak chcete odstrániť značku, stlačte kláves Delete.\"\n}\n","{\n \"removeButtonLabel\": \"Odstrani\",\n \"removeDescription\": \"Pritisnite Delete, da odstranite oznako.\"\n}\n","{\n \"removeButtonLabel\": \"Ukloni\",\n \"removeDescription\": \"Pritisnite Obriši da biste uklonili oznaku.\"\n}\n","{\n \"removeButtonLabel\": \"Ta bort\",\n \"removeDescription\": \"Tryck på Radera för att ta bort taggen.\"\n}\n","{\n \"removeButtonLabel\": \"Kaldır\",\n \"removeDescription\": \"Etiketi kaldırmak için Sil tuşuna basın.\"\n}\n","{\n \"removeButtonLabel\": \"Вилучити\",\n \"removeDescription\": \"Натисніть Delete, щоб вилучити тег.\"\n}\n","{\n \"removeButtonLabel\": \"删除\",\n \"removeDescription\": \"按下“删除”以删除标记。\"\n}\n","{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;ACVD;;;;;;;;;;CAUC;;;;;;;AA4CM,MAAM,4CAAW,IAAI;AASrB,SAAS,0CAAe,KAA6B,EAAE,KAAmB,EAAE,GAA2B;IAC5G,IAAI,aAAC,SAAS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/B;IACF;IAEA,IAAI,WAAmB,CAAA,GAAA,mDAAqB;IAC5C,IAAI,aAAa,aAAe,OAAO,WAAW,eAAe,kBAAkB,QACjF,WAAW;IAEb,IAAI,cAAc,YAAa,CAAA,aAAa,cAAc,aAAa,SAAQ,IAAK,gBAAgB,MAAM,CAAC,uBAAuB;IAClI,IAAI,YAAY,CAAA,GAAA,oCAAa,EAAE;IAE/B,IAAI,YAAY,KAAK,GAAG,KAAK,MAAM,gBAAgB,CAAC,UAAU;IAC9D,sEAAsE;IACtE,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,KAAK,KAAK;IACxC,IAAI,YAAY,CAAA,GAAA,2CAAoB,EAAE,KAAK,KAAK;IAChD,OAAO;QACL,mBAAmB;YACjB,cAAc,gBAAgB,MAAM,CAAC;YACrC,mBAAmB,CAAC,EAAE,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;YAC/C,IAAI;YACJ,SAAS,IAAM,WAAW,SAAS,IAAI,IAAI;oBAAC,KAAK,GAAG;iBAAC,KAAK;YAC1D,qBAAqB;QACvB;QACA,UAAU,CAAA,GAAA,gCAAS,EAAE,UAAU,UAAU,WAAW;YAClD,UAAU,AAAC,aAAa,MAAM,gBAAgB,CAAC,UAAU,IAAI,OAAQ,IAAI;YACzE,WAAW,WAAW,YAAY;YAClC,oBAAoB,SAAS,CAAC,mBAAmB;QACnD;QACA,eAAe,CAAA,GAAA,gCAAS,EAAE,eAAe;YACvC,qBAAqB,KAAK,CAAC,oBAAoB;YAC/C,cAAc,KAAK,CAAC,aAAa;QACnC;QACA,GAAG,MAAM;QACT,gBAAgB,CAAC,CAAC;IACpB;AACF;;CD9FC","sources":["packages/@react-aria/tag/src/index.ts","packages/@react-aria/tag/src/useTag.ts","packages/@react-aria/tag/src/useTagGroup.ts","packages/@react-aria/tag/src/*.js"],"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 {useTag} from './useTag';\nexport {useTagGroup} from './useTagGroup';\n\nexport type {TagGroupAria, AriaTagGroupProps} from './useTagGroup';\nexport type {AriaTagProps, 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 {AriaButtonProps} from '@react-types/button';\nimport {DOMAttributes, FocusableElement, Node} from '@react-types/shared';\nimport {filterDOMProps, getSyntheticLinkProps, mergeProps, useDescription, useId} from '@react-aria/utils';\nimport {hookData} from './useTagGroup';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {KeyboardEvent, RefObject} from 'react';\nimport type {ListState} from '@react-stately/list';\nimport {SelectableItemStates} from '@react-aria/selection';\nimport {useGridListItem} from '@react-aria/gridlist';\nimport {useInteractionModality} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\n\nexport interface TagAria extends Omit<SelectableItemStates, 'hasAction'> {\n /** Props for the tag row element. */\n rowProps: DOMAttributes,\n /** Props for the tag cell element. */\n gridCellProps: DOMAttributes,\n /** Props for the tag remove button. */\n removeButtonProps: AriaButtonProps,\n /** Whether the tag can be removed. */\n allowsRemoving: boolean\n}\n\nexport interface AriaTagProps<T> {\n /** An object representing the tag. Contains all the relevant information that makes up the tag. */\n item: Node<T>\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 `useListState`.\n * @param ref - A ref to a DOM element for the tag.\n */\nexport function useTag<T>(props: AriaTagProps<T>, state: ListState<T>, ref: RefObject<FocusableElement>): TagAria {\n let {item} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');\n let buttonId = useId();\n\n let {onRemove} = hookData.get(state) || {};\n let {rowProps, gridCellProps, ...states} = useGridListItem({\n node: item\n }, state, ref);\n\n // We want the group to handle keyboard navigation between tags.\n delete rowProps.onKeyDownCapture;\n delete states.descriptionProps;\n\n let onKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Delete' || e.key === 'Backspace') {\n e.preventDefault();\n if (state.selectionManager.isSelected(item.key)) {\n onRemove(new Set(state.selectionManager.selectedKeys));\n } else {\n onRemove(new Set([item.key]));\n }\n }\n };\n\n let modality: string = useInteractionModality();\n if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {\n modality = 'touch';\n }\n let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';\n let descProps = useDescription(description);\n\n let isFocused = item.key === state.selectionManager.focusedKey;\n // @ts-ignore - data attributes are ok but TS doesn't know about them.\n let domProps = filterDOMProps(item.props);\n let linkProps = getSyntheticLinkProps(item.props);\n return {\n removeButtonProps: {\n 'aria-label': stringFormatter.format('removeButtonLabel'),\n 'aria-labelledby': `${buttonId} ${rowProps.id}`,\n id: buttonId,\n onPress: () => onRemove ? onRemove(new Set([item.key])) : null,\n excludeFromTabOrder: true\n },\n rowProps: mergeProps(rowProps, domProps, linkProps, {\n tabIndex: (isFocused || state.selectionManager.focusedKey == null) ? 0 : -1,\n onKeyDown: onRemove ? onKeyDown : undefined,\n 'aria-describedby': descProps['aria-describedby']\n }),\n gridCellProps: mergeProps(gridCellProps, {\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-label': props['aria-label']\n }),\n ...states,\n allowsRemoving: !!onRemove\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 {AriaLabelingProps, CollectionBase, DOMAttributes, DOMProps, HelpTextProps, Key, KeyboardDelegate, LabelableProps, MultipleSelection, SelectionBehavior} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport type {ListState} from '@react-stately/list';\nimport {ReactNode, RefObject, useEffect, useRef, useState} from 'react';\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 gridProps: 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 CollectionBase<T>, MultipleSelection, DOMProps, LabelableProps, AriaLabelingProps, Omit<HelpTextProps, 'errorMessage'> {\n /** How multiple selection should behave in the collection. */\n selectionBehavior?: SelectionBehavior,\n /** Handler that is called when a user deletes a tag. */\n onRemove?: (keys: Set<Key>) => void,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\nexport interface AriaTagGroupOptions<T> extends Omit<AriaTagGroupProps<T>, 'children'> {\n /**\n * An optional keyboard delegate to handle arrow key navigation,\n * to override the default.\n */\n keyboardDelegate?: KeyboardDelegate\n}\n\ninterface HookData {\n onRemove?: (keys: Set<Key>) => void\n}\n\nexport const hookData = new WeakMap<ListState<any>, HookData>();\n\n/**\n * Provides the behavior and accessibility implementation for a tag group component.\n * A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.\n * @param props - Props to be applied to the tag group.\n * @param state - State for the tag group, as returned by `useListState`.\n * @param ref - A ref to a DOM element for the tag group.\n */\nexport function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement>): TagGroupAria {\n let {direction} = useLocale();\n let keyboardDelegate = props.keyboardDelegate || new ListKeyboardDelegate({\n collection: state.collection,\n ref,\n orientation: 'horizontal',\n direction,\n disabledKeys: state.disabledKeys\n });\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span'\n });\n let {gridProps} = useGridList({\n ...props,\n ...fieldProps,\n keyboardDelegate,\n shouldFocusWrap: true,\n linkBehavior: 'override'\n }, state, ref);\n\n let [isFocusWithin, setFocusWithin] = useState(false);\n let {focusWithinProps} = useFocusWithin({\n onFocusWithinChange: setFocusWithin\n });\n let domProps = filterDOMProps(props);\n\n // If the last tag is removed, focus the container.\n let prevCount = useRef(state.collection.size);\n useEffect(() => {\n if (prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) {\n ref.current.focus();\n }\n prevCount.current = state.collection.size;\n }, [state.collection.size, isFocusWithin, ref]);\n\n hookData.set(state, {onRemove: props.onRemove});\n\n return {\n gridProps: 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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/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}"],"names":[],"version":3,"file":"main.js.map"}