@aws-amplify/ui-react-native 2.2.19 → 2.3.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.
- package/dist/Authenticator/Authenticator.d.ts +22 -22
- package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.d.ts +3 -3
- package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.d.ts +3 -3
- package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.d.ts +3 -3
- package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.d.ts +3 -3
- package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.d.ts +3 -3
- package/dist/Authenticator/Defaults/ForgotPassword/ForgotPassword.d.ts +3 -3
- package/dist/Authenticator/Defaults/SetupTotp/SetupTotp.d.ts +3 -3
- package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +3 -3
- package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +3 -3
- package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.d.ts +3 -3
- package/dist/Authenticator/Defaults/types.d.ts +0 -1
- package/dist/Authenticator/common/DefaultContainer/DefaultContainer.d.ts +2 -2
- package/dist/Authenticator/common/DefaultContainer/InnerContainer.d.ts +2 -2
- package/dist/Authenticator/common/DefaultContent/DefaultContent.d.ts +2 -2
- package/dist/Authenticator/common/DefaultFooter/DefaultFooter.d.ts +2 -2
- package/dist/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.d.ts +2 -2
- package/dist/Authenticator/common/DefaultFormFields/DefaultTextFormFields.d.ts +2 -2
- package/dist/Authenticator/common/DefaultFormFields/Field.d.ts +2 -2
- package/dist/Authenticator/common/DefaultFormFields/FieldErrors.d.ts +2 -2
- package/dist/Authenticator/common/DefaultHeader/DefaultHeader.d.ts +2 -2
- package/dist/Authenticator/common/FederatedProviderButton/FederatedProviderButton.d.ts +2 -2
- package/dist/Authenticator/common/FederatedProviderButton/types.d.ts +0 -1
- package/dist/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.d.ts +2 -2
- package/dist/Authenticator/withAuthenticator.d.ts +1 -1
- package/dist/InAppMessaging/components/BannerMessage/BannerMessage.d.ts +2 -2
- package/dist/InAppMessaging/components/CarouselMessage/CarouselMessage.d.ts +2 -2
- package/dist/InAppMessaging/components/CarouselMessage/CarouselMessageItem.d.ts +2 -2
- package/dist/InAppMessaging/components/FullScreenMessage/FullScreenMessage.d.ts +2 -2
- package/dist/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.d.ts +2 -2
- package/dist/InAppMessaging/components/MessageLayout/MessageLayout.d.ts +2 -2
- package/dist/InAppMessaging/components/MessageWrapper/MessageWrapper.d.ts +2 -2
- package/dist/InAppMessaging/components/ModalMessage/ModalMessage.d.ts +2 -2
- package/dist/InAppMessaging/components/withInAppMessaging/withInAppMessaging.d.ts +1 -1
- package/dist/primitives/Button/Button.d.ts +2 -2
- package/dist/primitives/Carousel/Carousel.d.ts +2 -2
- package/dist/primitives/Carousel/CarouselPageIndicator.d.ts +2 -2
- package/dist/primitives/Carousel/CarouselPageIndicator.js +2 -2
- package/dist/primitives/Carousel/types.d.ts +1 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +2 -2
- package/dist/primitives/Divider/Divider.d.ts +2 -2
- package/dist/primitives/ErrorMessage/ErrorMessage.d.ts +2 -2
- package/dist/primitives/Heading/Heading.d.ts +2 -2
- package/dist/primitives/Icon/Icon.d.ts +2 -2
- package/dist/primitives/IconButton/IconButton.d.ts +2 -2
- package/dist/primitives/Label/Label.d.ts +2 -2
- package/dist/primitives/PasswordField/PasswordField.d.ts +2 -2
- package/dist/primitives/PhoneNumberField/PhoneNumberField.d.ts +2 -2
- package/dist/primitives/Radio/Radio.d.ts +2 -2
- package/dist/primitives/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/primitives/RadioGroup/types.d.ts +0 -1
- package/dist/primitives/Tabs/Tab.d.ts +2 -2
- package/dist/primitives/Tabs/Tabs.d.ts +2 -2
- package/dist/primitives/Tabs/types.d.ts +0 -1
- package/dist/primitives/TextField/TextField.d.ts +2 -2
- package/dist/primitives/TextField/types.d.ts +0 -1
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/primitives/Carousel/CarouselPageIndicator.js +2 -2
- package/lib/version.js +1 -1
- package/package.json +6 -6
- package/src/Authenticator/Authenticator.tsx +1 -1
- package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +1 -1
- package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +1 -1
- package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +1 -1
- package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +1 -1
- package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +1 -1
- package/src/Authenticator/Defaults/ForgotPassword/ForgotPassword.tsx +1 -1
- package/src/Authenticator/Defaults/SetupTotp/SetupTotp.tsx +1 -1
- package/src/Authenticator/Defaults/SignIn/SignIn.tsx +1 -1
- package/src/Authenticator/Defaults/SignUp/SignUp.tsx +1 -1
- package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +1 -1
- package/src/Authenticator/common/DefaultContainer/DefaultContainer.tsx +1 -1
- package/src/Authenticator/common/DefaultContainer/InnerContainer.tsx +1 -1
- package/src/Authenticator/common/DefaultContent/DefaultContent.tsx +1 -1
- package/src/Authenticator/common/DefaultFooter/DefaultFooter.tsx +1 -1
- package/src/Authenticator/common/DefaultFormFields/DefaultRadioFormFields.tsx +1 -1
- package/src/Authenticator/common/DefaultFormFields/DefaultTextFormFields.tsx +1 -1
- package/src/Authenticator/common/DefaultFormFields/Field.tsx +1 -1
- package/src/Authenticator/common/DefaultFormFields/FieldErrors.tsx +1 -1
- package/src/Authenticator/common/DefaultHeader/DefaultHeader.tsx +1 -1
- package/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx +1 -1
- package/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx +1 -1
- package/src/Authenticator/withAuthenticator.tsx +2 -2
- package/src/InAppMessaging/components/BannerMessage/BannerMessage.tsx +1 -1
- package/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx +1 -1
- package/src/InAppMessaging/components/CarouselMessage/CarouselMessageItem.tsx +1 -1
- package/src/InAppMessaging/components/FullScreenMessage/FullScreenMessage.tsx +1 -1
- package/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx +1 -1
- package/src/InAppMessaging/components/MessageLayout/MessageLayout.tsx +1 -1
- package/src/InAppMessaging/components/MessageWrapper/MessageWrapper.tsx +1 -1
- package/src/InAppMessaging/components/ModalMessage/ModalMessage.tsx +1 -1
- package/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx +2 -2
- package/src/primitives/Button/Button.tsx +1 -1
- package/src/primitives/Carousel/Carousel.tsx +1 -1
- package/src/primitives/Carousel/CarouselPageIndicator.tsx +5 -2
- package/src/primitives/Carousel/types.ts +1 -0
- package/src/primitives/Checkbox/Checkbox.tsx +1 -1
- package/src/primitives/Divider/Divider.tsx +1 -1
- package/src/primitives/ErrorMessage/ErrorMessage.tsx +1 -1
- package/src/primitives/Heading/Heading.tsx +1 -1
- package/src/primitives/Icon/Icon.tsx +1 -1
- package/src/primitives/IconButton/IconButton.tsx +1 -1
- package/src/primitives/Label/Label.tsx +1 -1
- package/src/primitives/PasswordField/PasswordField.tsx +1 -1
- package/src/primitives/PhoneNumberField/PhoneNumberField.tsx +1 -1
- package/src/primitives/Radio/Radio.tsx +1 -1
- package/src/primitives/RadioGroup/RadioGroup.tsx +1 -1
- package/src/primitives/Tabs/Tab.tsx +1 -1
- package/src/primitives/Tabs/Tabs.tsx +1 -1
- package/src/primitives/TextField/TextField.tsx +1 -1
- package/src/theme/ThemeProvider.tsx +1 -1
- package/src/version.ts +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { PhoneNumberFieldProps } from './types';
|
|
3
|
-
export default function PhoneNumberField({ disabled, fieldStyle, labelStyle, style, ...rest }: PhoneNumberFieldProps): JSX.Element;
|
|
3
|
+
export default function PhoneNumberField({ disabled, fieldStyle, labelStyle, style, ...rest }: PhoneNumberFieldProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RadioProps } from './types';
|
|
3
3
|
export declare const CONTAINER_TEST_ID = "amplify__radio-button__container";
|
|
4
4
|
export declare const DOT_TEST_ID = "amplify__radio-button__dot";
|
|
5
|
-
export default function Radio<T>({ accessibilityRole, disabled, label, labelPosition, labelStyle, onChange, onPress, radioContainerStyle, radioDotStyle, selected, size, style, value, ...rest }: RadioProps<T>): JSX.Element;
|
|
5
|
+
export default function Radio<T>({ accessibilityRole, disabled, label, labelPosition, labelStyle, onChange, onPress, radioContainerStyle, radioDotStyle, selected, size, style, value, ...rest }: RadioProps<T>): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
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,3 +1,3 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
|
|
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;
|
|
@@ -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.
|
|
1
|
+
export declare const VERSION = "2.3.0";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.3.0';
|
|
@@ -5,10 +5,10 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const react_native_1 = require("react-native");
|
|
6
6
|
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
|
-
function CarouselPageIndicator({ activeStyle, currentIndex, inactiveStyle, numberOfItems, style, }) {
|
|
8
|
+
function CarouselPageIndicator({ activeStyle, currentIndex, inactiveStyle, indicatorTestId, numberOfItems, style, }) {
|
|
9
9
|
const items = (0, react_1.useMemo)(() => new Array(numberOfItems ?? 0)
|
|
10
10
|
.fill(null)
|
|
11
|
-
.map((_, index) => (currentIndex ?? 0) === index ? (<react_native_1.View style={[constants_1.DEFAULT_CAROUSEL_INDICATOR_ACTIVE_STYLE, activeStyle]} key={`indicator-item-${index}`}/>) : (<react_native_1.View style={[constants_1.DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, inactiveStyle]} key={`indicator-item-${index}`}/>)), [activeStyle, currentIndex, inactiveStyle, numberOfItems]);
|
|
11
|
+
.map((_, index) => (currentIndex ?? 0) === index ? (<react_native_1.View style={[constants_1.DEFAULT_CAROUSEL_INDICATOR_ACTIVE_STYLE, activeStyle]} key={`indicator-item-${index}`} testID={indicatorTestId}/>) : (<react_native_1.View style={[constants_1.DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, inactiveStyle]} key={`indicator-item-${index}`} testID={indicatorTestId}/>)), [activeStyle, currentIndex, inactiveStyle, indicatorTestId, numberOfItems]);
|
|
12
12
|
return <react_native_safe_area_context_1.SafeAreaView style={style}>{items}</react_native_safe_area_context_1.SafeAreaView>;
|
|
13
13
|
}
|
|
14
14
|
exports.default = CarouselPageIndicator;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -25,19 +25,19 @@
|
|
|
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.
|
|
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.
|
|
34
|
-
"@aws-amplify/ui-react-core": "3.
|
|
35
|
-
"@aws-amplify/ui-react-core-notifications": "2.0
|
|
33
|
+
"@aws-amplify/ui": "6.7.2",
|
|
34
|
+
"@aws-amplify/ui-react-core": "3.2.0",
|
|
35
|
+
"@aws-amplify/ui-react-core-notifications": "2.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"aws-amplify": "^6.9.0",
|
|
39
39
|
"react": "*",
|
|
40
|
-
"react-native": "
|
|
40
|
+
"react-native": ">=0.70",
|
|
41
41
|
"react-native-safe-area-context": "^4.2.5"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
@@ -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,
|
|
@@ -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 @@ 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
|
|
@@ -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) =>
|
|
@@ -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]
|
|
@@ -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
|
};
|
|
@@ -12,9 +12,10 @@ export default function CarouselPageIndicator({
|
|
|
12
12
|
activeStyle,
|
|
13
13
|
currentIndex,
|
|
14
14
|
inactiveStyle,
|
|
15
|
+
indicatorTestId,
|
|
15
16
|
numberOfItems,
|
|
16
17
|
style,
|
|
17
|
-
}: CarouselPageIndicatorProps): JSX.Element {
|
|
18
|
+
}: CarouselPageIndicatorProps): React.JSX.Element {
|
|
18
19
|
const items = useMemo(
|
|
19
20
|
() =>
|
|
20
21
|
new Array(numberOfItems ?? 0)
|
|
@@ -24,15 +25,17 @@ export default function CarouselPageIndicator({
|
|
|
24
25
|
<View
|
|
25
26
|
style={[DEFAULT_CAROUSEL_INDICATOR_ACTIVE_STYLE, activeStyle]}
|
|
26
27
|
key={`indicator-item-${index}`}
|
|
28
|
+
testID={indicatorTestId}
|
|
27
29
|
/>
|
|
28
30
|
) : (
|
|
29
31
|
<View
|
|
30
32
|
style={[DEFAULT_CAROUSEL_INDICATOR_INACTIVE_STYLE, inactiveStyle]}
|
|
31
33
|
key={`indicator-item-${index}`}
|
|
34
|
+
testID={indicatorTestId}
|
|
32
35
|
/>
|
|
33
36
|
)
|
|
34
37
|
),
|
|
35
|
-
[activeStyle, currentIndex, inactiveStyle, numberOfItems]
|
|
38
|
+
[activeStyle, currentIndex, inactiveStyle, indicatorTestId, numberOfItems]
|
|
36
39
|
);
|
|
37
40
|
|
|
38
41
|
return <SafeAreaView style={style}>{items}</SafeAreaView>;
|
|
@@ -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);
|
|
@@ -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];
|