@react-spectrum/label 3.10.2-nightly.3698 → 3.10.2-nightly.3705
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 +566 -0
- package/package.json +17 -12
package/dist/import.mjs
ADDED
@@ -0,0 +1,566 @@
|
|
1
|
+
import "./main.css";
|
2
|
+
import {useStyleProps as $6WzO6$useStyleProps, classNames as $6WzO6$classNames, SlotProvider as $6WzO6$SlotProvider, useDOMRef as $6WzO6$useDOMRef} from "@react-spectrum/utils";
|
3
|
+
import {Flex as $6WzO6$Flex} from "@react-spectrum/layout";
|
4
|
+
import {useId as $6WzO6$useId, mergeProps as $6WzO6$mergeProps, filterDOMProps as $6WzO6$filterDOMProps} from "@react-aria/utils";
|
5
|
+
import $6WzO6$react from "react";
|
6
|
+
import {useFormProps as $6WzO6$useFormProps} from "@react-spectrum/form";
|
7
|
+
import $6WzO6$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
|
8
|
+
import $6WzO6$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
|
9
|
+
import {useLocalizedStringFormatter as $6WzO6$useLocalizedStringFormatter} from "@react-aria/i18n";
|
10
|
+
import {useProviderProps as $6WzO6$useProviderProps} from "@react-spectrum/provider";
|
11
|
+
|
12
|
+
function $parcel$interopDefault(a) {
|
13
|
+
return a && a.__esModule ? a.default : a;
|
14
|
+
}
|
15
|
+
function $parcel$export(e, n, v, s) {
|
16
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
17
|
+
}
|
18
|
+
/*
|
19
|
+
* Copyright 2020 Adobe. All rights reserved.
|
20
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
21
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
22
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
23
|
+
*
|
24
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
25
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
26
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
27
|
+
* governing permissions and limitations under the License.
|
28
|
+
*/ /// <reference types="css-module-types" />
|
29
|
+
/*
|
30
|
+
* Copyright 2020 Adobe. All rights reserved.
|
31
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
32
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
33
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
34
|
+
*
|
35
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
36
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
37
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
38
|
+
* governing permissions and limitations under the License.
|
39
|
+
*/
|
40
|
+
|
41
|
+
/*
|
42
|
+
* Copyright 2021 Adobe. All rights reserved.
|
43
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
44
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
45
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
46
|
+
*
|
47
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
48
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
49
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
50
|
+
* governing permissions and limitations under the License.
|
51
|
+
*/
|
52
|
+
|
53
|
+
|
54
|
+
var $beda4304297005df$exports = {};
|
55
|
+
|
56
|
+
$parcel$export($beda4304297005df$exports, "spectrum-HelpText", () => $beda4304297005df$export$c0875e83c57c7736, (v) => $beda4304297005df$export$c0875e83c57c7736 = v);
|
57
|
+
$parcel$export($beda4304297005df$exports, "spectrum-HelpText-validationIcon", () => $beda4304297005df$export$527776642b333691, (v) => $beda4304297005df$export$527776642b333691 = v);
|
58
|
+
$parcel$export($beda4304297005df$exports, "spectrum-HelpText-text", () => $beda4304297005df$export$a512452beb4231bf, (v) => $beda4304297005df$export$a512452beb4231bf = v);
|
59
|
+
$parcel$export($beda4304297005df$exports, "spectrum-HelpText--neutral", () => $beda4304297005df$export$6e9351b1ad13c, (v) => $beda4304297005df$export$6e9351b1ad13c = v);
|
60
|
+
$parcel$export($beda4304297005df$exports, "is-disabled", () => $beda4304297005df$export$d35bc1e505d1ebbf, (v) => $beda4304297005df$export$d35bc1e505d1ebbf = v);
|
61
|
+
$parcel$export($beda4304297005df$exports, "spectrum-HelpText--negative", () => $beda4304297005df$export$d31dd875d69daee0, (v) => $beda4304297005df$export$d31dd875d69daee0 = v);
|
62
|
+
var $beda4304297005df$export$c0875e83c57c7736;
|
63
|
+
var $beda4304297005df$export$527776642b333691;
|
64
|
+
var $beda4304297005df$export$a512452beb4231bf;
|
65
|
+
var $beda4304297005df$export$6e9351b1ad13c;
|
66
|
+
var $beda4304297005df$export$d35bc1e505d1ebbf;
|
67
|
+
var $beda4304297005df$export$d31dd875d69daee0;
|
68
|
+
$beda4304297005df$export$c0875e83c57c7736 = "spectrum-HelpText_f395de";
|
69
|
+
$beda4304297005df$export$527776642b333691 = "spectrum-HelpText-validationIcon_f395de";
|
70
|
+
$beda4304297005df$export$a512452beb4231bf = "spectrum-HelpText-text_f395de";
|
71
|
+
$beda4304297005df$export$6e9351b1ad13c = "spectrum-HelpText--neutral_f395de";
|
72
|
+
$beda4304297005df$export$d35bc1e505d1ebbf = "is-disabled_f395de";
|
73
|
+
$beda4304297005df$export$d31dd875d69daee0 = "spectrum-HelpText--negative_f395de";
|
74
|
+
|
75
|
+
|
76
|
+
function $8e50676506611310$var$HelpText(props, ref) {
|
77
|
+
let { description: description , errorMessage: errorMessage , validationState: validationState , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
|
78
|
+
let domRef = (0, $6WzO6$useDOMRef)(ref);
|
79
|
+
let isErrorMessage = errorMessage && validationState === "invalid";
|
80
|
+
let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(props);
|
81
|
+
return /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
82
|
+
...styleProps,
|
83
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($beda4304297005df$exports))), "spectrum-HelpText", `spectrum-HelpText--${isErrorMessage ? "negative" : "neutral"}`, {
|
84
|
+
"is-disabled": isDisabled
|
85
|
+
}, styleProps.className),
|
86
|
+
ref: domRef
|
87
|
+
}, isErrorMessage ? /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$react).Fragment, null, showErrorIcon && /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$spectrumiconsuiAlertMedium), {
|
88
|
+
UNSAFE_className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($beda4304297005df$exports))), "spectrum-HelpText-validationIcon")
|
89
|
+
}), /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
90
|
+
...errorMessageProps,
|
91
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($beda4304297005df$exports))), "spectrum-HelpText-text")
|
92
|
+
}, errorMessage)) : /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
93
|
+
...descriptionProps,
|
94
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($beda4304297005df$exports))), "spectrum-HelpText-text")
|
95
|
+
}, description));
|
96
|
+
}
|
97
|
+
/**
|
98
|
+
* Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
|
99
|
+
*/ const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $6WzO6$react).forwardRef($8e50676506611310$var$HelpText);
|
100
|
+
|
101
|
+
|
102
|
+
/*
|
103
|
+
* Copyright 2020 Adobe. All rights reserved.
|
104
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
105
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
106
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
107
|
+
*
|
108
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
109
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
110
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
111
|
+
* governing permissions and limitations under the License.
|
112
|
+
*/
|
113
|
+
|
114
|
+
|
115
|
+
var $79b4ff1b6ea94ffc$exports = {};
|
116
|
+
var $dfe96401c0c81db3$exports = {};
|
117
|
+
$dfe96401c0c81db3$exports = {
|
118
|
+
"(optional)": `(اختياري)`,
|
119
|
+
"(required)": `(مطلوب)`
|
120
|
+
};
|
121
|
+
|
122
|
+
|
123
|
+
var $f504605657ece833$exports = {};
|
124
|
+
$f504605657ece833$exports = {
|
125
|
+
"(optional)": `(незадължително)`,
|
126
|
+
"(required)": `(задължително)`
|
127
|
+
};
|
128
|
+
|
129
|
+
|
130
|
+
var $ed0ab9e7c53f9351$exports = {};
|
131
|
+
$ed0ab9e7c53f9351$exports = {
|
132
|
+
"(optional)": `(volitelně)`,
|
133
|
+
"(required)": `(požadováno)`
|
134
|
+
};
|
135
|
+
|
136
|
+
|
137
|
+
var $59d9df99e04ee555$exports = {};
|
138
|
+
$59d9df99e04ee555$exports = {
|
139
|
+
"(optional)": `(valgfrit)`,
|
140
|
+
"(required)": `(obligatorisk)`
|
141
|
+
};
|
142
|
+
|
143
|
+
|
144
|
+
var $c5df0169c370d169$exports = {};
|
145
|
+
$c5df0169c370d169$exports = {
|
146
|
+
"(optional)": `(optional)`,
|
147
|
+
"(required)": `(erforderlich)`
|
148
|
+
};
|
149
|
+
|
150
|
+
|
151
|
+
var $3c9af509a01a8d08$exports = {};
|
152
|
+
$3c9af509a01a8d08$exports = {
|
153
|
+
"(optional)": `(προαιρετικό)`,
|
154
|
+
"(required)": `(απαιτείται)`
|
155
|
+
};
|
156
|
+
|
157
|
+
|
158
|
+
var $aa36476f91664a08$exports = {};
|
159
|
+
$aa36476f91664a08$exports = {
|
160
|
+
"(required)": `(required)`,
|
161
|
+
"(optional)": `(optional)`
|
162
|
+
};
|
163
|
+
|
164
|
+
|
165
|
+
var $d96f2251ced25e45$exports = {};
|
166
|
+
$d96f2251ced25e45$exports = {
|
167
|
+
"(optional)": `(opcional)`,
|
168
|
+
"(required)": `(necesario)`
|
169
|
+
};
|
170
|
+
|
171
|
+
|
172
|
+
var $16ec4ffbd4b2ca4b$exports = {};
|
173
|
+
$16ec4ffbd4b2ca4b$exports = {
|
174
|
+
"(optional)": `(valikuline)`,
|
175
|
+
"(required)": `(nõutav)`
|
176
|
+
};
|
177
|
+
|
178
|
+
|
179
|
+
var $60f372f660e937e4$exports = {};
|
180
|
+
$60f372f660e937e4$exports = {
|
181
|
+
"(optional)": `(valinnainen)`,
|
182
|
+
"(required)": `(pakollinen)`
|
183
|
+
};
|
184
|
+
|
185
|
+
|
186
|
+
var $d87c5f1e899f6af1$exports = {};
|
187
|
+
$d87c5f1e899f6af1$exports = {
|
188
|
+
"(optional)": `(facultatif)`,
|
189
|
+
"(required)": `(requis)`
|
190
|
+
};
|
191
|
+
|
192
|
+
|
193
|
+
var $6899669fa63c7816$exports = {};
|
194
|
+
$6899669fa63c7816$exports = {
|
195
|
+
"(optional)": `(אופציונלי)`,
|
196
|
+
"(required)": `(נדרש)`
|
197
|
+
};
|
198
|
+
|
199
|
+
|
200
|
+
var $3597d722a30a8081$exports = {};
|
201
|
+
$3597d722a30a8081$exports = {
|
202
|
+
"(optional)": `(opcionalno)`,
|
203
|
+
"(required)": `(obvezno)`
|
204
|
+
};
|
205
|
+
|
206
|
+
|
207
|
+
var $3ef905a2ce0921cb$exports = {};
|
208
|
+
$3ef905a2ce0921cb$exports = {
|
209
|
+
"(optional)": `(opcionális)`,
|
210
|
+
"(required)": `(kötelező)`
|
211
|
+
};
|
212
|
+
|
213
|
+
|
214
|
+
var $e59d2e4af9ff1c28$exports = {};
|
215
|
+
$e59d2e4af9ff1c28$exports = {
|
216
|
+
"(optional)": `(facoltativo)`,
|
217
|
+
"(required)": `(obbligatorio)`
|
218
|
+
};
|
219
|
+
|
220
|
+
|
221
|
+
var $422a7013ab2cb36d$exports = {};
|
222
|
+
$422a7013ab2cb36d$exports = {
|
223
|
+
"(optional)": `(オプション)`,
|
224
|
+
"(required)": `(必須)`
|
225
|
+
};
|
226
|
+
|
227
|
+
|
228
|
+
var $a58a7ab9570c5a18$exports = {};
|
229
|
+
$a58a7ab9570c5a18$exports = {
|
230
|
+
"(optional)": `(선택 사항)`,
|
231
|
+
"(required)": `(필수 사항)`
|
232
|
+
};
|
233
|
+
|
234
|
+
|
235
|
+
var $24e660c5a5be82af$exports = {};
|
236
|
+
$24e660c5a5be82af$exports = {
|
237
|
+
"(optional)": `(pasirenkama)`,
|
238
|
+
"(required)": `(privaloma)`
|
239
|
+
};
|
240
|
+
|
241
|
+
|
242
|
+
var $a222e05de6d8dce8$exports = {};
|
243
|
+
$a222e05de6d8dce8$exports = {
|
244
|
+
"(optional)": `(neobligāti)`,
|
245
|
+
"(required)": `(obligāti)`
|
246
|
+
};
|
247
|
+
|
248
|
+
|
249
|
+
var $524caea23ab94ad7$exports = {};
|
250
|
+
$524caea23ab94ad7$exports = {
|
251
|
+
"(optional)": `(valgfritt)`,
|
252
|
+
"(required)": `(obligatorisk)`
|
253
|
+
};
|
254
|
+
|
255
|
+
|
256
|
+
var $572079ed86210ca9$exports = {};
|
257
|
+
$572079ed86210ca9$exports = {
|
258
|
+
"(optional)": `(optioneel)`,
|
259
|
+
"(required)": `(vereist)`
|
260
|
+
};
|
261
|
+
|
262
|
+
|
263
|
+
var $6a0777ee77a74b18$exports = {};
|
264
|
+
$6a0777ee77a74b18$exports = {
|
265
|
+
"(optional)": `(opcjonalne)`,
|
266
|
+
"(required)": `(wymagane)`
|
267
|
+
};
|
268
|
+
|
269
|
+
|
270
|
+
var $ea0401974d81b469$exports = {};
|
271
|
+
$ea0401974d81b469$exports = {
|
272
|
+
"(optional)": `(opcional)`,
|
273
|
+
"(required)": `(obrigatório)`
|
274
|
+
};
|
275
|
+
|
276
|
+
|
277
|
+
var $701d0854e4f18979$exports = {};
|
278
|
+
$701d0854e4f18979$exports = {
|
279
|
+
"(optional)": `(opcional)`,
|
280
|
+
"(required)": `(obrigatório)`
|
281
|
+
};
|
282
|
+
|
283
|
+
|
284
|
+
var $dd9fccd10d0a4be3$exports = {};
|
285
|
+
$dd9fccd10d0a4be3$exports = {
|
286
|
+
"(optional)": `(opţional)`,
|
287
|
+
"(required)": `(obligatoriu)`
|
288
|
+
};
|
289
|
+
|
290
|
+
|
291
|
+
var $3cd1eab3b0ecc980$exports = {};
|
292
|
+
$3cd1eab3b0ecc980$exports = {
|
293
|
+
"(optional)": `(дополнительно)`,
|
294
|
+
"(required)": `(обязательно)`
|
295
|
+
};
|
296
|
+
|
297
|
+
|
298
|
+
var $d109f3d68ba24ffc$exports = {};
|
299
|
+
$d109f3d68ba24ffc$exports = {
|
300
|
+
"(optional)": `(nepovinné)`,
|
301
|
+
"(required)": `(povinné)`
|
302
|
+
};
|
303
|
+
|
304
|
+
|
305
|
+
var $6382c2117e9fd1b6$exports = {};
|
306
|
+
$6382c2117e9fd1b6$exports = {
|
307
|
+
"(optional)": `(opcijsko)`,
|
308
|
+
"(required)": `(obvezno)`
|
309
|
+
};
|
310
|
+
|
311
|
+
|
312
|
+
var $ba796dd79114e2d4$exports = {};
|
313
|
+
$ba796dd79114e2d4$exports = {
|
314
|
+
"(optional)": `(opciono)`,
|
315
|
+
"(required)": `(obavezno)`
|
316
|
+
};
|
317
|
+
|
318
|
+
|
319
|
+
var $916521e9800ac46c$exports = {};
|
320
|
+
$916521e9800ac46c$exports = {
|
321
|
+
"(optional)": `(valfritt)`,
|
322
|
+
"(required)": `(krävs)`
|
323
|
+
};
|
324
|
+
|
325
|
+
|
326
|
+
var $acd72b88f580fe64$exports = {};
|
327
|
+
$acd72b88f580fe64$exports = {
|
328
|
+
"(optional)": `(isteğe bağlı)`,
|
329
|
+
"(required)": `(gerekli)`
|
330
|
+
};
|
331
|
+
|
332
|
+
|
333
|
+
var $bd065904f1420f31$exports = {};
|
334
|
+
$bd065904f1420f31$exports = {
|
335
|
+
"(optional)": `(необов’язково)`,
|
336
|
+
"(required)": `(обов’язково)`
|
337
|
+
};
|
338
|
+
|
339
|
+
|
340
|
+
var $0128cc194bc107bb$exports = {};
|
341
|
+
$0128cc194bc107bb$exports = {
|
342
|
+
"(optional)": `(可选)`,
|
343
|
+
"(required)": `(必填)`
|
344
|
+
};
|
345
|
+
|
346
|
+
|
347
|
+
var $c57738f6094a3d25$exports = {};
|
348
|
+
$c57738f6094a3d25$exports = {
|
349
|
+
"(optional)": `(選填)`,
|
350
|
+
"(required)": `(必填)`
|
351
|
+
};
|
352
|
+
|
353
|
+
|
354
|
+
$79b4ff1b6ea94ffc$exports = {
|
355
|
+
"ar-AE": $dfe96401c0c81db3$exports,
|
356
|
+
"bg-BG": $f504605657ece833$exports,
|
357
|
+
"cs-CZ": $ed0ab9e7c53f9351$exports,
|
358
|
+
"da-DK": $59d9df99e04ee555$exports,
|
359
|
+
"de-DE": $c5df0169c370d169$exports,
|
360
|
+
"el-GR": $3c9af509a01a8d08$exports,
|
361
|
+
"en-US": $aa36476f91664a08$exports,
|
362
|
+
"es-ES": $d96f2251ced25e45$exports,
|
363
|
+
"et-EE": $16ec4ffbd4b2ca4b$exports,
|
364
|
+
"fi-FI": $60f372f660e937e4$exports,
|
365
|
+
"fr-FR": $d87c5f1e899f6af1$exports,
|
366
|
+
"he-IL": $6899669fa63c7816$exports,
|
367
|
+
"hr-HR": $3597d722a30a8081$exports,
|
368
|
+
"hu-HU": $3ef905a2ce0921cb$exports,
|
369
|
+
"it-IT": $e59d2e4af9ff1c28$exports,
|
370
|
+
"ja-JP": $422a7013ab2cb36d$exports,
|
371
|
+
"ko-KR": $a58a7ab9570c5a18$exports,
|
372
|
+
"lt-LT": $24e660c5a5be82af$exports,
|
373
|
+
"lv-LV": $a222e05de6d8dce8$exports,
|
374
|
+
"nb-NO": $524caea23ab94ad7$exports,
|
375
|
+
"nl-NL": $572079ed86210ca9$exports,
|
376
|
+
"pl-PL": $6a0777ee77a74b18$exports,
|
377
|
+
"pt-BR": $ea0401974d81b469$exports,
|
378
|
+
"pt-PT": $701d0854e4f18979$exports,
|
379
|
+
"ro-RO": $dd9fccd10d0a4be3$exports,
|
380
|
+
"ru-RU": $3cd1eab3b0ecc980$exports,
|
381
|
+
"sk-SK": $d109f3d68ba24ffc$exports,
|
382
|
+
"sl-SI": $6382c2117e9fd1b6$exports,
|
383
|
+
"sr-SP": $ba796dd79114e2d4$exports,
|
384
|
+
"sv-SE": $916521e9800ac46c$exports,
|
385
|
+
"tr-TR": $acd72b88f580fe64$exports,
|
386
|
+
"uk-UA": $bd065904f1420f31$exports,
|
387
|
+
"zh-CN": $0128cc194bc107bb$exports,
|
388
|
+
"zh-TW": $c57738f6094a3d25$exports
|
389
|
+
};
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
var $cd231e464c886c86$exports = {};
|
394
|
+
|
395
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
|
396
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
|
397
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
|
398
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
|
399
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
400
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-contextualHelp", () => $cd231e464c886c86$export$24fb860d16dd2d3f, (v) => $cd231e464c886c86$export$24fb860d16dd2d3f = v);
|
401
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
402
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
403
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--alignEnd", () => $cd231e464c886c86$export$5354c9be7ada5f83, (v) => $cd231e464c886c86$export$5354c9be7ada5f83 = v);
|
404
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
405
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
406
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--hasContextualHelp", () => $cd231e464c886c86$export$9ba23707a252cdd4, (v) => $cd231e464c886c86$export$9ba23707a252cdd4 = v);
|
407
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
408
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
409
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelCell", () => $cd231e464c886c86$export$9cde5aecff012641, (v) => $cd231e464c886c86$export$9cde5aecff012641 = v);
|
410
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelWrapper", () => $cd231e464c886c86$export$a872a8c78b26c9e0, (v) => $cd231e464c886c86$export$a872a8c78b26c9e0 = v);
|
411
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
412
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-LabeledValue", () => $cd231e464c886c86$export$79f9a5e9dd010c8d, (v) => $cd231e464c886c86$export$79f9a5e9dd010c8d = v);
|
413
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
414
|
+
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
415
|
+
var $cd231e464c886c86$export$493d18e796ae054;
|
416
|
+
var $cd231e464c886c86$export$9e6f19dc21f22f2e;
|
417
|
+
var $cd231e464c886c86$export$7c47642c7d46f3c9;
|
418
|
+
var $cd231e464c886c86$export$885efcc08143a987;
|
419
|
+
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
420
|
+
var $cd231e464c886c86$export$24fb860d16dd2d3f;
|
421
|
+
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
422
|
+
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
423
|
+
var $cd231e464c886c86$export$5354c9be7ada5f83;
|
424
|
+
var $cd231e464c886c86$export$2963225c91179589;
|
425
|
+
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
426
|
+
var $cd231e464c886c86$export$9ba23707a252cdd4;
|
427
|
+
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
428
|
+
var $cd231e464c886c86$export$7f44db659563c8f4;
|
429
|
+
var $cd231e464c886c86$export$9cde5aecff012641;
|
430
|
+
var $cd231e464c886c86$export$a872a8c78b26c9e0;
|
431
|
+
var $cd231e464c886c86$export$11b8bc81fe551057;
|
432
|
+
var $cd231e464c886c86$export$79f9a5e9dd010c8d;
|
433
|
+
var $cd231e464c886c86$export$51ec27881a1e3928;
|
434
|
+
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
435
|
+
$cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
436
|
+
$cd231e464c886c86$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
|
437
|
+
$cd231e464c886c86$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
|
438
|
+
$cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
|
439
|
+
$cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
440
|
+
$cd231e464c886c86$export$24fb860d16dd2d3f = "spectrum-Field-contextualHelp_d2db1f";
|
441
|
+
$cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
442
|
+
$cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
443
|
+
$cd231e464c886c86$export$5354c9be7ada5f83 = "spectrum-Field--alignEnd_d2db1f";
|
444
|
+
$cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
445
|
+
$cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
446
|
+
$cd231e464c886c86$export$9ba23707a252cdd4 = "spectrum-Field--hasContextualHelp_d2db1f";
|
447
|
+
$cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
448
|
+
$cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
449
|
+
$cd231e464c886c86$export$9cde5aecff012641 = "spectrum-Field-labelCell_d2db1f";
|
450
|
+
$cd231e464c886c86$export$a872a8c78b26c9e0 = "spectrum-Field-labelWrapper_d2db1f";
|
451
|
+
$cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
452
|
+
$cd231e464c886c86$export$79f9a5e9dd010c8d = "spectrum-LabeledValue_d2db1f";
|
453
|
+
$cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
454
|
+
$cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
function $00af9ba397a66f43$var$Label(props, ref) {
|
460
|
+
props = (0, $6WzO6$useProviderProps)(props);
|
461
|
+
let { children: children , labelPosition: labelPosition = "top" , labelAlign: labelAlign = labelPosition === "side" ? "start" : null , isRequired: isRequired , necessityIndicator: necessityIndicator = isRequired != null ? "icon" : null , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false , htmlFor: htmlFor , for: labelFor , elementType: ElementType = "label" , onClick: onClick , ...otherProps } = props;
|
462
|
+
let domRef = (0, $6WzO6$useDOMRef)(ref);
|
463
|
+
let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(otherProps);
|
464
|
+
let stringFormatter = (0, $6WzO6$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($79b4ff1b6ea94ffc$exports))));
|
465
|
+
let necessityLabel = isRequired ? stringFormatter.format("(required)") : stringFormatter.format("(optional)");
|
466
|
+
let icon = /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$spectrumiconsuiAsterisk), {
|
467
|
+
UNSAFE_className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-FieldLabel-requiredIcon"),
|
468
|
+
"aria-label": includeNecessityIndicatorInAccessibilityName ? stringFormatter.format("(required)") : undefined
|
469
|
+
});
|
470
|
+
let labelClassNames = (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-FieldLabel", {
|
471
|
+
"spectrum-FieldLabel--positionSide": labelPosition === "side",
|
472
|
+
"spectrum-FieldLabel--alignEnd": labelAlign === "end"
|
473
|
+
}, styleProps.className);
|
474
|
+
return /*#__PURE__*/ (0, $6WzO6$react).createElement(ElementType, {
|
475
|
+
...(0, $6WzO6$filterDOMProps)(otherProps),
|
476
|
+
...styleProps,
|
477
|
+
onClick: onClick,
|
478
|
+
ref: domRef,
|
479
|
+
className: labelClassNames,
|
480
|
+
htmlFor: ElementType === "label" ? labelFor || htmlFor : undefined
|
481
|
+
}, children, (necessityIndicator === "label" || necessityIndicator === "icon" && isRequired) && " ", necessityIndicator === "label" && /*#__PURE__*/ (0, $6WzO6$react).createElement("span", {
|
482
|
+
"aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
|
483
|
+
}, necessityLabel), necessityIndicator === "icon" && isRequired && icon);
|
484
|
+
}
|
485
|
+
let $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $6WzO6$react).forwardRef($00af9ba397a66f43$var$Label);
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
function $b7ca5b4454a2009d$var$Field(props, ref) {
|
493
|
+
let formProps = (0, $6WzO6$useFormProps)(props);
|
494
|
+
let isInForm = formProps !== props;
|
495
|
+
props = formProps;
|
496
|
+
let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps , descriptionProps: // Not every component that uses <Field> supports help text.
|
497
|
+
descriptionProps = {} , errorMessageProps: errorMessageProps = {} , elementType: elementType , wrapperClassName: wrapperClassName , wrapperProps: wrapperProps = {} , ...otherProps } = props;
|
498
|
+
let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(otherProps);
|
499
|
+
let hasHelpText = !!description || errorMessage && validationState === "invalid";
|
500
|
+
let contextualHelpId = (0, $6WzO6$useId)();
|
501
|
+
let labelWrapperClass = (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field", {
|
502
|
+
"spectrum-Field--positionTop": labelPosition === "top",
|
503
|
+
"spectrum-Field--positionSide": labelPosition === "side",
|
504
|
+
"spectrum-Field--alignEnd": labelAlign === "end",
|
505
|
+
"spectrum-Field--hasContextualHelp": !!props.contextualHelp
|
506
|
+
}, styleProps.className, wrapperClassName);
|
507
|
+
children = /*#__PURE__*/ (0, $6WzO6$react).cloneElement(children, (0, $6WzO6$mergeProps)(children.props, {
|
508
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field-field")
|
509
|
+
}));
|
510
|
+
let renderHelpText = ()=>/*#__PURE__*/ (0, $6WzO6$react).createElement((0, $8e50676506611310$export$a67c0bc59081311a), {
|
511
|
+
descriptionProps: descriptionProps,
|
512
|
+
errorMessageProps: errorMessageProps,
|
513
|
+
description: description,
|
514
|
+
errorMessage: errorMessage,
|
515
|
+
validationState: validationState,
|
516
|
+
isDisabled: isDisabled,
|
517
|
+
showErrorIcon: showErrorIcon,
|
518
|
+
gridArea: "helpText"
|
519
|
+
});
|
520
|
+
let renderChildren = ()=>{
|
521
|
+
if (labelPosition === "side") return /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$Flex), {
|
522
|
+
direction: "column",
|
523
|
+
UNSAFE_className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field-wrapper")
|
524
|
+
}, children, hasHelpText && renderHelpText());
|
525
|
+
return /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$react).Fragment, null, children, hasHelpText && renderHelpText());
|
526
|
+
};
|
527
|
+
let labelAndContextualHelp = /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$react).Fragment, null, label && /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $00af9ba397a66f43$export$b04be29aa201d4f5), {
|
528
|
+
...labelProps,
|
529
|
+
labelPosition: labelPosition,
|
530
|
+
labelAlign: labelAlign,
|
531
|
+
isRequired: isRequired,
|
532
|
+
necessityIndicator: necessityIndicator,
|
533
|
+
includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName,
|
534
|
+
elementType: elementType
|
535
|
+
}, label), label && contextualHelp && /*#__PURE__*/ (0, $6WzO6$react).createElement((0, $6WzO6$SlotProvider), {
|
536
|
+
slots: {
|
537
|
+
actionButton: {
|
538
|
+
UNSAFE_className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field-contextualHelp"),
|
539
|
+
id: contextualHelpId,
|
540
|
+
"aria-labelledby": (labelProps === null || labelProps === void 0 ? void 0 : labelProps.id) ? `${labelProps.id} ${contextualHelpId}` : undefined
|
541
|
+
}
|
542
|
+
}
|
543
|
+
}, contextualHelp));
|
544
|
+
// Need to add an extra wrapper for the label and contextual help if labelPosition is side,
|
545
|
+
// so that the table layout works inside forms.
|
546
|
+
if (isInForm && labelPosition === "side" && label && contextualHelp) labelAndContextualHelp = /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
547
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field-labelCell")
|
548
|
+
}, /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
549
|
+
className: (0, $6WzO6$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Field-labelWrapper")
|
550
|
+
}, labelAndContextualHelp));
|
551
|
+
return /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
|
552
|
+
...styleProps,
|
553
|
+
...wrapperProps,
|
554
|
+
ref: ref,
|
555
|
+
className: labelWrapperClass
|
556
|
+
}, labelAndContextualHelp, renderChildren());
|
557
|
+
}
|
558
|
+
let $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ (0, $6WzO6$react).forwardRef($b7ca5b4454a2009d$var$Field);
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
export {$b7ca5b4454a2009d$export$a455218a85c89869 as Field, $00af9ba397a66f43$export$b04be29aa201d4f5 as Label, $8e50676506611310$export$a67c0bc59081311a as HelpText};
|
566
|
+
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
@@ -1,10 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/label",
|
3
|
-
"version": "3.10.2-nightly.
|
3
|
+
"version": "3.10.2-nightly.3705+93b3c951e",
|
4
4
|
"description": "Spectrum UI components in React",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "dist/main.js",
|
7
7
|
"module": "dist/module.js",
|
8
|
+
"exports": {
|
9
|
+
"types": "./dist/types.d.ts",
|
10
|
+
"import": "./dist/import.mjs",
|
11
|
+
"require": "./dist/main.js"
|
12
|
+
},
|
8
13
|
"types": "dist/types.d.ts",
|
9
14
|
"source": "src/index.ts",
|
10
15
|
"files": [
|
@@ -31,19 +36,19 @@
|
|
31
36
|
"url": "https://github.com/adobe/react-spectrum"
|
32
37
|
},
|
33
38
|
"dependencies": {
|
34
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
35
|
-
"@react-aria/label": "3.0.0-nightly.
|
36
|
-
"@react-aria/utils": "3.0.0-nightly.
|
37
|
-
"@react-spectrum/form": "3.0.0-nightly.
|
38
|
-
"@react-spectrum/layout": "3.4.5-nightly.
|
39
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
40
|
-
"@react-types/label": "3.0.0-nightly.
|
41
|
-
"@react-types/shared": "3.0.0-nightly.
|
42
|
-
"@spectrum-icons/ui": "3.0.0-nightly.
|
39
|
+
"@react-aria/i18n": "3.0.0-nightly.2005+93b3c951e",
|
40
|
+
"@react-aria/label": "3.0.0-nightly.2005+93b3c951e",
|
41
|
+
"@react-aria/utils": "3.0.0-nightly.2005+93b3c951e",
|
42
|
+
"@react-spectrum/form": "3.0.0-nightly.2005+93b3c951e",
|
43
|
+
"@react-spectrum/layout": "3.4.5-nightly.3705+93b3c951e",
|
44
|
+
"@react-spectrum/utils": "3.0.0-nightly.2005+93b3c951e",
|
45
|
+
"@react-types/label": "3.0.0-nightly.2005+93b3c951e",
|
46
|
+
"@react-types/shared": "3.0.0-nightly.2005+93b3c951e",
|
47
|
+
"@spectrum-icons/ui": "3.0.0-nightly.2005+93b3c951e",
|
43
48
|
"@swc/helpers": "^0.4.14"
|
44
49
|
},
|
45
50
|
"devDependencies": {
|
46
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
51
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.2005+93b3c951e"
|
47
52
|
},
|
48
53
|
"peerDependencies": {
|
49
54
|
"@react-spectrum/provider": "^3.0.0",
|
@@ -52,5 +57,5 @@
|
|
52
57
|
"publishConfig": {
|
53
58
|
"access": "public"
|
54
59
|
},
|
55
|
-
"gitHead": "
|
60
|
+
"gitHead": "93b3c951eb784b14183f9988f2d188b34de8f42d"
|
56
61
|
}
|