fix(ui,app): update React Aria to v1.17.0 and migrate to monopackage imports
React Aria Components v1.17.0 consolidated individual packages into monopackages, dropping `@react-types/table` as a transitive dependency. This caused `TS2307` errors in new app installations where `react-aria-components@1.17.0` was resolved. Migrate all imports from individual `@react-aria/*` and `@react-stately/*` packages to the `react-aria` and `react-stately` monopackages in both `@backstage/ui` and `@backstage/plugin-app`, and update minimum dependency versions accordingly. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -65,12 +65,11 @@
|
||||
"@material-ui/core": "^4.9.13",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "^4.0.0-alpha.61",
|
||||
"@react-aria/button": "^3.14.3",
|
||||
"@react-aria/toast": "^3.0.9",
|
||||
"@react-hookz/web": "^24.0.0",
|
||||
"@react-stately/toast": "^3.1.2",
|
||||
"@remixicon/react": "^4.6.0",
|
||||
"motion": "^12.0.0",
|
||||
"react-aria": "^3.48.0",
|
||||
"react-stately": "^3.46.0",
|
||||
"react-use": "^17.2.4",
|
||||
"zen-observable": "^0.10.0",
|
||||
"zod": "^3.25.76 || ^4.0.0"
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useState } from 'react';
|
||||
import preview from '../../../../../.storybook/preview';
|
||||
import { Button, Flex, Text } from '../../../../../packages/ui/src';
|
||||
/* eslint-enable @backstage/no-relative-monorepo-imports */
|
||||
import { ToastQueue } from '@react-stately/toast';
|
||||
import { ToastQueue } from 'react-stately';
|
||||
import { ToastContainer } from './index';
|
||||
import type { ToastApiMessageContent } from './types';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
*/
|
||||
|
||||
import { forwardRef, Ref, useRef, useLayoutEffect, useState } from 'react';
|
||||
import { useToast } from '@react-aria/toast';
|
||||
import { useButton } from '@react-aria/button';
|
||||
import { useToast, useButton } from 'react-aria';
|
||||
import { motion } from 'motion/react';
|
||||
import { Box } from '@backstage/ui';
|
||||
import {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
|
||||
import { forwardRef, Ref, useState, useRef, useCallback, useMemo } from 'react';
|
||||
import { useToastRegion } from '@react-aria/toast';
|
||||
import { useToastQueue } from '@react-stately/toast';
|
||||
import { useToastRegion } from 'react-aria';
|
||||
import { useToastQueue } from 'react-stately';
|
||||
import { AnimatePresence } from 'motion/react';
|
||||
import type { ToastApiMessageContainerProps } from './types';
|
||||
import { useInvertedThemeMode } from '../../hooks/useInvertedThemeMode';
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
import { alertApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
import { ToastQueue } from '@react-stately/toast';
|
||||
import { ToastQueue } from 'react-stately';
|
||||
import { ToastContainer } from './ToastContainer';
|
||||
import { toastApiForwarderRef } from '../../apis';
|
||||
import type {
|
||||
|
||||
Reference in New Issue
Block a user