@aws-amplify/ui-react-native 1.2.27 → 2.0.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 +83 -12
- package/dist/Authenticator/Authenticator.js +19 -16
- package/dist/Authenticator/Defaults/{ResetPassword/ResetPassword.d.ts → ForgotPassword/ForgotPassword.d.ts} +2 -2
- package/dist/Authenticator/Defaults/{ResetPassword/ResetPassword.js → ForgotPassword/ForgotPassword.js} +1 -1
- package/dist/Authenticator/Defaults/ForgotPassword/index.d.ts +1 -0
- package/dist/Authenticator/Defaults/ForgotPassword/index.js +1 -0
- package/dist/Authenticator/Defaults/{SetupTOTP/SetupTOTP.d.ts → SetupTotp/SetupTotp.d.ts} +4 -4
- package/dist/Authenticator/Defaults/{SetupTOTP/SetupTOTP.js → SetupTotp/SetupTotp.js} +10 -10
- package/dist/Authenticator/Defaults/SetupTotp/index.d.ts +1 -0
- package/dist/Authenticator/Defaults/SetupTotp/index.js +1 -0
- package/dist/Authenticator/Defaults/SetupTotp/styles.d.ts +5 -0
- package/dist/Authenticator/Defaults/SignIn/SignIn.d.ts +1 -1
- package/dist/Authenticator/Defaults/SignIn/SignIn.js +6 -5
- package/dist/Authenticator/Defaults/SignUp/SignUp.d.ts +1 -1
- package/dist/Authenticator/Defaults/SignUp/SignUp.js +4 -3
- package/dist/Authenticator/Defaults/index.d.ts +2 -2
- package/dist/Authenticator/Defaults/index.js +2 -2
- package/dist/Authenticator/Defaults/types.d.ts +11 -11
- package/dist/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +2 -4
- package/dist/Authenticator/common/FederatedProviderButton/types.d.ts +3 -1
- package/dist/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.d.ts +1 -1
- package/dist/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +24 -11
- package/dist/Authenticator/common/FederatedProviderButtons/styles.d.ts +2 -1
- package/dist/Authenticator/common/FederatedProviderButtons/styles.js +14 -4
- package/dist/Authenticator/common/FederatedProviderButtons/types.d.ts +5 -3
- package/dist/Authenticator/hooks/useFieldValues/useFieldValues.js +1 -1
- package/dist/Authenticator/hooks/useFieldValues/utils.js +1 -1
- package/dist/Authenticator/types.d.ts +1 -1
- package/dist/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +2 -2
- package/dist/InAppMessaging/hooks/useMessageImage/useMessageImage.d.ts +2 -2
- package/dist/InAppMessaging/hooks/useMessageImage/useMessageImage.js +2 -2
- package/dist/InAppMessaging/hooks/useMessageImage/utils.d.ts +2 -2
- package/dist/InAppMessaging/hooks/useMessageImage/utils.js +2 -2
- package/dist/InAppMessaging/hooks/useMessageProps/types.d.ts +2 -2
- package/dist/InAppMessaging/hooks/useMessageProps/utils.d.ts +2 -2
- package/dist/InAppMessaging/index.d.ts +1 -1
- package/dist/InAppMessaging/index.js +1 -0
- package/dist/assets/icons/icons.ts +3 -0
- package/dist/primitives/Button/styles.js +4 -2
- package/dist/primitives/Carousel/Carousel.js +1 -11
- package/dist/primitives/Divider/styles.js +4 -3
- package/dist/primitives/ErrorMessage/ErrorMessage.d.ts +1 -1
- package/dist/primitives/ErrorMessage/ErrorMessage.js +2 -2
- package/dist/primitives/Icon/Icon.d.ts +1 -1
- package/dist/primitives/Icon/Icon.js +2 -1
- package/dist/primitives/Icon/styles.js +1 -1
- package/dist/primitives/Radio/styles.js +1 -1
- package/dist/primitives/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/primitives/RadioGroup/RadioGroup.js +2 -2
- package/dist/primitives/Tabs/Tabs.d.ts +1 -1
- package/dist/primitives/Tabs/Tabs.js +2 -2
- package/dist/primitives/Tabs/styles.js +3 -3
- package/dist/utils/platform.d.ts +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/Authenticator/Authenticator.js +17 -14
- package/lib/Authenticator/Defaults/{ResetPassword/ResetPassword.js → ForgotPassword/ForgotPassword.js} +1 -1
- package/lib/Authenticator/Defaults/ForgotPassword/index.js +8 -0
- package/lib/Authenticator/Defaults/{SetupTOTP/SetupTOTP.js → SetupTotp/SetupTotp.js} +10 -10
- package/lib/Authenticator/Defaults/{SetupTOTP → SetupTotp}/index.js +3 -3
- package/lib/Authenticator/Defaults/SignIn/SignIn.js +5 -4
- package/lib/Authenticator/Defaults/SignUp/SignUp.js +3 -2
- package/lib/Authenticator/Defaults/index.js +5 -5
- package/lib/Authenticator/common/FederatedProviderButton/FederatedProviderButton.js +2 -4
- package/lib/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.js +22 -9
- package/lib/Authenticator/common/FederatedProviderButtons/styles.js +16 -5
- package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +8 -8
- package/lib/Authenticator/hooks/useFieldValues/utils.js +2 -2
- package/lib/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.js +2 -2
- package/lib/InAppMessaging/hooks/useMessageImage/types.js +1 -1
- package/lib/InAppMessaging/hooks/useMessageImage/useMessageImage.js +5 -5
- package/lib/InAppMessaging/hooks/useMessageImage/utils.js +2 -2
- package/lib/InAppMessaging/index.js +1 -0
- package/lib/assets/icons/icons.ts +3 -0
- package/lib/primitives/Button/styles.js +4 -2
- package/lib/primitives/Carousel/Carousel.js +1 -11
- package/lib/primitives/Divider/styles.js +4 -3
- package/lib/primitives/ErrorMessage/ErrorMessage.js +2 -2
- package/lib/primitives/Icon/Icon.js +2 -1
- package/lib/primitives/Icon/styles.js +2 -2
- package/lib/primitives/Radio/styles.js +1 -1
- package/lib/primitives/RadioGroup/RadioGroup.js +2 -2
- package/lib/primitives/Tabs/Tabs.js +2 -2
- package/lib/primitives/Tabs/styles.js +3 -3
- package/lib/version.js +1 -1
- package/package.json +16 -31
- package/src/Authenticator/Authenticator.tsx +20 -17
- package/src/Authenticator/Defaults/{ResetPassword/ResetPassword.tsx → ForgotPassword/ForgotPassword.tsx} +3 -3
- package/src/Authenticator/Defaults/ForgotPassword/index.ts +1 -0
- package/src/Authenticator/Defaults/{SetupTOTP/SetupTOTP.tsx → SetupTotp/SetupTotp.tsx} +13 -13
- package/src/Authenticator/Defaults/SetupTotp/index.ts +1 -0
- package/src/Authenticator/Defaults/{SetupTOTP → SetupTotp}/styles.ts +2 -2
- package/src/Authenticator/Defaults/SignIn/SignIn.tsx +15 -3
- package/src/Authenticator/Defaults/SignUp/SignUp.tsx +12 -0
- package/src/Authenticator/Defaults/index.ts +2 -2
- package/src/Authenticator/Defaults/types.ts +13 -13
- package/src/Authenticator/common/FederatedProviderButton/FederatedProviderButton.tsx +2 -4
- package/src/Authenticator/common/FederatedProviderButton/types.ts +3 -1
- package/src/Authenticator/common/FederatedProviderButtons/FederatedProviderButtons.tsx +41 -13
- package/src/Authenticator/common/FederatedProviderButtons/styles.ts +19 -4
- package/src/Authenticator/common/FederatedProviderButtons/types.ts +9 -6
- package/src/Authenticator/hooks/useFieldValues/useFieldValues.ts +1 -1
- package/src/Authenticator/hooks/useFieldValues/utils.ts +1 -1
- package/src/Authenticator/types.ts +1 -4
- package/src/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.ts +2 -2
- package/src/InAppMessaging/hooks/useMessageImage/useMessageImage.ts +6 -6
- package/src/InAppMessaging/hooks/useMessageImage/utils.ts +5 -5
- package/src/InAppMessaging/hooks/useMessageProps/types.ts +3 -3
- package/src/InAppMessaging/hooks/useMessageProps/utils.ts +2 -2
- package/src/InAppMessaging/index.ts +9 -0
- package/src/assets/icons/icons.ts +3 -0
- package/src/hooks/useDeviceOrientation/useDeviceOrientation.ts +6 -1
- package/src/primitives/Button/styles.ts +4 -2
- package/src/primitives/Carousel/Carousel.tsx +1 -10
- package/src/primitives/Divider/styles.ts +4 -3
- package/src/primitives/ErrorMessage/ErrorMessage.tsx +4 -1
- package/src/primitives/Icon/Icon.tsx +2 -0
- package/src/primitives/Icon/styles.ts +1 -1
- package/src/primitives/Radio/styles.ts +1 -1
- package/src/primitives/RadioGroup/RadioGroup.tsx +6 -1
- package/src/primitives/Tabs/Tabs.tsx +4 -1
- package/src/primitives/Tabs/styles.ts +3 -3
- package/src/version.ts +1 -1
- package/dist/Authenticator/Defaults/ResetPassword/index.d.ts +0 -1
- package/dist/Authenticator/Defaults/ResetPassword/index.js +0 -1
- package/dist/Authenticator/Defaults/SetupTOTP/index.d.ts +0 -1
- package/dist/Authenticator/Defaults/SetupTOTP/index.js +0 -1
- package/dist/Authenticator/Defaults/SetupTOTP/styles.d.ts +0 -5
- package/dist/Authenticator/common/FederatedProviderButton/styles.d.ts +0 -2
- package/dist/Authenticator/common/FederatedProviderButton/styles.js +0 -18
- package/lib/Authenticator/Defaults/ResetPassword/index.js +0 -8
- package/lib/Authenticator/common/FederatedProviderButton/styles.js +0 -21
- package/src/Authenticator/Defaults/ResetPassword/index.ts +0 -1
- package/src/Authenticator/Defaults/SetupTOTP/index.ts +0 -1
- package/src/Authenticator/common/FederatedProviderButton/styles.ts +0 -21
- /package/dist/Authenticator/Defaults/{SetupTOTP → SetupTotp}/styles.js +0 -0
- /package/lib/Authenticator/Defaults/{SetupTOTP → SetupTotp}/styles.js +0 -0
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
View,
|
|
8
8
|
ViewToken,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import { isFunction } from '@aws-amplify/ui';
|
|
11
10
|
|
|
12
11
|
import CarouselPageIndicator from './CarouselPageIndicator';
|
|
13
12
|
import { VIEWABILITY_CONFIG } from './constants';
|
|
@@ -65,15 +64,7 @@ export default function Carousel<T>(
|
|
|
65
64
|
orientationHandler
|
|
66
65
|
);
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
// available so try to remove via a `EmitterSubscription` first before falling back to `removeEventListener`
|
|
70
|
-
return () => {
|
|
71
|
-
if (isFunction(subscription?.remove)) {
|
|
72
|
-
subscription.remove();
|
|
73
|
-
} else {
|
|
74
|
-
Dimensions.removeEventListener('change', orientationHandler);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
67
|
+
return subscription.remove;
|
|
77
68
|
}, [updateOrientation]);
|
|
78
69
|
|
|
79
70
|
const carouselRenderItem = (renderInfo: ListRenderItemInfo<T>) => (
|
|
@@ -5,7 +5,7 @@ import { DividerStyles } from './types';
|
|
|
5
5
|
|
|
6
6
|
export const getThemedStyles = (theme: StrictTheme): DividerStyles => {
|
|
7
7
|
const { tokens, components } = theme;
|
|
8
|
-
const { colors, fontSizes, space } = tokens;
|
|
8
|
+
const { colors, fontSizes, space, borderWidths } = tokens;
|
|
9
9
|
|
|
10
10
|
return StyleSheet.create({
|
|
11
11
|
container: {
|
|
@@ -17,12 +17,13 @@ export const getThemedStyles = (theme: StrictTheme): DividerStyles => {
|
|
|
17
17
|
fontSize: fontSizes.medium,
|
|
18
18
|
margin: space.medium,
|
|
19
19
|
textAlign: 'center',
|
|
20
|
+
color: colors.font.tertiary,
|
|
20
21
|
...components?.divider?.label,
|
|
21
22
|
},
|
|
22
23
|
line: {
|
|
23
|
-
backgroundColor: colors.
|
|
24
|
+
backgroundColor: colors.border.secondary,
|
|
24
25
|
flex: 1,
|
|
25
|
-
height:
|
|
26
|
+
height: borderWidths.small,
|
|
26
27
|
...components?.divider?.line,
|
|
27
28
|
},
|
|
28
29
|
});
|
|
@@ -13,6 +13,8 @@ export const CLOSE_BUTTON_TEST_ID =
|
|
|
13
13
|
'authenticator--error-message--close-button';
|
|
14
14
|
|
|
15
15
|
export default function ErrorMessage({
|
|
16
|
+
accessible = true,
|
|
17
|
+
accessibilityRole = 'alert',
|
|
16
18
|
children,
|
|
17
19
|
iconStyle,
|
|
18
20
|
labelStyle,
|
|
@@ -26,7 +28,8 @@ export default function ErrorMessage({
|
|
|
26
28
|
return (
|
|
27
29
|
<View
|
|
28
30
|
{...rest}
|
|
29
|
-
|
|
31
|
+
accessible={accessible}
|
|
32
|
+
accessibilityRole={accessibilityRole}
|
|
30
33
|
style={[themedStyle.container, style]}
|
|
31
34
|
>
|
|
32
35
|
<Icon
|
|
@@ -6,6 +6,7 @@ import { getThemedStyles } from './styles';
|
|
|
6
6
|
import { IconProps } from './types';
|
|
7
7
|
|
|
8
8
|
export default function Icon({
|
|
9
|
+
accessible = true,
|
|
9
10
|
accessibilityRole = 'image',
|
|
10
11
|
animated,
|
|
11
12
|
color,
|
|
@@ -21,6 +22,7 @@ export default function Icon({
|
|
|
21
22
|
|
|
22
23
|
const imageProps: IconProps = {
|
|
23
24
|
...rest,
|
|
25
|
+
accessible,
|
|
24
26
|
accessibilityRole,
|
|
25
27
|
style: [themedStyle.icon, style],
|
|
26
28
|
};
|
|
@@ -35,7 +35,7 @@ export const getThemedStyles = (theme: StrictTheme): Required<RadioStyles> => {
|
|
|
35
35
|
...components?.radio?.radioContainer,
|
|
36
36
|
},
|
|
37
37
|
radioDot: {
|
|
38
|
-
backgroundColor: colors.
|
|
38
|
+
backgroundColor: colors.primary[80],
|
|
39
39
|
borderRadius: ROUNDED_BORDER_RADIUS,
|
|
40
40
|
...components?.radio?.radioDot,
|
|
41
41
|
},
|
|
@@ -20,6 +20,7 @@ import { getThemedStyles } from './styles';
|
|
|
20
20
|
import { RadioGroupProps } from './types';
|
|
21
21
|
|
|
22
22
|
export default function RadioGroup<T>({
|
|
23
|
+
accessible = true,
|
|
23
24
|
accessibilityRole = 'radiogroup',
|
|
24
25
|
children,
|
|
25
26
|
direction = 'vertical',
|
|
@@ -73,7 +74,11 @@ export default function RadioGroup<T>({
|
|
|
73
74
|
|
|
74
75
|
return (
|
|
75
76
|
<View {...rest} style={[themedStyle.container, containerStyle, style]}>
|
|
76
|
-
<View
|
|
77
|
+
<View
|
|
78
|
+
accessible={accessible}
|
|
79
|
+
accessibilityRole={accessibilityRole}
|
|
80
|
+
style={childContainerStyle}
|
|
81
|
+
>
|
|
77
82
|
{Children.map(children, (child) => {
|
|
78
83
|
if (isValidElement<RadioProps<T>>(child)) {
|
|
79
84
|
const {
|
|
@@ -6,6 +6,8 @@ import { getThemedStyles } from './styles';
|
|
|
6
6
|
import { TabProps, TabsProps } from './types';
|
|
7
7
|
|
|
8
8
|
export default function Tabs({
|
|
9
|
+
accessible = true,
|
|
10
|
+
accessibilityRole = 'tablist',
|
|
9
11
|
children,
|
|
10
12
|
indicatorPosition = 'bottom',
|
|
11
13
|
onChange,
|
|
@@ -23,7 +25,8 @@ export default function Tabs({
|
|
|
23
25
|
return (
|
|
24
26
|
<View
|
|
25
27
|
{...rest}
|
|
26
|
-
|
|
28
|
+
accessible={accessible}
|
|
29
|
+
accessibilityRole={accessibilityRole}
|
|
27
30
|
style={[themedStyle.tabList, style]}
|
|
28
31
|
>
|
|
29
32
|
{Children.map(children, (child, index) => {
|
|
@@ -16,11 +16,11 @@ export const getThemedStyles = (
|
|
|
16
16
|
const tabBorderStyles: ViewStyle = {};
|
|
17
17
|
|
|
18
18
|
if (indicatorPosition && indicatorPosition === 'top') {
|
|
19
|
-
selectedTabBorderStyles.borderTopColor = colors.
|
|
19
|
+
selectedTabBorderStyles.borderTopColor = colors.primary[80];
|
|
20
20
|
tabBorderStyles.borderTopWidth = borderWidths.medium;
|
|
21
21
|
tabBorderStyles.borderTopColor = colors.border.secondary;
|
|
22
22
|
} else {
|
|
23
|
-
selectedTabBorderStyles.borderBottomColor = colors.
|
|
23
|
+
selectedTabBorderStyles.borderBottomColor = colors.primary[80];
|
|
24
24
|
tabBorderStyles.borderBottomWidth = borderWidths.medium;
|
|
25
25
|
tabBorderStyles.borderBottomColor = colors.border.secondary;
|
|
26
26
|
}
|
|
@@ -58,7 +58,7 @@ export const getThemedStyles = (
|
|
|
58
58
|
},
|
|
59
59
|
selected: {
|
|
60
60
|
backgroundColor: colors.background.primary,
|
|
61
|
-
color: colors.
|
|
61
|
+
color: colors.primary[80],
|
|
62
62
|
...selectedTabBorderStyles,
|
|
63
63
|
...components?.tabs?.selected,
|
|
64
64
|
},
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.2.
|
|
1
|
+
export const VERSION = '1.2.28';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ResetPassword } from './ResetPassword';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ResetPassword } from './ResetPassword';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SetupTOTP } from './SetupTOTP';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SetupTOTP } from './SetupTOTP';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
2
|
-
export const styles = StyleSheet.create({
|
|
3
|
-
container: {
|
|
4
|
-
alignItems: 'center',
|
|
5
|
-
borderRadius: 4,
|
|
6
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
7
|
-
flexDirection: 'row',
|
|
8
|
-
justifyContent: 'center',
|
|
9
|
-
paddingVertical: 8,
|
|
10
|
-
width: '100%',
|
|
11
|
-
},
|
|
12
|
-
icon: {
|
|
13
|
-
paddingHorizontal: 16,
|
|
14
|
-
},
|
|
15
|
-
label: {
|
|
16
|
-
fontWeight: '400',
|
|
17
|
-
},
|
|
18
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ResetPassword = void 0;
|
|
7
|
-
var ResetPassword_1 = require("./ResetPassword");
|
|
8
|
-
Object.defineProperty(exports, "ResetPassword", { enumerable: true, get: function () { return __importDefault(ResetPassword_1).default; } });
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.styles = void 0;
|
|
4
|
-
const react_native_1 = require("react-native");
|
|
5
|
-
exports.styles = react_native_1.StyleSheet.create({
|
|
6
|
-
container: {
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
borderRadius: 4,
|
|
9
|
-
borderWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
10
|
-
flexDirection: 'row',
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
paddingVertical: 8,
|
|
13
|
-
width: '100%',
|
|
14
|
-
},
|
|
15
|
-
icon: {
|
|
16
|
-
paddingHorizontal: 16,
|
|
17
|
-
},
|
|
18
|
-
label: {
|
|
19
|
-
fontWeight: '400',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ResetPassword } from './ResetPassword';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as SetupTOTP } from './SetupTOTP';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { StyleSheet } from 'react-native';
|
|
2
|
-
|
|
3
|
-
import { FederatedProviderButtonStyles } from './types';
|
|
4
|
-
|
|
5
|
-
export const styles: FederatedProviderButtonStyles = StyleSheet.create({
|
|
6
|
-
container: {
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
borderRadius: 4,
|
|
9
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
10
|
-
flexDirection: 'row',
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
paddingVertical: 8,
|
|
13
|
-
width: '100%',
|
|
14
|
-
},
|
|
15
|
-
icon: {
|
|
16
|
-
paddingHorizontal: 16,
|
|
17
|
-
},
|
|
18
|
-
label: {
|
|
19
|
-
fontWeight: '400',
|
|
20
|
-
},
|
|
21
|
-
});
|
|
File without changes
|
|
File without changes
|