@aws-amplify/ui-react-native 1.2.17 → 1.2.19

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 (81) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/Authenticator/Authenticator.d.ts +6 -12
  3. package/dist/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.js +15 -4
  4. package/dist/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.js +13 -3
  5. package/dist/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.js +13 -3
  6. package/dist/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.js +13 -3
  7. package/dist/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.js +15 -4
  8. package/dist/Authenticator/Defaults/ResetPassword/ResetPassword.js +13 -3
  9. package/dist/Authenticator/Defaults/SetupTOTP/SetupTOTP.js +13 -3
  10. package/dist/Authenticator/Defaults/SignIn/SignIn.js +3 -2
  11. package/dist/Authenticator/Defaults/SignUp/SignUp.js +9 -3
  12. package/dist/Authenticator/Defaults/VerifyUser/VerifyUser.js +3 -3
  13. package/dist/Authenticator/common/DefaultContent/DefaultContent.js +2 -2
  14. package/dist/InAppMessaging/components/BannerMessage/types.d.ts +1 -1
  15. package/dist/InAppMessaging/components/CarouselMessage/types.d.ts +1 -1
  16. package/dist/InAppMessaging/components/FullScreenMessage/types.d.ts +1 -1
  17. package/dist/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.js +1 -1
  18. package/dist/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.d.ts +1 -1
  19. package/dist/InAppMessaging/components/InAppMessageDisplay/types.d.ts +1 -1
  20. package/dist/InAppMessaging/components/MessageLayout/types.d.ts +1 -1
  21. package/dist/InAppMessaging/components/ModalMessage/types.d.ts +1 -1
  22. package/dist/InAppMessaging/components/withInAppMessaging/withInAppMessaging.js +1 -1
  23. package/dist/InAppMessaging/hooks/useMessageImage/useMessageImage.d.ts +1 -1
  24. package/dist/InAppMessaging/hooks/useMessageImage/utils.d.ts +1 -1
  25. package/dist/InAppMessaging/hooks/useMessageProps/types.d.ts +1 -1
  26. package/dist/InAppMessaging/hooks/useMessageProps/useMessageProps.d.ts +1 -1
  27. package/dist/InAppMessaging/hooks/useMessageProps/utils.d.ts +1 -1
  28. package/dist/InAppMessaging/index.d.ts +1 -1
  29. package/dist/InAppMessaging/index.js +1 -1
  30. package/dist/primitives/Radio/styles.js +2 -1
  31. package/dist/version.d.ts +1 -1
  32. package/dist/version.js +1 -1
  33. package/package.json +4 -3
  34. package/src/Authenticator/Defaults/ConfirmResetPassword/ConfirmResetPassword.tsx +19 -3
  35. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/ConfirmResetPassword.spec.tsx +1 -0
  36. package/src/Authenticator/Defaults/ConfirmResetPassword/__tests__/__snapshots__/ConfirmResetPassword.spec.tsx.snap +13 -0
  37. package/src/Authenticator/Defaults/ConfirmSignIn/ConfirmSignIn.tsx +17 -3
  38. package/src/Authenticator/Defaults/ConfirmSignIn/__tests__/__snapshots__/ConfirmSignIn.spec.tsx.snap +13 -0
  39. package/src/Authenticator/Defaults/ConfirmSignUp/ConfirmSignUp.tsx +17 -3
  40. package/src/Authenticator/Defaults/ConfirmSignUp/__tests__/__snapshots__/ConfirmSignUp.spec.tsx.snap +19 -0
  41. package/src/Authenticator/Defaults/ConfirmVerifyUser/ConfirmVerifyUser.tsx +17 -3
  42. package/src/Authenticator/Defaults/ConfirmVerifyUser/__tests__/__snapshots__/ConfirmVerifyUser.spec.tsx.snap +19 -0
  43. package/src/Authenticator/Defaults/ForceNewPassword/ForceNewPassword.tsx +19 -3
  44. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/ForceNewPassword.spec.tsx +1 -0
  45. package/src/Authenticator/Defaults/ForceNewPassword/__tests__/__snapshots__/ForceNewPassword.spec.tsx.snap +19 -0
  46. package/src/Authenticator/Defaults/ResetPassword/ResetPassword.tsx +17 -3
  47. package/src/Authenticator/Defaults/ResetPassword/__tests__/__snapshots__/ResetPassword.spec.tsx.snap +13 -0
  48. package/src/Authenticator/Defaults/SetupTOTP/SetupTOTP.tsx +17 -3
  49. package/src/Authenticator/Defaults/SetupTOTP/__tests__/__snapshots__/SetupTOTP.spec.tsx.snap +13 -0
  50. package/src/Authenticator/Defaults/SignIn/SignIn.tsx +7 -2
  51. package/src/Authenticator/Defaults/SignIn/__tests__/__snapshots__/SignIn.spec.tsx.snap +19 -0
  52. package/src/Authenticator/Defaults/SignUp/SignUp.tsx +13 -2
  53. package/src/Authenticator/Defaults/SignUp/__tests__/SignUp.spec.tsx +1 -0
  54. package/src/Authenticator/Defaults/SignUp/__tests__/__snapshots__/SignUp.spec.tsx.snap +31 -0
  55. package/src/Authenticator/Defaults/VerifyUser/VerifyUser.tsx +7 -3
  56. package/src/Authenticator/Defaults/VerifyUser/__tests__/__snapshots__/VerifyUser.spec.tsx.snap +19 -0
  57. package/src/Authenticator/common/DefaultContent/DefaultContent.tsx +2 -0
  58. package/src/InAppMessaging/components/BannerMessage/types.ts +1 -1
  59. package/src/InAppMessaging/components/CarouselMessage/CarouselMessage.tsx +1 -1
  60. package/src/InAppMessaging/components/CarouselMessage/types.ts +1 -1
  61. package/src/InAppMessaging/components/FullScreenMessage/types.ts +1 -1
  62. package/src/InAppMessaging/components/InAppMessageDisplay/InAppMessageDisplay.tsx +1 -1
  63. package/src/InAppMessaging/components/InAppMessageDisplay/__tests__/InAppMessageDisplay.spec.tsx +5 -2
  64. package/src/InAppMessaging/components/InAppMessageDisplay/handleMessageLinkAction.ts +1 -1
  65. package/src/InAppMessaging/components/InAppMessageDisplay/types.ts +1 -1
  66. package/src/InAppMessaging/components/MessageLayout/types.ts +1 -1
  67. package/src/InAppMessaging/components/ModalMessage/types.ts +1 -1
  68. package/src/InAppMessaging/components/withInAppMessaging/withInAppMessaging.tsx +1 -1
  69. package/src/InAppMessaging/hooks/useMessageImage/__tests__/useMessageImage.spec.ts +1 -1
  70. package/src/InAppMessaging/hooks/useMessageImage/useMessageImage.ts +4 -1
  71. package/src/InAppMessaging/hooks/useMessageImage/utils.ts +1 -1
  72. package/src/InAppMessaging/hooks/useMessageProps/__tests__/useMessageProps.spec.ts +1 -1
  73. package/src/InAppMessaging/hooks/useMessageProps/__tests__/utils.spec.ts +1 -1
  74. package/src/InAppMessaging/hooks/useMessageProps/types.ts +4 -1
  75. package/src/InAppMessaging/hooks/useMessageProps/useMessageProps.ts +1 -1
  76. package/src/InAppMessaging/hooks/useMessageProps/utils.ts +1 -1
  77. package/src/InAppMessaging/index.ts +1 -1
  78. package/src/primitives/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +9 -0
  79. package/src/primitives/Radio/styles.ts +2 -1
  80. package/src/primitives/RadioGroup/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +24 -0
  81. package/src/version.ts +1 -1
