@aws-amplify/ui-react-native 2.3.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/Authenticator/Authenticator.d.ts +22 -22
  2. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.d.ts +3 -3
  3. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.d.ts +3 -3
  4. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.d.ts +3 -3
  5. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.d.ts +3 -3
  6. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.d.ts +3 -3
  7. package/dist/Authenticator/Defaults/ForgotPassword/ForgotPassword.d.ts +3 -3
  8. package/dist/Authenticator/Defaults/SetupTotp/SetupTotp.d.ts +3 -3
  9. package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +3 -3
  10. package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +3 -3
  11. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.d.ts +3 -3
  12. package/dist/Authenticator/Defaults/types.d.ts +0 -1
  13. package/dist/Authenticator/common/DefaultContainer/DefaultContainer.d.ts +2 -2
  14. package/dist/Authenticator/common/DefaultContainer/InnerContainer.d.ts +2 -2
  15. package/dist/Authenticator/common/DefaultContent/DefaultContent.d.ts +2 -2
  16. package/dist/Authenticator/common/DefaultFooter/DefaultFooter.d.ts +2 -2
  17. package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.d.ts +2 -2
  18. package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.d.ts +2 -2
  19. package/dist/Authenticator/common/DefaultFormFields/Field.d.ts +2 -2
  20. package/dist/Authenticator/common/DefaultFormFields/FieldErrors.d.ts +2 -2
  21. package/dist/Authenticator/common/DefaultHeader/DefaultHeader.d.ts +2 -2
  22. package/dist/Authenticator/common/FederatedProviderButton/FederatedProviderButton.d.ts +2 -2
  23. package/dist/Authenticator/common/FederatedProviderButton/types.d.ts +0 -1
  24. package/dist/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.d.ts +2 -2
  25. package/dist/Authenticator/withAuthenticator.d.ts +1 -1
  26. package/dist/InAppMessaging/components/BannerMessage/BannerMessage.d.ts +2 -2
  27. package/dist/InAppMessaging/components/CarouselMessage/CarouselMessage.d.ts +2 -2
  28. package/dist/InAppMessaging/components/CarouselMessage/CarouselMessageItem.d.ts +2 -2
  29. package/dist/InAppMessaging/components/FullScreenMessage/FullScreenMessage.d.ts +2 -2
  30. package/dist/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.d.ts +2 -2
  31. package/dist/InAppMessaging/components/MessageLayout/MessageLayout.d.ts +2 -2
  32. package/dist/InAppMessaging/components/MessageWrapper/MessageWrapper.d.ts +2 -2
  33. package/dist/InAppMessaging/components/ModalMessage/ModalMessage.d.ts +2 -2
  34. package/dist/InAppMessaging/components/withInAppMessaging/withInAppMessaging.d.ts +1 -1
  35. package/dist/primitives/Button/Button.d.ts +2 -2
  36. package/dist/primitives/Carousel/Carousel.d.ts +2 -2
  37. package/dist/primitives/Carousel/CarouselPageIndicator.d.ts +2 -2
  38. package/dist/primitives/Checkbox/Checkbox.d.ts +2 -2
  39. package/dist/primitives/Divider/Divider.d.ts +2 -2
  40. package/dist/primitives/ErrorMessage/ErrorMessage.d.ts +2 -2
  41. package/dist/primitives/Heading/Heading.d.ts +2 -2
  42. package/dist/primitives/Icon/Icon.d.ts +2 -2
  43. package/dist/primitives/IconButton/IconButton.d.ts +2 -2
  44. package/dist/primitives/Label/Label.d.ts +2 -2
  45. package/dist/primitives/PasswordField/PasswordField.d.ts +2 -2
  46. package/dist/primitives/PhoneNumberField/PhoneNumberField.d.ts +2 -2
  47. package/dist/primitives/Radio/Radio.d.ts +2 -2
  48. package/dist/primitives/RadioGroup/RadioGroup.d.ts +2 -2
  49. package/dist/primitives/RadioGroup/types.d.ts +0 -1
  50. package/dist/primitives/Tabs/Tab.d.ts +2 -2
  51. package/dist/primitives/Tabs/Tabs.d.ts +2 -2
  52. package/dist/primitives/Tabs/types.d.ts +0 -1
  53. package/dist/primitives/TextField/TextField.d.ts +2 -2
  54. package/dist/primitives/TextField/types.d.ts +0 -1
  55. package/dist/theme/ThemeProvider.d.ts +1 -1
  56. package/dist/version.d.ts +1 -1
  57. package/dist/version.js +1 -1
  58. package/lib/version.js +1 -1
  59. package/package.json +5 -5
  60. package/src/Authenticator/Authenticator.tsx +1 -1
  61. package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +1 -1
  62. package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +1 -1
  63. package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +1 -1
  64. package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +1 -1
  65. package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +1 -1
  66. package/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx +1 -1
  67. package/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx +1 -1
  68. package/src/Authenticator/Defaults/SignIn/SignIn.tsx +1 -1
  69. package/src/Authenticator/Defaults/SignUp/SignUp.tsx +1 -1
  70. package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +1 -1
  71. package/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx +1 -1
  72. package/src/Authenticator/common/DefaultContainer/InnerContainer.tsx +1 -1
  73. package/src/Authenticator/common/DefaultContent/DefaultContent.tsx +1 -1
  74. package/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx +1 -1
  75. package/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +1 -1
  76. package/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +1 -1
  77. package/src/Authenticator/common/DefaultFormFields/Field.tsx +1 -1
  78. package/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx +1 -1
  79. package/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx +1 -1
  80. package/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx +1 -1
  81. package/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx +1 -1
  82. package/src/Authenticator/withAuthenticator.tsx +2 -2
  83. package/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx +1 -1
  84. package/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx +1 -1
  85. package/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx +1 -1
  86. package/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx +1 -1
  87. package/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx +1 -1
  88. package/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx +1 -1
  89. package/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx +1 -1
  90. package/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx +1 -1
  91. package/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx +2 -2
  92. package/src/primitives/Button/Button.tsx +1 -1
  93. package/src/primitives/Carousel/Carousel.tsx +1 -1
  94. package/src/primitives/Carousel/CarouselPageIndicator.tsx +1 -1
  95. package/src/primitives/Checkbox/Checkbox.tsx +1 -1
  96. package/src/primitives/Divider/Divider.tsx +1 -1
  97. package/src/primitives/ErrorMessage/ErrorMessage.tsx +1 -1
  98. package/src/primitives/Heading/Heading.tsx +1 -1
  99. package/src/primitives/Icon/Icon.tsx +1 -1
  100. package/src/primitives/IconButton/IconButton.tsx +1 -1
  101. package/src/primitives/Label/Label.tsx +1 -1
  102. package/src/primitives/PasswordField/PasswordField.tsx +1 -1
  103. package/src/primitives/PhoneNumberField/PhoneNumberField.tsx +1 -1
  104. package/src/primitives/Radio/Radio.tsx +1 -1
  105. package/src/primitives/RadioGroup/RadioGroup.tsx +1 -1
  106. package/src/primitives/Tabs/Tab.tsx +1 -1
  107. package/src/primitives/Tabs/Tabs.tsx +1 -1
  108. package/src/primitives/TextField/TextField.tsx +1 -1
  109. package/src/theme/ThemeProvider.tsx +1 -1
  110. package/src/version.ts +1 -1
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { RadioGroupProps } from './types';
3
- export default function RadioGroup<T>({ accessible, accessibilityRole, children, direction, disabled, initialValue, label, labelPosition, labelStyle, onChange, onValueChange, size, style, ...rest }: RadioGroupProps<T>): JSX.Element;
3
+ export default function RadioGroup<T>({ accessible, accessibilityRole, children, direction, disabled, initialValue, label, labelPosition, labelStyle, onChange, onValueChange, size, style, ...rest }: RadioGroupProps<T>): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextStyle, ViewProps, ViewStyle } from 'react-native';
3
2
  import { RadioProps } from '../Radio';
