@react-spectrum/tag 3.2.4 → 3.2.6
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/Tag.main.js +92 -0
- package/dist/Tag.main.js.map +1 -0
- package/dist/Tag.mjs +87 -0
- package/dist/Tag.module.js +87 -0
- package/dist/Tag.module.js.map +1 -0
- package/dist/TagGroup.main.js +270 -0
- package/dist/TagGroup.main.js.map +1 -0
- package/dist/TagGroup.mjs +265 -0
- package/dist/TagGroup.module.js +265 -0
- package/dist/TagGroup.module.js.map +1 -0
- package/dist/import.mjs +1 -520
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/main.js +2 -517
- package/dist/main.js.map +1 -1
- package/dist/module.js +1 -520
- package/dist/module.js.map +1 -1
- package/dist/tags_vars_css.main.js +86 -0
- package/dist/tags_vars_css.main.js.map +1 -0
- package/dist/tags_vars_css.mjs +88 -0
- package/dist/tags_vars_css.module.js +88 -0
- package/dist/tags_vars_css.module.js.map +1 -0
- package/dist/{main.css → vars.0a7fe83c.css} +14 -24
- package/dist/vars.0a7fe83c.css.map +1 -0
- package/package.json +16 -16
- package/dist/main.css.map +0 -1
package/dist/main.js
CHANGED
|
@@ -1,76 +1,14 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $9b536cac3e0b637e$exports = require("./bg-BG.main.js");
|
|
3
|
-
var $06ebf46bd7a639dd$exports = require("./cs-CZ.main.js");
|
|
4
|
-
var $d0c8889aa143e531$exports = require("./da-DK.main.js");
|
|
5
|
-
var $09f15015489dc476$exports = require("./de-DE.main.js");
|
|
6
|
-
var $ec81f332ee1bb67a$exports = require("./el-GR.main.js");
|
|
7
|
-
var $a5d4273001869f16$exports = require("./en-US.main.js");
|
|
8
|
-
var $355c19ee0d058106$exports = require("./es-ES.main.js");
|
|
9
|
-
var $94d247b24eb969ef$exports = require("./et-EE.main.js");
|
|
10
|
-
var $fe04eda9b3e92668$exports = require("./fi-FI.main.js");
|
|
11
|
-
var $8c0ca11f9a10e544$exports = require("./fr-FR.main.js");
|
|
12
|
-
var $5cf885b76293f7ea$exports = require("./he-IL.main.js");
|
|
13
|
-
var $26efb27e85fe3886$exports = require("./hr-HR.main.js");
|
|
14
|
-
var $5afbffe322be4f78$exports = require("./hu-HU.main.js");
|
|
15
|
-
var $e2e8477c50691c5a$exports = require("./it-IT.main.js");
|
|
16
|
-
var $aa322e153c7fc6cf$exports = require("./ja-JP.main.js");
|
|
17
|
-
var $ef5171b4e7fef8b6$exports = require("./ko-KR.main.js");
|
|
18
|
-
var $11cf3f21588c59d5$exports = require("./lt-LT.main.js");
|
|
19
|
-
var $7798af2d0360d513$exports = require("./lv-LV.main.js");
|
|
20
|
-
var $36fbb928ae891fff$exports = require("./nb-NO.main.js");
|
|
21
|
-
var $64f658e8416b1edc$exports = require("./nl-NL.main.js");
|
|
22
|
-
var $d83dc3596c86b9b1$exports = require("./pl-PL.main.js");
|
|
23
|
-
var $f05393b8526809a5$exports = require("./pt-BR.main.js");
|
|
24
|
-
var $d7b3c6e34da453ec$exports = require("./pt-PT.main.js");
|
|
25
|
-
var $671c8a587799a566$exports = require("./ro-RO.main.js");
|
|
26
|
-
var $f7d5f2f6333669ae$exports = require("./ru-RU.main.js");
|
|
27
|
-
var $6872c5a06d3d5bd6$exports = require("./sk-SK.main.js");
|
|
28
|
-
var $8d44aaec5d910562$exports = require("./sl-SI.main.js");
|
|
29
|
-
var $48a1f90aac47b13f$exports = require("./sr-SP.main.js");
|
|
30
|
-
var $e67f8d08ca5a16ce$exports = require("./sv-SE.main.js");
|
|
31
|
-
var $dfe98dff52c184ea$exports = require("./tr-TR.main.js");
|
|
32
|
-
var $ba516e0f6c423a4a$exports = require("./uk-UA.main.js");
|
|
33
|
-
var $7c2f3cb525451680$exports = require("./zh-CN.main.js");
|
|
34
|
-
var $00b7e0167640331e$exports = require("./zh-TW.main.js");
|
|
35
|
-
require("./main.css");
|
|
1
|
+
var $e7b72d8874e98cd4$exports = require("./TagGroup.main.js");
|
|
36
2
|
var $dTV3V$reactstatelycollections = require("@react-stately/collections");
|
|
37
|
-
var $dTV3V$reactspectrumbutton = require("@react-spectrum/button");
|
|
38
|
-
var $dTV3V$reactariatag = require("@react-aria/tag");
|
|
39
|
-
var $dTV3V$reactspectrumutils = require("@react-spectrum/utils");
|
|
40
|
-
var $dTV3V$reactspectrumlabel = require("@react-spectrum/label");
|
|
41
|
-
var $dTV3V$reactariafocus = require("@react-aria/focus");
|
|
42
|
-
var $dTV3V$reactstatelylist = require("@react-stately/list");
|
|
43
|
-
var $dTV3V$reactariaselection = require("@react-aria/selection");
|
|
44
|
-
var $dTV3V$reactspectrumprovider = require("@react-spectrum/provider");
|
|
45
|
-
var $dTV3V$react = require("react");
|
|
46
|
-
var $dTV3V$reactspectrumform = require("@react-spectrum/form");
|
|
47
|
-
var $dTV3V$reactariautils = require("@react-aria/utils");
|
|
48
|
-
var $dTV3V$reactariai18n = require("@react-aria/i18n");
|
|
49
|
-
var $dTV3V$reactspectrumtext = require("@react-spectrum/text");
|
|
50
|
-
var $dTV3V$reactariainteractions = require("@react-aria/interactions");
|
|
51
3
|
|
|
52
4
|
|
|
53
5
|
function $parcel$export(e, n, v, s) {
|
|
54
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
55
7
|
}
|
|
56
8
|
|
|
57
|
-
|
|
58
|
-
return a && a.__esModule ? a.default : a;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
$parcel$export(module.exports, "TagGroup", () => $e7b72d8874e98cd4$export$67ea30858aaf75e3);
|
|
9
|
+
$parcel$export(module.exports, "TagGroup", () => $e7b72d8874e98cd4$exports.TagGroup);
|
|
62
10
|
$parcel$export(module.exports, "Item", () => $dTV3V$reactstatelycollections.Item);
|
|
63
11
|
/*
|
|
64
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
65
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
66
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
67
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
-
*
|
|
69
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
70
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
71
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
72
|
-
* governing permissions and limitations under the License.
|
|
73
|
-
*/ /*
|
|
74
12
|
* Copyright 2020 Adobe. All rights reserved.
|
|
75
13
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
76
14
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
@@ -84,457 +22,4 @@ $parcel$export(module.exports, "Item", () => $dTV3V$reactstatelycollections.Item
|
|
|
84
22
|
|
|
85
23
|
|
|
86
24
|
|
|
87
|
-
|
|
88
|
-
var $a85da3418799ba7d$exports = {};
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
$a85da3418799ba7d$exports = {
|
|
124
|
-
"ar-AE": $e4833c69a6a8a469$exports,
|
|
125
|
-
"bg-BG": $9b536cac3e0b637e$exports,
|
|
126
|
-
"cs-CZ": $06ebf46bd7a639dd$exports,
|
|
127
|
-
"da-DK": $d0c8889aa143e531$exports,
|
|
128
|
-
"de-DE": $09f15015489dc476$exports,
|
|
129
|
-
"el-GR": $ec81f332ee1bb67a$exports,
|
|
130
|
-
"en-US": $a5d4273001869f16$exports,
|
|
131
|
-
"es-ES": $355c19ee0d058106$exports,
|
|
132
|
-
"et-EE": $94d247b24eb969ef$exports,
|
|
133
|
-
"fi-FI": $fe04eda9b3e92668$exports,
|
|
134
|
-
"fr-FR": $8c0ca11f9a10e544$exports,
|
|
135
|
-
"he-IL": $5cf885b76293f7ea$exports,
|
|
136
|
-
"hr-HR": $26efb27e85fe3886$exports,
|
|
137
|
-
"hu-HU": $5afbffe322be4f78$exports,
|
|
138
|
-
"it-IT": $e2e8477c50691c5a$exports,
|
|
139
|
-
"ja-JP": $aa322e153c7fc6cf$exports,
|
|
140
|
-
"ko-KR": $ef5171b4e7fef8b6$exports,
|
|
141
|
-
"lt-LT": $11cf3f21588c59d5$exports,
|
|
142
|
-
"lv-LV": $7798af2d0360d513$exports,
|
|
143
|
-
"nb-NO": $36fbb928ae891fff$exports,
|
|
144
|
-
"nl-NL": $64f658e8416b1edc$exports,
|
|
145
|
-
"pl-PL": $d83dc3596c86b9b1$exports,
|
|
146
|
-
"pt-BR": $f05393b8526809a5$exports,
|
|
147
|
-
"pt-PT": $d7b3c6e34da453ec$exports,
|
|
148
|
-
"ro-RO": $671c8a587799a566$exports,
|
|
149
|
-
"ru-RU": $f7d5f2f6333669ae$exports,
|
|
150
|
-
"sk-SK": $6872c5a06d3d5bd6$exports,
|
|
151
|
-
"sl-SI": $8d44aaec5d910562$exports,
|
|
152
|
-
"sr-SP": $48a1f90aac47b13f$exports,
|
|
153
|
-
"sv-SE": $e67f8d08ca5a16ce$exports,
|
|
154
|
-
"tr-TR": $dfe98dff52c184ea$exports,
|
|
155
|
-
"uk-UA": $ba516e0f6c423a4a$exports,
|
|
156
|
-
"zh-CN": $7c2f3cb525451680$exports,
|
|
157
|
-
"zh-TW": $00b7e0167640331e$exports
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
var $ed889f8f1f091fc8$exports = {};
|
|
166
|
-
|
|
167
|
-
$parcel$export($ed889f8f1f091fc8$exports, "action", () => $ed889f8f1f091fc8$export$31eb53bd5b582a97, (v) => $ed889f8f1f091fc8$export$31eb53bd5b582a97 = v);
|
|
168
|
-
$parcel$export($ed889f8f1f091fc8$exports, "content", () => $ed889f8f1f091fc8$export$a7db06668cad9adb, (v) => $ed889f8f1f091fc8$export$a7db06668cad9adb = v);
|
|
169
|
-
$parcel$export($ed889f8f1f091fc8$exports, "decoration", () => $ed889f8f1f091fc8$export$3454f895b9105e06, (v) => $ed889f8f1f091fc8$export$3454f895b9105e06 = v);
|
|
170
|
-
$parcel$export($ed889f8f1f091fc8$exports, "focus-ring", () => $ed889f8f1f091fc8$export$f39a09f249340e2a, (v) => $ed889f8f1f091fc8$export$f39a09f249340e2a = v);
|
|
171
|
-
$parcel$export($ed889f8f1f091fc8$exports, "i18nFontFamily", () => $ed889f8f1f091fc8$export$8c4ee2c50c22c514, (v) => $ed889f8f1f091fc8$export$8c4ee2c50c22c514 = v);
|
|
172
|
-
$parcel$export($ed889f8f1f091fc8$exports, "is-disabled", () => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf, (v) => $ed889f8f1f091fc8$export$d35bc1e505d1ebbf = v);
|
|
173
|
-
$parcel$export($ed889f8f1f091fc8$exports, "is-focused", () => $ed889f8f1f091fc8$export$e7dc768d35940237, (v) => $ed889f8f1f091fc8$export$e7dc768d35940237 = v);
|
|
174
|
-
$parcel$export($ed889f8f1f091fc8$exports, "is-hovered", () => $ed889f8f1f091fc8$export$b8813cd5d7824ce7, (v) => $ed889f8f1f091fc8$export$b8813cd5d7824ce7 = v);
|
|
175
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-FocusRing-ring", () => $ed889f8f1f091fc8$export$4109102f950813a6, (v) => $ed889f8f1f091fc8$export$4109102f950813a6 = v);
|
|
176
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-FocusRing", () => $ed889f8f1f091fc8$export$24c7f46a6e3605dd, (v) => $ed889f8f1f091fc8$export$24c7f46a6e3605dd = v);
|
|
177
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-FocusRing--quiet", () => $ed889f8f1f091fc8$export$2927016961429360, (v) => $ed889f8f1f091fc8$export$2927016961429360 = v);
|
|
178
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag", () => $ed889f8f1f091fc8$export$6174bd1d20b4c022, (v) => $ed889f8f1f091fc8$export$6174bd1d20b4c022 = v);
|
|
179
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag--removable", () => $ed889f8f1f091fc8$export$87165794583be111, (v) => $ed889f8f1f091fc8$export$87165794583be111 = v);
|
|
180
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-avatar", () => $ed889f8f1f091fc8$export$7b57f5221a1b5306, (v) => $ed889f8f1f091fc8$export$7b57f5221a1b5306 = v);
|
|
181
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-cell", () => $ed889f8f1f091fc8$export$9c4fd4d7faada408, (v) => $ed889f8f1f091fc8$export$9c4fd4d7faada408 = v);
|
|
182
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-content", () => $ed889f8f1f091fc8$export$d281c967f4ee071e, (v) => $ed889f8f1f091fc8$export$d281c967f4ee071e = v);
|
|
183
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-icon", () => $ed889f8f1f091fc8$export$21f5254139e14871, (v) => $ed889f8f1f091fc8$export$21f5254139e14871 = v);
|
|
184
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tag-removeButton", () => $ed889f8f1f091fc8$export$23a76b996f0a6c1, (v) => $ed889f8f1f091fc8$export$23a76b996f0a6c1 = v);
|
|
185
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags", () => $ed889f8f1f091fc8$export$eb7e80013a1212da, (v) => $ed889f8f1f091fc8$export$eb7e80013a1212da = v);
|
|
186
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actionButton", () => $ed889f8f1f091fc8$export$e6882f8db018e3bd, (v) => $ed889f8f1f091fc8$export$e6882f8db018e3bd = v);
|
|
187
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-actions", () => $ed889f8f1f091fc8$export$8afaa02110915bbb, (v) => $ed889f8f1f091fc8$export$8afaa02110915bbb = v);
|
|
188
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container", () => $ed889f8f1f091fc8$export$3300169c5d27fe96, (v) => $ed889f8f1f091fc8$export$3300169c5d27fe96 = v);
|
|
189
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-container--empty", () => $ed889f8f1f091fc8$export$a5e59d283417e02b, (v) => $ed889f8f1f091fc8$export$a5e59d283417e02b = v);
|
|
190
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-empty-state", () => $ed889f8f1f091fc8$export$cd48f925394bb16, (v) => $ed889f8f1f091fc8$export$cd48f925394bb16 = v);
|
|
191
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper", () => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5, (v) => $ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = v);
|
|
192
|
-
$parcel$export($ed889f8f1f091fc8$exports, "spectrum-Tags-fieldWrapper--positionSide", () => $ed889f8f1f091fc8$export$a7c11d4acc244e09, (v) => $ed889f8f1f091fc8$export$a7c11d4acc244e09 = v);
|
|
193
|
-
var $ed889f8f1f091fc8$export$31eb53bd5b582a97;
|
|
194
|
-
var $ed889f8f1f091fc8$export$a7db06668cad9adb;
|
|
195
|
-
var $ed889f8f1f091fc8$export$3454f895b9105e06;
|
|
196
|
-
var $ed889f8f1f091fc8$export$f39a09f249340e2a;
|
|
197
|
-
var $ed889f8f1f091fc8$export$8c4ee2c50c22c514;
|
|
198
|
-
var $ed889f8f1f091fc8$export$d35bc1e505d1ebbf;
|
|
199
|
-
var $ed889f8f1f091fc8$export$e7dc768d35940237;
|
|
200
|
-
var $ed889f8f1f091fc8$export$b8813cd5d7824ce7;
|
|
201
|
-
var $ed889f8f1f091fc8$export$4109102f950813a6;
|
|
202
|
-
var $ed889f8f1f091fc8$export$24c7f46a6e3605dd;
|
|
203
|
-
var $ed889f8f1f091fc8$export$2927016961429360;
|
|
204
|
-
var $ed889f8f1f091fc8$export$6174bd1d20b4c022;
|
|
205
|
-
var $ed889f8f1f091fc8$export$87165794583be111;
|
|
206
|
-
var $ed889f8f1f091fc8$export$7b57f5221a1b5306;
|
|
207
|
-
var $ed889f8f1f091fc8$export$9c4fd4d7faada408;
|
|
208
|
-
var $ed889f8f1f091fc8$export$d281c967f4ee071e;
|
|
209
|
-
var $ed889f8f1f091fc8$export$21f5254139e14871;
|
|
210
|
-
var $ed889f8f1f091fc8$export$23a76b996f0a6c1;
|
|
211
|
-
var $ed889f8f1f091fc8$export$eb7e80013a1212da;
|
|
212
|
-
var $ed889f8f1f091fc8$export$e6882f8db018e3bd;
|
|
213
|
-
var $ed889f8f1f091fc8$export$8afaa02110915bbb;
|
|
214
|
-
var $ed889f8f1f091fc8$export$3300169c5d27fe96;
|
|
215
|
-
var $ed889f8f1f091fc8$export$a5e59d283417e02b;
|
|
216
|
-
var $ed889f8f1f091fc8$export$cd48f925394bb16;
|
|
217
|
-
var $ed889f8f1f091fc8$export$c9b7ca327d69b2b5;
|
|
218
|
-
var $ed889f8f1f091fc8$export$a7c11d4acc244e09;
|
|
219
|
-
$ed889f8f1f091fc8$export$31eb53bd5b582a97 = `fx8d1q_action`;
|
|
220
|
-
$ed889f8f1f091fc8$export$a7db06668cad9adb = `fx8d1q_content`;
|
|
221
|
-
$ed889f8f1f091fc8$export$3454f895b9105e06 = `fx8d1q_decoration`;
|
|
222
|
-
$ed889f8f1f091fc8$export$f39a09f249340e2a = `fx8d1q_focus-ring`;
|
|
223
|
-
$ed889f8f1f091fc8$export$8c4ee2c50c22c514 = `fx8d1q_i18nFontFamily`;
|
|
224
|
-
$ed889f8f1f091fc8$export$d35bc1e505d1ebbf = `fx8d1q_is-disabled`;
|
|
225
|
-
$ed889f8f1f091fc8$export$e7dc768d35940237 = `fx8d1q_is-focused`;
|
|
226
|
-
$ed889f8f1f091fc8$export$b8813cd5d7824ce7 = `fx8d1q_is-hovered`;
|
|
227
|
-
$ed889f8f1f091fc8$export$4109102f950813a6 = `fx8d1q_spectrum-FocusRing-ring`;
|
|
228
|
-
$ed889f8f1f091fc8$export$24c7f46a6e3605dd = `fx8d1q_spectrum-FocusRing ${$ed889f8f1f091fc8$export$4109102f950813a6}`;
|
|
229
|
-
$ed889f8f1f091fc8$export$2927016961429360 = `fx8d1q_spectrum-FocusRing--quiet`;
|
|
230
|
-
$ed889f8f1f091fc8$export$6174bd1d20b4c022 = `fx8d1q_spectrum-Tag ${$ed889f8f1f091fc8$export$24c7f46a6e3605dd}`;
|
|
231
|
-
$ed889f8f1f091fc8$export$87165794583be111 = `fx8d1q_spectrum-Tag--removable`;
|
|
232
|
-
$ed889f8f1f091fc8$export$7b57f5221a1b5306 = `fx8d1q_spectrum-Tag-avatar`;
|
|
233
|
-
$ed889f8f1f091fc8$export$9c4fd4d7faada408 = `fx8d1q_spectrum-Tag-cell`;
|
|
234
|
-
$ed889f8f1f091fc8$export$d281c967f4ee071e = `fx8d1q_spectrum-Tag-content`;
|
|
235
|
-
$ed889f8f1f091fc8$export$21f5254139e14871 = `fx8d1q_spectrum-Tag-icon`;
|
|
236
|
-
$ed889f8f1f091fc8$export$23a76b996f0a6c1 = `fx8d1q_spectrum-Tag-removeButton`;
|
|
237
|
-
$ed889f8f1f091fc8$export$eb7e80013a1212da = `fx8d1q_spectrum-Tags`;
|
|
238
|
-
$ed889f8f1f091fc8$export$e6882f8db018e3bd = `fx8d1q_spectrum-Tags-actionButton`;
|
|
239
|
-
$ed889f8f1f091fc8$export$8afaa02110915bbb = `fx8d1q_spectrum-Tags-actions`;
|
|
240
|
-
$ed889f8f1f091fc8$export$3300169c5d27fe96 = `fx8d1q_spectrum-Tags-container`;
|
|
241
|
-
$ed889f8f1f091fc8$export$a5e59d283417e02b = `fx8d1q_spectrum-Tags-container--empty`;
|
|
242
|
-
$ed889f8f1f091fc8$export$cd48f925394bb16 = `fx8d1q_spectrum-Tags-empty-state`;
|
|
243
|
-
$ed889f8f1f091fc8$export$c9b7ca327d69b2b5 = `fx8d1q_spectrum-Tags-fieldWrapper`;
|
|
244
|
-
$ed889f8f1f091fc8$export$a7c11d4acc244e09 = `fx8d1q_spectrum-Tags-fieldWrapper--positionSide`;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/*
|
|
248
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
249
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
250
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
251
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
252
|
-
*
|
|
253
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
254
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
255
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
256
|
-
* governing permissions and limitations under the License.
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
|
|
267
|
-
const { item: item, state: state, ...otherProps } = props;
|
|
268
|
-
// @ts-ignore
|
|
269
|
-
let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(otherProps);
|
|
270
|
-
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $dTV3V$reactariainteractions.useHover)({});
|
|
271
|
-
let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $dTV3V$reactariafocus.useFocusRing)({
|
|
272
|
-
within: true
|
|
273
|
-
});
|
|
274
|
-
let ref = (0, $dTV3V$react.useRef)(null);
|
|
275
|
-
let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $dTV3V$reactariatag.useTag)({
|
|
276
|
-
...props,
|
|
277
|
-
item: item
|
|
278
|
-
}, state, ref);
|
|
279
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
280
|
-
...(0, $dTV3V$reactariautils.mergeProps)(rowProps, hoverProps, focusProps),
|
|
281
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag", {
|
|
282
|
-
"focus-ring": isFocusVisible,
|
|
283
|
-
"is-focused": isFocused,
|
|
284
|
-
"is-hovered": isHovered,
|
|
285
|
-
"spectrum-Tag--removable": allowsRemoving
|
|
286
|
-
}, styleProps.className),
|
|
287
|
-
ref: ref
|
|
288
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
289
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-cell"),
|
|
290
|
-
...gridCellProps
|
|
291
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumutils.SlotProvider), {
|
|
292
|
-
slots: {
|
|
293
|
-
icon: {
|
|
294
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-icon"),
|
|
295
|
-
size: "XS"
|
|
296
|
-
},
|
|
297
|
-
text: {
|
|
298
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-content")
|
|
299
|
-
},
|
|
300
|
-
avatar: {
|
|
301
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-avatar"),
|
|
302
|
-
size: "avatar-size-50"
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}, typeof item.rendered === "string" ? /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumtext.Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumutils.ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement($dd2c5d00108c1840$var$TagRemoveButton, {
|
|
306
|
-
item: item,
|
|
307
|
-
...removeButtonProps,
|
|
308
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tag-removeButton")
|
|
309
|
-
})))));
|
|
310
|
-
}
|
|
311
|
-
function $dd2c5d00108c1840$var$TagRemoveButton(props) {
|
|
312
|
-
let { styleProps: styleProps } = (0, $dTV3V$reactspectrumutils.useStyleProps)(props);
|
|
313
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("span", styleProps, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumbutton.ClearButton), props));
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
const $e7b72d8874e98cd4$var$TAG_STYLES = {
|
|
321
|
-
medium: {
|
|
322
|
-
height: 24,
|
|
323
|
-
margin: 4
|
|
324
|
-
},
|
|
325
|
-
large: {
|
|
326
|
-
height: 30,
|
|
327
|
-
margin: 5
|
|
328
|
-
}
|
|
329
|
-
};
|
|
330
|
-
function $e7b72d8874e98cd4$var$TagGroup(props, ref) {
|
|
331
|
-
props = (0, $dTV3V$reactspectrumprovider.useProviderProps)(props);
|
|
332
|
-
props = (0, $dTV3V$reactspectrumform.useFormProps)(props);
|
|
333
|
-
let { maxRows: maxRows, children: children, actionLabel: actionLabel, onAction: onAction, labelPosition: labelPosition, renderEmptyState: renderEmptyState = ()=>stringFormatter.format("noTags") } = props;
|
|
334
|
-
let domRef = (0, $dTV3V$reactspectrumutils.useDOMRef)(ref);
|
|
335
|
-
let containerRef = (0, $dTV3V$react.useRef)(null);
|
|
336
|
-
let tagsRef = (0, $dTV3V$react.useRef)(null);
|
|
337
|
-
let { direction: direction } = (0, $dTV3V$reactariai18n.useLocale)();
|
|
338
|
-
let { scale: scale } = (0, $dTV3V$reactspectrumprovider.useProvider)();
|
|
339
|
-
let stringFormatter = (0, $dTV3V$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($a85da3418799ba7d$exports))), "@react-spectrum/tag");
|
|
340
|
-
let [isCollapsed, setIsCollapsed] = (0, $dTV3V$react.useState)(maxRows != null);
|
|
341
|
-
let state = (0, $dTV3V$reactstatelylist.useListState)(props);
|
|
342
|
-
let [tagState, setTagState] = (0, $dTV3V$reactariautils.useValueEffect)({
|
|
343
|
-
visibleTagCount: state.collection.size,
|
|
344
|
-
showCollapseButton: false
|
|
345
|
-
});
|
|
346
|
-
let keyboardDelegate = (0, $dTV3V$react.useMemo)(()=>{
|
|
347
|
-
let collection = isCollapsed ? new (0, $dTV3V$reactstatelylist.ListCollection)([
|
|
348
|
-
...state.collection
|
|
349
|
-
].slice(0, tagState.visibleTagCount)) : new (0, $dTV3V$reactstatelylist.ListCollection)([
|
|
350
|
-
...state.collection
|
|
351
|
-
]);
|
|
352
|
-
return new (0, $dTV3V$reactariaselection.ListKeyboardDelegate)({
|
|
353
|
-
collection: collection,
|
|
354
|
-
ref: domRef,
|
|
355
|
-
direction: direction,
|
|
356
|
-
orientation: "horizontal"
|
|
357
|
-
});
|
|
358
|
-
}, [
|
|
359
|
-
direction,
|
|
360
|
-
isCollapsed,
|
|
361
|
-
state.collection,
|
|
362
|
-
tagState.visibleTagCount,
|
|
363
|
-
domRef
|
|
364
|
-
]);
|
|
365
|
-
// Remove onAction from props so it doesn't make it into useGridList.
|
|
366
|
-
delete props.onAction;
|
|
367
|
-
let { gridProps: gridProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $dTV3V$reactariatag.useTagGroup)({
|
|
368
|
-
...props,
|
|
369
|
-
keyboardDelegate: keyboardDelegate
|
|
370
|
-
}, state, tagsRef);
|
|
371
|
-
let actionsId = (0, $dTV3V$reactariautils.useId)();
|
|
372
|
-
let actionsRef = (0, $dTV3V$react.useRef)(null);
|
|
373
|
-
let updateVisibleTagCount = (0, $dTV3V$react.useCallback)(()=>{
|
|
374
|
-
if (maxRows && maxRows > 0) {
|
|
375
|
-
let computeVisibleTagCount = ()=>{
|
|
376
|
-
// Refs can be null at runtime.
|
|
377
|
-
let currContainerRef = containerRef.current;
|
|
378
|
-
let currTagsRef = tagsRef.current;
|
|
379
|
-
let currActionsRef = actionsRef.current;
|
|
380
|
-
if (!currContainerRef || !currTagsRef || !currActionsRef || state.collection.size === 0) return {
|
|
381
|
-
visibleTagCount: 0,
|
|
382
|
-
showCollapseButton: false
|
|
383
|
-
};
|
|
384
|
-
// Count rows and show tags until we hit the maxRows.
|
|
385
|
-
let tags = [
|
|
386
|
-
...currTagsRef.children
|
|
387
|
-
];
|
|
388
|
-
let currY = -Infinity;
|
|
389
|
-
let rowCount = 0;
|
|
390
|
-
let index = 0;
|
|
391
|
-
let tagWidths = [];
|
|
392
|
-
for (let tag of tags){
|
|
393
|
-
let { width: width, y: y } = tag.getBoundingClientRect();
|
|
394
|
-
if (y !== currY) {
|
|
395
|
-
currY = y;
|
|
396
|
-
rowCount++;
|
|
397
|
-
}
|
|
398
|
-
if (maxRows && rowCount > maxRows) break;
|
|
399
|
-
tagWidths.push(width);
|
|
400
|
-
index++;
|
|
401
|
-
}
|
|
402
|
-
// Remove tags until there is space for the collapse button and action button (if present) on the last row.
|
|
403
|
-
let buttons = [
|
|
404
|
-
...currActionsRef.children
|
|
405
|
-
];
|
|
406
|
-
if (maxRows && buttons.length > 0 && rowCount >= maxRows) {
|
|
407
|
-
var _tags_;
|
|
408
|
-
let buttonsWidth = buttons.reduce((acc, curr)=>acc += curr.getBoundingClientRect().width, 0);
|
|
409
|
-
buttonsWidth += $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin * 2 * buttons.length;
|
|
410
|
-
let end = direction === "ltr" ? "right" : "left";
|
|
411
|
-
let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];
|
|
412
|
-
let lastTagEnd = (_tags_ = tags[index - 1]) === null || _tags_ === void 0 ? void 0 : _tags_.getBoundingClientRect()[end];
|
|
413
|
-
lastTagEnd += $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin;
|
|
414
|
-
let availableWidth = containerEnd - lastTagEnd;
|
|
415
|
-
while(availableWidth < buttonsWidth && index > 0){
|
|
416
|
-
availableWidth += tagWidths.pop();
|
|
417
|
-
index--;
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
return {
|
|
421
|
-
visibleTagCount: Math.max(index, 1),
|
|
422
|
-
showCollapseButton: index < state.collection.size
|
|
423
|
-
};
|
|
424
|
-
};
|
|
425
|
-
setTagState(function*() {
|
|
426
|
-
// Update to show all items.
|
|
427
|
-
yield {
|
|
428
|
-
visibleTagCount: state.collection.size,
|
|
429
|
-
showCollapseButton: true
|
|
430
|
-
};
|
|
431
|
-
// Measure, and update to show the items until maxRows is reached.
|
|
432
|
-
yield computeVisibleTagCount();
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
}, [
|
|
436
|
-
maxRows,
|
|
437
|
-
setTagState,
|
|
438
|
-
direction,
|
|
439
|
-
scale,
|
|
440
|
-
state.collection.size
|
|
441
|
-
]);
|
|
442
|
-
(0, $dTV3V$reactariautils.useResizeObserver)({
|
|
443
|
-
ref: containerRef,
|
|
444
|
-
onResize: updateVisibleTagCount
|
|
445
|
-
});
|
|
446
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
447
|
-
(0, $dTV3V$reactariautils.useLayoutEffect)(updateVisibleTagCount, [
|
|
448
|
-
children
|
|
449
|
-
]);
|
|
450
|
-
(0, $dTV3V$react.useEffect)(()=>{
|
|
451
|
-
var // Recalculate visible tags when fonts are loaded.
|
|
452
|
-
_document_fonts;
|
|
453
|
-
(_document_fonts = document.fonts) === null || _document_fonts === void 0 ? void 0 : _document_fonts.ready.then(()=>updateVisibleTagCount());
|
|
454
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
455
|
-
}, []);
|
|
456
|
-
let visibleTags = (0, $dTV3V$react.useMemo)(()=>[
|
|
457
|
-
...state.collection
|
|
458
|
-
].slice(0, isCollapsed ? tagState.visibleTagCount : state.collection.size), [
|
|
459
|
-
isCollapsed,
|
|
460
|
-
state.collection,
|
|
461
|
-
tagState.visibleTagCount
|
|
462
|
-
]);
|
|
463
|
-
let handlePressCollapse = ()=>{
|
|
464
|
-
// Prevents button from losing focus if focusedKey got collapsed.
|
|
465
|
-
state.selectionManager.setFocusedKey(null);
|
|
466
|
-
setIsCollapsed((prevCollapsed)=>!prevCollapsed);
|
|
467
|
-
};
|
|
468
|
-
let showActions = tagState.showCollapseButton || actionLabel && onAction;
|
|
469
|
-
let isEmpty = state.collection.size === 0;
|
|
470
|
-
let containerStyle = (0, $dTV3V$react.useMemo)(()=>{
|
|
471
|
-
if (maxRows == null || !isCollapsed || isEmpty) return undefined;
|
|
472
|
-
let maxHeight = ($e7b72d8874e98cd4$var$TAG_STYLES[scale].height + $e7b72d8874e98cd4$var$TAG_STYLES[scale].margin * 2) * maxRows;
|
|
473
|
-
return {
|
|
474
|
-
maxHeight: maxHeight,
|
|
475
|
-
overflow: "hidden"
|
|
476
|
-
};
|
|
477
|
-
}, [
|
|
478
|
-
isCollapsed,
|
|
479
|
-
maxRows,
|
|
480
|
-
isEmpty,
|
|
481
|
-
scale
|
|
482
|
-
]);
|
|
483
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumlabel.Field), {
|
|
484
|
-
...props,
|
|
485
|
-
labelProps: labelProps,
|
|
486
|
-
descriptionProps: descriptionProps,
|
|
487
|
-
errorMessageProps: errorMessageProps,
|
|
488
|
-
showErrorIcon: true,
|
|
489
|
-
ref: domRef,
|
|
490
|
-
elementType: "span",
|
|
491
|
-
wrapperClassName: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-fieldWrapper", {
|
|
492
|
-
"spectrum-Tags-fieldWrapper--positionSide": labelPosition === "side"
|
|
493
|
-
})
|
|
494
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
495
|
-
ref: containerRef,
|
|
496
|
-
style: containerStyle,
|
|
497
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-container", {
|
|
498
|
-
"spectrum-Tags-container--empty": isEmpty
|
|
499
|
-
})
|
|
500
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactariafocus.FocusRing), {
|
|
501
|
-
focusRingClass: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "focus-ring")
|
|
502
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
503
|
-
ref: tagsRef,
|
|
504
|
-
...gridProps,
|
|
505
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags")
|
|
506
|
-
}, visibleTags.map((item)=>/*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dd2c5d00108c1840$export$3288d34c523a1192), {
|
|
507
|
-
...item.props,
|
|
508
|
-
key: item.key,
|
|
509
|
-
item: item,
|
|
510
|
-
state: state
|
|
511
|
-
}, item.rendered)), isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
512
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-empty-state")
|
|
513
|
-
}, renderEmptyState()))), showActions && !isEmpty && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumprovider.Provider), {
|
|
514
|
-
isDisabled: false
|
|
515
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement("div", {
|
|
516
|
-
role: "group",
|
|
517
|
-
ref: actionsRef,
|
|
518
|
-
id: actionsId,
|
|
519
|
-
"aria-label": stringFormatter.format("actions"),
|
|
520
|
-
"aria-labelledby": `${gridProps.id} ${actionsId}`,
|
|
521
|
-
className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-actions")
|
|
522
|
-
}, tagState.showCollapseButton && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumbutton.ActionButton), {
|
|
523
|
-
isQuiet: true,
|
|
524
|
-
onPress: handlePressCollapse,
|
|
525
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-actionButton")
|
|
526
|
-
}, isCollapsed ? stringFormatter.format("showAllButtonLabel", {
|
|
527
|
-
tagCount: state.collection.size
|
|
528
|
-
}) : stringFormatter.format("hideButtonLabel")), actionLabel && onAction && /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).createElement((0, $dTV3V$reactspectrumbutton.ActionButton), {
|
|
529
|
-
isQuiet: true,
|
|
530
|
-
onPress: ()=>onAction === null || onAction === void 0 ? void 0 : onAction(),
|
|
531
|
-
UNSAFE_className: (0, $dTV3V$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($ed889f8f1f091fc8$exports))), "spectrum-Tags-actionButton")
|
|
532
|
-
}, actionLabel))))));
|
|
533
|
-
}
|
|
534
|
-
/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */ const $e7b72d8874e98cd4$export$67ea30858aaf75e3 = /*#__PURE__*/ (0, ($parcel$interopDefault($dTV3V$react))).forwardRef($e7b72d8874e98cd4$var$TagGroup);
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
25
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBD,4BAAiB;IACf,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;I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;OACpC,cACC,gBAAgB,MAAM,CAAC,sBAAsB;QAAC,UAAU,MAAM,UAAU,CAAC,IAAI;IAAA,KAC7E,gBAAgB,MAAM,CAAC,qBAI5B,eAAe,0BACd,0DAAC,CAAA,GAAA,uCAAW;QACV,SAAA;QACA,SAAS,IAAM,qBAAA,+BAAA;QACf,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OACpC;AAUrB;AAEA,4IAA4I,GAC5I,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC;;CD7QlC","sources":["packages/@react-spectrum/tag/src/index.ts","packages/@react-spectrum/tag/src/TagGroup.tsx","packages/@react-spectrum/tag/src/*.js","packages/@adobe/spectrum-css-temp/components/tags/vars.css","packages/@react-spectrum/tag/src/Tag.tsx"],"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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\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 {ActionButton} from '@react-spectrum/button';\nimport {AriaTagGroupProps, useTagGroup} from '@react-aria/tag';\nimport {classNames, useDOMRef} from '@react-spectrum/utils';\nimport {Collection, DOMRef, Node, SpectrumLabelableProps, StyleProps, Validation} from '@react-types/shared';\nimport {Field} from '@react-spectrum/label';\nimport {FocusRing, FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {ListCollection, useListState} from '@react-stately/list';\nimport {ListKeyboardDelegate} from '@react-aria/selection';\nimport {Provider, useProvider, useProviderProps} from '@react-spectrum/provider';\nimport React, {JSX, ReactElement, useCallback, useEffect, useMemo, useRef, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Tag} from './Tag';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useId, useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\n\nconst TAG_STYLES = {\n medium: {\n height: 24,\n margin: 4\n },\n large: {\n height: 30,\n margin: 5\n }\n};\n\nexport interface SpectrumTagGroupProps<T> extends Omit<AriaTagGroupProps<T>, 'selectionMode' | 'disallowEmptySelection' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'selectionBehavior' | 'disabledKeys'>, StyleProps, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, Pick<Validation<any>, 'isInvalid' | 'validationState'> {\n /** The label to display on the action button. */\n actionLabel?: string,\n /** Handler that is called when the action button is pressed. */\n onAction?: () => void,\n /** Sets what the TagGroup should render when there are no tags to display. */\n renderEmptyState?: () => JSX.Element,\n /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */\n maxRows?: number\n}\n\nfunction TagGroup<T extends object>(props: SpectrumTagGroupProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n maxRows,\n children,\n actionLabel,\n onAction,\n labelPosition,\n renderEmptyState = () => stringFormatter.format('noTags')\n } = props;\n let domRef = useDOMRef(ref);\n let containerRef = useRef(null);\n let tagsRef = useRef<HTMLDivElement | null>(null);\n let {direction} = useLocale();\n let {scale} = useProvider();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/tag');\n let [isCollapsed, setIsCollapsed] = useState(maxRows != null);\n let state = useListState(props);\n let [tagState, setTagState] = useValueEffect({visibleTagCount: state.collection.size, showCollapseButton: false});\n let keyboardDelegate = useMemo(() => {\n let collection = (isCollapsed\n ? new ListCollection([...state.collection].slice(0, tagState.visibleTagCount))\n : new ListCollection([...state.collection])) as Collection<Node<T>>;\n return new ListKeyboardDelegate({\n collection,\n ref: domRef,\n direction,\n orientation: 'horizontal'\n });\n }, [direction, isCollapsed, state.collection, tagState.visibleTagCount, domRef]) as ListKeyboardDelegate<T>;\n // Remove onAction from props so it doesn't make it into useGridList.\n delete props.onAction;\n let {gridProps, labelProps, descriptionProps, errorMessageProps} = useTagGroup({...props, keyboardDelegate}, state, tagsRef);\n let actionsId = useId();\n let actionsRef = useRef(null);\n\n let updateVisibleTagCount = useCallback(() => {\n if (maxRows && maxRows > 0) {\n let computeVisibleTagCount = () => {\n // Refs can be null at runtime.\n let currContainerRef: HTMLDivElement | null = containerRef.current;\n let currTagsRef: HTMLDivElement | null = tagsRef.current;\n let currActionsRef: HTMLDivElement | null = actionsRef.current;\n if (!currContainerRef || !currTagsRef || !currActionsRef || state.collection.size === 0) {\n return {\n visibleTagCount: 0,\n showCollapseButton: false\n };\n }\n\n // Count rows and show tags until we hit the maxRows.\n let tags = [...currTagsRef.children];\n let currY = -Infinity;\n let rowCount = 0;\n let index = 0;\n let tagWidths: number[] = [];\n for (let tag of tags) {\n let {width, y} = tag.getBoundingClientRect();\n\n if (y !== currY) {\n currY = y;\n rowCount++;\n }\n\n if (maxRows && rowCount > maxRows) {\n break;\n }\n tagWidths.push(width);\n index++;\n }\n\n // Remove tags until there is space for the collapse button and action button (if present) on the last row.\n let buttons = [...currActionsRef.children];\n if (maxRows && buttons.length > 0 && rowCount >= maxRows) {\n let buttonsWidth = buttons.reduce((acc, curr) => acc += curr.getBoundingClientRect().width, 0);\n buttonsWidth += TAG_STYLES[scale].margin * 2 * buttons.length;\n let end = direction === 'ltr' ? 'right' : 'left';\n let containerEnd = currContainerRef.parentElement.getBoundingClientRect()[end];\n let lastTagEnd = tags[index - 1]?.getBoundingClientRect()[end];\n lastTagEnd += TAG_STYLES[scale].margin;\n let availableWidth = containerEnd - lastTagEnd;\n\n while (availableWidth < buttonsWidth && index > 0) {\n availableWidth += tagWidths.pop();\n index--;\n }\n }\n\n return {\n visibleTagCount: Math.max(index, 1),\n showCollapseButton: index < state.collection.size\n };\n };\n\n setTagState(function *() {\n // Update to show all items.\n yield {visibleTagCount: state.collection.size, showCollapseButton: true};\n\n // Measure, and update to show the items until maxRows is reached.\n yield computeVisibleTagCount();\n });\n }\n }, [maxRows, setTagState, direction, scale, state.collection.size]);\n\n useResizeObserver({ref: containerRef, onResize: updateVisibleTagCount});\n // eslint-disable-next-line react-hooks/exhaustive-deps\n useLayoutEffect(updateVisibleTagCount, [children]);\n\n useEffect(() => {\n // Recalculate visible tags when fonts are loaded.\n document.fonts?.ready.then(() => updateVisibleTagCount());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n let visibleTags = useMemo(() =>\n [...state.collection].slice(0, isCollapsed ? tagState.visibleTagCount : state.collection.size),\n [isCollapsed, state.collection, tagState.visibleTagCount]\n );\n\n let handlePressCollapse = () => {\n // Prevents button from losing focus if focusedKey got collapsed.\n state.selectionManager.setFocusedKey(null);\n setIsCollapsed(prevCollapsed => !prevCollapsed);\n };\n\n let showActions = tagState.showCollapseButton || (actionLabel && onAction);\n let isEmpty = state.collection.size === 0;\n\n let containerStyle = useMemo(() => {\n if (maxRows == null || !isCollapsed || isEmpty) {\n return undefined;\n }\n let maxHeight = (TAG_STYLES[scale].height + (TAG_STYLES[scale].margin * 2)) * maxRows;\n return {maxHeight, overflow: 'hidden'};\n }, [isCollapsed, maxRows, isEmpty, scale]);\n\n return (\n <FocusScope>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n showErrorIcon\n ref={domRef}\n elementType=\"span\"\n wrapperClassName={\n classNames(\n styles,\n 'spectrum-Tags-fieldWrapper',\n {\n 'spectrum-Tags-fieldWrapper--positionSide': labelPosition === 'side'\n }\n )\n }>\n <div\n ref={containerRef}\n style={containerStyle}\n className={\n classNames(\n styles,\n 'spectrum-Tags-container',\n {\n 'spectrum-Tags-container--empty': isEmpty\n }\n )\n }>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n ref={tagsRef}\n {...gridProps}\n className={classNames(styles, 'spectrum-Tags')}>\n {visibleTags.map(item => (\n <Tag\n {...item.props}\n key={item.key}\n item={item}\n state={state}>\n {item.rendered}\n </Tag>\n ))}\n {isEmpty && (\n <div className={classNames(styles, 'spectrum-Tags-empty-state')}>\n {renderEmptyState()}\n </div>\n )}\n </div>\n </FocusRing>\n {showActions && !isEmpty &&\n <Provider isDisabled={false}>\n <div\n role=\"group\"\n ref={actionsRef}\n id={actionsId}\n aria-label={stringFormatter.format('actions')}\n aria-labelledby={`${gridProps.id} ${actionsId}`}\n className={classNames(styles, 'spectrum-Tags-actions')}>\n {tagState.showCollapseButton &&\n <ActionButton\n isQuiet\n onPress={handlePressCollapse}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {isCollapsed ?\n stringFormatter.format('showAllButtonLabel', {tagCount: state.collection.size}) :\n stringFormatter.format('hideButtonLabel')\n }\n </ActionButton>\n }\n {actionLabel && onAction &&\n <ActionButton\n isQuiet\n onPress={() => onAction?.()}\n UNSAFE_className={classNames(styles, 'spectrum-Tags-actionButton')}>\n {actionLabel}\n </ActionButton>\n }\n </div>\n </Provider>\n }\n </div>\n </Field>\n </FocusScope>\n );\n}\n\n/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */\nconst _TagGroup = React.forwardRef(TagGroup) as <T>(props: SpectrumTagGroupProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_TagGroup as TagGroup};\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 * 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\n@import './index.css';\n@import './skin.css';\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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>) {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: true});\n let ref = useRef(null);\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/src/index.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 {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"main.js.map"}
|