;
interface LinksPrimitives {
@@ -152,7 +152,7 @@ interface LinksPrimitives
{
ButtonGroup: React.ComponentType;
}
-export type LinksControlType = (() => React.JSX.Element) &
+export type LinksControlType = (() => JSX.Element) &
LinksPrimitives &
NonPrimitiveControls['Links'];
@@ -162,10 +162,9 @@ interface FederatedProvidersPrimitives {
Divider: React.ComponentType;
}
-export type FederatedProvidersControlType =
- (() => React.JSX.Element) &
- FederatedProvidersPrimitives &
- NonPrimitiveControls['FederatedProviders'];
+export type FederatedProvidersControlType = (() => JSX.Element) &
+ FederatedProvidersPrimitives &
+ NonPrimitiveControls['FederatedProviders'];
export interface SetupTotpPrimitives {
Container: React.ComponentType;
@@ -177,15 +176,15 @@ export interface SetupTotpPrimitives {
Loader: React.ComponentType;
}
-export type SetupTotpControlType = (() => React.JSX.Element) &
+export type SetupTotpControlType = (() => JSX.Element) &
SetupTotpPrimitives;
interface VerifyContactMethodPrimitives {
RadioGroup: React.ComponentType>;
}
-export type VerifyContactMethodControlType =
- (() => React.JSX.Element) & VerifyContactMethodPrimitives;
+export type VerifyContactMethodControlType = (() => JSX.Element) &
+ VerifyContactMethodPrimitives;
/**
* Compound Control values contain primitives
diff --git a/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts b/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts
index 36c58eb1c2f..7ebbfed56dc 100644
--- a/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts
+++ b/packages/react-core-auth/src/components/Authenticator/createProvider/types.ts
@@ -27,4 +27,4 @@ export interface ProviderProps {
export type ProviderComponent = (
params: ProviderProps
-) => React.JSX.Element;
+) => JSX.Element;
diff --git a/packages/react-core-notifications/package.json b/packages/react-core-notifications/package.json
index 44cc94a30f0..dd080e830e0 100644
--- a/packages/react-core-notifications/package.json
+++ b/packages/react-core-notifications/package.json
@@ -40,7 +40,7 @@
},
"peerDependencies": {
"aws-amplify": "^6.9.0",
- "react": "^16.14 || ^17 || ^18 || ^19"
+ "react": "^16.14.0 || ^17.0 || ^18.0"
},
"sideEffects": false
}
diff --git a/packages/react-core/package.json b/packages/react-core/package.json
index 42f64999262..01dff8507b3 100644
--- a/packages/react-core/package.json
+++ b/packages/react-core/package.json
@@ -43,12 +43,12 @@
"@aws-amplify/ui": "6.7.2",
"@xstate/react": "^3.2.2",
"lodash": "4.17.21",
- "react-hook-form": "^7.53.2",
+ "react-hook-form": "^7.43.5",
"xstate": "^4.33.6"
},
"peerDependencies": {
"aws-amplify": "^6.9.0",
- "react": "^16.14 || ^17 || ^18 || ^19"
+ "react": "^16.14.0 || ^17.0 || ^18.0"
},
"sideEffects": false
}
diff --git a/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx b/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx
index 4ea300de9bf..011bc9979c3 100644
--- a/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx
+++ b/packages/react-core/src/Authenticator/context/AuthenticatorProvider.tsx
@@ -24,7 +24,7 @@ export default function AuthenticatorProvider({
children,
}: {
children: ReactNode;
-}): React.JSX.Element {
+}): JSX.Element {
// `authStatus` is exposed by `useAuthenticator` but should not be derived directly from the
// state machine as the machine only updates on `Authenticator` initiated events, which
// leads to scenarios where the state machine `authStatus` gets "stuck". For exmample,
diff --git a/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx b/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx
index a4d8fdf650d..1736a916100 100644
--- a/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx
+++ b/packages/react-core/src/Authenticator/context/__tests__/AuthenticatorProvider.test.tsx
@@ -16,7 +16,7 @@ const getCurrentUserSpy = jest
.spyOn(Auth, 'getCurrentUser')
.mockResolvedValue({ userId: '1234', username: 'test' });
-function TestComponent(): React.JSX.Element | null {
+function TestComponent(): JSX.Element | null {
const { authStatus } = useAuthenticator();
return <>{authStatus}>;
}
diff --git a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap
index 092aa722ee5..ebd5557b34f 100644
--- a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap
+++ b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useField.spec.ts.snap
@@ -7,7 +7,6 @@ exports[`useField returns the expected values in the happy path 1`] = `
"invalid": false,
"isDirty": false,
"isTouched": false,
- "isValidating": false,
"name": "test-field",
"onBlur": [Function],
"onChange": [Function],
diff --git a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap
index 1cc48bf0bf3..250bcc448ba 100644
--- a/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap
+++ b/packages/react-core/src/components/FormCore/__tests__/__snapshots__/useForm.spec.ts.snap
@@ -7,7 +7,6 @@ exports[`useForm returns the expected values from getFieldState in the happy pat
"invalid": false,
"isDirty": false,
"isTouched": false,
- "isValidating": false,
}
`;
diff --git a/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts b/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts
index 01052370714..45542354156 100644
--- a/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts
+++ b/packages/react-core/src/components/FormCore/__tests__/useForm.spec.ts
@@ -1,5 +1,5 @@
import { renderHook } from '@testing-library/react-hooks';
-import ReactHookForm from 'react-hook-form';
+import * as ReactHookForm from 'react-hook-form';
import { useForm } from '..';
import FormProvider from '../FormProvider';
@@ -9,7 +9,6 @@ import { DEFAULT_ERROR_MESSAGE } from '../useForm';
// mock 'react-hook-form` context
const mockFormContext: ReactHookForm.UseFormReturn = {
formState: {
- disabled: false,
isDirty: false,
isLoading: false,
isSubmitSuccessful: false,
@@ -21,7 +20,6 @@ const mockFormContext: ReactHookForm.UseFormReturn = {
dirtyFields: [],
touchedFields: [],
errors: {},
- validatingFields: {},
},
getFieldState: jest.fn(),
getValues: jest.fn(),
diff --git a/packages/react-core/src/components/FormCore/withFormProvider.tsx b/packages/react-core/src/components/FormCore/withFormProvider.tsx
index dd814261bcd..71f159d957d 100644
--- a/packages/react-core/src/components/FormCore/withFormProvider.tsx
+++ b/packages/react-core/src/components/FormCore/withFormProvider.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-import { AnyComponent } from '../../types';
+import { AnyComponent, MergeProps } from '../../types';
import FormProvider from './FormProvider';
import { FormHandle, FormProviderProps } from './types';
@@ -12,7 +12,7 @@ import { FormHandle, FormProviderProps } from './types';
export default function withFormProvider<
ChildComp extends AnyComponent,
ChildProps extends React.ComponentPropsWithRef,
- Props extends ChildProps & FormProviderProps,
+ Props extends MergeProps
>(
Child: ChildComp
): React.ForwardRefExoticComponent<
@@ -23,11 +23,7 @@ export default function withFormProvider<
ref
) {
return (
-
+
);
diff --git a/packages/react-core/src/components/RenderNothing/RenderNothing.tsx b/packages/react-core/src/components/RenderNothing/RenderNothing.tsx
index bddff9c0092..b8b35a490c8 100644
--- a/packages/react-core/src/components/RenderNothing/RenderNothing.tsx
+++ b/packages/react-core/src/components/RenderNothing/RenderNothing.tsx
@@ -1,8 +1,6 @@
/**
* Utility component for rendering nothing.
*/
-export default function RenderNothing(
- _: Props
-): React.JSX.Element | null {
+export default function RenderNothing(_: Props): JSX.Element | null {
return null;
}
diff --git a/packages/react-core/src/hooks/usePreviousValue.ts b/packages/react-core/src/hooks/usePreviousValue.ts
index 2623db6040f..7824e2fdd6c 100644
--- a/packages/react-core/src/hooks/usePreviousValue.ts
+++ b/packages/react-core/src/hooks/usePreviousValue.ts
@@ -3,7 +3,7 @@ import { useEffect, useRef } from 'react';
export default function usePreviousValue(
value: Value
): Value | undefined {
- const previous = useRef(undefined);
+ const previous = useRef();
// update ref post render
useEffect(() => {
diff --git a/packages/react-geo/package.json b/packages/react-geo/package.json
index e14a0b90a49..0b4ba4c7264 100644
--- a/packages/react-geo/package.json
+++ b/packages/react-geo/package.json
@@ -49,8 +49,8 @@
"peerDependencies": {
"@aws-amplify/geo": "^3.0.59",
"aws-amplify": "^6.9.0",
- "react": "^16.14 || ^17 || ^18 || ^19",
- "react-dom": "^16.14 || ^17 || ^18 || ^19"
+ "react": "^16.14.0 || ^17.0 || ^18.0",
+ "react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
"devDependencies": {
"@aws-amplify/geo": "^3.0.59",
diff --git a/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx b/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx
index fae42c6b49e..6eff1540666 100644
--- a/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx
+++ b/packages/react-geo/src/components/LocationSearch/LocationSearch.tsx
@@ -74,9 +74,7 @@ const LocationSearchStandalone = (props: LocationSearchProps) => {
* return ;
* }
*/
-export const LocationSearch = (
- props: LocationSearchProps
-): React.JSX.Element => {
+export const LocationSearch = (props: LocationSearchProps): JSX.Element => {
const { current: map } = useMap();
useSetUserAgent({
diff --git a/packages/react-liveness/package.json b/packages/react-liveness/package.json
index 00c0f0df22f..9158ed56168 100644
--- a/packages/react-liveness/package.json
+++ b/packages/react-liveness/package.json
@@ -44,8 +44,8 @@
"peerDependencies": {
"@aws-amplify/core": "*",
"aws-amplify": "^6.9.0",
- "react": "^16.14 || ^17 || ^18 || ^19",
- "react-dom": "^16.14 || ^17 || ^18 || ^19"
+ "react": "^16.14.0 || ^17.0 || ^18.0",
+ "react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
"dependencies": {
"@aws-amplify/ui": "6.7.2",
diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx
index 5665341706a..397747fe2b9 100644
--- a/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx
+++ b/packages/react-liveness/src/components/FaceLivenessDetector/FaceLivenessDetector.tsx
@@ -21,7 +21,7 @@ const credentialProvider = async () => {
export default function FaceLivenessDetector(
props: FaceLivenessDetectorProps
-): React.JSX.Element {
+): JSX.Element {
const { config, ...rest } = props;
return (
(null);
const {
diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx
index d9be3d3f811..d3be78737bd 100644
--- a/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx
+++ b/packages/react-liveness/src/components/FaceLivenessDetector/LivenessCheck/LivenessCameraModule.tsx
@@ -95,7 +95,7 @@ const MemoizedMatchIndicator = React.memo(MatchIndicator);
export const LivenessCameraModule = (
props: LivenessCameraModuleProps
-): React.JSX.Element => {
+): JSX.Element => {
const {
isMobileScreen,
isRecordingStopped,
diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx
index 9dc5fc4fca1..2fc51349784 100644
--- a/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx
+++ b/packages/react-liveness/src/components/FaceLivenessDetector/__mocks__/utils.tsx
@@ -11,7 +11,7 @@ type RenderWithLivenessLivenessProviderResult = RenderResult & {
};
export function renderWithLivenessProvider(
- ui: React.JSX.Element
+ ui: JSX.Element
): RenderWithLivenessLivenessProviderResult {
const mockComponentProps: FaceLivenessDetectorProps = {
region: 'us-east-1',
diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx
index dba293d6c13..8a97d8a3c6b 100644
--- a/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx
+++ b/packages/react-liveness/src/components/FaceLivenessDetector/providers/FaceLivenessDetectorProvider.tsx
@@ -16,7 +16,7 @@ export interface FaceLivenessDetectorProviderProps
export function FaceLivenessDetectorProvider({
children,
...props
-}: FaceLivenessDetectorProviderProps): React.JSX.Element {
+}: FaceLivenessDetectorProviderProps): JSX.Element {
return (
{children}
diff --git a/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx b/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx
index 554bc13d73e..55c91b1e12e 100644
--- a/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx
+++ b/packages/react-liveness/src/components/FaceLivenessDetector/shared/DefaultStartScreenComponents.tsx
@@ -26,7 +26,7 @@ export const DefaultPhotosensitiveWarning = ({
headingText,
infoText,
labelText,
-}: DefaultPhotosensitiveWarningProps): React.JSX.Element => {
+}: DefaultPhotosensitiveWarningProps): JSX.Element => {
return (
{
+}: DefaultRecordingIconProps): JSX.Element => {
return (
{recordingIndicatorText}
@@ -63,7 +63,7 @@ interface CancelButtonProps {
export const DefaultCancelButton = ({
cancelLivenessCheckText,
-}: CancelButtonProps): React.JSX.Element => {
+}: CancelButtonProps): JSX.Element => {
return (
{
+}): JSX.Element | null => {
const displayText: Required = {
...defaultErrorDisplayText,
...overrideErrorDisplayText,
diff --git a/packages/react-liveness/tsconfig.json b/packages/react-liveness/tsconfig.json
index 9fa9a542d53..5be1de00eac 100644
--- a/packages/react-liveness/tsconfig.json
+++ b/packages/react-liveness/tsconfig.json
@@ -1,6 +1,5 @@
{
"extends": "@aws-amplify/typescript-config/tsconfig.react.json",
- "compilerOptions": { "types": ["@types/emscripten", "@types/long"] },
"include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules"]
}
diff --git a/packages/react-native-auth/package.json b/packages/react-native-auth/package.json
index d4dd895ff53..f3a6718cd4f 100644
--- a/packages/react-native-auth/package.json
+++ b/packages/react-native-auth/package.json
@@ -24,7 +24,7 @@
"@babel/cli": "^7.23.0",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
- "@testing-library/react-native": "^12.9.0",
+ "@testing-library/react-native": "^12.3.0",
"metro-react-native-babel-preset": "^0.77.0"
},
"dependencies": {
diff --git a/packages/react-native/package.json b/packages/react-native/package.json
index 9f0b14a6959..a6bd2ced45f 100644
--- a/packages/react-native/package.json
+++ b/packages/react-native/package.json
@@ -25,7 +25,7 @@
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@react-native-async-storage/async-storage": "*",
- "@testing-library/react-native": "^12.9.0",
+ "@testing-library/react-native": "^12.3.0",
"metro-react-native-babel-preset": "^0.77.0",
"react-native-safe-area-context": "^4.7.3"
},
diff --git a/packages/react-native/src/Authenticator/Authenticator.tsx b/packages/react-native/src/Authenticator/Authenticator.tsx
index bd074852337..4b5a443d568 100644
--- a/packages/react-native/src/Authenticator/Authenticator.tsx
+++ b/packages/react-native/src/Authenticator/Authenticator.tsx
@@ -56,7 +56,7 @@ function Authenticator({
Footer,
Header,
...options
-}: AuthenticatorProps): React.JSX.Element | null {
+}: AuthenticatorProps): JSX.Element | null {
useDeprecationWarning({
message:
'The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.',
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx
index 73c6be323ca..3b4d1b2b5bb 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx
@@ -30,7 +30,7 @@ const ConfirmResetPassword = ({
resendCode,
validationErrors,
...rest
-}: DefaultConfirmResetPasswordProps): React.JSX.Element => {
+}: DefaultConfirmResetPasswordProps): JSX.Element => {
const {
disableFormSubmit,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx
index 32e86838085..3f686a74808 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx
@@ -53,7 +53,7 @@ describe('ConfirmResetPassword', () => {
expect(getAllByRole('header')).toBeDefined();
expect(getByText(getSubmitText())).toBeDefined();
expect(getByText(getResendCodeText())).toBeDefined();
- expect(getAllByRole('text')).toHaveLength(5);
+ expect(getAllByRole('text')).toHaveLength(fields.length);
});
it('renders an error message', () => {
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx
index 9a5e578c220..c63a4e8b0fe 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx
@@ -30,7 +30,7 @@ const ConfirmSignIn = ({
toSignIn,
validationErrors,
...rest
-}: DefaultConfirmSignInProps): React.JSX.Element => {
+}: DefaultConfirmSignInProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx
index ead0e3dbf1e..393adc6845d 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignIn/__tests__/ConfirmSignIn.spec.tsx
@@ -44,7 +44,7 @@ describe('ConfirmSignIn', () => {
expect(getAllByRole('header')).toBeDefined();
expect(getByText(getChallengeText('SMS_MFA'))).toBeDefined();
expect(getByText(getConfirmText())).toBeDefined();
- expect(getAllByRole('text')).toHaveLength(3);
+ expect(getAllByRole('text')).toHaveLength(fields.length);
});
it('renders an error message', () => {
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx
index f18d36c3514..150a8adbf2d 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx
@@ -31,7 +31,7 @@ const ConfirmSignUp = ({
resendCode,
validationErrors,
...rest
-}: DefaultConfirmSignUpProps): React.JSX.Element => {
+}: DefaultConfirmSignUpProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx b/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx
index e3cc30693a0..a3b100d7d96 100644
--- a/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx
@@ -29,7 +29,7 @@ const ConfirmVerifyUser = ({
skipVerification,
validationErrors,
...rest
-}: DefaultConfirmVerifyUserProps): React.JSX.Element => {
+}: DefaultConfirmVerifyUserProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx
index d90e692a776..4943d3137b6 100644
--- a/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx
@@ -26,7 +26,7 @@ const ForceNewPassword = ({
toSignIn,
validationErrors,
...rest
-}: DefaultForceNewPasswordProps): React.JSX.Element => {
+}: DefaultForceNewPasswordProps): JSX.Element => {
const {
disableFormSubmit,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx
index c734a21ee64..77dd70ea4d6 100644
--- a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx
@@ -28,7 +28,7 @@ const ForgotPassword = ({
toSignIn,
validationErrors,
...rest
-}: DefaultForgotPasswordProps): React.JSX.Element => {
+}: DefaultForgotPasswordProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx
index 316d827ce7e..e1a58c75888 100644
--- a/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/ForgotPassword/__tests__/ForgotPassword.spec.tsx
@@ -44,7 +44,7 @@ describe('ForgotPassword', () => {
expect(getAllByRole('header')).toBeDefined();
expect(getByText(getResetYourPasswordText())).toBeDefined();
expect(getByText(getSendCodeText())).toBeDefined();
- expect(getAllByRole('text')).toHaveLength(3);
+ expect(getAllByRole('text')).toHaveLength(fields.length);
});
it('renders an error message', () => {
diff --git a/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx b/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx
index ee27c1a0abd..4712876dacf 100644
--- a/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx
@@ -35,7 +35,7 @@ const SetupTotp = ({
totpSecretCode,
validationErrors,
...rest
-}: DefaultSetupTotpProps): React.JSX.Element => {
+}: DefaultSetupTotpProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx b/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx
index 08cf3a3d73b..4a22619e651 100644
--- a/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/SignIn/SignIn.tsx
@@ -26,7 +26,7 @@ const SignIn = ({
toSignUp,
validationErrors,
...rest
-}: DefaultSignInProps): React.JSX.Element => {
+}: DefaultSignInProps): JSX.Element => {
const {
getSignInTabText,
getSignInText,
diff --git a/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx b/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx
index e4685bedb1e..e370099b6e6 100644
--- a/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/SignIn/__tests__/SignIn.spec.tsx
@@ -49,7 +49,7 @@ describe('SignIn', () => {
const { toJSON, getAllByRole, getByText } = render();
expect(toJSON()).toMatchSnapshot();
- expect(getAllByRole('text')).toHaveLength(5);
+ expect(getAllByRole('text')).toHaveLength(fields.length);
expect(getByText(getSignInText())).toBeDefined();
expect(getByText(getForgotPasswordText(true))).toBeDefined();
});
diff --git a/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx b/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx
index 631c63549f5..b94e01de114 100644
--- a/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/SignUp/SignUp.tsx
@@ -34,7 +34,7 @@ const SignUp = ({
toSignIn,
validationErrors,
...rest
-}: DefaultSignUpProps): React.JSX.Element => {
+}: DefaultSignUpProps): JSX.Element => {
const {
disableFormSubmit,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx b/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx
index 08dd5cd7aaa..f7ad231d87c 100644
--- a/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx
@@ -59,7 +59,7 @@ describe('SignUp', () => {
expect(toJSON()).toMatchSnapshot();
expect(queryByText(getCreatingAccountText())).toBe(null);
- expect(getAllByRole('text')).toHaveLength(6);
+ expect(getAllByRole('text')).toHaveLength(fields.length);
});
it('renders as expected with errors', () => {
diff --git a/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx b/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx
index 9a6cb18afbe..0047d5f85b9 100644
--- a/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx
+++ b/packages/react-native/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx
@@ -27,7 +27,7 @@ const VerifyUser = ({
skipVerification,
validationErrors,
...rest
-}: DefaultVerifyUserProps): React.JSX.Element => {
+}: DefaultVerifyUserProps): JSX.Element => {
const {
disableFormSubmit: disabled,
fields: fieldsWithHandlers,
diff --git a/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx b/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx
index 01f4fc7fa52..e826b25c024 100644
--- a/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx
@@ -26,7 +26,7 @@ export default function DefaultContainer({
scrollViewContentContainerStyle,
style,
...rest
-}: ContainerProps): React.JSX.Element | null {
+}: ContainerProps): JSX.Element | null {
const theme = useTheme();
const insets = useSafeAreaInsets();
diff --git a/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx b/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx
index 35d42b85609..0ca446c9942 100644
--- a/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultContainer/InnerContainer.tsx
@@ -8,7 +8,7 @@ import { ContainerProps } from './types';
export default function InnerContainer({
children,
...rest
-}: ContainerProps): React.JSX.Element | null {
+}: ContainerProps): JSX.Element | null {
const theme = useTheme();
const themedStyle = getInnerContainerStyles(theme);
diff --git a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx
index dac1cd48788..6ed12ad08d9 100644
--- a/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultContent/DefaultContent.tsx
@@ -26,7 +26,7 @@ export default function DefaultContent<
Header,
headerText,
validationErrors,
-}: DefaultContentProps): React.JSX.Element {
+}: DefaultContentProps): JSX.Element {
const themedStyles = useThemedStyles(getDefaultStyle);
const linkButtons = useMemo(
diff --git a/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx b/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx
index fc73223bd8b..057a8cef95b 100644
--- a/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx
@@ -6,6 +6,6 @@ import { DefaultFooterProps } from './types';
export default function DefaultFooter({
children,
...rest
-}: DefaultFooterProps): React.JSX.Element | null {
+}: DefaultFooterProps): JSX.Element | null {
return children ? {children} : null;
}
diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx
index c0473ef9c4a..aaf246d1d55 100644
--- a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx
@@ -20,7 +20,7 @@ const DefaultRadioFormFields = ({
fieldLabelStyle,
isPending,
style,
-}: DefaultRadioFormFieldsProps): React.JSX.Element => {
+}: DefaultRadioFormFieldsProps): JSX.Element => {
return (
{(fields ?? []).map(({ name, value, ...props }) => {
diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx
index ba86fe8a828..98a1638eb59 100644
--- a/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx
@@ -19,7 +19,7 @@ const DefaultTextFormFields = ({
isPending = false,
style,
validationErrors,
-}: DefaultTextFormFieldsProps): React.JSX.Element => {
+}: DefaultTextFormFieldsProps): JSX.Element => {
const formFields = (fields ?? []).map(({ name, type, ...field }) => {
const errors = validationErrors ? getErrors(validationErrors?.[name]) : [];
diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx
index a60c3647da6..b879b6e1ffe 100644
--- a/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/Field.tsx
@@ -28,7 +28,7 @@ const HIDDEN_INPUT_PROPS: TextInputProps = {
const HiddenInput = () => ;
-const Field = ({ type, ...rest }: FieldProps): React.JSX.Element => {
+const Field = ({ type, ...rest }: FieldProps): JSX.Element => {
const isPassword = type === 'password';
const Field = isPassword
? PasswordField
diff --git a/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx b/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx
index 73fdd560312..206a2bd3d37 100644
--- a/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx
@@ -7,7 +7,7 @@ export const FieldErrors = ({
errors,
errorStyle,
style,
-}: FieldErrorsProps): React.JSX.Element | null => {
+}: FieldErrorsProps): JSX.Element | null => {
if (!errors || !errors.length) {
return null;
}
diff --git a/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx b/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx
index 014781e871d..fb58da67941 100644
--- a/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx
+++ b/packages/react-native/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx
@@ -7,7 +7,7 @@ export default function DefaultHeader({
children,
level = 3,
...rest
-}: DefaultHeaderProps): React.JSX.Element | null {
+}: DefaultHeaderProps): JSX.Element | null {
return children ? (
{children}
diff --git a/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx b/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx
index 66f848b80fc..15ade7884e7 100644
--- a/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx
+++ b/packages/react-native/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx
@@ -11,7 +11,7 @@ export default function FederatedProviderButton({
style,
textStyle,
...rest
-}: FederatedProviderButtonProps): React.JSX.Element {
+}: FederatedProviderButtonProps): JSX.Element {
const pressableStyle = usePressableContainerStyles({
overrideStyle: style,
});
diff --git a/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx b/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx
index 484b5540997..3c6b9e6b66d 100644
--- a/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx
+++ b/packages/react-native/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx
@@ -23,7 +23,7 @@ export default function FederatedProviderButtons({
socialProviders,
style,
toFederatedSignIn,
-}: FederatedProviderButtonsProps): React.JSX.Element | null {
+}: FederatedProviderButtonsProps): JSX.Element | null {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/Authenticator/withAuthenticator.tsx b/packages/react-native/src/Authenticator/withAuthenticator.tsx
index 6d0f0b7c322..79331b5f5be 100644
--- a/packages/react-native/src/Authenticator/withAuthenticator.tsx
+++ b/packages/react-native/src/Authenticator/withAuthenticator.tsx
@@ -5,12 +5,12 @@ import { WithAuthenticatorOptions } from './types';
export default function withAuthenticator(
Component: React.ComponentType,
options: WithAuthenticatorOptions = {}
-): (props: Props) => React.JSX.Element {
+): (props: Props) => JSX.Element {
return function WrappedWithAuthenticator(props: Props) {
return (
-
+
);
diff --git a/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx b/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx
index f8ee7266ca6..ca537203094 100644
--- a/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx
+++ b/packages/react-native/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx
@@ -10,7 +10,7 @@ import { BannerMessageProps } from './types';
export default function BannerMessage({
position = 'top',
...props
-}: BannerMessageProps): React.JSX.Element | null {
+}: BannerMessageProps): JSX.Element | null {
const messageProps = useMessageProps(
props,
(imageDimensions: ImageDimensions) =>
diff --git a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx
index b54289d1395..47ee927c033 100644
--- a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx
+++ b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx
@@ -11,7 +11,7 @@ import { CarouselMessageProps } from './types';
export default function CarouselMessage(
props: CarouselMessageProps
-): React.JSX.Element {
+): JSX.Element {
const { data, ...rest } = props;
const { style } = rest;
diff --git a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx
index d47ade24290..07d21a1accd 100644
--- a/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx
+++ b/packages/react-native/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx
@@ -10,7 +10,7 @@ import { CarouselMessageItemProps } from './types';
export default function CarouselMessageItem(
props: CarouselMessageItemProps
-): React.JSX.Element | null {
+): JSX.Element | null {
const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
const messageProps = useMessageProps(
props,
diff --git a/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx b/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx
index 7c38ccb3b98..9d6da819885 100644
--- a/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx
+++ b/packages/react-native/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx
@@ -11,7 +11,7 @@ import { FullScreenMessageProps } from './types';
export default function FullScreenMessage(
props: FullScreenMessageProps
-): React.JSX.Element | null {
+): JSX.Element | null {
const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
const messageProps = useMessageProps(
props,
diff --git a/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx b/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx
index da669ea257f..fb5e77f6454 100644
--- a/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx
+++ b/packages/react-native/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx
@@ -27,7 +27,7 @@ const onMessageAction: OnMessageAction = ({ action, url }) => {
function InAppMessageDisplay({
components: overrideComponents,
-}: InAppMessageDisplayProps): React.JSX.Element | null {
+}: InAppMessageDisplayProps): JSX.Element | null {
const components = React.useMemo(
() => ({ ...platformComponents, ...overrideComponents }),
[overrideComponents]
diff --git a/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx b/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx
index 72baab59c97..c2d37b7c102 100644
--- a/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx
+++ b/packages/react-native/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx
@@ -16,7 +16,7 @@ import { LayoutProps } from './types';
export default function MessageLayout({
orientation,
...props
-}: LayoutProps): React.JSX.Element {
+}: LayoutProps): JSX.Element {
const {
body,
hasButtons,
diff --git a/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx b/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx
index 55c3a7658e5..b37bb4d8f61 100644
--- a/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx
+++ b/packages/react-native/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx
@@ -17,7 +17,7 @@ export default function MessageWrapper({
children,
disableSafeAreaView,
style,
-}: MessageWrapperProps): React.JSX.Element {
+}: MessageWrapperProps): JSX.Element {
return (
diff --git a/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx b/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx
index 3aa01096118..2267e1de9e2 100644
--- a/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx
+++ b/packages/react-native/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx
@@ -10,7 +10,7 @@ import { ModalMessageProps } from './types';
export default function ModalMessage(
props: ModalMessageProps
-): React.JSX.Element | null {
+): JSX.Element | null {
const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
const messageProps = useMessageProps(
props,
diff --git a/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx b/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx
index 693c3aedc5b..9501989fb10 100644
--- a/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx
+++ b/packages/react-native/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx
@@ -6,12 +6,12 @@ import { InAppMessageDisplay, MessageComponents } from '../InAppMessageDisplay';
export default function withInAppMessaging(
Component: React.ComponentType,
options?: { components?: MessageComponents }
-): (props: Props) => React.JSX.Element {
+): (props: Props) => JSX.Element {
return function WrappedWithInAppMessaging(props: Props) {
return (
-
+
);
};
diff --git a/packages/react-native/src/primitives/Button/Button.tsx b/packages/react-native/src/primitives/Button/Button.tsx
index 8dbfe6ebb22..b14770fa319 100644
--- a/packages/react-native/src/primitives/Button/Button.tsx
+++ b/packages/react-native/src/primitives/Button/Button.tsx
@@ -15,7 +15,7 @@ export default function Button({
textStyle,
variant = 'default',
...rest
-}: ButtonProps): React.JSX.Element {
+}: ButtonProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Carousel/Carousel.tsx b/packages/react-native/src/primitives/Carousel/Carousel.tsx
index 495012b7d2e..9ae45204ff2 100644
--- a/packages/react-native/src/primitives/Carousel/Carousel.tsx
+++ b/packages/react-native/src/primitives/Carousel/Carousel.tsx
@@ -15,7 +15,7 @@ import { CarouselProps } from './types';
export default function Carousel(
props: CarouselProps
-): React.JSX.Element | null {
+): JSX.Element | null {
const {
data,
indicatorActiveStyle,
diff --git a/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx b/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx
index 563b6353f10..46f6fe66784 100644
--- a/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx
+++ b/packages/react-native/src/primitives/Carousel/CarouselPageIndicator.tsx
@@ -15,7 +15,7 @@ export default function CarouselPageIndicator({
indicatorTestId,
numberOfItems,
style,
-}: CarouselPageIndicatorProps): React.JSX.Element {
+}: CarouselPageIndicatorProps): JSX.Element {
const items = useMemo(
() =>
new Array(numberOfItems ?? 0)
diff --git a/packages/react-native/src/primitives/Checkbox/Checkbox.tsx b/packages/react-native/src/primitives/Checkbox/Checkbox.tsx
index 854f4a750c7..689003a651a 100644
--- a/packages/react-native/src/primitives/Checkbox/Checkbox.tsx
+++ b/packages/react-native/src/primitives/Checkbox/Checkbox.tsx
@@ -21,7 +21,7 @@ export default function Checkbox({
style,
value,
...rest
-}: CheckboxProps): React.JSX.Element {
+}: CheckboxProps): JSX.Element {
const [checked, setChecked] = useState(selected ?? false);
const theme = useTheme();
const themedStyle = getThemedStyles(theme, labelPosition);
diff --git a/packages/react-native/src/primitives/Divider/Divider.tsx b/packages/react-native/src/primitives/Divider/Divider.tsx
index ca3ecf7b5ac..125845295bd 100644
--- a/packages/react-native/src/primitives/Divider/Divider.tsx
+++ b/packages/react-native/src/primitives/Divider/Divider.tsx
@@ -13,7 +13,7 @@ export default function Divider({
labelStyle,
lineStyle,
style,
-}: DividerProps): React.JSX.Element {
+}: DividerProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx b/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx
index de7a9c4560a..1f6cb1d84dc 100644
--- a/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx
+++ b/packages/react-native/src/primitives/ErrorMessage/ErrorMessage.tsx
@@ -21,7 +21,7 @@ export default function ErrorMessage({
onDismiss,
style,
...rest
-}: ErrorMessageProps): React.JSX.Element {
+}: ErrorMessageProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Heading/Heading.tsx b/packages/react-native/src/primitives/Heading/Heading.tsx
index 5f9f7688433..4ca0ac419e0 100644
--- a/packages/react-native/src/primitives/Heading/Heading.tsx
+++ b/packages/react-native/src/primitives/Heading/Heading.tsx
@@ -11,7 +11,7 @@ export default function Heading({
level = 6,
style,
...rest
-}: HeadingProps): React.JSX.Element {
+}: HeadingProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Icon/Icon.tsx b/packages/react-native/src/primitives/Icon/Icon.tsx
index 59a690fdd4d..f3d49d18e21 100644
--- a/packages/react-native/src/primitives/Icon/Icon.tsx
+++ b/packages/react-native/src/primitives/Icon/Icon.tsx
@@ -13,7 +13,7 @@ export default function Icon({
size,
style,
...rest
-}: IconProps): React.JSX.Element {
+}: IconProps): JSX.Element {
const theme = useTheme();
const themedStyle = useMemo(
() => getThemedStyles(theme, color, size),
diff --git a/packages/react-native/src/primitives/IconButton/IconButton.tsx b/packages/react-native/src/primitives/IconButton/IconButton.tsx
index 21a099c207a..94f776a94b7 100644
--- a/packages/react-native/src/primitives/IconButton/IconButton.tsx
+++ b/packages/react-native/src/primitives/IconButton/IconButton.tsx
@@ -17,7 +17,7 @@ export default function IconButton({
source,
style,
...rest
-}: IconButtonProps): React.JSX.Element {
+}: IconButtonProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Label/Label.tsx b/packages/react-native/src/primitives/Label/Label.tsx
index 05a54fe4fd9..6d1e65900bd 100644
--- a/packages/react-native/src/primitives/Label/Label.tsx
+++ b/packages/react-native/src/primitives/Label/Label.tsx
@@ -11,7 +11,7 @@ export default function Label({
style,
variant = 'primary',
...rest
-}: LabelProps): React.JSX.Element {
+}: LabelProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
const textStyle = [themedStyle.text, themedStyle[variant], style];
diff --git a/packages/react-native/src/primitives/PasswordField/PasswordField.tsx b/packages/react-native/src/primitives/PasswordField/PasswordField.tsx
index 29c2537a431..2af94288d7a 100644
--- a/packages/react-native/src/primitives/PasswordField/PasswordField.tsx
+++ b/packages/react-native/src/primitives/PasswordField/PasswordField.tsx
@@ -19,7 +19,7 @@ export default function PasswordField({
showPasswordButton = true,
style,
...rest
-}: PasswordFieldProps): React.JSX.Element {
+}: PasswordFieldProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx b/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx
index d406f9e4db9..08bc85f271b 100644
--- a/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx
+++ b/packages/react-native/src/primitives/PhoneNumberField/PhoneNumberField.tsx
@@ -11,7 +11,7 @@ export default function PhoneNumberField({
labelStyle,
style,
...rest
-}: PhoneNumberFieldProps): React.JSX.Element {
+}: PhoneNumberFieldProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Radio/Radio.tsx b/packages/react-native/src/primitives/Radio/Radio.tsx
index e6c25e7f165..5d2dfa79d06 100644
--- a/packages/react-native/src/primitives/Radio/Radio.tsx
+++ b/packages/react-native/src/primitives/Radio/Radio.tsx
@@ -33,7 +33,7 @@ export default function Radio({
style,
value,
...rest
-}: RadioProps): React.JSX.Element {
+}: RadioProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx b/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx
index 6ca9c9065de..157ace888c0 100644
--- a/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx
+++ b/packages/react-native/src/primitives/RadioGroup/RadioGroup.tsx
@@ -34,7 +34,7 @@ export default function RadioGroup({
size,
style,
...rest
-}: RadioGroupProps): React.JSX.Element {
+}: RadioGroupProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme);
diff --git a/packages/react-native/src/primitives/Tabs/Tab.tsx b/packages/react-native/src/primitives/Tabs/Tab.tsx
index 17778b54b14..232ebbf8b5a 100644
--- a/packages/react-native/src/primitives/Tabs/Tab.tsx
+++ b/packages/react-native/src/primitives/Tabs/Tab.tsx
@@ -14,7 +14,7 @@ export default function Tab({
textStyle,
indicatorPosition,
...rest
-}: TabProps): React.JSX.Element {
+}: TabProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme, indicatorPosition);
diff --git a/packages/react-native/src/primitives/Tabs/Tabs.tsx b/packages/react-native/src/primitives/Tabs/Tabs.tsx
index 52e11619fe5..72af1b2cc73 100644
--- a/packages/react-native/src/primitives/Tabs/Tabs.tsx
+++ b/packages/react-native/src/primitives/Tabs/Tabs.tsx
@@ -14,7 +14,7 @@ export default function Tabs({
selectedIndex = 0,
style,
...rest
-}: TabsProps): React.JSX.Element {
+}: TabsProps): JSX.Element {
const theme = useTheme();
const themedStyle = getThemedStyles(theme, indicatorPosition);
diff --git a/packages/react-native/src/primitives/TextField/TextField.tsx b/packages/react-native/src/primitives/TextField/TextField.tsx
index d7f5157a886..09b7a6ff83b 100644
--- a/packages/react-native/src/primitives/TextField/TextField.tsx
+++ b/packages/react-native/src/primitives/TextField/TextField.tsx
@@ -25,7 +25,7 @@ export default function TextField({
labelStyle,
style,
...rest
-}: TextFieldProps): React.JSX.Element {
+}: TextFieldProps): JSX.Element {
const theme = useTheme();
const themedStyle = useMemo(() => getThemedStyles(theme), [theme]);
diff --git a/packages/react-native/src/theme/ThemeProvider.tsx b/packages/react-native/src/theme/ThemeProvider.tsx
index 4c020fa9586..258447c5d4c 100644
--- a/packages/react-native/src/theme/ThemeProvider.tsx
+++ b/packages/react-native/src/theme/ThemeProvider.tsx
@@ -14,7 +14,7 @@ export const ThemeProvider = ({
children,
theme,
colorMode,
-}: ThemeProviderProps): React.JSX.Element => {
+}: ThemeProviderProps): JSX.Element => {
const value = React.useMemo(
() => ({ theme: createTheme(theme, colorMode) }),
[theme, colorMode]
diff --git a/packages/react-notifications/package.json b/packages/react-notifications/package.json
index 7631488f272..5f1e4c06372 100644
--- a/packages/react-notifications/package.json
+++ b/packages/react-notifications/package.json
@@ -47,8 +47,8 @@
},
"peerDependencies": {
"aws-amplify": "^6.9.0",
- "react": "^16.14 || ^17 || ^18 || ^19",
- "react-dom": "^16.14 || ^17 || ^18 || ^19"
+ "react": "^16.14.0 || ^17.0 || ^18.0",
+ "react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
"devDependencies": {
"@types/tinycolor2": "^1.4.3"
diff --git a/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx b/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx
index 4e40c05bc3d..8bdbdff1671 100644
--- a/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx
+++ b/packages/react-notifications/src/components/InAppMessaging/Backdrop/Backdrop.tsx
@@ -6,10 +6,7 @@ import { BackdropProps } from './types';
export const BACKDROP_TEST_ID = 'inappmessaging-backdrop';
-export function Backdrop({
- onClick,
- ...rest
-}: BackdropProps): React.JSX.Element {
+export function Backdrop({ onClick, ...rest }: BackdropProps): JSX.Element {
return (
(
- Content: (props: Props) => React.JSX.Element,
+ Content: (props: Props) => JSX.Element,
options: BackdropProps = {}
-): (props: Props) => React.JSX.Element {
+): (props: Props) => JSX.Element {
return function ContentWithBackdrop(props: Props) {
return (
<>
-
+
>
diff --git a/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx b/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx
index b5d94855a62..5a0b8d1d348 100644
--- a/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx
+++ b/packages/react-notifications/src/components/InAppMessaging/BannerMessage/BannerMessage.tsx
@@ -9,9 +9,7 @@ import { MessageLayout } from '../MessageLayout';
import { BLOCK_CLASS } from './constants';
import { BannerMessageProps } from './types';
-export function BannerMessage(
- props: BannerMessageProps
-): React.JSX.Element | null {
+export function BannerMessage(props: BannerMessageProps): JSX.Element | null {
const messageProps = useMessageProps(props);
const shouldBeFullWidth = useBreakpointValue([true, true, false]);
const { shouldRenderMessage, styles } = messageProps;
diff --git a/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx b/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx
index 5eae1c5ac47..96da2266ed7 100644
--- a/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx
+++ b/packages/react-notifications/src/components/InAppMessaging/CloseIconButton/CloseIconButton.tsx
@@ -11,7 +11,7 @@ export function CloseIconButton({
onClick,
style,
...rest
-}: CloseIconButtonProps): React.JSX.Element {
+}: CloseIconButtonProps): JSX.Element {
return (