@react-aria/dialog 3.5.13 → 3.5.14
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/useDialog.main.js +3 -3
- package/dist/useDialog.mjs +4 -4
- package/dist/useDialog.module.js +3 -3
- package/package.json +7 -7
package/dist/useDialog.main.js
CHANGED
|
@@ -24,9 +24,9 @@ $parcel$export(module.exports, "useDialog", () => $e7b76b4fae4e4c55$export$d55e7
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
function $e7b76b4fae4e4c55$export$d55e7ee900f34e93(props, ref) {
|
|
27
|
-
let { role: role =
|
|
27
|
+
let { role: role = 'dialog' } = props;
|
|
28
28
|
let titleId = (0, $HoXek$reactariautils.useSlotId)();
|
|
29
|
-
titleId = props[
|
|
29
|
+
titleId = props['aria-label'] ? undefined : titleId;
|
|
30
30
|
let isRefocusing = (0, $HoXek$react.useRef)(false);
|
|
31
31
|
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
32
32
|
(0, $HoXek$react.useEffect)(()=>{
|
|
@@ -65,7 +65,7 @@ function $e7b76b4fae4e4c55$export$d55e7ee900f34e93(props, ref) {
|
|
|
65
65
|
}),
|
|
66
66
|
role: role,
|
|
67
67
|
tabIndex: -1,
|
|
68
|
-
|
|
68
|
+
'aria-labelledby': props['aria-labelledby'] || titleId,
|
|
69
69
|
// Prevent blur events from reaching useOverlay, which may cause
|
|
70
70
|
// popovers to close. Since focus is contained within the dialog,
|
|
71
71
|
// we don't want this to occur due to the above useEffect.
|
package/dist/useDialog.mjs
CHANGED
|
@@ -18,9 +18,9 @@ import {useOverlayFocusContain as $i6df2$useOverlayFocusContain} from "@react-ar
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
21
|
-
let { role: role =
|
|
21
|
+
let { role: role = 'dialog' } = props;
|
|
22
22
|
let titleId = (0, $i6df2$useSlotId)();
|
|
23
|
-
titleId = props[
|
|
23
|
+
titleId = props['aria-label'] ? undefined : titleId;
|
|
24
24
|
let isRefocusing = (0, $i6df2$useRef)(false);
|
|
25
25
|
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
26
26
|
(0, $i6df2$useEffect)(()=>{
|
|
@@ -59,7 +59,7 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
59
59
|
}),
|
|
60
60
|
role: role,
|
|
61
61
|
tabIndex: -1,
|
|
62
|
-
|
|
62
|
+
'aria-labelledby': props['aria-labelledby'] || titleId,
|
|
63
63
|
// Prevent blur events from reaching useOverlay, which may cause
|
|
64
64
|
// popovers to close. Since focus is contained within the dialog,
|
|
65
65
|
// we don't want this to occur due to the above useEffect.
|
|
@@ -75,4 +75,4 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
export {$40df3f8667284809$export$d55e7ee900f34e93 as useDialog};
|
|
78
|
-
//# sourceMappingURL=useDialog.
|
|
78
|
+
//# sourceMappingURL=useDialog.module.js.map
|
package/dist/useDialog.module.js
CHANGED
|
@@ -18,9 +18,9 @@ import {useOverlayFocusContain as $i6df2$useOverlayFocusContain} from "@react-ar
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
21
|
-
let { role: role =
|
|
21
|
+
let { role: role = 'dialog' } = props;
|
|
22
22
|
let titleId = (0, $i6df2$useSlotId)();
|
|
23
|
-
titleId = props[
|
|
23
|
+
titleId = props['aria-label'] ? undefined : titleId;
|
|
24
24
|
let isRefocusing = (0, $i6df2$useRef)(false);
|
|
25
25
|
// Focus the dialog itself on mount, unless a child element is already focused.
|
|
26
26
|
(0, $i6df2$useEffect)(()=>{
|
|
@@ -59,7 +59,7 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
59
59
|
}),
|
|
60
60
|
role: role,
|
|
61
61
|
tabIndex: -1,
|
|
62
|
-
|
|
62
|
+
'aria-labelledby': props['aria-labelledby'] || titleId,
|
|
63
63
|
// Prevent blur events from reaching useOverlay, which may cause
|
|
64
64
|
// popovers to close. Since focus is contained within the dialog,
|
|
65
65
|
// we don't want this to occur due to the above useEffect.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/dialog",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.14",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@react-aria/focus": "^3.17.
|
|
30
|
-
"@react-aria/overlays": "^3.22.
|
|
31
|
-
"@react-aria/utils": "^3.24.
|
|
32
|
-
"@react-types/dialog": "^3.5.
|
|
33
|
-
"@react-types/shared": "^3.23.
|
|
29
|
+
"@react-aria/focus": "^3.17.1",
|
|
30
|
+
"@react-aria/overlays": "^3.22.1",
|
|
31
|
+
"@react-aria/utils": "^3.24.1",
|
|
32
|
+
"@react-types/dialog": "^3.5.10",
|
|
33
|
+
"@react-types/shared": "^3.23.1",
|
|
34
34
|
"@swc/helpers": "^0.5.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
40
40
|
}
|