4
3
  export type Direction = 'vertical' | 'horizontal';
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TabProps } from './types';
3
- export default function Tab({ children, selected, style, textStyle, indicatorPosition, ...rest }: TabProps): JSX.Element;
3
+ export default function Tab({ children, selected, style, textStyle, indicatorPosition, ...rest }: TabProps): React.JSX.Element;
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TabsProps } from './types';
3
- export default function Tabs({ accessible, accessibilityRole, children, indicatorPosition, onChange, selectedIndex, style, ...rest }: TabsProps): JSX.Element;
3
+ export default function Tabs({ accessible, accessibilityRole, children, indicatorPosition, onChange, selectedIndex, style, ...rest }: TabsProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextStyle, ViewProps, ViewStyle } from 'react-native';
3
2
  import { ButtonProps } from '../Button';
4
3
  type IndicatorPosition = 'top' | 'bottom';
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TextFieldProps } from './types';
3
3
  export declare const TEXTFIELD_CONTAINER_TEST_ID = "amplify__text-field-container";
4
4
  export declare const INPUT_CONTAINER_TEST_ID = "amplify__text-field__input-container";
5
- export default function TextField({ accessibilityLabel, accessibilityRole, accessibilityState, accessible, autoCapitalize, disabled, endAccessory, error, errorMessage, errorMessageStyle, fieldStyle, label, labelStyle, style, ...rest }: TextFieldProps): JSX.Element;
5
+ export default function TextField({ accessibilityLabel, accessibilityRole, accessibilityState, accessible, autoCapitalize, disabled, endAccessory, error, errorMessage, errorMessageStyle, fieldStyle, label, labelStyle, style, ...rest }: TextFieldProps): React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StyleProp, TextInputProps, TextStyle, ViewStyle } from 'react-native';
3
2
  import { LabelProps } from '../Label/types';
