@aws-amplify/ui-react-native 2.3.0 → 2.3.1
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 +1 -0
- 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 +1 -0
- 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/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 +1 -0
- 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 +1 -0
- package/dist/primitives/TextField/TextField.d.ts +2 -2
- package/dist/primitives/TextField/types.d.ts +1 -0
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- 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 +1 -1
- 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
|
+
/// <reference types="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>):
|
|
3
|
+
export default function RadioGroup<T>({ accessible, accessibilityRole, children, direction, disabled, initialValue, label, labelPosition, labelStyle, onChange, onValueChange, size, style, ...rest }: RadioGroupProps<T>): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { TabProps } from './types';
|
|
3
|
-
export default function Tab({ children, selected, style, textStyle, indicatorPosition, ...rest }: TabProps):
|
|
3
|
+
export default function Tab({ children, selected, style, textStyle, indicatorPosition, ...rest }: TabProps): JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { TabsProps } from './types';
|
|
3
|
-
export default function Tabs({ accessible, accessibilityRole, children, indicatorPosition, onChange, selectedIndex, style, ...rest }: TabsProps):
|
|
3
|
+
export default function Tabs({ accessible, accessibilityRole, children, indicatorPosition, onChange, selectedIndex, style, ...rest }: TabsProps): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="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):
|
|
5
|
+
export default function TextField({ accessibilityLabel, accessibilityRole, accessibilityState, accessible, autoCapitalize, disabled, endAccessory, error, errorMessage, errorMessageStyle, fieldStyle, label, labelStyle, style, ...rest }: TextFieldProps): 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) =>
|
|
8
|
+
export declare const ThemeProvider: ({ children, theme, colorMode, }: ThemeProviderProps) => JSX.Element;
|
|
9
9
|
export {};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.3.
|
|
1
|
+
export declare const VERSION = "2.3.1";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.3.
|
|
1
|
+
export const VERSION = '2.3.1';
|
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.
|
|
3
|
+
"version": "2.3.1",
|
|
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.
|
|
28
|
+
"@testing-library/react-native": "^12.3.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
33
|
"@aws-amplify/ui": "6.7.2",
|
|
34
|
-
"@aws-amplify/ui-react-core": "3.2.
|
|
35
|
-
"@aws-amplify/ui-react-core-notifications": "2.1.
|
|
34
|
+
"@aws-amplify/ui-react-core": "3.2.1",
|
|
35
|
+
"@aws-amplify/ui-react-core-notifications": "2.1.1"
|
|
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):
|
|
59
|
+
}: AuthenticatorProps): 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):
|
|
33
|
+
}: DefaultConfirmResetPasswordProps): 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):
|
|
32
|
+
}: DefaultConfirmVerifyUserProps): 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):
|
|
29
|
+
}: ContainerProps): 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):
|
|
11
|
+
}: ContainerProps): 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>):
|
|
29
|
+
}: DefaultContentProps<FieldsType>): 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):
|
|
9
|
+
}: DefaultFooterProps): 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):
|
|
23
|
+
}: DefaultRadioFormFieldsProps): 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):
|
|
22
|
+
}: DefaultTextFormFieldsProps): 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):
|
|
31
|
+
const Field = ({ type, ...rest }: FieldProps): 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):
|
|
14
|
+
}: FederatedProviderButtonProps): 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):
|
|
26
|
+
}: FederatedProviderButtonsProps): 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) =>
|
|
8
|
+
): (props: Props) => 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 &
|
|
13
|
+
<Component {...(props as Props & 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):
|
|
13
|
+
}: BannerMessageProps): 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
|
-
):
|
|
13
|
+
): 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
|
-
):
|
|
14
|
+
): 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):
|
|
30
|
+
}: InAppMessageDisplayProps): 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):
|
|
20
|
+
}: MessageWrapperProps): 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
|
-
):
|
|
13
|
+
): 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) =>
|
|
9
|
+
): (props: Props) => JSX.Element {
|
|
10
10
|
return function WrappedWithInAppMessaging(props: Props) {
|
|
11
11
|
return (
|
|
12
12
|
<InAppMessagingProvider>
|
|
13
13
|
<InAppMessageDisplay {...options} />
|
|
14
|
-
<Component {...(props as Props &
|
|
14
|
+
<Component {...(props as Props & JSX.IntrinsicAttributes)} />
|
|
15
15
|
</InAppMessagingProvider>
|
|
16
16
|
);
|
|
17
17
|
};
|
|
@@ -15,7 +15,7 @@ export default function CarouselPageIndicator({
|
|
|
15
15
|
indicatorTestId,
|
|
16
16
|
numberOfItems,
|
|
17
17
|
style,
|
|
18
|
-
}: CarouselPageIndicatorProps):
|
|
18
|
+
}: CarouselPageIndicatorProps): 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>):
|
|
24
|
+
}: CheckboxProps<T>): 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):
|
|
14
|
+
}: LabelProps): JSX.Element {
|
|
15
15
|
const theme = useTheme();
|
|
16
16
|
const themedStyle = getThemedStyles(theme);
|
|
17
17
|
const textStyle = [themedStyle.text, themedStyle[variant], style];
|
|
@@ -14,7 +14,7 @@ export const ThemeProvider = ({
|
|
|
14
14
|
children,
|
|
15
15
|
theme,
|
|
16
16
|
colorMode,
|
|
17
|
-
}: ThemeProviderProps):
|
|
17
|
+
}: ThemeProviderProps): 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
|
+
export const VERSION = '2.3.1';
|