From b40c7246ade7d0367c7c907233cb1932fd28202f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 8 Oct 2024 14:34:28 -0500 Subject: [PATCH] Downgrade Radix packages for type compat --- package.json | 6 +----- src/view/com/util/forms/NativeDropdown.tsx | 9 +++++---- yarn.lock | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index cc2e10c35d..fd383fad8e 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,6 @@ "@mattermost/react-native-paste-input": "^0.7.1", "@miblanchard/react-native-slider": "^2.3.1", "@radix-ui/react-dismissable-layer": "^1.1.1", - "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-focus-guards": "^1.1.1", "@radix-ui/react-focus-scope": "^1.1.0", "@react-native-async-storage/async-storage": "1.23.1", @@ -280,10 +279,7 @@ "**/zod": "3.23.8", "**/expo-constants": "16.0.1", "**/expo-device": "6.0.2", - "@react-native/babel-preset": "0.74.1", - "@radix-ui/react-dropdown-menu": "2.1.2", - "@radix-ui/react-context-menu": "2.2.2", - "@radix-ui/react-focus-scope": "1.1.0" + "@react-native/babel-preset": "0.74.1" }, "jest": { "preset": "jest-expo/ios", diff --git a/src/view/com/util/forms/NativeDropdown.tsx b/src/view/com/util/forms/NativeDropdown.tsx index c8e5fb2daf..22237f5e14 100644 --- a/src/view/com/util/forms/NativeDropdown.tsx +++ b/src/view/com/util/forms/NativeDropdown.tsx @@ -5,10 +5,10 @@ import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import * as DropdownMenu from 'zeego/dropdown-menu' import {MenuItemCommonProps} from 'zeego/lib/typescript/menu' -import {HITSLOP_10} from 'lib/constants' -import {usePalette} from 'lib/hooks/usePalette' -import {useTheme} from 'lib/ThemeContext' -import {isIOS, isWeb} from 'platform/detection' +import {HITSLOP_10} from '#/lib/constants' +import {usePalette} from '#/lib/hooks/usePalette' +import {useTheme} from '#/lib/ThemeContext' +import {isIOS, isWeb} from '#/platform/detection' import {Portal} from '#/components/Portal' // Custom Dropdown Menu Components @@ -190,6 +190,7 @@ export function NativeDropdown({ accessibilityHint={accessibilityHint}> {children} + {/* @ts-ignore inheriting props from Radix, which is only for web */} diff --git a/yarn.lock b/yarn.lock index 35b5c7a4e1..a126d22f51 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5049,7 +5049,7 @@ resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz#656432461fc8283d7b591dcf0d79152fae9ecc74" integrity sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw== -"@radix-ui/react-context-menu@2.2.2", "@radix-ui/react-context-menu@^2.0.1": +"@radix-ui/react-context-menu@^2.0.1": version "2.2.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-context-menu/-/react-context-menu-2.2.2.tgz#efcddc559fc3011721b65148f062d04027f76c7a" integrity sha512-99EatSTpW+hRYHt7m8wdDlLtkmTovEe8Z/hnxUPV+SKuuNL5HWNhQI4QSdjZqNSgXHay2z4M3Dym73j9p2Gx5Q== @@ -5087,7 +5087,7 @@ "@radix-ui/react-use-callback-ref" "1.1.0" "@radix-ui/react-use-escape-keydown" "1.1.0" -"@radix-ui/react-dropdown-menu@2.1.2", "@radix-ui/react-dropdown-menu@^2.0.1", "@radix-ui/react-dropdown-menu@^2.1.2": +"@radix-ui/react-dropdown-menu@^2.0.1": version "2.1.2" resolved "https://registry.yarnpkg.com/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.2.tgz#acc49577130e3c875ef0133bd1e271ea3392d924" integrity sha512-GVZMR+eqK8/Kes0a36Qrv+i20bAPXSn8rCBTHx30w+3ECnR5o3xixAlqcVaYvLeyKUsm0aqyhWfmUcqufM8nYA==