4
3
  export interface TextFieldProps extends Omit<TextInputProps, 'editable'> {
@@ -5,5 +5,5 @@ interface ThemeProviderProps {
5
5
  theme?: Theme;
6
6
  colorMode?: ColorMode;
7
7
  }
8
- export declare const ThemeProvider: ({ children, theme, colorMode, }: ThemeProviderProps) => JSX.Element;
8
+ export declare const ThemeProvider: ({ children, theme, colorMode, }: ThemeProviderProps) => React.JSX.Element;
9
9
  export {};
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "2.3.1";
1
+ export declare const VERSION = "2.4.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.3.1';
1
+ export const VERSION = '2.4.0';
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '2.3.1';
4
+ exports.VERSION = '2.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-react-native",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "main": "lib/index.js",
5
5
  "module": "dist/index.js",
6
6
  "react-native": "src/index.ts",
@@ -25,14 +25,14 @@
25
25
  "@babel/preset-env": "^7.23.2",
26
26
  "@babel/preset-typescript": "^7.23.2",
27
27
  "@react-native-async-storage/async-storage": "*",
28
- "@testing-library/react-native": "^12.3.0",
28
+ "@testing-library/react-native": "^12.9.0",
29
29
  "metro-react-native-babel-preset": "^0.77.0",
30
30
  "react-native-safe-area-context": "^4.7.3"
31
31
  },
