Browse Source

Merge pull request #2942 from pyth-network/cprussin/upgrade-react-aria

fix(component-library): upgrade react-aria and react-aria-components
Connor Prussin 3 months ago
parent
commit
56aff81b1e

+ 2 - 4
apps/insights/src/components/Root/search-button.tsx

@@ -267,17 +267,15 @@ const SearchDialogContents = ({
             className={styles.listbox ?? ""}
             // eslint-disable-next-line jsx-a11y/no-autofocus
             autoFocus={false}
-            // @ts-expect-error looks like react-aria isn't exposing this
-            // property in the typescript types correctly...
             shouldFocusOnHover
-            emptyState={
+            renderEmptyState={() => (
               <NoResults
                 query={search}
                 onClearSearch={() => {
                   setSearch("");
                 }}
               />
-            }
+            )}
           >
             {(result) => (
               <ListBoxItem

+ 1 - 1
packages/component-library/src/unstyled/ListBox/index.tsx

@@ -19,7 +19,7 @@ export const ListBoxItem = <T extends Element>({
   onHoverStart,
   ...props
 }: ListBoxItemProps<T>) => {
-  const prefetchProps = usePrefetch<T>({
+  const prefetchProps = usePrefetch({
     href: props.href,
     prefetch,
     onHoverStart,

+ 2 - 2
packages/component-library/src/unstyled/Table/index.tsx

@@ -24,11 +24,11 @@ export const Row = <T extends object>({
   onHoverStart,
   ...props
 }: RowProps<T>) => {
-  const prefetchProps = usePrefetch<HTMLTableRowElement>({
+  const prefetchProps = usePrefetch({
     href: props.href,
     prefetch,
     onHoverStart,
-    ref: ref,
+    ref,
   });
 
   return <BaseRow {...props} {...prefetchProps} />;

+ 1 - 3
packages/component-library/src/unstyled/Tabs/index.tsx

@@ -12,12 +12,10 @@ type TabProps = ComponentProps<typeof BaseTab> & {
 };
 
 export const Tab = ({ ref, prefetch, onHoverStart, ...props }: TabProps) => {
-  const prefetchProps = usePrefetch<HTMLAnchorElement>({
+  const prefetchProps = usePrefetch({
     href: props.href,
     prefetch,
     onHoverStart,
-    // TODO Figure this out...
-    // @ts-expect-error It doesn't look like refs are getting passed through correctly...
     ref,
   });
 

File diff suppressed because it is too large
+ 272 - 235
pnpm-lock.yaml


+ 2 - 2
pnpm-workspace.yaml

@@ -128,8 +128,8 @@ catalog:
   prettier-plugin-solidity: ^1.4.2
   proxycheck-ts: ^0.0.11
   react: ^19.1.0
-  react-aria: ^3.38.1
-  react-aria-components: ^1.7.1
+  react-aria: ^3.42.0
+  react-aria-components: ^1.11.0
   react-dom: ^19.1.0
   react-markdown: ^10.1.0
   react-timeago: ^8.2.0

Some files were not shown because too many files changed in this diff