@react-aria/label 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +16 -16
- package/dist/module.js +15 -15
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var $
|
|
1
|
+
var $g2CPN$reactariautils = require("@react-aria/utils");
|
|
2
2
|
|
|
3
3
|
function $parcel$exportWildcard(dest, source) {
|
|
4
4
|
Object.keys(source).forEach(function(key) {
|
|
@@ -19,17 +19,17 @@ function $parcel$exportWildcard(dest, source) {
|
|
|
19
19
|
function $parcel$export(e, n, v, s) {
|
|
20
20
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
21
21
|
}
|
|
22
|
-
var $
|
|
22
|
+
var $50e2f39368b9c636$exports = {};
|
|
23
23
|
|
|
24
|
-
$parcel$export($
|
|
25
|
-
var $
|
|
24
|
+
$parcel$export($50e2f39368b9c636$exports, "useField", () => $50e2f39368b9c636$export$294aa081a6c6f55d);
|
|
25
|
+
var $ce7359c25a7dec1c$exports = {};
|
|
26
26
|
|
|
27
|
-
$parcel$export($
|
|
27
|
+
$parcel$export($ce7359c25a7dec1c$exports, "useLabel", () => $ce7359c25a7dec1c$export$8467354a121f1b9f);
|
|
28
28
|
|
|
29
|
-
function $
|
|
29
|
+
function $ce7359c25a7dec1c$export$8467354a121f1b9f(props) {
|
|
30
30
|
let { id: id , label: label , 'aria-labelledby': ariaLabelledby , 'aria-label': ariaLabel , labelElementType: labelElementType = 'label' } = props;
|
|
31
|
-
id = $
|
|
32
|
-
let labelId = $
|
|
31
|
+
id = $g2CPN$reactariautils.useId(id);
|
|
32
|
+
let labelId = $g2CPN$reactariautils.useId();
|
|
33
33
|
let labelProps = {
|
|
34
34
|
};
|
|
35
35
|
if (label) {
|
|
@@ -39,7 +39,7 @@ function $065184908ba2f35b$export$8467354a121f1b9f(props) {
|
|
|
39
39
|
htmlFor: labelElementType === 'label' ? id : undefined
|
|
40
40
|
};
|
|
41
41
|
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
42
|
-
let fieldProps = $
|
|
42
|
+
let fieldProps = $g2CPN$reactariautils.useLabels({
|
|
43
43
|
id: id,
|
|
44
44
|
'aria-label': ariaLabel,
|
|
45
45
|
'aria-labelledby': ariaLabelledby
|
|
@@ -52,20 +52,20 @@ function $065184908ba2f35b$export$8467354a121f1b9f(props) {
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
function $
|
|
55
|
+
function $50e2f39368b9c636$export$294aa081a6c6f55d(props) {
|
|
56
56
|
let { description: description , errorMessage: errorMessage , validationState: validationState } = props;
|
|
57
|
-
let { labelProps: labelProps , fieldProps: fieldProps } = $
|
|
58
|
-
let descriptionId = $
|
|
57
|
+
let { labelProps: labelProps , fieldProps: fieldProps } = $ce7359c25a7dec1c$export$8467354a121f1b9f(props);
|
|
58
|
+
let descriptionId = $g2CPN$reactariautils.useSlotId([
|
|
59
59
|
Boolean(description),
|
|
60
60
|
Boolean(errorMessage),
|
|
61
61
|
validationState
|
|
62
62
|
]);
|
|
63
|
-
let errorMessageId = $
|
|
63
|
+
let errorMessageId = $g2CPN$reactariautils.useSlotId([
|
|
64
64
|
Boolean(description),
|
|
65
65
|
Boolean(errorMessage),
|
|
66
66
|
validationState
|
|
67
67
|
]);
|
|
68
|
-
fieldProps = $
|
|
68
|
+
fieldProps = $g2CPN$reactariautils.mergeProps(fieldProps, {
|
|
69
69
|
'aria-describedby': [
|
|
70
70
|
descriptionId,
|
|
71
71
|
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
|
|
@@ -87,8 +87,8 @@ function $591153d67f42b03f$export$294aa081a6c6f55d(props) {
|
|
|
87
87
|
|
|
88
88
|
|
|
89
89
|
|
|
90
|
-
$parcel$exportWildcard(module.exports, $
|
|
91
|
-
$parcel$exportWildcard(module.exports, $
|
|
90
|
+
$parcel$exportWildcard(module.exports, $50e2f39368b9c636$exports);
|
|
91
|
+
$parcel$exportWildcard(module.exports, $ce7359c25a7dec1c$exports);
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
//# sourceMappingURL=main.js.map
|
package/dist/module.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {useSlotId as $
|
|
1
|
+
import {useSlotId as $iD7q0$useSlotId, mergeProps as $iD7q0$mergeProps, useId as $iD7q0$useId, useLabels as $iD7q0$useLabels} from "@react-aria/utils";
|
|
2
2
|
|
|
3
3
|
function $parcel$export(e, n, v, s) {
|
|
4
4
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
5
5
|
}
|
|
6
|
-
var $
|
|
6
|
+
var $2baaea4c71418dea$exports = {};
|
|
7
7
|
|
|
8
|
-
$parcel$export($
|
|
9
|
-
var $
|
|
8
|
+
$parcel$export($2baaea4c71418dea$exports, "useField", () => $2baaea4c71418dea$export$294aa081a6c6f55d);
|
|
9
|
+
var $d191a55c9702f145$exports = {};
|
|
10
10
|
|
|
11
|
-
$parcel$export($
|
|
11
|
+
$parcel$export($d191a55c9702f145$exports, "useLabel", () => $d191a55c9702f145$export$8467354a121f1b9f);
|
|
12
12
|
|
|
13
|
-
function $
|
|
13
|
+
function $d191a55c9702f145$export$8467354a121f1b9f(props) {
|
|
14
14
|
let { id: id , label: label , 'aria-labelledby': ariaLabelledby , 'aria-label': ariaLabel , labelElementType: labelElementType = 'label' } = props;
|
|
15
|
-
id = $
|
|
16
|
-
let labelId = $
|
|
15
|
+
id = $iD7q0$useId(id);
|
|
16
|
+
let labelId = $iD7q0$useId();
|
|
17
17
|
let labelProps = {
|
|
18
18
|
};
|
|
19
19
|
if (label) {
|
|
@@ -23,7 +23,7 @@ function $6f8f5e0de5a77844$export$8467354a121f1b9f(props) {
|
|
|
23
23
|
htmlFor: labelElementType === 'label' ? id : undefined
|
|
24
24
|
};
|
|
25
25
|
} else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
|
|
26
|
-
let fieldProps = $
|
|
26
|
+
let fieldProps = $iD7q0$useLabels({
|
|
27
27
|
id: id,
|
|
28
28
|
'aria-label': ariaLabel,
|
|
29
29
|
'aria-labelledby': ariaLabelledby
|
|
@@ -36,20 +36,20 @@ function $6f8f5e0de5a77844$export$8467354a121f1b9f(props) {
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
function $
|
|
39
|
+
function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
|
|
40
40
|
let { description: description , errorMessage: errorMessage , validationState: validationState } = props;
|
|
41
|
-
let { labelProps: labelProps , fieldProps: fieldProps } = $
|
|
42
|
-
let descriptionId = $
|
|
41
|
+
let { labelProps: labelProps , fieldProps: fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f(props);
|
|
42
|
+
let descriptionId = $iD7q0$useSlotId([
|
|
43
43
|
Boolean(description),
|
|
44
44
|
Boolean(errorMessage),
|
|
45
45
|
validationState
|
|
46
46
|
]);
|
|
47
|
-
let errorMessageId = $
|
|
47
|
+
let errorMessageId = $iD7q0$useSlotId([
|
|
48
48
|
Boolean(description),
|
|
49
49
|
Boolean(errorMessage),
|
|
50
50
|
validationState
|
|
51
51
|
]);
|
|
52
|
-
fieldProps = $
|
|
52
|
+
fieldProps = $iD7q0$mergeProps(fieldProps, {
|
|
53
53
|
'aria-describedby': [
|
|
54
54
|
descriptionId,
|
|
55
55
|
// Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
|
|
@@ -73,5 +73,5 @@ function $8f1f06f2efd295ee$export$294aa081a6c6f55d(props) {
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
export {$
|
|
76
|
+
export {$2baaea4c71418dea$export$294aa081a6c6f55d as useField, $d191a55c9702f145$export$8467354a121f1b9f as useLabel};
|
|
77
77
|
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/label",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@react-aria/utils": "^3.11.
|
|
22
|
-
"@react-types/label": "^3.5.
|
|
23
|
-
"@react-types/shared": "^3.11.
|
|
21
|
+
"@react-aria/utils": "^3.11.3",
|
|
22
|
+
"@react-types/label": "^3.5.3",
|
|
23
|
+
"@react-types/shared": "^3.11.2"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "ed8d8d984c2f7f2c31e8b18795b97858a95e4729"
|
|
32
32
|
}
|