32
32
  "dependencies": {
33
- "@aws-amplify/ui": "6.7.2",
34
- "@aws-amplify/ui-react-core": "3.2.1",
35
- "@aws-amplify/ui-react-core-notifications": "2.1.1"
33
+ "@aws-amplify/ui": "6.8.0",
34
+ "@aws-amplify/ui-react-core": "3.3.0",
35
+ "@aws-amplify/ui-react-core-notifications": "2.2.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "aws-amplify": "^6.9.0",
@@ -56,7 +56,7 @@ function Authenticator({
56
56
  Footer,
57
57
  Header,
58
58
  ...options
59
- }: AuthenticatorProps): JSX.Element | null {
59
+ }: AuthenticatorProps): React.JSX.Element | null {
60
60
  useDeprecationWarning({
61
61
  message:
62
62
  'The `passwordSettings` prop has been deprecated and will be removed in a future major version of Amplify UI.',
@@ -30,7 +30,7 @@ const ConfirmResetPassword = ({
30
30
  resendCode,
31
31
  validationErrors,
32
32
  ...rest
33
- }: DefaultConfirmResetPasswordProps): JSX.Element => {
33
+ }: DefaultConfirmResetPasswordProps): React.JSX.Element => {
34
34
  const {
35
35
  disableFormSubmit,
36
36
  fields: fieldsWithHandlers,
@@ -30,7 +30,7 @@ const ConfirmSignIn = ({
30
30
  toSignIn,
31
31
  validationErrors,
32
32
  ...rest
33
- }: DefaultConfirmSignInProps): JSX.Element => {
33
+ }: DefaultConfirmSignInProps): React.JSX.Element => {
34
34
  const {
35
35
  disableFormSubmit: disabled,
36
36
  fields: fieldsWithHandlers,
@@ -31,7 +31,7 @@ const ConfirmSignUp = ({
31
31
  resendCode,
32
32
  validationErrors,
33
33
  ...rest
34
- }: DefaultConfirmSignUpProps): JSX.Element => {
34
+ }: DefaultConfirmSignUpProps): React.JSX.Element => {
35
35
  const {
36
36
  disableFormSubmit: disabled,
37
37
  fields: fieldsWithHandlers,
@@ -29,7 +29,7 @@ const ConfirmVerifyUser = ({
29
29
  skipVerification,
30
30
  validationErrors,
31
31
  ...rest
32
- }: DefaultConfirmVerifyUserProps): JSX.Element => {
32
+ }: DefaultConfirmVerifyUserProps): React.JSX.Element => {
33
33
  const {
34
34
  disableFormSubmit: disabled,
35
35
  fields: fieldsWithHandlers,
@@ -26,7 +26,7 @@ const ForceNewPassword = ({
26
26
  toSignIn,
27
27
  validationErrors,
28
28
  ...rest
29
- }: DefaultForceNewPasswordProps): JSX.Element => {
29
+ }: DefaultForceNewPasswordProps): React.JSX.Element => {
30
30
  const {
31
31
  disableFormSubmit,
32
32
  fields: fieldsWithHandlers,
@@ -28,7 +28,7 @@ const ForgotPassword = ({
28
28
  toSignIn,
29
29
  validationErrors,
30
30
  ...rest
31
- }: DefaultForgotPasswordProps): JSX.Element => {
31
+ }: DefaultForgotPasswordProps): React.JSX.Element => {
32
32
  const {
33
33
  disableFormSubmit: disabled,
34
34
  fields: fieldsWithHandlers,
@@ -35,7 +35,7 @@ const SetupTotp = ({
35
35
  totpSecretCode,
36
36
  validationErrors,
37
37
  ...rest
38
- }: DefaultSetupTotpProps): JSX.Element => {
38
+ }: DefaultSetupTotpProps): React.JSX.Element => {
39
39
  const {
40
40
  disableFormSubmit: disabled,
41
41
  fields: fieldsWithHandlers,
@@ -26,7 +26,7 @@ const SignIn = ({
26
26
  toSignUp,
27
27
  validationErrors,
28
28
  ...rest
29
- }: DefaultSignInProps): JSX.Element => {
29
+ }: DefaultSignInProps): React.JSX.Element => {
30
30
  const {
31
31
  getSignInTabText,
32
32
  getSignInText,
@@ -34,7 +34,7 @@ const SignUp = ({
34
34
  toSignIn,
35
35
  validationErrors,
36
36
  ...rest
37
- }: DefaultSignUpProps): JSX.Element => {
37
+ }: DefaultSignUpProps): React.JSX.Element => {
38
38
  const {
39
39
  disableFormSubmit,
40
40
  fields: fieldsWithHandlers,
@@ -27,7 +27,7 @@ const VerifyUser = ({
27
27
  skipVerification,
28
28
  validationErrors,
29
29
  ...rest
30
- }: DefaultVerifyUserProps): JSX.Element => {
30
+ }: DefaultVerifyUserProps): React.JSX.Element => {
31
31
  const {
32
32
  disableFormSubmit: disabled,
33
33
  fields: fieldsWithHandlers,
@@ -26,7 +26,7 @@ export default function DefaultContainer({
26
26
  scrollViewContentContainerStyle,
27
27
  style,
28
28
  ...rest
29
- }: ContainerProps): JSX.Element | null {
29
+ }: ContainerProps): React.JSX.Element | null {
30
30
  const theme = useTheme();
31
31
  const insets = useSafeAreaInsets();
32
32
 
@@ -8,7 +8,7 @@ import { ContainerProps } from './types';
8
8
  export default function InnerContainer({
9
9
  children,
10
10
  ...rest
11
- }: ContainerProps): JSX.Element | null {
11
+ }: ContainerProps): React.JSX.Element | null {
12
12
  const theme = useTheme();
13
13
 
14
14
  const themedStyle = getInnerContainerStyles(theme);
@@ -26,7 +26,7 @@ export default function DefaultContent<
26
26
  Header,
27
27
  headerText,
28
28
  validationErrors,
29
- }: DefaultContentProps<FieldsType>): JSX.Element {
29
+ }: DefaultContentProps<FieldsType>): React.JSX.Element {
30
30
  const themedStyles = useThemedStyles(getDefaultStyle);
31
31
 
32
32
  const linkButtons = useMemo(
@@ -6,6 +6,6 @@ import { DefaultFooterProps } from './types';
6
6
  export default function DefaultFooter({
7
7
  children,
8
8
  ...rest
9
- }: DefaultFooterProps): JSX.Element | null {
9
+ }: DefaultFooterProps): React.JSX.Element | null {
10
10
  return children ? <View {...rest}>{children}</View> : null;
11
11
  }
@@ -20,7 +20,7 @@ const DefaultRadioFormFields = ({
20
20
  fieldLabelStyle,
21
21
  isPending,
22
22
  style,
23
- }: DefaultRadioFormFieldsProps): JSX.Element => {
23
+ }: DefaultRadioFormFieldsProps): React.JSX.Element => {
24
24
  return (
25
25
  <RadioGroup disabled={isPending} style={style}>
26
26
  {(fields ?? []).map(({ name, value, ...props }) => {
@@ -19,7 +19,7 @@ const DefaultTextFormFields = ({
19
19
  isPending = false,
20
20
  style,
21
21
  validationErrors,
22
- }: DefaultTextFormFieldsProps): JSX.Element => {
22
+ }: DefaultTextFormFieldsProps): React.JSX.Element => {
23
23
  const formFields = (fields ?? []).map(({ name, type, ...field }) => {
24
24
  const errors = validationErrors ? getErrors(validationErrors?.[name]) : [];
25
25
 
@@ -28,7 +28,7 @@ const HIDDEN_INPUT_PROPS: TextInputProps = {
28
28
 
29
29
  const HiddenInput = () => <TextInput {...HIDDEN_INPUT_PROPS} />;
30
30
 
31
- const Field = ({ type, ...rest }: FieldProps): JSX.Element => {
31
+ const Field = ({ type, ...rest }: FieldProps): React.JSX.Element => {
32
32
  const isPassword = type === 'password';
33
33
  const Field = isPassword
34
34
  ? PasswordField
@@ -7,7 +7,7 @@ export const FieldErrors = ({
7
7
  errors,
8
8
  errorStyle,
9
9
  style,
10
- }: FieldErrorsProps): JSX.Element | null => {
10
+ }: FieldErrorsProps): React.JSX.Element | null => {
11
11
  if (!errors || !errors.length) {
12
12
  return null;
13
13
  }
@@ -7,7 +7,7 @@ export default function DefaultHeader({
7
7
  children,
8
8
  level = 3,
9
9
  ...rest
10
- }: DefaultHeaderProps): JSX.Element | null {
10
+ }: DefaultHeaderProps): React.JSX.Element | null {
11
11
  return children ? (
12
12
  <Heading {...rest} level={level}>
13
13
  {children}
@@ -11,7 +11,7 @@ export default function FederatedProviderButton({
11
11
  style,
12
12
  textStyle,
13
13
  ...rest
14
- }: FederatedProviderButtonProps): JSX.Element {
14
+ }: FederatedProviderButtonProps): React.JSX.Element {
15
15
  const pressableStyle = usePressableContainerStyles({
16
16
  overrideStyle: style,
17
17
  });
@@ -23,7 +23,7 @@ export default function FederatedProviderButtons({
23
23
  socialProviders,
24
24
  style,
25
25
  toFederatedSignIn,
26
- }: FederatedProviderButtonsProps): JSX.Element | null {
26
+ }: FederatedProviderButtonsProps): React.JSX.Element | null {
27
27
  const theme = useTheme();
28
28
  const themedStyle = getThemedStyles(theme);
29
29
 
@@ -5,12 +5,12 @@ import { WithAuthenticatorOptions } from './types';
5
5
  export default function withAuthenticator<Props = {}>(
6
6
  Component: React.ComponentType<Props>,
7
7
  options: WithAuthenticatorOptions = {}
8
- ): (props: Props) => JSX.Element {
8
+ ): (props: Props) => React.JSX.Element {
9
9
  return function WrappedWithAuthenticator(props: Props) {
10
10
  return (
11
11
  <Authenticator.Provider>
12
12
  <Authenticator {...options}>
13
- <Component {...(props as Props & JSX.IntrinsicAttributes)} />
13
+ <Component {...(props as Props & React.JSX.IntrinsicAttributes)} />
14
14
  </Authenticator>
15
15
  </Authenticator.Provider>
16
16
  );
@@ -10,7 +10,7 @@ import { BannerMessageProps } from './types';
10
10
  export default function BannerMessage({
11
11
  position = 'top',
12
12
  ...props
13
- }: BannerMessageProps): JSX.Element | null {
13
+ }: BannerMessageProps): React.JSX.Element | null {
14
14
  const messageProps = useMessageProps(
15
15
  props,
16
16
  (imageDimensions: ImageDimensions) =>
@@ -11,7 +11,7 @@ import { CarouselMessageProps } from './types';
11
11
 
12
12
  export default function CarouselMessage(
13
13
  props: CarouselMessageProps
14
- ): JSX.Element {
14
+ ): React.JSX.Element {
15
15
  const { data, ...rest } = props;
16
16
  const { style } = rest;
17
17
 
@@ -10,7 +10,7 @@ import { CarouselMessageItemProps } from './types';
10
10
 
11
11
  export default function CarouselMessageItem(
12
12
  props: CarouselMessageItemProps
13
- ): JSX.Element | null {
13
+ ): React.JSX.Element | null {
14
14
  const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
15
15
  const messageProps = useMessageProps(
16
16
  props,
@@ -11,7 +11,7 @@ import { FullScreenMessageProps } from './types';
11
11
 
12
12
  export default function FullScreenMessage(
13
13
  props: FullScreenMessageProps
14
- ): JSX.Element | null {
14
+ ): React.JSX.Element | null {
15
15
  const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
16
16
  const messageProps = useMessageProps(
17
17
  props,
@@ -27,7 +27,7 @@ const onMessageAction: OnMessageAction = ({ action, url }) => {
27
27
 
28
28
  function InAppMessageDisplay({
29
29
  components: overrideComponents,
30
- }: InAppMessageDisplayProps): JSX.Element | null {
30
+ }: InAppMessageDisplayProps): React.JSX.Element | null {
31
31
  const components = React.useMemo(
32
32
  () => ({ ...platformComponents, ...overrideComponents }),
33
33
  [overrideComponents]
@@ -16,7 +16,7 @@ import { LayoutProps } from './types';
16
16
  export default function MessageLayout({
17
17
  orientation,
18
18
  ...props
19
- }: LayoutProps): JSX.Element {
19
+ }: LayoutProps): React.JSX.Element {
20
20
  const {
21
21
  body,
22
22
  hasButtons,
@@ -17,7 +17,7 @@ export default function MessageWrapper({
17
17
  children,
18
18
  disableSafeAreaView,
19
19
  style,
20
- }: MessageWrapperProps): JSX.Element {
20
+ }: MessageWrapperProps): React.JSX.Element {
21
21
  return (
22
22
  <Modal transparent visible supportedOrientations={SUPPORTED_ORIENTATIONS}>
23
23
  <SafeAreaProvider>
@@ -10,7 +10,7 @@ import { ModalMessageProps } from './types';
10
10
 
11
11
  export default function ModalMessage(
12
12
  props: ModalMessageProps
13
- ): JSX.Element | null {
13
+ ): React.JSX.Element | null {
14
14
  const { deviceOrientation, isPortraitMode } = useDeviceOrientation();
15
15
  const messageProps = useMessageProps(
16
16
  props,
@@ -6,12 +6,12 @@ import { InAppMessageDisplay, MessageComponents } from '../InAppMessageDisplay';
6
6
  export default function withInAppMessaging<Props = {}>(
7
7
  Component: React.ComponentType<Props>,
8
8
  options?: { components?: MessageComponents }
9
- ): (props: Props) => JSX.Element {
9
+ ): (props: Props) => React.JSX.Element {
10
10
  return function WrappedWithInAppMessaging(props: Props) {
11
11
  return (
12
12
  <InAppMessagingProvider>
13
13
  <InAppMessageDisplay {...options} />
14
- <Component {...(props as Props & JSX.IntrinsicAttributes)} />
14
+ <Component {...(props as Props & React.JSX.IntrinsicAttributes)} />
15
15
  </InAppMessagingProvider>
16
16
  );
17
17
  };
@@ -15,7 +15,7 @@ export default function Button({
15
15
  textStyle,
16
16
  variant = 'default',
17
17
  ...rest
18
- }: ButtonProps): JSX.Element {
18
+ }: ButtonProps): React.JSX.Element {
19
19
  const theme = useTheme();
20
20
  const themedStyle = getThemedStyles(theme);
21
21
 
@@ -15,7 +15,7 @@ import { CarouselProps } from './types';
15
15
 
16
16
  export default function Carousel<T>(
17
17
  props: CarouselProps<T>
18
- ): JSX.Element | null {
18
+ ): React.JSX.Element | null {
19
19
  const {
20
20
  data,
21
21
  indicatorActiveStyle,
@@ -15,7 +15,7 @@ export default function CarouselPageIndicator({
15
15
  indicatorTestId,
16
16
  numberOfItems,
17
17
  style,
18
- }: CarouselPageIndicatorProps): JSX.Element {
18
+ }: CarouselPageIndicatorProps): React.JSX.Element {
19
19
  const items = useMemo(
20
20
  () =>
21
21
  new Array(numberOfItems ?? 0)
@@ -21,7 +21,7 @@ export default function Checkbox<T>({
21
21
  style,
22
22
  value,
23
23
  ...rest
24
- }: CheckboxProps<T>): JSX.Element {
24
+ }: CheckboxProps<T>): React.JSX.Element {
25
25
  const [checked, setChecked] = useState(selected ?? false);
26
26
  const theme = useTheme();
27
27
  const themedStyle = getThemedStyles(theme, labelPosition);
@@ -13,7 +13,7 @@ export default function Divider({
13
13
  labelStyle,
14
14
  lineStyle,
15
15
  style,
16
- }: DividerProps): JSX.Element {
16
+ }: DividerProps): React.JSX.Element {
17
17
  const theme = useTheme();
18
18
  const themedStyle = getThemedStyles(theme);
19
19
 
@@ -21,7 +21,7 @@ export default function ErrorMessage({
21
21
  onDismiss,
22
22
  style,
23
23
  ...rest
24
- }: ErrorMessageProps): JSX.Element {
24
+ }: ErrorMessageProps): React.JSX.Element {
25
25
  const theme = useTheme();
26
26
  const themedStyle = getThemedStyles(theme);
27
27
 
@@ -11,7 +11,7 @@ export default function Heading({
11
11
  level = 6,
12
12
  style,
13
13
  ...rest
14
- }: HeadingProps): JSX.Element {
14
+ }: HeadingProps): React.JSX.Element {
15
15
  const theme = useTheme();
16
16
  const themedStyle = getThemedStyles(theme);
17
17
 
@@ -13,7 +13,7 @@ export default function Icon({
13
13
  size,
14
14
  style,
15
15
  ...rest
16
- }: IconProps): JSX.Element {
16
+ }: IconProps): React.JSX.Element {
17
17
  const theme = useTheme();
18
18
  const themedStyle = useMemo(
19
19
  () => getThemedStyles(theme, color, size),
@@ -17,7 +17,7 @@ export default function IconButton({
17
17
  source,
18
18
  style,
19
19
  ...rest
20
- }: IconButtonProps): JSX.Element {
20
+ }: IconButtonProps): React.JSX.Element {
21
21
  const theme = useTheme();
22
22
  const themedStyle = getThemedStyles(theme);
23
23
 
@@ -11,7 +11,7 @@ export default function Label({
11
11
  style,
12
12
  variant = 'primary',
13
13
  ...rest
14
- }: LabelProps): JSX.Element {
14
+ }: LabelProps): React.JSX.Element {
15
15
  const theme = useTheme();
16
16
  const themedStyle = getThemedStyles(theme);
17
17
  const textStyle = [themedStyle.text, themedStyle[variant], style];
@@ -19,7 +19,7 @@ export default function PasswordField({
19
19
  showPasswordButton = true,
20
20
  style,
21
21
  ...rest
22
- }: PasswordFieldProps): JSX.Element {
22
+ }: PasswordFieldProps): React.JSX.Element {
23
23
  const theme = useTheme();
24
24
  const themedStyle = getThemedStyles(theme);
25
25
 
@@ -11,7 +11,7 @@ export default function PhoneNumberField({
11
11
  labelStyle,
12
12
  style,
13
13
  ...rest
14
- }: PhoneNumberFieldProps): JSX.Element {
14
+ }: PhoneNumberFieldProps): React.JSX.Element {
15
15
  const theme = useTheme();
16
16
  const themedStyle = getThemedStyles(theme);
17
17
 
@@ -33,7 +33,7 @@ export default function Radio<T>({
33
33
  style,
34
34
  value,
35
35
  ...rest
36
- }: RadioProps<T>): JSX.Element {
36
+ }: RadioProps<T>): React.JSX.Element {
37
37
  const theme = useTheme();
38
38
  const themedStyle = getThemedStyles(theme);
39
39
 
@@ -34,7 +34,7 @@ export default function RadioGroup<T>({
34
34
  size,
35
35
  style,
36
36
  ...rest
37
- }: RadioGroupProps<T>): JSX.Element {
37
+ }: RadioGroupProps<T>): React.JSX.Element {
38
38
  const theme = useTheme();
39
39
  const themedStyle = getThemedStyles(theme);
40
40
 
@@ -14,7 +14,7 @@ export default function Tab({
14
14
  textStyle,
15
15
  indicatorPosition,
16
16
  ...rest
17
- }: TabProps): JSX.Element {
17
+ }: TabProps): React.JSX.Element {
18
18
  const theme = useTheme();
19
19
  const themedStyle = getThemedStyles(theme, indicatorPosition);
20
20
 
@@ -14,7 +14,7 @@ export default function Tabs({
14
14
  selectedIndex = 0,
15
15
  style,
16
16
  ...rest
17
- }: TabsProps): JSX.Element {
17
+ }: TabsProps): React.JSX.Element {
18
18
  const theme = useTheme();
19
19
  const themedStyle = getThemedStyles(theme, indicatorPosition);
20
20
 
@@ -25,7 +25,7 @@ export default function TextField({
25
25
  labelStyle,
26
26
  style,
27
27
  ...rest
28
- }: TextFieldProps): JSX.Element {
28
+ }: TextFieldProps): React.JSX.Element {
29
29
  const theme = useTheme();
30
30
  const themedStyle = useMemo(() => getThemedStyles(theme), [theme]);
31
31
 
@@ -14,7 +14,7 @@ export const ThemeProvider = ({
14
14
  children,
15
15
  theme,
16
16
  colorMode,
17
- }: ThemeProviderProps): JSX.Element => {
17
+ }: ThemeProviderProps): React.JSX.Element => {
18
18
  const value = React.useMemo(
19
19
  () => ({ theme: createTheme(theme, colorMode) }),
20
20
  [theme, colorMode]
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '2.3.1';
1
+ export const VERSION = '2.4.0';