@@ -30,7 +30,11 @@ const SignIn: DefaultSignInComponent = ({
30
30
  getForgotPasswordText,
31
31
  } = authenticatorTextUtil;
32
32
 
33
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
33
+ const {
34
+ disableFormSubmit: disabled,
35
+ fields: fieldsWithHandlers,
36
+ handleFormSubmit,
37
+ } = useFieldValues({
34
38
  componentName: COMPONENT_NAME,
35
39
  fields,
36
40
  handleBlur,
@@ -49,12 +53,13 @@ const SignIn: DefaultSignInComponent = ({
49
53
  onPress: toResetPassword,
50
54
  };
51
55
  return {
52
- primary: { children: signInText, onPress: handleFormSubmit },
56
+ primary: { children: signInText, disabled, onPress: handleFormSubmit },
53
57
  links: hideSignUp
54
58
  ? [forgotPassword]
55
59
  : [forgotPassword, { children: signUpText, onPress: toSignUp }],
56
60
  };
57
61
  }, [
62
+ disabled,
58
63
  forgotPasswordText,
59
64
  handleFormSubmit,
60
65
  hideSignUp,
@@ -261,6 +261,11 @@ Array [
261
261
  </View>,
262
262
  <View
263
263
  accessibilityRole="button"
264
+ accessibilityState={
265
+ Object {
266
+ "disabled": false,
267
+ }
268
+ }
264
269
  accessible={true}
265
270
  collapsable={false}
266
271
  focusable={true}
@@ -290,6 +295,7 @@ Array [
290
295
  },
291
296
  ]
292
297
  }
298
+ testID="amplify__button"
293
299
  >
294
300
  <Text
295
301
  style={
@@ -677,6 +683,11 @@ Array [
677
683
  </View>,
678
684
  <View
679
685
  accessibilityRole="button"
686
+ accessibilityState={
687
+ Object {
688
+ "disabled": false,
689
+ }
690
+ }
680
691
  accessible={true}
681
692
  collapsable={false}
682
693
  focusable={true}
@@ -706,6 +717,7 @@ Array [
706
717
  },
707
718
  ]
708
719
  }
720
+ testID="amplify__button"
709
721
  >
710
722
  <Text
711
723
  style={
@@ -1059,6 +1071,7 @@ Array [
1059
1071
  },
1060
1072
  ]
1061
1073
  }
1074
+ testID="amplify__error-message"
1062
1075
  >
1063
1076
  <Image
1064
1077
  accessibilityRole="image"
@@ -1103,6 +1116,11 @@ Array [
1103
1116
  </View>,
1104
1117
  <View
1105
1118
  accessibilityRole="button"
1119
+ accessibilityState={
1120
+ Object {
1121
+ "disabled": false,
1122
+ }
1123
+ }
1106
1124
  accessible={true}
1107
1125
  collapsable={false}
1108
1126
  focusable={true}
@@ -1132,6 +1150,7 @@ Array [
1132
1150
  },
1133
1151
  ]
1134
1152
  }
1153
+ testID="amplify__button"
1135
1154
  >
1136
1155
  <Text
1137
1156
  style={
@@ -25,12 +25,17 @@ const SignUp: DefaultSignUpComponent = ({
25
25
  handleBlur,
26
26
  handleChange,
27
27
  handleSubmit,
28
+ hasValidationErrors,
28
29
  hideSignIn,
29
30
  isPending,
30
31
  toSignIn,
31
32
  ...rest
32
33
  }) => {
33
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
34
+ const {
35
+ disableFormSubmit,
36
+ fields: fieldsWithHandlers,
37
+ handleFormSubmit,
38
+ } = useFieldValues({
34
39
  componentName: COMPONENT_NAME,
35
40
  fields,
36
41
  handleBlur,
@@ -38,6 +43,7 @@ const SignUp: DefaultSignUpComponent = ({
38
43
  handleSubmit,
39
44
  });
40
45
 
46
+ const disabled = hasValidationErrors || disableFormSubmit;
41
47
  const headerText = getSignUpTabText();
42
48
  const primaryButtonText = isPending
43
49
  ? getCreatingAccountText()
@@ -46,12 +52,17 @@ const SignUp: DefaultSignUpComponent = ({
46
52
 
47
53
  const buttons = useMemo(
48
54
  () => ({
49
- primary: { children: primaryButtonText, onPress: handleFormSubmit },
55
+ primary: {
56
+ children: primaryButtonText,
57
+ disabled,
58
+ onPress: handleFormSubmit,
59
+ },
50
60
  links: hideSignIn
51
61
  ? undefined
52
62
  : [{ children: secondaryButtonText, onPress: toSignIn }],
53
63
  }),
54
64
  [
65
+ disabled,
55
66
  handleFormSubmit,
56
67
  hideSignIn,
57
68
  primaryButtonText,
@@ -39,6 +39,7 @@ const props = {
39
39
  handleBlur: jest.fn(),
40
40
  handleChange: jest.fn(),
41
41
  handleSubmit: jest.fn(),
42
+ hasValidationErrors: false,
42
43
  Header: SignUp.Header,
43
44
  isPending: false,
44
45
  socialProviders: [],
@@ -499,6 +499,11 @@ Array [
499
499
  </View>,
500
500
  <View
501
501
  accessibilityRole="button"
502
+ accessibilityState={
503
+ Object {
504
+ "disabled": false,
505
+ }
506
+ }
502
507
  accessible={true}
503
508
  collapsable={false}
504
509
  focusable={true}
@@ -528,6 +533,7 @@ Array [
528
533
  },
529
534
  ]
530
535
  }
536
+ testID="amplify__button"
531
537
  >
532
538
  <Text
533
539
  style={
@@ -1105,6 +1111,11 @@ Array [
1105
1111
  </View>,
1106
1112
  <View
1107
1113
  accessibilityRole="button"
1114
+ accessibilityState={
1115
+ Object {
1116
+ "disabled": false,
1117
+ }
1118
+ }
1108
1119
  accessible={true}
1109
1120
  collapsable={false}
1110
1121
  focusable={true}
@@ -1134,6 +1145,7 @@ Array [
1134
1145
  },
1135
1146
  ]
1136
1147
  }
1148
+ testID="amplify__button"
1137
1149
  >
1138
1150
  <Text
1139
1151
  style={
@@ -1661,6 +1673,11 @@ Array [
1661
1673
  </View>,
1662
1674
  <View
1663
1675
  accessibilityRole="button"
1676
+ accessibilityState={
1677
+ Object {
1678
+ "disabled": false,
1679
+ }
1680
+ }
1664
1681
  accessible={true}
1665
1682
  collapsable={false}
1666
1683
  focusable={true}
@@ -1690,6 +1707,7 @@ Array [
1690
1707
  },
1691
1708
  ]
1692
1709
  }
1710
+ testID="amplify__button"
1693
1711
  >
1694
1712
  <Text
1695
1713
  style={
@@ -2281,6 +2299,7 @@ Array [
2281
2299
  },
2282
2300
  ]
2283
2301
  }
2302
+ testID="amplify__error-message"
2284
2303
  >
2285
2304
  <Image
2286
2305
  accessibilityRole="image"
@@ -2325,6 +2344,11 @@ Array [
2325
2344
  </View>,
2326
2345
  <View
2327
2346
  accessibilityRole="button"
2347
+ accessibilityState={
2348
+ Object {
2349
+ "disabled": false,
2350
+ }
2351
+ }
2328
2352
  accessible={true}
2329
2353
  collapsable={false}
2330
2354
  focusable={true}
@@ -2354,6 +2378,7 @@ Array [
2354
2378
  },
2355
2379
  ]
2356
2380
  }
2381
+ testID="amplify__button"
2357
2382
  >
2358
2383
  <Text
2359
2384
  style={
@@ -2968,6 +2993,11 @@ Array [
2968
2993
  </View>,
2969
2994
  <View
2970
2995
  accessibilityRole="button"
2996
+ accessibilityState={
2997
+ Object {
2998
+ "disabled": false,
2999
+ }
3000
+ }
2971
3001
  accessible={true}
2972
3002
  collapsable={false}
2973
3003
  focusable={true}
@@ -2997,6 +3027,7 @@ Array [
2997
3027
  },
2998
3028
  ]
2999
3029
  }
3030
+ testID="amplify__button"
3000
3031
  >
3001
3032
  <Text
3002
3033
  style={
@@ -27,7 +27,11 @@ const VerifyUser: DefaultVerifyUserComponent = ({
27
27
  skipVerification,
28
28
  ...rest
29
29
  }) => {
30
- const { fields: fieldsWithHandlers, handleFormSubmit } = useFieldValues({
30
+ const {
31
+ disableFormSubmit: disabled,
32
+ fields: fieldsWithHandlers,
33
+ handleFormSubmit,
34
+ } = useFieldValues({
31
35
  componentName: COMPONENT_NAME,
32
36
  fields,
33
37
  handleBlur,
@@ -42,10 +46,10 @@ const VerifyUser: DefaultVerifyUserComponent = ({
42
46
 
43
47
  const buttons = useMemo(
44
48
  () => ({
45
- primary: { children: verifyText, onPress: handleFormSubmit },
49
+ primary: { children: verifyText, disabled, onPress: handleFormSubmit },
46
50
  links: [{ children: skipText, onPress: skipVerification }],
47
51
  }),
48
- [handleFormSubmit, skipText, skipVerification, verifyText]
52
+ [disabled, handleFormSubmit, skipText, skipVerification, verifyText]
49
53
  );
50
54
 
51
55
  return (
@@ -102,6 +102,7 @@ Array [
102
102
  "borderRadius": 999,
103
103
  "borderWidth": 2,
104
104
  "justifyContent": "center",
105
+ "margin": 4,
105
106
  },
106
107
  Object {
107
108
  "height": 20,
@@ -168,6 +169,7 @@ Array [
168
169
  "borderRadius": 999,
169
170
  "borderWidth": 2,
170
171
  "justifyContent": "center",
172
+ "margin": 4,
171
173
  },
172
174
  Object {
173
175
  "height": 20,
@@ -201,6 +203,11 @@ Array [
201
203
  </View>,
202
204
  <View
203
205
  accessibilityRole="button"
206
+ accessibilityState={
207
+ Object {
208
+ "disabled": true,
209
+ }
210
+ }
204
211
  accessible={true}
205
212
  collapsable={false}
206
213
  focusable={true}
@@ -220,6 +227,7 @@ Array [
220
227
  "backgroundColor": "hsl(190, 95%, 30%)",
221
228
  "borderRadius": 4,
222
229
  "justifyContent": "center",
230
+ "opacity": 0.6,
223
231
  "paddingHorizontal": 16,
224
232
  "paddingVertical": 12,
225
233
  },
@@ -230,6 +238,7 @@ Array [
230
238
  },
231
239
  ]
232
240
  }
241
+ testID="amplify__button"
233
242
  >
234
243
  <Text
235
244
  style={
@@ -410,6 +419,7 @@ Array [
410
419
  "borderRadius": 999,
411
420
  "borderWidth": 2,
412
421
  "justifyContent": "center",
422
+ "margin": 4,
413
423
  },
414
424
  Object {
415
425
  "height": 20,
@@ -476,6 +486,7 @@ Array [
476
486
  "borderRadius": 999,
477
487
  "borderWidth": 2,
478
488
  "justifyContent": "center",
489
+ "margin": 4,
479
490
  },
480
491
  Object {
481
492
  "height": 20,
@@ -523,6 +534,7 @@ Array [
523
534
  },
524
535
  ]
525
536
  }
537
+ testID="amplify__error-message"
526
538
  >
527
539
  <Image
528
540
  accessibilityRole="image"
@@ -567,6 +579,11 @@ Array [
567
579
  </View>,
568
580
  <View
569
581
  accessibilityRole="button"
582
+ accessibilityState={
583
+ Object {
584
+ "disabled": true,
585
+ }
586
+ }
570
587
  accessible={true}
571
588
  collapsable={false}
572
589
  focusable={true}
@@ -586,6 +603,7 @@ Array [
586
603
  "backgroundColor": "hsl(190, 95%, 30%)",
587
604
  "borderRadius": 4,
588
605
  "justifyContent": "center",
606
+ "opacity": 0.6,
589
607
  "paddingHorizontal": 16,
590
608
  "paddingVertical": 12,
591
609
  },
@@ -596,6 +614,7 @@ Array [
596
614
  },
597
615
  ]
598
616
  }
617
+ testID="amplify__button"
599
618
  >
600
619
  <Text
601
620
  style={
@@ -69,6 +69,7 @@ export default function DefaultContent<
69
69
  iconStyle={themedStyles.errorMessageIcon}
70
70
  labelStyle={themedStyles.errorMessageLabel}
71
71
  style={themedStyles.errorMessage}
72
+ testID="amplify__error-message"
72
73
  >
73
74
  {error}
74
75
  </ErrorMessage>
@@ -78,6 +79,7 @@ export default function DefaultContent<
78
79
  variant="primary"
79
80
  textStyle={themedStyles.buttonPrimaryLabel}
80
81
  style={themedStyles.buttonPrimary}
82
+ testID="amplify__button"
81
83
  />
82
84
  {secondary ? (
83
85
  <Button
@@ -1,5 +1,5 @@
1
1
  import { ViewStyle } from 'react-native';
2
- import { BannerMessageCommonProps } from '@aws-amplify/ui-react-core';
2
+ import { BannerMessageCommonProps } from '@aws-amplify/ui-react-core-notifications';
3
3
 
4
4
  import { MessageDefaultStyle, MessageOverrideStyle } from '../../hooks';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { MessageContentProps } from '@aws-amplify/ui-react-core';
2
+ import { MessageContentProps } from '@aws-amplify/ui-react-core-notifications';
3
3
 
4
4
  import { Carousel } from '../../../primitives';
5
5
  import { IN_APP_MESSAGING_TEST_ID } from '../../constants';
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle } from 'react-native';
3
3
  import {
4
4
  CarouselMessageCommonProps,
5
5
  MessageComponentBaseProps,
6
- } from '@aws-amplify/ui-react-core';
6
+ } from '@aws-amplify/ui-react-core-notifications';
7
7
 
8
8
  import { MessageDefaultStyle, MessageOverrideStyle } from '../../hooks';
9
9
 
@@ -1,4 +1,4 @@
1
- import { FullScreenMessageCommonProps } from '@aws-amplify/ui-react-core';
1
+ import { FullScreenMessageCommonProps } from '@aws-amplify/ui-react-core-notifications';
2
2
  import { MessageDefaultStyle, MessageOverrideStyle } from '../../hooks';
3
3
 
4
4
  export interface FullScreenMessageProps
@@ -4,7 +4,7 @@ import {
4
4
  handleMessageAction,
5
5
  OnMessageAction,
6
6
  useMessage,
7
- } from '@aws-amplify/ui-react-core';
7
+ } from '@aws-amplify/ui-react-core-notifications';
8
8
 
9
9
  import { BannerMessage } from '../BannerMessage';
10
10
  import { FullScreenMessage } from '../FullScreenMessage';
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
2
  import { Text, View } from 'react-native';
3
3
  import { render } from '@testing-library/react-native';
4
- import { MessageLayout, useMessage } from '@aws-amplify/ui-react-core';
4
+ import {
5
+ MessageLayout,
6
+ useMessage,
7
+ } from '@aws-amplify/ui-react-core-notifications';
5
8
 
6
9
  import InAppMessageDisplay from '../InAppMessageDisplay';
7
10
 
8
- jest.mock('@aws-amplify/ui-react-core');
11
+ jest.mock('@aws-amplify/ui-react-core-notifications');
9
12
 
10
13
  const mockUseMessage = useMessage as jest.Mock;
11
14
 
@@ -1,6 +1,6 @@
1
1
  import { Linking } from 'react-native';
2
2
  import { ConsoleLogger as Logger } from '@aws-amplify/core';
3
- import { HandleMessageLinkAction } from '@aws-amplify/ui-react-core';
3
+ import { HandleMessageLinkAction } from '@aws-amplify/ui-react-core-notifications';
4
4
 
5
5
  const logger = new Logger('Notifications.InAppMessaging');
6
6
 
@@ -3,7 +3,7 @@ import {
3
3
  CarouselMessageComponent,
4
4
  FullScreenMessageComponent,
5
5
  ModalMessageComponent,
6
- } from '@aws-amplify/ui-react-core';
6
+ } from '@aws-amplify/ui-react-core-notifications';
7
7
 
8
8
  import { BannerMessageProps } from '../BannerMessage';
9
9
  import { CarouselMessageProps } from '../CarouselMessage';
@@ -1,4 +1,4 @@
1
- import { MessageComponentBaseProps } from '@aws-amplify/ui-react-core';
1
+ import { MessageComponentBaseProps } from '@aws-amplify/ui-react-core-notifications';
2
2
 
3
3
  import { DeviceOrientation } from '../../../hooks';
4
4
  import {
@@ -1,4 +1,4 @@
1
- import { ModalMessageCommonProps } from '@aws-amplify/ui-react-core';
1
+ import { ModalMessageCommonProps } from '@aws-amplify/ui-react-core-notifications';
2
2
 
3
3
  import { MessageDefaultStyle, MessageOverrideStyle } from '../../hooks';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { InAppMessagingProvider } from '@aws-amplify/ui-react-core';
2
+ import { InAppMessagingProvider } from '@aws-amplify/ui-react-core-notifications';
3
3
 
4
4
  import { InAppMessageDisplay, MessageComponents } from '../InAppMessageDisplay';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { Image } from 'react-native';
2
2
  import { renderHook } from '@testing-library/react-hooks';
3
3
  import { ConsoleLogger as Logger } from '@aws-amplify/core';
4
- import { MessageImage } from '@aws-amplify/ui-react-core';
4
+ import { MessageImage } from '@aws-amplify/ui-react-core-notifications';
5
5
 
6
6
  import { getLayoutImageDimensions, prefetchNetworkImage } from '../utils';
7
7
  import useMessageImage from '../useMessageImage';
@@ -2,7 +2,10 @@ import { useEffect, useRef, useState } from 'react';
2
2
  import { Image } from 'react-native';
3
3
 
4
4
  import { ConsoleLogger as Logger } from '@aws-amplify/core';
5
- import { MessageImage, MessageLayout } from '@aws-amplify/ui-react-core';
5
+ import {
6
+ MessageImage,
7
+ MessageLayout,
8
+ } from '@aws-amplify/ui-react-core-notifications';
6
9
 
7
10
  import { ImageDimensions, ImagePrefetchStatus, UseMessageImage } from './types';
8
11
  import { getLayoutImageDimensions, prefetchNetworkImage } from './utils';
@@ -1,6 +1,6 @@
1
1
  import { Image } from 'react-native';
2
2
  import { ConsoleLogger as Logger } from '@aws-amplify/core';
3
- import { MessageLayout } from '@aws-amplify/ui-react-core';
3
+ import { MessageLayout } from '@aws-amplify/ui-react-core-notifications';
4
4
 
5
5
  import {
6
6
  BANNER_IMAGE_SCREEN_SIZE,
@@ -2,7 +2,7 @@ import { renderHook } from '@testing-library/react-hooks';
2
2
  import {
3
3
  MessageButtonProps,
4
4
  MessageComponentBaseProps,
5
- } from '@aws-amplify/ui-react-core';
5
+ } from '@aws-amplify/ui-react-core-notifications';
6
6
 
7
7
  import { useMessageImage } from '../../useMessageImage';
8
8
  import { MessageOverrideStyle } from '../types';
@@ -4,7 +4,7 @@ import {
4
4
  MessageComponentBaseProps,
5
5
  MessageLayout,
6
6
  MessageTextAlign,
7
- } from '@aws-amplify/ui-react-core';
7
+ } from '@aws-amplify/ui-react-core-notifications';
8
8
  import { BUTTON_PRESSED_OPACITY } from '../../../constants';
9
9
  import { MessageDefaultStyle } from '../types';
10
10
  import { StyleParams } from '../types';
@@ -5,7 +5,10 @@ import {
5
5
  TextStyle,
6
6
  ViewStyle,
7
7
  } from 'react-native';
8
- import { MessageLayout, MessagePayloadStyle } from '@aws-amplify/ui-react-core';
8
+ import {
9
+ MessageLayout,
10
+ MessagePayloadStyle,
11
+ } from '@aws-amplify/ui-react-core-notifications';
9
12
 
10
13
  import { ButtonProps } from '../../../primitives';
11
14
 
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useMemo, useRef } from 'react';
2
2
  import { isEmpty } from '@aws-amplify/ui';
3
- import { MessageComponentBaseProps } from '@aws-amplify/ui-react-core';
3
+ import { MessageComponentBaseProps } from '@aws-amplify/ui-react-core-notifications';
4
4
 
5
5
  import { useMessageImage } from '../useMessageImage';
6
6
  import {
@@ -4,7 +4,7 @@ import {
4
4
  MessageComponentBaseProps,
5
5
  MessageLayout,
6
6
  MessagePayloadStyle,
7
- } from '@aws-amplify/ui-react-core';
7
+ } from '@aws-amplify/ui-react-core-notifications';
8
8
 
9
9
  import { DEFAULT_CAROUSEL_INDICATOR_SIZE } from '../../../primitives';
10
10
  import { BUTTON_PRESSED_OPACITY, SPACING_EXTRA_LARGE } from '../../constants';
@@ -1,7 +1,7 @@
1
1
  export {
2
2
  InAppMessagingProvider,
3
3
  useInAppMessaging,
4
- } from '@aws-amplify/ui-react-core';
4
+ } from '@aws-amplify/ui-react-core-notifications';
5
5
 
6
6
  export {
7
7
  BannerMessageProps,
@@ -37,6 +37,7 @@ exports[`Radio applies theme and custom styles 1`] = `
37
37
  "borderRadius": 999,
38
38
  "borderWidth": 2,
39
39
  "justifyContent": "center",
40
+ "margin": 4,
40
41
  },
41
42
  Object {
42
43
  "height": 20,
@@ -108,6 +109,7 @@ exports[`Radio renders as expected when disabled 1`] = `
108
109
  "borderRadius": 999,
109
110
  "borderWidth": 2,
110
111
  "justifyContent": "center",
112
+ "margin": 4,
111
113
  },
112
114
  Object {
113
115
  "height": 20,
@@ -174,6 +176,7 @@ exports[`Radio renders as expected when passing a number to the size prop 1`] =
174
176
  "borderRadius": 999,
175
177
  "borderWidth": 2,
176
178
  "justifyContent": "center",
179
+ "margin": 4,
177
180
  },
178
181
  Object {
179
182
  "height": 40,
@@ -257,6 +260,7 @@ exports[`Radio renders as expected when selected is false 1`] = `
257
260
  "borderRadius": 999,
258
261
  "borderWidth": 2,
259
262
  "justifyContent": "center",
263
+ "margin": 4,
260
264
  },
261
265
  Object {
262
266
  "height": 20,
@@ -323,6 +327,7 @@ exports[`Radio renders as expected when selected is true 1`] = `
323
327
  "borderRadius": 999,
324
328
  "borderWidth": 2,
325
329
  "justifyContent": "center",
330
+ "margin": 4,
326
331
  },
327
332
  Object {
328
333
  "height": 20,
@@ -406,6 +411,7 @@ exports[`Radio renders as expected when size is large 1`] = `
406
411
  "borderRadius": 999,
407
412
  "borderWidth": 2,
408
413
  "justifyContent": "center",
414
+ "margin": 4,
409
415
  },
410
416
  Object {
411
417
  "height": 24,
@@ -489,6 +495,7 @@ exports[`Radio renders as expected when size is medium 1`] = `
489
495
  "borderRadius": 999,
490
496
  "borderWidth": 2,
491
497
  "justifyContent": "center",
498
+ "margin": 4,
492
499
  },
493
500
  Object {
494
501
  "height": 20,
@@ -572,6 +579,7 @@ exports[`Radio renders as expected when size is small 1`] = `
572
579
  "borderRadius": 999,
573
580
  "borderWidth": 2,
574
581
  "justifyContent": "center",
582
+ "margin": 4,
575
583
  },
576
584
  Object {
577
585
  "height": 16,
@@ -655,6 +663,7 @@ exports[`Radio renders as expected with accessibilityRole 1`] = `
655
663
  "borderRadius": 999,
656
664
  "borderWidth": 2,
657
665
  "justifyContent": "center",
666
+ "margin": 4,
658
667
  },
659
668
  Object {
660
669
  "height": 20,
@@ -9,7 +9,7 @@ const ROUNDED_BORDER_RADIUS = 999;
9
9
  export const getThemedStyles = (theme: StrictTheme): Required<RadioStyles> => {
10
10
  const {
11
11
  components,
12
- tokens: { colors, fontSizes, opacities, borderWidths },
12
+ tokens: { colors, fontSizes, opacities, borderWidths, space },
13
13
  } = theme;
14
14
 
15
15
  return StyleSheet.create({
@@ -31,6 +31,7 @@ export const getThemedStyles = (theme: StrictTheme): Required<RadioStyles> => {
31
31
  borderRadius: ROUNDED_BORDER_RADIUS,
32
32
  borderWidth: borderWidths.medium,
33
33
  justifyContent: 'center',
34
+ margin: space.xxs,
34
35
  ...components?.radio?.radioContainer,
35
36
  },
36
37
  radioDot: {