@react-aria/focus
Advanced tools
Comparing version 3.0.0-nightly-c78b24831-250206 to 3.0.0-nightly-c8fdba56e-250225
@@ -1,2 +0,1 @@ | ||
var $1c7f9157d722357d$exports = require("./focusSafely.main.js"); | ||
var $d5156037ad898a4d$exports = require("./isElementVisible.main.js"); | ||
@@ -35,3 +34,2 @@ var $euGna$reactariautils = require("@react-aria/utils"); | ||
const $a7a032acae3ddda9$var$FocusContext = /*#__PURE__*/ (0, ($parcel$interopDefault($euGna$react))).createContext(null); | ||
@@ -355,3 +353,3 @@ const $a7a032acae3ddda9$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore'; | ||
if (element != null && !scroll) try { | ||
(0, $1c7f9157d722357d$exports.focusSafely)(element); | ||
(0, $euGna$reactariainteractions.focusSafely)(element); | ||
} catch { | ||
@@ -358,0 +356,0 @@ // ignore |
@@ -1,5 +0,4 @@ | ||
import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from "./focusSafely.module.js"; | ||
import {isElementVisible as $645f2e67b85a24c9$export$e989c0fffaa6b27a} from "./isElementVisible.module.js"; | ||
import {useLayoutEffect as $cgawC$useLayoutEffect, getActiveElement as $cgawC$getActiveElement, getOwnerDocument as $cgawC$getOwnerDocument, getEventTarget as $cgawC$getEventTarget, isAndroid as $cgawC$isAndroid, isChrome as $cgawC$isChrome, isTabbable as $cgawC$isTabbable, isFocusable as $cgawC$isFocusable, createShadowTreeWalker as $cgawC$createShadowTreeWalker} from "@react-aria/utils"; | ||
import {getInteractionModality as $cgawC$getInteractionModality} from "@react-aria/interactions"; | ||
import {getInteractionModality as $cgawC$getInteractionModality, focusSafely as $cgawC$focusSafely} from "@react-aria/interactions"; | ||
import $cgawC$react, {useRef as $cgawC$useRef, useContext as $cgawC$useContext, useMemo as $cgawC$useMemo, useEffect as $cgawC$useEffect} from "react"; | ||
@@ -21,3 +20,2 @@ | ||
const $9bf71ea28793e738$var$FocusContext = /*#__PURE__*/ (0, $cgawC$react).createContext(null); | ||
@@ -341,3 +339,3 @@ const $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore'; | ||
if (element != null && !scroll) try { | ||
(0, $6a99195332edec8b$export$80f3e147d781571c)(element); | ||
(0, $cgawC$focusSafely)(element); | ||
} catch { | ||
@@ -344,0 +342,0 @@ // ignore |
var $a7a032acae3ddda9$exports = require("./FocusScope.main.js"); | ||
var $dfd8c70b928eb1b3$exports = require("./FocusRing.main.js"); | ||
var $fb504d83237fd6ac$exports = require("./useFocusable.main.js"); | ||
var $581a96d6eb128c1b$exports = require("./useFocusRing.main.js"); | ||
var $1c7f9157d722357d$exports = require("./focusSafely.main.js"); | ||
var $259c6413a286f2e6$exports = require("./useHasTabbableChild.main.js"); | ||
var $a756eb2d3b28d089$exports = require("./virtualFocus.main.js"); | ||
var $aB6Cp$reactariautils = require("@react-aria/utils"); | ||
var $aB6Cp$reactariainteractions = require("@react-aria/interactions"); | ||
@@ -20,8 +20,13 @@ | ||
$parcel$export(module.exports, "FocusRing", () => $dfd8c70b928eb1b3$exports.FocusRing); | ||
$parcel$export(module.exports, "FocusableProvider", () => $fb504d83237fd6ac$exports.FocusableProvider); | ||
$parcel$export(module.exports, "useFocusable", () => $fb504d83237fd6ac$exports.useFocusable); | ||
$parcel$export(module.exports, "useFocusRing", () => $581a96d6eb128c1b$exports.useFocusRing); | ||
$parcel$export(module.exports, "focusSafely", () => $1c7f9157d722357d$exports.focusSafely); | ||
$parcel$export(module.exports, "useHasTabbableChild", () => $259c6413a286f2e6$exports.useHasTabbableChild); | ||
$parcel$export(module.exports, "moveVirtualFocus", () => $a756eb2d3b28d089$exports.moveVirtualFocus); | ||
$parcel$export(module.exports, "dispatchVirtualBlur", () => $a756eb2d3b28d089$exports.dispatchVirtualBlur); | ||
$parcel$export(module.exports, "dispatchVirtualFocus", () => $a756eb2d3b28d089$exports.dispatchVirtualFocus); | ||
$parcel$export(module.exports, "getVirtuallyFocusedElement", () => $a756eb2d3b28d089$exports.getVirtuallyFocusedElement); | ||
$parcel$export(module.exports, "isFocusable", () => $aB6Cp$reactariautils.isFocusable); | ||
$parcel$export(module.exports, "FocusableProvider", () => $aB6Cp$reactariainteractions.FocusableProvider); | ||
$parcel$export(module.exports, "Focusable", () => $aB6Cp$reactariainteractions.Focusable); | ||
$parcel$export(module.exports, "useFocusable", () => $aB6Cp$reactariainteractions.useFocusable); | ||
$parcel$export(module.exports, "focusSafely", () => $aB6Cp$reactariainteractions.focusSafely); | ||
/* | ||
@@ -28,0 +33,0 @@ * Copyright 2020 Adobe. All rights reserved. |
import {createFocusManager as $9bf71ea28793e738$export$c5251b9e124bf29, FocusScope as $9bf71ea28793e738$export$20e40289641fbbb6, getFocusableTreeWalker as $9bf71ea28793e738$export$2d6ec8fc375ceafa, isElementInChildOfActiveScope as $9bf71ea28793e738$export$1258395f99bf9cbf, useFocusManager as $9bf71ea28793e738$export$10c5169755ce7bd7} from "./FocusScope.module.js"; | ||
import {FocusRing as $907718708eab68af$export$1a38b4ad7f578e1d} from "./FocusRing.module.js"; | ||
import {FocusableProvider as $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5, useFocusable as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c} from "./useFocusable.module.js"; | ||
import {useFocusRing as $f7dceffc5ad7768b$export$4e328f61c538687f} from "./useFocusRing.module.js"; | ||
import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from "./focusSafely.module.js"; | ||
import {useHasTabbableChild as $83013635b024ae3d$export$eac1895992b9f3d6} from "./useHasTabbableChild.module.js"; | ||
import {dispatchVirtualBlur as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, dispatchVirtualFocus as $55f9b1ae81f22853$export$2b35b76d2e30e129, getVirtuallyFocusedElement as $55f9b1ae81f22853$export$759df0d867455a91, moveVirtualFocus as $55f9b1ae81f22853$export$76e4e37e5339496d} from "./virtualFocus.module.js"; | ||
import {isFocusable as $d48f97c9d1a8e323$re_export$isFocusable} from "@react-aria/utils"; | ||
import {FocusableProvider as $d48f97c9d1a8e323$re_export$FocusableProvider, Focusable as $d48f97c9d1a8e323$re_export$Focusable, useFocusable as $d48f97c9d1a8e323$re_export$useFocusable, focusSafely as $d48f97c9d1a8e323$re_export$focusSafely} from "@react-aria/interactions"; | ||
@@ -28,3 +28,3 @@ /* | ||
export {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $907718708eab68af$export$1a38b4ad7f578e1d as FocusRing, $e6afbd83fe6ebbd2$export$13f3202a3e5ddd5 as FocusableProvider, $e6afbd83fe6ebbd2$export$4c014de7c8940b4c as useFocusable, $f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing, $6a99195332edec8b$export$80f3e147d781571c as focusSafely, $83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild, $d48f97c9d1a8e323$re_export$isFocusable as isFocusable}; | ||
export {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $907718708eab68af$export$1a38b4ad7f578e1d as FocusRing, $f7dceffc5ad7768b$export$4e328f61c538687f as useFocusRing, $83013635b024ae3d$export$eac1895992b9f3d6 as useHasTabbableChild, $55f9b1ae81f22853$export$76e4e37e5339496d as moveVirtualFocus, $55f9b1ae81f22853$export$6c5dc7e81d2cc29a as dispatchVirtualBlur, $55f9b1ae81f22853$export$2b35b76d2e30e129 as dispatchVirtualFocus, $55f9b1ae81f22853$export$759df0d867455a91 as getVirtuallyFocusedElement, $d48f97c9d1a8e323$re_export$isFocusable as isFocusable, $d48f97c9d1a8e323$re_export$FocusableProvider as FocusableProvider, $d48f97c9d1a8e323$re_export$Focusable as Focusable, $d48f97c9d1a8e323$re_export$useFocusable as useFocusable, $d48f97c9d1a8e323$re_export$focusSafely as focusSafely}; | ||
//# sourceMappingURL=module.js.map |
@@ -1,9 +0,4 @@ | ||
import { FocusableElement, RefObject, DOMAttributes, FocusableDOMProps, FocusableProps } from "@react-types/shared"; | ||
import { ShadowTreeWalker } from "@react-aria/utils"; | ||
import { FocusableElement, RefObject, DOMAttributes } from "@react-types/shared"; | ||
import React, { ReactNode, ReactElement } from "react"; | ||
/** | ||
* A utility function that focuses an element while avoiding undesired side effects such | ||
* as page scrolling and screen reader issues with CSS transitions. | ||
*/ | ||
export function focusSafely(element: FocusableElement): void; | ||
export interface FocusScopeProps { | ||
@@ -122,22 +117,2 @@ /** The contents of the focus scope. */ | ||
export function FocusRing(props: FocusRingProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>; | ||
export interface FocusableOptions<T = FocusableElement> extends FocusableProps<T>, FocusableDOMProps { | ||
/** Whether focus should be disabled. */ | ||
isDisabled?: boolean; | ||
} | ||
export interface FocusableProviderProps extends DOMAttributes { | ||
/** The child element to provide DOM props to. */ | ||
children?: ReactNode; | ||
} | ||
/** | ||
* Provides DOM props to the nearest focusable child. | ||
*/ | ||
export const FocusableProvider: React.ForwardRefExoticComponent<FocusableProviderProps & React.RefAttributes<FocusableElement>>; | ||
export interface FocusableAria { | ||
/** Props for the focusable element. */ | ||
focusableProps: DOMAttributes; | ||
} | ||
/** | ||
* Used to make an element focusable and capable of auto focus. | ||
*/ | ||
export function useFocusable<T extends FocusableElement = FocusableElement>(props: FocusableOptions<T>, domRef: RefObject<FocusableElement | null>): FocusableAria; | ||
interface AriaHasTabbableChildOptions { | ||
@@ -151,4 +126,10 @@ isDisabled?: boolean; | ||
export function useHasTabbableChild(ref: RefObject<Element | null>, options?: AriaHasTabbableChildOptions): boolean; | ||
export function moveVirtualFocus(to: Element | null): void; | ||
export function dispatchVirtualBlur(from: Element, to: Element | null): void; | ||
export function dispatchVirtualFocus(to: Element, from: Element | null): void; | ||
export function getVirtuallyFocusedElement(document: Document): Element | null; | ||
export { isFocusable } from '@react-aria/utils'; | ||
export { FocusableProvider, Focusable, useFocusable, focusSafely } from '@react-aria/interactions'; | ||
export type { FocusableAria, FocusableOptions, FocusableProviderProps } from '@react-aria/interactions'; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@react-aria/focus", | ||
"version": "3.0.0-nightly-c78b24831-250206", | ||
"version": "3.0.0-nightly-c8fdba56e-250225", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,5 +25,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/interactions": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/utils": "3.0.0-nightly-c78b24831-250206", | ||
"@react-types/shared": "3.0.0-nightly-c78b24831-250206", | ||
"@react-aria/interactions": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-aria/utils": "3.0.0-nightly-c8fdba56e-250225", | ||
"@react-types/shared": "3.0.0-nightly-c8fdba56e-250225", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -30,0 +30,0 @@ "clsx": "^2.0.0" |
@@ -15,12 +15,12 @@ /* | ||
export {FocusRing} from './FocusRing'; | ||
export {FocusableProvider, useFocusable} from './useFocusable'; | ||
export {useFocusRing} from './useFocusRing'; | ||
export {focusSafely} from './focusSafely'; | ||
export {useHasTabbableChild} from './useHasTabbableChild'; | ||
export {moveVirtualFocus, dispatchVirtualBlur, dispatchVirtualFocus, getVirtuallyFocusedElement} from './virtualFocus'; | ||
// For backward compatibility. | ||
export {isFocusable} from '@react-aria/utils'; | ||
export {FocusableProvider, Focusable, useFocusable, focusSafely} from '@react-aria/interactions'; | ||
export type {FocusScopeProps, FocusManager, FocusManagerOptions} from './FocusScope'; | ||
export type {FocusRingProps} from './FocusRing'; | ||
export type {FocusableAria, FocusableOptions, FocusableProviderProps} from './useFocusable'; | ||
export type {FocusableAria, FocusableOptions, FocusableProviderProps} from '@react-aria/interactions'; | ||
export type {AriaFocusRingProps, FocusRingAria} from './useFocusRing'; |
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
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
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 3 instances in 1 package
8
365944
46
4161
+ Added@react-aria/interactions@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/ssr@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-aria/utils@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/flags@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-stately/utils@3.0.0-nightly-c8fdba56e-250225(transitive)
+ Added@react-types/shared@3.0.0-nightly-c8fdba56e-250225(transitive)
- Removed@react-aria/interactions@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/ssr@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-aria/utils@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/flags@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-stately/utils@3.0.0-nightly-c78b24831-250206(transitive)
- Removed@react-types/shared@3.0.0-nightly-c78b24831-250206(transitive)
Updated@react-aria/interactions@3.0.0-nightly-c8fdba56e-250225