@react-aria/dialog
Advanced tools
Comparing version
var $HoXek$reactariautils = require("@react-aria/utils"); | ||
var $HoXek$reactariafocus = require("@react-aria/focus"); | ||
var $HoXek$reactariainteractions = require("@react-aria/interactions"); | ||
var $HoXek$react = require("react"); | ||
@@ -34,3 +34,3 @@ var $HoXek$reactariaoverlays = require("@react-aria/overlays"); | ||
if (ref.current && !ref.current.contains(document.activeElement)) { | ||
(0, $HoXek$reactariafocus.focusSafely)(ref.current); | ||
(0, $HoXek$reactariainteractions.focusSafely)(ref.current); | ||
// Safari on iOS does not move the VoiceOver cursor to the dialog | ||
@@ -44,3 +44,3 @@ // or announce that it has opened until it has rendered. A workaround | ||
ref.current.blur(); | ||
(0, $HoXek$reactariafocus.focusSafely)(ref.current); | ||
(0, $HoXek$reactariainteractions.focusSafely)(ref.current); | ||
} | ||
@@ -47,0 +47,0 @@ isRefocusing.current = false; |
import {useSlotId as $i6df2$useSlotId, filterDOMProps as $i6df2$filterDOMProps} from "@react-aria/utils"; | ||
import {focusSafely as $i6df2$focusSafely} from "@react-aria/focus"; | ||
import {focusSafely as $i6df2$focusSafely} from "@react-aria/interactions"; | ||
import {useRef as $i6df2$useRef, useEffect as $i6df2$useEffect} from "react"; | ||
@@ -4,0 +4,0 @@ import {useOverlayFocusContain as $i6df2$useOverlayFocusContain} from "@react-aria/overlays"; |
{ | ||
"name": "@react-aria/dialog", | ||
"version": "3.5.21", | ||
"version": "3.5.22", | ||
"description": "Spectrum UI components in React", | ||
@@ -29,7 +29,7 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/focus": "^3.19.1", | ||
"@react-aria/overlays": "^3.25.0", | ||
"@react-aria/utils": "^3.27.0", | ||
"@react-types/dialog": "^3.5.15", | ||
"@react-types/shared": "^3.27.0", | ||
"@react-aria/interactions": "^3.24.0", | ||
"@react-aria/overlays": "^3.26.0", | ||
"@react-aria/utils": "^3.28.0", | ||
"@react-types/dialog": "^3.5.16", | ||
"@react-types/shared": "^3.28.0", | ||
"@swc/helpers": "^0.5.0" | ||
@@ -40,3 +40,3 @@ }, | ||
}, | ||
"gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea" | ||
"gitHead": "4d3c72c94eea2d72eb3a0e7d56000c6ef7e39726" | ||
} |
@@ -16,3 +16,3 @@ /* | ||
import {filterDOMProps, useSlotId} from '@react-aria/utils'; | ||
import {focusSafely} from '@react-aria/focus'; | ||
import {focusSafely} from '@react-aria/interactions'; | ||
import {useEffect, useRef} from 'react'; | ||
@@ -34,3 +34,5 @@ import {useOverlayFocusContain} from '@react-aria/overlays'; | ||
export function useDialog(props: AriaDialogProps, ref: RefObject<FocusableElement | null>): DialogAria { | ||
let {role = 'dialog'} = props; | ||
let { | ||
role = 'dialog' | ||
} = props; | ||
let titleId: string | undefined = useSlotId(); | ||
@@ -37,0 +39,0 @@ titleId = props['aria-label'] ? undefined : titleId; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
43030
0.22%375
0.54%- Removed
Updated
Updated
Updated
Updated