🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@react-aria/focus

Package Overview
Dependencies
Maintainers
2
Versions
1011
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-aria/focus - npm Package Compare versions

Comparing version

to
3.0.0-nightly-ad4681f74-250408

6

dist/types.d.ts
import { ShadowTreeWalker } from "@react-aria/utils";
import { FocusableElement, RefObject, DOMAttributes } from "@react-types/shared";
import React, { ReactNode, ReactElement } from "react";
import { ReactNode, ReactElement } from "react";
export interface FocusScopeProps {

@@ -47,3 +47,3 @@ /** The contents of the focus scope. */

*/
export function FocusScope(props: FocusScopeProps): React.JSX.Element;
export function FocusScope(props: FocusScopeProps): ReactNode;
/**

@@ -117,3 +117,3 @@ * Returns a FocusManager interface for the parent FocusScope.

*/
export function FocusRing(props: FocusRingProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
export function FocusRing(props: FocusRingProps): ReactNode;
interface AriaHasTabbableChildOptions {

@@ -120,0 +120,0 @@ isDisabled?: boolean;

{
"name": "@react-aria/focus",
"version": "3.0.0-nightly-acce72a36-250303",
"version": "3.0.0-nightly-ad4681f74-250408",
"description": "Spectrum UI components in React",

@@ -25,5 +25,5 @@ "license": "Apache-2.0",

"dependencies": {
"@react-aria/interactions": "3.0.0-nightly-acce72a36-250303",
"@react-aria/utils": "3.0.0-nightly-acce72a36-250303",
"@react-types/shared": "3.0.0-nightly-acce72a36-250303",
"@react-aria/interactions": "3.0.0-nightly-ad4681f74-250408",
"@react-aria/utils": "3.0.0-nightly-ad4681f74-250408",
"@react-types/shared": "3.0.0-nightly-ad4681f74-250408",
"@swc/helpers": "^0.5.0",

@@ -30,0 +30,0 @@ "clsx": "^2.0.0"

@@ -62,3 +62,3 @@ /*

*/
export function isElementVisible(element: Element, childElement?: Element) {
export function isElementVisible(element: Element, childElement?: Element): boolean {
return (

@@ -65,0 +65,0 @@ element.nodeName !== '#comment' &&

import {getActiveElement, getOwnerDocument} from '@react-aria/utils';
export function moveVirtualFocus(to: Element | null) {
export function moveVirtualFocus(to: Element | null): void {
let from = getVirtuallyFocusedElement(getOwnerDocument(to));

@@ -15,3 +15,3 @@ if (from !== to) {

export function dispatchVirtualBlur(from: Element, to: Element | null) {
export function dispatchVirtualBlur(from: Element, to: Element | null): void {
from.dispatchEvent(new FocusEvent('blur', {relatedTarget: to}));

@@ -21,3 +21,3 @@ from.dispatchEvent(new FocusEvent('focusout', {bubbles: true, relatedTarget: to}));

export function dispatchVirtualFocus(to: Element, from: Element | null) {
export function dispatchVirtualFocus(to: Element, from: Element | null): void {
to.dispatchEvent(new FocusEvent('focus', {relatedTarget: from}));

@@ -27,3 +27,3 @@ to.dispatchEvent(new FocusEvent('focusin', {bubbles: true, relatedTarget: from}));

export function getVirtuallyFocusedElement(document: Document) {
export function getVirtuallyFocusedElement(document: Document): Element | null {
let activeElement = getActiveElement(document);

@@ -30,0 +30,0 @@ let activeDescendant = activeElement?.getAttribute('aria-activedescendant');

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

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