From 489f1376db4c9715715fd6066bfab0a344d873be Mon Sep 17 00:00:00 2001 From: sobol4156 Date: Sun, 26 Jul 2026 01:21:39 +0300 Subject: [PATCH 1/2] fix: re-export FocusableElement, HoverEvent and KeyboardEvent types from react-aria-components --- packages/react-aria-components/exports/Button.ts | 2 +- packages/react-aria-components/exports/index.ts | 5 ++++- packages/react-aria-components/test/types.tsx | 7 +++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/react-aria-components/exports/Button.ts b/packages/react-aria-components/exports/Button.ts index 49448350fa1..d1674ef6862 100644 --- a/packages/react-aria-components/exports/Button.ts +++ b/packages/react-aria-components/exports/Button.ts @@ -16,4 +16,4 @@ import 'client-only'; export {Button, ButtonContext} from '../src/Button'; export type {ButtonProps, ButtonRenderProps} from '../src/Button'; -export type {PressEvent} from '@react-types/shared'; +export type {PressEvent, FocusableElement, HoverEvent, KeyboardEvent} from '@react-types/shared'; diff --git a/packages/react-aria-components/exports/index.ts b/packages/react-aria-components/exports/index.ts index e72133c7b1d..b9c568ddb9f 100644 --- a/packages/react-aria-components/exports/index.ts +++ b/packages/react-aria-components/exports/index.ts @@ -580,7 +580,10 @@ export type { ItemDropTarget, RootDropTarget, TextDropItem, - PressEvent + PressEvent, + FocusableElement, + HoverEvent, + KeyboardEvent } from '@react-types/shared'; export type {CalendarState} from 'react-stately/useCalendarState'; export type {RangeCalendarState} from 'react-stately/useRangeCalendarState'; diff --git a/packages/react-aria-components/test/types.tsx b/packages/react-aria-components/test/types.tsx index 3eae9dfa5ff..2584c7c693b 100644 --- a/packages/react-aria-components/test/types.tsx +++ b/packages/react-aria-components/test/types.tsx @@ -96,3 +96,10 @@ motion(RAC.Text); motion(RAC.TextField); motion(RAC.ToggleButton); motion(RAC.Tooltip); + +// Types that appear structurally in public props must be nameable from the package root, +// otherwise consumers emitting declarations cannot write a portable import for them. +type _FocusableElement = RAC.FocusableElement; +type _HoverEvent = RAC.HoverEvent; +type _KeyboardEvent = RAC.KeyboardEvent; +type _PressEvent = RAC.PressEvent; From 81461289e66052d6396dc5d04a42ec2b4f0bdfbb Mon Sep 17 00:00:00 2001 From: Rob Snow Date: Tue, 28 Jul 2026 15:40:01 +1000 Subject: [PATCH 2/2] remove unnecessary test --- packages/react-aria-components/test/types.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/react-aria-components/test/types.tsx b/packages/react-aria-components/test/types.tsx index 2584c7c693b..3eae9dfa5ff 100644 --- a/packages/react-aria-components/test/types.tsx +++ b/packages/react-aria-components/test/types.tsx @@ -96,10 +96,3 @@ motion(RAC.Text); motion(RAC.TextField); motion(RAC.ToggleButton); motion(RAC.Tooltip); - -// Types that appear structurally in public props must be nameable from the package root, -// otherwise consumers emitting declarations cannot write a portable import for them. -type _FocusableElement = RAC.FocusableElement; -type _HoverEvent = RAC.HoverEvent; -type _KeyboardEvent = RAC.KeyboardEvent; -type _PressEvent = RAC.PressEvent;