@react-spectrum/tag 3.0.0-rc.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.mjs +138 -59
- package/dist/main.css +1 -1
- package/dist/main.js +134 -55
- package/dist/main.js.map +1 -1
- package/dist/module.js +138 -59
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +6 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -17
- package/src/Tag.tsx +7 -12
- package/src/TagGroup.tsx +113 -64
package/dist/main.js
CHANGED
|
@@ -6,12 +6,12 @@ var $dTV3V$reactspectrumutils = require("@react-spectrum/utils");
|
|
|
6
6
|
var $dTV3V$reactspectrumlabel = require("@react-spectrum/label");
|
|
7
7
|
var $dTV3V$reactariafocus = require("@react-aria/focus");
|
|
8
8
|
var $dTV3V$reactstatelylist = require("@react-stately/list");
|
|
9
|
+
var $dTV3V$reactariaselection = require("@react-aria/selection");
|
|
9
10
|
var $dTV3V$reactspectrumprovider = require("@react-spectrum/provider");
|
|
10
11
|
var $dTV3V$react = require("react");
|
|
11
12
|
var $dTV3V$reactspectrumform = require("@react-spectrum/form");
|
|
12
13
|
var $dTV3V$reactariautils = require("@react-aria/utils");
|
|
13
14
|
var $dTV3V$reactariai18n = require("@react-aria/i18n");
|
|
14
|
-
var $dTV3V$reactstatelytag = require("@react-stately/tag");
|
|
15
15
|
var $dTV3V$reactspectrumtext = require("@react-spectrum/text");
|
|
16
16
|
var $dTV3V$reactariainteractions = require("@react-aria/interactions");
|
|
17
17
|
|
|
@@ -54,6 +54,7 @@ var $e4833c69a6a8a469$exports = {};
|
|
|
54
54
|
$e4833c69a6a8a469$exports = {
|
|
55
55
|
"actions": `الإجراءات`,
|
|
56
56
|
"hideButtonLabel": `إظهار أقل`,
|
|
57
|
+
"noTags": `بدون`,
|
|
57
58
|
"showAllButtonLabel": (args, formatter)=>`عرض الكل (${formatter.number(args.tagCount)})`
|
|
58
59
|
};
|
|
59
60
|
|
|
@@ -62,6 +63,7 @@ var $9b536cac3e0b637e$exports = {};
|
|
|
62
63
|
$9b536cac3e0b637e$exports = {
|
|
63
64
|
"actions": `Действия`,
|
|
64
65
|
"hideButtonLabel": `Показване на по-малко`,
|
|
66
|
+
"noTags": `Нито един`,
|
|
65
67
|
"showAllButtonLabel": (args, formatter)=>`Показване на всички (${formatter.number(args.tagCount)})`
|
|
66
68
|
};
|
|
67
69
|
|
|
@@ -70,6 +72,7 @@ var $06ebf46bd7a639dd$exports = {};
|
|
|
70
72
|
$06ebf46bd7a639dd$exports = {
|
|
71
73
|
"actions": `Akce`,
|
|
72
74
|
"hideButtonLabel": `Zobrazit méně`,
|
|
75
|
+
"noTags": `Žádný`,
|
|
73
76
|
"showAllButtonLabel": (args, formatter)=>`Zobrazit vše (${formatter.number(args.tagCount)})`
|
|
74
77
|
};
|
|
75
78
|
|
|
@@ -78,6 +81,7 @@ var $d0c8889aa143e531$exports = {};
|
|
|
78
81
|
$d0c8889aa143e531$exports = {
|
|
79
82
|
"actions": `Handlinger`,
|
|
80
83
|
"hideButtonLabel": `Vis mindre`,
|
|
84
|
+
"noTags": `Ingen`,
|
|
81
85
|
"showAllButtonLabel": (args, formatter)=>`Vis alle (${formatter.number(args.tagCount)})`
|
|
82
86
|
};
|
|
83
87
|
|
|
@@ -86,6 +90,7 @@ var $09f15015489dc476$exports = {};
|
|
|
86
90
|
$09f15015489dc476$exports = {
|
|
87
91
|
"actions": `Aktionen`,
|
|
88
92
|
"hideButtonLabel": `Weniger zeigen`,
|
|
93
|
+
"noTags": `Keine`,
|
|
89
94
|
"showAllButtonLabel": (args, formatter)=>`Alle anzeigen (${formatter.number(args.tagCount)})`
|
|
90
95
|
};
|
|
91
96
|
|
|
@@ -94,6 +99,7 @@ var $ec81f332ee1bb67a$exports = {};
|
|
|
94
99
|
$ec81f332ee1bb67a$exports = {
|
|
95
100
|
"actions": `Ενέργειες`,
|
|
96
101
|
"hideButtonLabel": `Εμφάνιση λιγότερων`,
|
|
102
|
+
"noTags": `Κανένα`,
|
|
97
103
|
"showAllButtonLabel": (args, formatter)=>`Εμφάνιση όλων (${formatter.number(args.tagCount)})`
|
|
98
104
|
};
|
|
99
105
|
|
|
@@ -102,7 +108,8 @@ var $a5d4273001869f16$exports = {};
|
|
|
102
108
|
$a5d4273001869f16$exports = {
|
|
103
109
|
"showAllButtonLabel": (args, formatter)=>`Show all (${formatter.number(args.tagCount)})`,
|
|
104
110
|
"hideButtonLabel": `Show less`,
|
|
105
|
-
"actions": `Actions
|
|
111
|
+
"actions": `Actions`,
|
|
112
|
+
"noTags": `None`
|
|
106
113
|
};
|
|
107
114
|
|
|
108
115
|
|
|
@@ -110,6 +117,7 @@ var $355c19ee0d058106$exports = {};
|
|
|
110
117
|
$355c19ee0d058106$exports = {
|
|
111
118
|
"actions": `Acciones`,
|
|
112
119
|
"hideButtonLabel": `Mostrar menos`,
|
|
120
|
+
"noTags": `Ninguno`,
|
|
113
121
|
"showAllButtonLabel": (args, formatter)=>`Mostrar todo (${formatter.number(args.tagCount)})`
|
|
114
122
|
};
|
|
115
123
|
|
|
@@ -118,6 +126,7 @@ var $94d247b24eb969ef$exports = {};
|
|
|
118
126
|
$94d247b24eb969ef$exports = {
|
|
119
127
|
"actions": `Toimingud`,
|
|
120
128
|
"hideButtonLabel": `Kuva vähem`,
|
|
129
|
+
"noTags": `Puudub`,
|
|
121
130
|
"showAllButtonLabel": (args, formatter)=>`Kuva kõik (${formatter.number(args.tagCount)})`
|
|
122
131
|
};
|
|
123
132
|
|
|
@@ -126,6 +135,7 @@ var $fe04eda9b3e92668$exports = {};
|
|
|
126
135
|
$fe04eda9b3e92668$exports = {
|
|
127
136
|
"actions": `Toiminnot`,
|
|
128
137
|
"hideButtonLabel": `Näytä vähemmän`,
|
|
138
|
+
"noTags": `Ei mitään`,
|
|
129
139
|
"showAllButtonLabel": (args, formatter)=>`Näytä kaikki (${formatter.number(args.tagCount)})`
|
|
130
140
|
};
|
|
131
141
|
|
|
@@ -134,6 +144,7 @@ var $8c0ca11f9a10e544$exports = {};
|
|
|
134
144
|
$8c0ca11f9a10e544$exports = {
|
|
135
145
|
"actions": `Actions`,
|
|
136
146
|
"hideButtonLabel": `Afficher moins`,
|
|
147
|
+
"noTags": `Aucun`,
|
|
137
148
|
"showAllButtonLabel": (args, formatter)=>`Tout afficher (${formatter.number(args.tagCount)})`
|
|
138
149
|
};
|
|
139
150
|
|
|
@@ -142,6 +153,7 @@ var $5cf885b76293f7ea$exports = {};
|
|
|
142
153
|
$5cf885b76293f7ea$exports = {
|
|
143
154
|
"actions": `פעולות`,
|
|
144
155
|
"hideButtonLabel": `הצג פחות`,
|
|
156
|
+
"noTags": `ללא`,
|
|
145
157
|
"showAllButtonLabel": (args, formatter)=>`הצג הכל (${formatter.number(args.tagCount)})`
|
|
146
158
|
};
|
|
147
159
|
|
|
@@ -150,6 +162,7 @@ var $26efb27e85fe3886$exports = {};
|
|
|
150
162
|
$26efb27e85fe3886$exports = {
|
|
151
163
|
"actions": `Radnje`,
|
|
152
164
|
"hideButtonLabel": `Prikaži manje`,
|
|
165
|
+
"noTags": `Nema`,
|
|
153
166
|
"showAllButtonLabel": (args, formatter)=>`Prikaži sve (${formatter.number(args.tagCount)})`
|
|
154
167
|
};
|
|
155
168
|
|
|
@@ -158,6 +171,7 @@ var $5afbffe322be4f78$exports = {};
|
|
|
158
171
|
$5afbffe322be4f78$exports = {
|
|
159
172
|
"actions": `Műveletek`,
|
|
160
173
|
"hideButtonLabel": `Mutass kevesebbet`,
|
|
174
|
+
"noTags": `Egyik sem`,
|
|
161
175
|
"showAllButtonLabel": (args, formatter)=>`Az összes megjelenítése (${formatter.number(args.tagCount)})`
|
|
162
176
|
};
|
|
163
177
|
|
|
@@ -166,6 +180,7 @@ var $e2e8477c50691c5a$exports = {};
|
|
|
166
180
|
$e2e8477c50691c5a$exports = {
|
|
167
181
|
"actions": `Azioni`,
|
|
168
182
|
"hideButtonLabel": `Mostra meno`,
|
|
183
|
+
"noTags": `Nessuno`,
|
|
169
184
|
"showAllButtonLabel": (args, formatter)=>`Mostra tutto (${formatter.number(args.tagCount)})`
|
|
170
185
|
};
|
|
171
186
|
|
|
@@ -174,6 +189,7 @@ var $aa322e153c7fc6cf$exports = {};
|
|
|
174
189
|
$aa322e153c7fc6cf$exports = {
|
|
175
190
|
"actions": `アクション`,
|
|
176
191
|
"hideButtonLabel": `表示を減らす`,
|
|
192
|
+
"noTags": `なし`,
|
|
177
193
|
"showAllButtonLabel": (args, formatter)=>`すべての (${formatter.number(args.tagCount)}) を表示`
|
|
178
194
|
};
|
|
179
195
|
|
|
@@ -182,6 +198,7 @@ var $ef5171b4e7fef8b6$exports = {};
|
|
|
182
198
|
$ef5171b4e7fef8b6$exports = {
|
|
183
199
|
"actions": `액션`,
|
|
184
200
|
"hideButtonLabel": `간단히 표시`,
|
|
201
|
+
"noTags": `없음`,
|
|
185
202
|
"showAllButtonLabel": (args, formatter)=>`모두 표시 (${formatter.number(args.tagCount)})`
|
|
186
203
|
};
|
|
187
204
|
|
|
@@ -190,6 +207,7 @@ var $11cf3f21588c59d5$exports = {};
|
|
|
190
207
|
$11cf3f21588c59d5$exports = {
|
|
191
208
|
"actions": `Veiksmai`,
|
|
192
209
|
"hideButtonLabel": `Rodyti mažiau`,
|
|
210
|
+
"noTags": `Nėra`,
|
|
193
211
|
"showAllButtonLabel": (args, formatter)=>`Rodyti viską (${formatter.number(args.tagCount)})`
|
|
194
212
|
};
|
|
195
213
|
|
|
@@ -198,6 +216,7 @@ var $7798af2d0360d513$exports = {};
|
|
|
198
216
|
$7798af2d0360d513$exports = {
|
|
199
217
|
"actions": `Darbības`,
|
|
200
218
|
"hideButtonLabel": `Rādīt mazāk`,
|
|
219
|
+
"noTags": `Nav`,
|
|
201
220
|
"showAllButtonLabel": (args, formatter)=>`Rādīt visu (${formatter.number(args.tagCount)})`
|
|
202
221
|
};
|
|
203
222
|
|
|
@@ -206,6 +225,7 @@ var $36fbb928ae891fff$exports = {};
|
|
|
206
225
|
$36fbb928ae891fff$exports = {
|
|
207
226
|
"actions": `Handlinger`,
|
|
208
227
|
"hideButtonLabel": `Vis mindre`,
|
|
228
|
+
"noTags": `Ingen`,
|
|
209
229
|
"showAllButtonLabel": (args, formatter)=>`Vis alle (${formatter.number(args.tagCount)})`
|
|
210
230
|
};
|
|
211
231
|
|
|
@@ -214,6 +234,7 @@ var $64f658e8416b1edc$exports = {};
|
|
|
214
234
|
$64f658e8416b1edc$exports = {
|
|
215
235
|
"actions": `Acties`,
|
|
216
236
|
"hideButtonLabel": `Minder weergeven`,
|
|
237
|
+
"noTags": `Geen`,
|
|
217
238
|
"showAllButtonLabel": (args, formatter)=>`Alles tonen (${formatter.number(args.tagCount)})`
|
|
218
239
|
};
|
|
219
240
|
|
|
@@ -222,6 +243,7 @@ var $d83dc3596c86b9b1$exports = {};
|
|
|
222
243
|
$d83dc3596c86b9b1$exports = {
|
|
223
244
|
"actions": `Działania`,
|
|
224
245
|
"hideButtonLabel": `Wyświetl mniej`,
|
|
246
|
+
"noTags": `Brak`,
|
|
225
247
|
"showAllButtonLabel": (args, formatter)=>`Pokaż wszystko (${formatter.number(args.tagCount)})`
|
|
226
248
|
};
|
|
227
249
|
|
|
@@ -230,6 +252,7 @@ var $f05393b8526809a5$exports = {};
|
|
|
230
252
|
$f05393b8526809a5$exports = {
|
|
231
253
|
"actions": `Ações`,
|
|
232
254
|
"hideButtonLabel": `Mostrar menos`,
|
|
255
|
+
"noTags": `Nenhum`,
|
|
233
256
|
"showAllButtonLabel": (args, formatter)=>`Mostrar tudo (${formatter.number(args.tagCount)})`
|
|
234
257
|
};
|
|
235
258
|
|
|
@@ -238,6 +261,7 @@ var $d7b3c6e34da453ec$exports = {};
|
|
|
238
261
|
$d7b3c6e34da453ec$exports = {
|
|
239
262
|
"actions": `Ações`,
|
|
240
263
|
"hideButtonLabel": `Mostrar menos`,
|
|
264
|
+
"noTags": `Nenhum`,
|
|
241
265
|
"showAllButtonLabel": (args, formatter)=>`Mostrar tudo (${formatter.number(args.tagCount)})`
|
|
242
266
|
};
|
|
243
267
|
|
|
@@ -246,6 +270,7 @@ var $671c8a587799a566$exports = {};
|
|
|
246
270
|
$671c8a587799a566$exports = {
|
|
247
271
|
"actions": `Acțiuni`,
|
|
248
272
|
"hideButtonLabel": `Se afișează mai puțin`,
|
|
273
|
+
"noTags": `Niciuna`,
|
|
249
274
|
"showAllButtonLabel": (args, formatter)=>`Se afișează tot (${formatter.number(args.tagCount)})`
|
|
250
275
|
};
|
|
251
276
|
|
|
@@ -254,6 +279,7 @@ var $f7d5f2f6333669ae$exports = {};
|
|
|
254
279
|
$f7d5f2f6333669ae$exports = {
|
|
255
280
|
"actions": `Действия`,
|
|
256
281
|
"hideButtonLabel": `Показать меньше`,
|
|
282
|
+
"noTags": `Нет`,
|
|
257
283
|
"showAllButtonLabel": (args, formatter)=>`Показать все (${formatter.number(args.tagCount)})`
|
|
258
284
|
};
|
|
259
285
|
|
|
@@ -262,6 +288,7 @@ var $6872c5a06d3d5bd6$exports = {};
|
|
|
262
288
|
$6872c5a06d3d5bd6$exports = {
|
|
263
289
|
"actions": `Akcie`,
|
|
264
290
|
"hideButtonLabel": `Zobraziť menej`,
|
|
291
|
+
"noTags": `Žiadne`,
|
|
265
292
|
"showAllButtonLabel": (args, formatter)=>`Zobraziť všetko (${formatter.number(args.tagCount)})`
|
|
266
293
|
};
|
|
267
294
|
|
|
@@ -270,6 +297,7 @@ var $8d44aaec5d910562$exports = {};
|
|
|
270
297
|
$8d44aaec5d910562$exports = {
|
|
271
298
|
"actions": `Dejanja`,
|
|
272
299
|
"hideButtonLabel": `Prikaži manj`,
|
|
300
|
+
"noTags": `Nič`,
|
|
273
301
|
"showAllButtonLabel": (args, formatter)=>`Prikaž vse (${formatter.number(args.tagCount)})`
|
|
274
302
|
};
|
|
275
303
|
|
|
@@ -278,6 +306,7 @@ var $48a1f90aac47b13f$exports = {};
|
|
|
278
306
|
$48a1f90aac47b13f$exports = {
|
|
279
307
|
"actions": `Radnje`,
|
|
280
308
|
"hideButtonLabel": `Prikaži manje`,
|
|
309
|
+
"noTags": `Ne postoji`,
|
|
281
310
|
"showAllButtonLabel": (args, formatter)=>`Prikaži sve (${formatter.number(args.tagCount)})`
|
|
282
311
|
};
|
|
283
312
|
|
|
@@ -286,6 +315,7 @@ var $e67f8d08ca5a16ce$exports = {};
|
|
|
286
315
|
$e67f8d08ca5a16ce$exports = {
|
|
287
316
|
"actions": `Åtgärder`,
|
|
288
317
|
"hideButtonLabel": `Visa mindre`,
|
|
318
|
+
"noTags": `Ingen`,
|
|
289
319
|
"showAllButtonLabel": (args, formatter)=>`Visa alla (${formatter.number(args.tagCount)})`
|
|
290
320
|
};
|
|
291
321
|
|
|
@@ -294,6 +324,7 @@ var $dfe98dff52c184ea$exports = {};
|
|
|
294
324
|
$dfe98dff52c184ea$exports = {
|
|
295
325
|
"actions": `Eylemler`,
|
|
296
326
|
"hideButtonLabel": `Daha az göster`,
|
|
327
|
+
"noTags": `Hiçbiri`,
|
|
297
328
|
"showAllButtonLabel": (args, formatter)=>`Tümünü göster (${formatter.number(args.tagCount)})`
|
|
298
329
|
};
|
|
299
330
|
|
|
@@ -302,6 +333,7 @@ var $ba516e0f6c423a4a$exports = {};
|
|
|
302
333
|
$ba516e0f6c423a4a$exports = {
|
|
303
334
|
"actions": `Дії`,
|
|
304
335
|
"hideButtonLabel": `Показувати менше`,
|
|
336
|
+
"noTags": `Немає`,
|
|
305
337
|
"showAllButtonLabel": (args, formatter)=>`Показати всі (${formatter.number(args.tagCount)})`
|
|
306
338
|
};
|
|
307
339
|
|
|
@@ -310,6 +342,7 @@ var $7c2f3cb525451680$exports = {};
|
|
|
310
342
|
$7c2f3cb525451680$exports = {
|
|
311
343
|
"actions": `操作`,
|
|
312
344
|
"hideButtonLabel": `显示更少`,
|
|
345
|
+
"noTags": `无`,
|
|
313
346
|
"showAllButtonLabel": (args, formatter)=>`全部显示 (${formatter.number(args.tagCount)})`
|
|
314
347
|
};
|
|
315
348
|
|
|
@@ -318,6 +351,7 @@ var $00b7e0167640331e$exports = {};
|
|
|
318
351
|
$00b7e0167640331e$exports = {
|
|
319
352
|
"actions": `動作`,
|
|
320
353
|
"hideButtonLabel": `顯示較少`,
|
|
354
|
+
"noTags": `無`,
|
|
321
355
|
"showAllButtonLabel": (args, formatter)=>`顯示全部 (${formatter.number(args.tagCount)})`
|
|
322
356
|
};
|
|
323
357
|
|
|
@@ -363,12 +397,14 @@ $d97f7dfcca827852$exports = {
|
|
|
363
397
|
|
|
364
398
|
|
|
365
399
|
|
|
400
|
+
|
|
366
401
|
var $ed889f8f1f091fc8$exports = {};
|
|
367
402
|
|
|
368
403
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag", () => $ed889f8f1f091fc8$export$6174bd1d20b4c022, (v) => $ed889f8f1f091fc8$export$6174bd1d20b4c022 = v);
|
|
369
404
|
$parcel$export($ed889f8f1f091fc8$exports, "focus-ring", () => $ed889f8f1f091fc8$export$f39a09f249340e2a, (v) => $ed889f8f1f091fc8$export$f39a09f249340e2a = v);
|
|
370
405
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags", () => $ed889f8f1f091fc8$export$eb7e80013a1212da, (v) => $ed889f8f1f091fc8$export$eb7e80013a1212da = v);
|
|
371
406
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container", () => $ed889f8f1f091fc8$export$3300169c5d27fe96, (v) => $ed889f8f1f091fc8$export$3300169c5d27fe96 = v);
|
|
407
|
+
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container--empty", () => $ed889f8f1f091fc8$export$a5e59d283417e02b, (v) => $ed889f8f1f091fc8$export$a5e59d283417e02b = v);
|
|
372
408
|
$parcel$export($ed889f8f1f091fc8$exports, "is-disabled", () => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf, (v) => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf = v);
|
|
373
409
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-removeButton", () => $ed889f8f1f091fc8$export$23a76b996f0a6c1, (v) => $ed889f8f1f091fc8$export$23a76b996f0a6c1 = v);
|
|
374
410
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-cell", () => $ed889f8f1f091fc8$export$9c4fd4d7faada408, (v) => $ed889f8f1f091fc8$export$9c4fd4d7faada408 = v);
|
|
@@ -380,12 +416,14 @@ $parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actions", () => $ed889f
|
|
|
380
416
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actionButton", () => $ed889f8f1f091fc8$export$e6882f8db018e3bd, (v) => $ed889f8f1f091fc8$export$e6882f8db018e3bd = v);
|
|
381
417
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper", () => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5, (v) => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = v);
|
|
382
418
|
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper--positionSide", () => $ed889f8f1f091fc8$export$a7c11d4acc244e09, (v) => $ed889f8f1f091fc8$export$a7c11d4acc244e09 = v);
|
|
419
|
+
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-empty-state", () => $ed889f8f1f091fc8$export$cd48f925394bb16, (v) => $ed889f8f1f091fc8$export$cd48f925394bb16 = v);
|
|
383
420
|
$parcel$export($ed889f8f1f091fc8$exports, "is-hovered", () => $ed889f8f1f091fc8$export$b8813cd5d7824ce7, (v) => $ed889f8f1f091fc8$export$b8813cd5d7824ce7 = v);
|
|
384
421
|
$parcel$export($ed889f8f1f091fc8$exports, "is-focused", () => $ed889f8f1f091fc8$export$e7dc768d35940237, (v) => $ed889f8f1f091fc8$export$e7dc768d35940237 = v);
|
|
385
422
|
var $ed889f8f1f091fc8$export$6174bd1d20b4c022;
|
|
386
423
|
var $ed889f8f1f091fc8$export$f39a09f249340e2a;
|
|
387
424
|
var $ed889f8f1f091fc8$export$eb7e80013a1212da;
|
|
388
425
|
var $ed889f8f1f091fc8$export$3300169c5d27fe96;
|
|
426
|
+
var $ed889f8f1f091fc8$export$a5e59d283417e02b;
|
|
389
427
|
var $ed889f8f1f091fc8$export$d35bc1e505d1ebbf;
|
|
390
428
|
var $ed889f8f1f091fc8$export$23a76b996f0a6c1;
|
|
391
429
|
var $ed889f8f1f091fc8$export$9c4fd4d7faada408;
|
|
@@ -397,12 +435,14 @@ var $ed889f8f1f091fc8$export$8afaa02110915bbb;
|
|
|
397
435
|
var $ed889f8f1f091fc8$export$e6882f8db018e3bd;
|
|
398
436
|
var $ed889f8f1f091fc8$export$c9b7ca327d69b2b5;
|
|
399
437
|
var $ed889f8f1f091fc8$export$a7c11d4acc244e09;
|
|
438
|
+
var $ed889f8f1f091fc8$export$cd48f925394bb16;
|
|
400
439
|
var $ed889f8f1f091fc8$export$b8813cd5d7824ce7;
|
|
401
440
|
var $ed889f8f1f091fc8$export$e7dc768d35940237;
|
|
402
441
|
$ed889f8f1f091fc8$export$6174bd1d20b4c022 = "spectrum-Tag_8407eb";
|
|
403
442
|
$ed889f8f1f091fc8$export$f39a09f249340e2a = "focus-ring_8407eb";
|
|
404
443
|
$ed889f8f1f091fc8$export$eb7e80013a1212da = "spectrum-Tags_8407eb";
|
|
405
444
|
$ed889f8f1f091fc8$export$3300169c5d27fe96 = "spectrum-Tags-container_8407eb";
|
|
445
|
+
$ed889f8f1f091fc8$export$a5e59d283417e02b = "spectrum-Tags-container--empty_8407eb";
|
|
406
446
|
$ed889f8f1f091fc8$export$d35bc1e505d1ebbf = "is-disabled_8407eb";
|
|
407
447
|
$ed889f8f1f091fc8$export$23a76b996f0a6c1 = "spectrum-Tag-removeButton_8407eb";
|
|
408
448
|
$ed889f8f1f091fc8$export$9c4fd4d7faada408 = "spectrum-Tag-cell_8407eb";
|
|
@@ -414,6 +454,7 @@ $ed889f8f1f091fc8$export$8afaa02110915bbb = "spectrum-Tags-actions_8407eb";
|
|
|
414
454
|
$ed889f8f1f091fc8$export$e6882f8db018e3bd = "spectrum-Tags-actionButton_8407eb";
|
|
415
455
|
$ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = "spectrum-Tags-fieldWrapper_8407eb";
|
|
416
456
|
$ed889f8f1f091fc8$export$a7c11d4acc244e09 = "spectrum-Tags-fieldWrapper--positionSide_8407eb";
|
|
457
|
+
$ed889f8f1f091fc8$export$cd48f925394bb16 = "spectrum-Tags-empty-state_8407eb";
|
|
417
458
|
$ed889f8f1f091fc8$export$b8813cd5d7824ce7 = "is-hovered_8407eb";
|
|
418
459
|
$ed889f8f1f091fc8$export$e7dc768d35940237 = "is-focused_8407eb";
|
|
419
460
|
|
|
@@ -438,7 +479,7 @@ $ed889f8f1f091fc8$export$e7dc768d35940237 = "is-focused_8407eb";
|
|
|
438
479
|
|
|
439
480
|
|
|
440
481
|
function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
|
|
441
|
-
const {
|
|
482
|
+
const { item: item , state: state , ...otherProps } = props;
|
|
442
483
|
// @ts-ignore
|
|
443
484
|
let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(otherProps);
|
|
444
485
|
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $dTV3V$reactariainteractions.useHover)({});
|
|
@@ -446,11 +487,9 @@ function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
|
|
|
446
487
|
within: true
|
|
447
488
|
});
|
|
448
489
|
let ref = (0, $dTV3V$react.useRef)();
|
|
449
|
-
let { removeButtonProps: removeButtonProps ,
|
|
490
|
+
let { removeButtonProps: removeButtonProps , gridCellProps: gridCellProps , rowProps: rowProps , allowsRemoving: allowsRemoving } = (0, $dTV3V$reactariatag.useTag)({
|
|
450
491
|
...props,
|
|
451
|
-
|
|
452
|
-
item: item,
|
|
453
|
-
onRemove: onRemove
|
|
492
|
+
item: item
|
|
454
493
|
}, state, ref);
|
|
455
494
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
456
495
|
...(0, $dTV3V$reactariautils.mergeProps)(rowProps, hoverProps, focusProps),
|
|
@@ -471,8 +510,7 @@ function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
|
|
|
471
510
|
size: "XS"
|
|
472
511
|
},
|
|
473
512
|
text: {
|
|
474
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-content")
|
|
475
|
-
...labelProps
|
|
513
|
+
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-content")
|
|
476
514
|
},
|
|
477
515
|
avatar: {
|
|
478
516
|
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-avatar"),
|
|
@@ -494,32 +532,50 @@ function $dd2c5d00108c1840$var$TagRemoveButton(props) {
|
|
|
494
532
|
|
|
495
533
|
|
|
496
534
|
|
|
497
|
-
|
|
535
|
+
const $e7b72d8874e98cd4$var$TAG_STYLES = {
|
|
536
|
+
medium: {
|
|
537
|
+
height: 24,
|
|
538
|
+
margin: 4
|
|
539
|
+
},
|
|
540
|
+
large: {
|
|
541
|
+
height: 30,
|
|
542
|
+
margin: 5
|
|
543
|
+
}
|
|
544
|
+
};
|
|
498
545
|
function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
499
546
|
props = (0, $dTV3V$reactspectrumprovider.useProviderProps)(props);
|
|
500
547
|
props = (0, $dTV3V$reactspectrumform.useFormProps)(props);
|
|
501
|
-
let {
|
|
548
|
+
let { maxRows: maxRows , children: children , actionLabel: actionLabel , onAction: onAction , labelPosition: labelPosition , renderEmptyState: renderEmptyState = ()=>stringFormatter.format("noTags") } = props;
|
|
502
549
|
let domRef = (0, $dTV3V$reactspectrumutils.useDOMRef)(ref);
|
|
503
550
|
let containerRef = (0, $dTV3V$react.useRef)(null);
|
|
504
551
|
let tagsRef = (0, $dTV3V$react.useRef)(null);
|
|
505
552
|
let { direction: direction } = (0, $dTV3V$reactariai18n.useLocale)();
|
|
553
|
+
let { scale: scale } = (0, $dTV3V$reactspectrumprovider.useProvider)();
|
|
506
554
|
let stringFormatter = (0, $dTV3V$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($d97f7dfcca827852$exports))));
|
|
507
555
|
let [isCollapsed, setIsCollapsed] = (0, $dTV3V$react.useState)(maxRows != null);
|
|
508
|
-
let state = (0, $dTV3V$
|
|
556
|
+
let state = (0, $dTV3V$reactstatelylist.useListState)(props);
|
|
509
557
|
let [tagState, setTagState] = (0, $dTV3V$reactariautils.useValueEffect)({
|
|
510
558
|
visibleTagCount: state.collection.size,
|
|
511
|
-
showCollapseButton: false
|
|
512
|
-
maxHeight: undefined
|
|
559
|
+
showCollapseButton: false
|
|
513
560
|
});
|
|
514
|
-
let keyboardDelegate = (0, $dTV3V$react.useMemo)(()=>
|
|
561
|
+
let keyboardDelegate = (0, $dTV3V$react.useMemo)(()=>{
|
|
562
|
+
let collection = isCollapsed ? new (0, $dTV3V$reactstatelylist.ListCollection)([
|
|
515
563
|
...state.collection
|
|
516
|
-
].slice(0, tagState.visibleTagCount))
|
|
564
|
+
].slice(0, tagState.visibleTagCount)) : new (0, $dTV3V$reactstatelylist.ListCollection)([
|
|
517
565
|
...state.collection
|
|
518
|
-
])
|
|
566
|
+
]);
|
|
567
|
+
return new (0, $dTV3V$reactariaselection.ListKeyboardDelegate)({
|
|
568
|
+
collection: collection,
|
|
569
|
+
ref: domRef,
|
|
570
|
+
direction: direction,
|
|
571
|
+
orientation: "horizontal"
|
|
572
|
+
});
|
|
573
|
+
}, [
|
|
519
574
|
direction,
|
|
520
575
|
isCollapsed,
|
|
521
576
|
state.collection,
|
|
522
|
-
tagState.visibleTagCount
|
|
577
|
+
tagState.visibleTagCount,
|
|
578
|
+
domRef
|
|
523
579
|
]);
|
|
524
580
|
// Remove onAction from props so it doesn't make it into useGridList.
|
|
525
581
|
delete props.onAction;
|
|
@@ -528,25 +584,26 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
528
584
|
keyboardDelegate: keyboardDelegate
|
|
529
585
|
}, state, tagsRef);
|
|
530
586
|
let actionsId = (0, $dTV3V$reactariautils.useId)();
|
|
587
|
+
let actionsRef = (0, $dTV3V$react.useRef)(null);
|
|
531
588
|
let updateVisibleTagCount = (0, $dTV3V$react.useCallback)(()=>{
|
|
532
589
|
if (maxRows > 0) {
|
|
533
590
|
let computeVisibleTagCount = ()=>{
|
|
534
|
-
var _tags_;
|
|
535
591
|
// Refs can be null at runtime.
|
|
536
592
|
let currContainerRef = containerRef.current;
|
|
537
593
|
let currTagsRef = tagsRef.current;
|
|
538
|
-
|
|
594
|
+
let currActionsRef = actionsRef.current;
|
|
595
|
+
if (!currContainerRef || !currTagsRef || state.collection.size === 0) return {
|
|
596
|
+
visibleTagCount: 0,
|
|
597
|
+
showCollapseButton: false
|
|
598
|
+
};
|
|
599
|
+
// Count rows and show tags until we hit the maxRows.
|
|
539
600
|
let tags = [
|
|
540
601
|
...currTagsRef.children
|
|
541
602
|
];
|
|
542
|
-
let buttons = [
|
|
543
|
-
...currContainerRef.parentElement.querySelectorAll("button")
|
|
544
|
-
];
|
|
545
603
|
let currY = -Infinity;
|
|
546
604
|
let rowCount = 0;
|
|
547
605
|
let index = 0;
|
|
548
606
|
let tagWidths = [];
|
|
549
|
-
// Count rows and show tags until we hit the maxRows.
|
|
550
607
|
for (let tag of tags){
|
|
551
608
|
let { width: width , y: y } = tag.getBoundingClientRect();
|
|
552
609
|
if (y !== currY) {
|
|
@@ -558,31 +615,33 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
558
615
|
index++;
|
|
559
616
|
}
|
|
560
617
|
// Remove tags until there is space for the collapse button and action button (if present) on the last row.
|
|
561
|
-
let
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
index
|
|
618
|
+
let buttons = [
|
|
619
|
+
...currActionsRef.children
|
|
620
|
+
];
|
|
621
|
+
if (buttons.length > 0 && rowCount >= maxRows) {
|
|
622
|
+
var _tags_;
|
|
623
|
+
let buttonsWidth = buttons.reduce((acc, curr)=>acc += curr.getBoundingClientRect().width, 0);
|
|
624
|
+
buttonsWidth += $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin * 2 * buttons.length;
|
|
625
|
+
let end = direction === "ltr" ? "right" : "left";
|
|
626
|
+
let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];
|
|
627
|
+
let lastTagEnd = (_tags_ = tags[index - 1]) === null || _tags_ === void 0 ? void 0 : _tags_.getBoundingClientRect()[end];
|
|
628
|
+
lastTagEnd += $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin;
|
|
629
|
+
let availableWidth = containerEnd - lastTagEnd;
|
|
630
|
+
while(availableWidth < buttonsWidth && index > 0){
|
|
631
|
+
availableWidth += tagWidths.pop();
|
|
632
|
+
index--;
|
|
633
|
+
}
|
|
571
634
|
}
|
|
572
|
-
let tagStyle = window.getComputedStyle(tags[0]);
|
|
573
|
-
let maxHeight = (parseInt(tagStyle.height, 10) + parseInt(tagStyle.marginTop, 10) * 2) * maxRows;
|
|
574
635
|
return {
|
|
575
|
-
visibleTagCount: index,
|
|
576
|
-
showCollapseButton: index < state.collection.size
|
|
577
|
-
maxHeight: maxHeight
|
|
636
|
+
visibleTagCount: Math.max(index, 1),
|
|
637
|
+
showCollapseButton: index < state.collection.size
|
|
578
638
|
};
|
|
579
639
|
};
|
|
580
640
|
setTagState(function*() {
|
|
581
641
|
// Update to show all items.
|
|
582
642
|
yield {
|
|
583
643
|
visibleTagCount: state.collection.size,
|
|
584
|
-
showCollapseButton: true
|
|
585
|
-
maxHeight: undefined
|
|
644
|
+
showCollapseButton: true
|
|
586
645
|
};
|
|
587
646
|
// Measure, and update to show the items until maxRows is reached.
|
|
588
647
|
yield computeVisibleTagCount();
|
|
@@ -592,6 +651,7 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
592
651
|
maxRows,
|
|
593
652
|
setTagState,
|
|
594
653
|
direction,
|
|
654
|
+
scale,
|
|
595
655
|
state.collection.size
|
|
596
656
|
]);
|
|
597
657
|
(0, $dTV3V$reactariautils.useResizeObserver)({
|
|
@@ -608,16 +668,33 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
608
668
|
(_document_fonts = document.fonts) === null || _document_fonts === void 0 ? void 0 : _document_fonts.ready.then(()=>updateVisibleTagCount());
|
|
609
669
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
610
670
|
}, []);
|
|
611
|
-
let visibleTags = [
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
671
|
+
let visibleTags = (0, $dTV3V$react.useMemo)(()=>[
|
|
672
|
+
...state.collection
|
|
673
|
+
].slice(0, isCollapsed ? tagState.visibleTagCount : state.collection.size), [
|
|
674
|
+
isCollapsed,
|
|
675
|
+
state.collection,
|
|
676
|
+
tagState.visibleTagCount
|
|
677
|
+
]);
|
|
615
678
|
let handlePressCollapse = ()=>{
|
|
616
679
|
// Prevents button from losing focus if focusedKey got collapsed.
|
|
617
680
|
state.selectionManager.setFocusedKey(null);
|
|
618
681
|
setIsCollapsed((prevCollapsed)=>!prevCollapsed);
|
|
619
682
|
};
|
|
620
683
|
let showActions = tagState.showCollapseButton || actionLabel && onAction;
|
|
684
|
+
let isEmpty = state.collection.size === 0;
|
|
685
|
+
let containerStyle = (0, $dTV3V$react.useMemo)(()=>{
|
|
686
|
+
if (maxRows == null || !isCollapsed || isEmpty) return undefined;
|
|
687
|
+
let maxHeight = ($e7b72d8874e98cd4$var$TAG_STYLES[scale].height + $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin * 2) * maxRows;
|
|
688
|
+
return {
|
|
689
|
+
maxHeight: maxHeight,
|
|
690
|
+
overflow: "hidden"
|
|
691
|
+
};
|
|
692
|
+
}, [
|
|
693
|
+
isCollapsed,
|
|
694
|
+
maxRows,
|
|
695
|
+
isEmpty,
|
|
696
|
+
scale
|
|
697
|
+
]);
|
|
621
698
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumlabel.Field), {
|
|
622
699
|
...props,
|
|
623
700
|
labelProps: labelProps,
|
|
@@ -626,16 +703,17 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
626
703
|
showErrorIcon: true,
|
|
627
704
|
ref: domRef,
|
|
628
705
|
elementType: "span",
|
|
629
|
-
|
|
706
|
+
wrapperClassName: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-fieldWrapper", {
|
|
630
707
|
"spectrum-Tags-fieldWrapper--positionSide": labelPosition === "side"
|
|
631
708
|
})
|
|
632
709
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
633
|
-
style: maxRows != null && tagState.showCollapseButton && isCollapsed ? {
|
|
634
|
-
maxHeight: tagState.maxHeight,
|
|
635
|
-
overflow: "hidden"
|
|
636
|
-
} : undefined,
|
|
637
710
|
ref: containerRef,
|
|
638
|
-
|
|
711
|
+
style: containerStyle,
|
|
712
|
+
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-container", {
|
|
713
|
+
"spectrum-Tags-container--empty": isEmpty
|
|
714
|
+
})
|
|
715
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusRing), {
|
|
716
|
+
focusRingClass: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "focus-ring")
|
|
639
717
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
640
718
|
ref: tagsRef,
|
|
641
719
|
...gridProps,
|
|
@@ -644,13 +722,14 @@ function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
|
644
722
|
...item.props,
|
|
645
723
|
key: item.key,
|
|
646
724
|
item: item,
|
|
647
|
-
state: state
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
725
|
+
state: state
|
|
726
|
+
}, item.rendered)), isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
727
|
+
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-empty-state")
|
|
728
|
+
}, renderEmptyState()))), showActions && !isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumprovider.Provider), {
|
|
651
729
|
isDisabled: false
|
|
652
730
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
653
731
|
role: "group",
|
|
732
|
+
ref: actionsRef,
|
|
654
733
|
id: actionsId,
|
|
655
734
|
"aria-label": stringFormatter.format("actions"),
|
|
656
735
|
"aria-labelledby": `${gridProps.id} ${actionsId}`,
|