@hero-design/rn 8.61.1 → 8.61.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.61.1",
3
+ "version": "8.61.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -28,11 +28,11 @@
28
28
  "nanoid": "^4.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@hero-design/react-native-month-year-picker": "^8.42.7",
31
+ "@hero-design/react-native-month-year-picker": "^8.42.8",
32
32
  "@react-native-community/datetimepicker": "^3.5.2 || ^7.2.0",
33
33
  "@react-native-community/slider": "4.4.3",
34
34
  "react": "18.2.0",
35
- "react-native": "^0.71.0",
35
+ "react-native": "^0.72.11",
36
36
  "react-native-gesture-handler": "^1.10.3 || ~2.5.0",
37
37
  "react-native-linear-gradient": "^2.6.2",
38
38
  "react-native-pager-view": "^5.4.25",
@@ -48,7 +48,7 @@
48
48
  "@babel/runtime": "^7.20.0",
49
49
  "@emotion/jest": "^11.11.0",
50
50
  "@hero-design/eslint-plugin": "9.0.0",
51
- "@hero-design/react-native-month-year-picker": "^8.42.7",
51
+ "@hero-design/react-native-month-year-picker": "^8.42.8",
52
52
  "@react-native-community/datetimepicker": "7.2.0",
53
53
  "@react-native-community/slider": "4.4.3",
54
54
  "@rollup/plugin-babel": "^5.3.1",
@@ -64,6 +64,7 @@
64
64
  "@types/react": "^18.2.0",
65
65
  "@types/react-native-vector-icons": "^6.4.10",
66
66
  "babel-plugin-inline-import": "^3.0.0",
67
+ "babel-preset-expo": "9.5.2",
67
68
  "core-js": "^3.33.0",
68
69
  "eslint": "^8.56.0",
69
70
  "eslint-config-hd": "8.42.4",
@@ -74,7 +75,7 @@
74
75
  "prettier-config-hd": "8.42.4",
75
76
  "react": "18.2.0",
76
77
  "react-dom": "^18.2.0",
77
- "react-native": "0.71.14",
78
+ "react-native": "0.72.11",
78
79
  "react-native-gesture-handler": "~2.5.0",
79
80
  "react-native-linear-gradient": "^2.6.2",
80
81
  "react-native-pager-view": "^5.4.25",
@@ -2,6 +2,7 @@ sonar.host.url=https://sonarqube.staging.ehrocks.com
2
2
 
3
3
  sonar.projectKey=hero-design-react-native
4
4
  sonar.projectName=Hero Design React Native
5
+ sonar.organization=thinkei
5
6
 
6
7
  sonar.sources=.
7
8
  sonar.inclusions=**/*
@@ -40,7 +40,7 @@ const StyledCalendarRow = styled(View)<ViewProps>(({ theme }) => ({
40
40
  }));
41
41
 
42
42
  const StyledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
43
- flexBasis: `${Math.floor(100.0 / 7.0).toString()}%`,
43
+ flexBasis: `${Math.floor(100.0 / 7.0)}%`,
44
44
  alignItems: 'center',
45
45
  width: theme.__hd__.calendar.sizes.cellWidth,
46
46
  height: theme.__hd__.calendar.sizes.cellHeight,
@@ -48,7 +48,7 @@ const StyledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
48
48
  }));
49
49
 
50
50
  const StyledDisabledCalendarRowItem = styled(View)<ViewProps>(({ theme }) => ({
51
- flexBasis: `${Math.floor(100.0 / 7.0).toString()}%`,
51
+ flexBasis: `${Math.floor(100.0 / 7.0)}%`,
52
52
  alignItems: 'center',
53
53
  width: theme.__hd__.calendar.sizes.cellWidth,
54
54
  height: theme.__hd__.calendar.sizes.cellHeight,
@@ -160,7 +160,7 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
160
160
  );
161
161
 
162
162
  const getItemLayout = useCallback(
163
- (_: React.ReactNode, index: number) => ({
163
+ (_: ArrayLike<React.ReactNode> | null | undefined, index: number) => ({
164
164
  length: itemWidth,
165
165
  offset: itemWidth * index,
166
166
  index,
@@ -193,7 +193,7 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
193
193
  theme.__hd__.cardCarousel.space;
194
194
  return (
195
195
  <StyledWrapper style={style} testID={testID}>
196
- <FlatList
196
+ <FlatList<React.ReactNode>
197
197
  contentInset={{
198
198
  top: 0,
199
199
  left: contentContainerPaddingHorizontal,
@@ -35,9 +35,9 @@ const CarouselItem = ({
35
35
  return (
36
36
  <StyledCustomSizeCarouselImage
37
37
  source={image}
38
- height={image.height}
39
- width={image.width}
40
- resizeMode={image.resizeMode}
38
+ themeHeight={image.height}
39
+ themeWidth={image.width}
40
+ themeResizeMode={image.resizeMode}
41
41
  style={{ marginBottom: theme.space.medium }}
42
42
  />
43
43
  );
@@ -33,14 +33,14 @@ const StyledCarouselImage = styled(Image)(() => ({
33
33
  }));
34
34
 
35
35
  const StyledCustomSizeCarouselImage = styled(Image)<{
36
- height?: number | `${number}%`;
37
- width?: number | `${number}%`;
38
- resizeMode?: ImageResizeMode;
39
- }>(({ height, resizeMode = 'contain', width }) => ({
36
+ themeHeight?: number | `${number}%`;
37
+ themeWidth?: number | `${number}%`;
38
+ themeResizeMode?: ImageResizeMode;
39
+ }>(({ themeHeight, themeResizeMode = 'contain', themeWidth }) => ({
40
40
  alignSelf: 'center',
41
- width,
42
- height,
43
- resizeMode,
41
+ width: themeWidth,
42
+ height: themeHeight,
43
+ resizeMode: themeResizeMode,
44
44
  }));
45
45
 
46
46
  const StyledCarouselContentWrapper = styled(Box)<{
@@ -397,8 +397,6 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
397
397
  }
398
398
  >
399
399
  <Image
400
- height={100}
401
- resizeMode="cover"
402
400
  source={
403
401
  {
404
402
  "height": 100,
@@ -427,7 +425,9 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
427
425
  ],
428
426
  ]
429
427
  }
430
- width={30}
428
+ themeHeight={100}
429
+ themeResizeMode="cover"
430
+ themeWidth={30}
431
431
  />
432
432
  <View
433
433
  paddingHorizontal="medium"
@@ -516,7 +516,6 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
516
516
  }
517
517
  >
518
518
  <Image
519
- height={100}
520
519
  source={
521
520
  {
522
521
  "height": 100,
@@ -544,7 +543,8 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
544
543
  ],
545
544
  ]
546
545
  }
547
- width={30}
546
+ themeHeight={100}
547
+ themeWidth={30}
548
548
  />
549
549
  <View
550
550
  paddingHorizontal="medium"
@@ -1392,8 +1392,6 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1392
1392
  }
1393
1393
  >
1394
1394
  <Image
1395
- height={100}
1396
- resizeMode="cover"
1397
1395
  source={
1398
1396
  {
1399
1397
  "height": 100,
@@ -1422,7 +1420,9 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1422
1420
  ],
1423
1421
  ]
1424
1422
  }
1425
- width={30}
1423
+ themeHeight={100}
1424
+ themeResizeMode="cover"
1425
+ themeWidth={30}
1426
1426
  />
1427
1427
  <View
1428
1428
  paddingHorizontal="medium"
@@ -1511,7 +1511,6 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1511
1511
  }
1512
1512
  >
1513
1513
  <Image
1514
- height={100}
1515
1514
  source={
1516
1515
  {
1517
1516
  "height": 100,
@@ -1539,7 +1538,8 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1539
1538
  ],
1540
1539
  ]
1541
1540
  }
1542
- width={30}
1541
+ themeHeight={100}
1542
+ themeWidth={30}
1543
1543
  />
1544
1544
  <View
1545
1545
  paddingHorizontal="medium"
@@ -1 +1 @@
1
- {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bolt":59011,"bookmark-added":59012,"bookmark":59013,"box-check":59014,"box":59015,"bpay":59016,"buildings":59017,"cake":59018,"calendar-clock":59019,"calendar":59020,"candy-box-menu":59021,"caret-down-small":59022,"caret-down":59023,"caret-left-small":59024,"caret-left":59025,"caret-right-small":59026,"caret-right":59027,"caret-up-small":59028,"caret-up":59029,"check-radio":59030,"circle-add":59031,"circle-cancel":59032,"circle-check":59033,"circle-down":59034,"circle-info":59035,"circle-left":59036,"circle-ok":59037,"circle-pencil":59038,"circle-question":59039,"circle-remove":59040,"circle-right":59041,"circle-up":59042,"circle-warning":59043,"clock-3":59044,"clock":59045,"cloud-download":59046,"cloud-upload":59047,"cog":59048,"coin":59049,"contacts":59050,"credit-card":59051,"diamond":59052,"direction-arrows":59053,"directory":59054,"document":59055,"dollar-coin-shine":59056,"double-buildings":59057,"edit-template":59058,"envelope":59059,"exclude":59060,"expand-content":59061,"expense":59062,"explore_nearby":59063,"eye-circle":59064,"eye-invisible":59065,"eye":59066,"face-meh":59067,"face-sad":59068,"face-smiley":59069,"feed":59070,"feedbacks":59071,"file-certified":59072,"file-clone":59073,"file-copy":59074,"file-csv":59075,"file-dispose":59076,"file-doc":59077,"file-excel":59078,"file-export":59079,"file-lock":59080,"file-pdf":59081,"file-powerpoint":59082,"file-search":59083,"file-secured":59084,"file-sheets":59085,"file-slide":59086,"file-verified":59087,"file-word":59088,"file":59089,"filter":59090,"folder-user":59091,"folder":59092,"format-bold":59093,"format-heading1":59094,"format-heading2":59095,"format-italic":59096,"format-list-bulleted":59097,"format-list-numbered":59098,"format-underlined":59099,"funnel-filter":59100,"global-dollar":59101,"globe":59102,"graduation-cap":59103,"graph":59104,"happy-sun":59105,"health-bag":59106,"heart":59107,"hero-points":59108,"home":59109,"image":59110,"import":59111,"incident-siren":59112,"instapay-daily":59113,"instapay-now":59114,"instapay":59115,"list":59116,"loading-2":59117,"loading":59118,"location-on":59119,"location":59120,"lock":59121,"looks-one":59122,"looks-two":59123,"media-content":59124,"menu":59125,"money-notes":59126,"moneybag":59127,"moon":59128,"multiple-stars":59129,"multiple-users":59130,"near-me":59131,"node":59132,"open-folder":59133,"paperclip":59134,"payment-summary":59135,"pencil":59136,"phone":59137,"piggy-bank":59138,"plane-up":59139,"plane":59140,"play-circle":59141,"print":59142,"raising-hands":59143,"reply-arrow":59144,"reply":59145,"reschedule":59146,"rostering":59147,"salary-sacrifice":59148,"save":59149,"schedule-send":59150,"schedule":59151,"search-person":59152,"send":59153,"speaker-active":59154,"speaker":59155,"star-award":59156,"star-badge":59157,"star-circle":59158,"star-medal":59159,"star":59160,"steps-circle":59161,"stopwatch":59162,"suitcase":59163,"surfing":59164,"survey":59165,"swag-pillar-benefit":59166,"swag-pillar-career":59167,"swag-pillar-money":59168,"swag-pillar-work":59169,"swag":59170,"swipe-right":59171,"switch":59172,"tag":59173,"target":59174,"teams":59175,"timesheet":59176,"touch-id":59177,"trash-bin":59178,"unlock":59179,"user":59180,"video-1":59181,"video-2":59182,"wallet":59183,"warning":59184,"activate-outlined":59185,"add-credit-card-outlined":59186,"add-person-outlined":59187,"add-section-outlined":59188,"add-time-outlined":59189,"add":59190,"adjustment-outlined":59191,"ai-outlined":59192,"alignment-2-outlined":59193,"alignment-outlined":59194,"all-caps":59195,"application-outlined":59196,"arrow-down":59197,"arrow-downwards":59198,"arrow-left":59199,"arrow-leftwards":59200,"arrow-right":59201,"arrow-rightwards":59202,"arrow-up":59203,"arrow-upwards":59204,"article-outlined":59205,"at-sign":59206,"auto-graph-outlined":59207,"beer-outlined":59208,"bell-active-outlined":59209,"bell-outlined":59210,"bell-slash-outlined":59211,"bill-management-outlined":59212,"billing-outlined":59213,"body-outlined":59214,"bold":59215,"bolt-outlined":59216,"book-outlined":59217,"bookmark-added-outlined":59218,"bookmark-outlined":59219,"box-check-outlined":59220,"box-outlined":59221,"bullet-points":59222,"cake-outlined":59223,"calendar-dates-outlined":59224,"calendar-star-outlined":59225,"call-outlined":59226,"call-split-outlined":59227,"camera-outlined":59228,"cancel":59229,"car-forward-outlined":59230,"cashback-outlined":59231,"charging-station-outlined":59232,"chat-bubble-outlined":59233,"chat-unread-outlined":59234,"checkmark":59235,"circle-add-outlined":59236,"circle-cancel-outlined":59237,"circle-down-outlined":59238,"circle-info-outlined":59239,"circle-left-outlined":59240,"circle-ok-outlined":59241,"circle-question-outlined":59242,"circle-remove-outlined":59243,"circle-right-outlined":59244,"circle-up-outlined":59245,"circle-warning-outlined":59246,"clock-2-outlined":59247,"clock-outlined":59248,"cog-outlined":59249,"coin-outlined":59250,"coin-super-outlined":59251,"comment-outlined":59252,"contacts-outlined":59253,"contacts-user-outlined":59254,"credit-card-outlined":59255,"cup-outlined":59256,"dentistry-outlined":59257,"direction-arrows-outlined":59258,"directory-outlined":59259,"document-outlined":59260,"dollar-box-outlined":59261,"dollar-card-outlined":59262,"dollar-coin-shine-outlined":59263,"dollar-credit-card-outlined":59264,"dollar-sign":59265,"double-buildings-outlined":59266,"double-left-arrows":59267,"double-right-arrows":59268,"download-box-outlined":59269,"download-outlined":59270,"edit-template-outlined":59271,"email-outlined":59272,"enter-arrow":59273,"envelope-outlined":59274,"expense-approval-outlined":59275,"expense-outlined":59276,"explore-outlined":59277,"extension-outlined":59278,"external-link":59279,"eye-invisible-outlined":59280,"eye-outlined":59281,"face-id":59282,"face-meh-outlined":59283,"face-open-smiley-outlined":59284,"face-sad-outlined":59285,"face-smiley-outlined":59286,"fastfood-outlined":59287,"feed-outlined":59288,"file-certified-outlined":59289,"file-clone-outlined":59290,"file-copy-outlined":59291,"file-dispose-outlined":59292,"file-dollar-certified-outlined":59293,"file-dollar-outlined":59294,"file-download-outlined":59295,"file-export-outlined":59296,"file-lock-outlined":59297,"file-outlined":59298,"file-search-outlined":59299,"file-secured-outlined":59300,"file-statutory-outlined":59301,"file-verified-outlined":59302,"filter-outlined":59303,"folder-outlined":59304,"folder-user-outlined":59305,"form-outlined":59306,"funnel-filter-outline":59307,"goal-outlined":59308,"graph-outlined":59309,"hand-holding-user-outlined":59310,"happy-sun-outlined":59311,"health-bag-outlined":59312,"heart-outlined":59313,"home-active-outlined":59314,"home-outlined":59315,"id-card-outlined":59316,"image-outlined":59317,"import-outlined":59318,"instapay-outlined":59319,"italic":59320,"job-search-outlined":59321,"leave-approval-outlined":59322,"link-1":59323,"link-2":59324,"list-outlined":59325,"live-help-outlined":59326,"local_mall_outlined":59327,"location-on-outlined":59328,"location-outlined":59329,"lock-outlined":59330,"locked-file-outlined":59331,"log-out":59332,"mail-outlined":59333,"map-outlined":59334,"media-content-outlined":59335,"menu-close":59336,"menu-expand":59337,"menu-fold-outlined":59338,"menu-unfold-outlined":59339,"moneybag-outlined":59340,"moon-outlined":59341,"more-horizontal":59342,"more-vertical":59343,"multiple-folders-outlined":59344,"multiple-users-outlined":59345,"near-me-outlined":59346,"node-outlined":59347,"number-points":59348,"number":59349,"overview-outlined":59350,"payment-summary-outlined":59351,"payslip-outlined":59352,"pencil-outlined":59353,"percentage":59354,"phone-outlined":59355,"piggy-bank-outlined":59356,"plane-outlined":59357,"play-circle-outlined":59358,"print-outlined":59359,"propane-tank-outlined":59360,"qr-code-outlined":59361,"qualification-outlined":59362,"re-assign":59363,"redeem":59364,"refresh":59365,"remove":59366,"reply-outlined":59367,"restart":59368,"resume-outlined":59369,"return-arrow":59370,"rostering-outlined":59371,"safety-outlined":59372,"save-outlined":59373,"schedule-outlined":59374,"search-outlined":59375,"search-secured-outlined":59376,"send-outlined":59377,"share-1":59378,"share-2":59379,"share-outlined-2":59380,"share-outlined":59381,"shopping_basket_outlined":59382,"show-chart-outlined":59383,"single-down-arrow":59384,"single-left-arrow":59385,"single-right-arrow":59386,"single-up-arrow":59387,"smart-match-outlined":59388,"sparkle-outlined":59389,"speaker-active-outlined":59390,"speaker-outlined":59391,"star-circle-outlined":59392,"star-outlined":59393,"stash-outlined":59394,"stopwatch-outlined":59395,"strikethrough":59396,"styler-outlined":59397,"suitcase-clock-outlined":59398,"suitcase-outlined":59399,"survey-outlined":59400,"switch-outlined":59401,"sync":59402,"tag-outlined":59403,"target-outlined":59404,"tennis-outlined":59405,"ticket-outlined":59406,"timesheet-outlined":59407,"timesheets-outlined":59408,"today-outlined":59409,"transfer":59410,"trash-bin-outlined":59411,"umbrela-outlined":59412,"unavailability-outlined":59413,"unavailable":59414,"underline":59415,"union-outlined":59416,"unlock-outlined":59417,"upload-outlined":59418,"user-circle-outlined":59419,"user-gear-outlined":59420,"user-outlined":59421,"user-rectangle-outlined":59422,"video-1-outlined":59423,"video-2-outlined":59424,"volunteer-outlined":59425,"wallet-outlined":59426}
1
+ {"activate":59000,"add-emoji":59001,"add-person":59002,"adjustment":59003,"alignment":59004,"antenna":59005,"archive":59006,"assignment-warning":59007,"bank":59008,"bell":59009,"billing":59010,"bolt":59011,"bookmark-added":59012,"bookmark":59013,"box-check":59014,"box":59015,"bpay":59016,"buildings":59017,"cake":59018,"calendar-clock":59019,"calendar":59020,"candy-box-menu":59021,"caret-down-small":59022,"caret-down":59023,"caret-left-small":59024,"caret-left":59025,"caret-right-small":59026,"caret-right":59027,"caret-up-small":59028,"caret-up":59029,"check-radio":59030,"circle-add":59031,"circle-cancel":59032,"circle-check":59033,"circle-down":59034,"circle-info":59035,"circle-left":59036,"circle-ok":59037,"circle-pencil":59038,"circle-question":59039,"circle-remove":59040,"circle-right":59041,"circle-up":59042,"circle-warning":59043,"clock-3":59044,"clock":59045,"cloud-download":59046,"cloud-upload":59047,"cog":59048,"coin":59049,"contacts":59050,"credit-card":59051,"diamond":59052,"direction-arrows":59053,"directory":59054,"document":59055,"dollar-coin-shine":59056,"double-buildings":59057,"edit-template":59058,"envelope":59059,"exclude":59060,"expand-content":59061,"expense":59062,"explore_nearby":59063,"eye-circle":59064,"eye-invisible":59065,"eye":59066,"face-meh":59067,"face-sad":59068,"face-smiley":59069,"feed":59070,"feedbacks":59071,"file-certified":59072,"file-clone":59073,"file-copy":59074,"file-csv":59075,"file-dispose":59076,"file-doc":59077,"file-excel":59078,"file-export":59079,"file-lock":59080,"file-pdf":59081,"file-powerpoint":59082,"file-search":59083,"file-secured":59084,"file-sheets":59085,"file-slide":59086,"file-verified":59087,"file-word":59088,"file":59089,"filter":59090,"folder-user":59091,"folder":59092,"format-bold":59093,"format-heading1":59094,"format-heading2":59095,"format-italic":59096,"format-list-bulleted":59097,"format-list-numbered":59098,"format-underlined":59099,"funnel-filter":59100,"global-dollar":59101,"globe":59102,"graduation-cap":59103,"graph":59104,"happy-sun":59105,"health-bag":59106,"heart":59107,"hero-points":59108,"home":59109,"image":59110,"import":59111,"incident-siren":59112,"instapay-daily":59113,"instapay-now":59114,"instapay":59115,"list":59116,"loading-2":59117,"loading":59118,"location-on":59119,"location":59120,"lock":59121,"looks-one":59122,"looks-two":59123,"media-content":59124,"menu":59125,"money-notes":59126,"moneybag":59127,"moon":59128,"multiple-stars":59129,"multiple-users":59130,"near-me":59131,"node":59132,"open-folder":59133,"paperclip":59134,"payment-summary":59135,"pencil":59136,"phone":59137,"piggy-bank":59138,"plane-up":59139,"plane":59140,"play-circle":59141,"print":59142,"raising-hands":59143,"reply-arrow":59144,"reply":59145,"reschedule":59146,"rostering":59147,"salary-sacrifice":59148,"save":59149,"schedule-send":59150,"schedule":59151,"search-person":59152,"send":59153,"speaker-active":59154,"speaker":59155,"star-award":59156,"star-badge":59157,"star-circle":59158,"star-medal":59159,"star":59160,"steps-circle":59161,"stopwatch":59162,"suitcase":59163,"surfing":59164,"survey":59165,"swag-pillar-benefit":59166,"swag-pillar-career":59167,"swag-pillar-money":59168,"swag-pillar-work":59169,"swag":59170,"swipe-right":59171,"switch":59172,"tag":59173,"target":59174,"teams":59175,"timesheet":59176,"touch-id":59177,"trash-bin":59178,"unlock":59179,"user":59180,"video-1":59181,"video-2":59182,"wallet":59183,"warning":59184,"activate-outlined":59185,"add-credit-card-outlined":59186,"add-person-outlined":59187,"add-section-outlined":59188,"add-time-outlined":59189,"add":59190,"adjustment-outlined":59191,"ai-outlined":59192,"alignment-2-outlined":59193,"alignment-outlined":59194,"all-caps":59195,"application-outlined":59196,"arrow-down":59197,"arrow-downwards":59198,"arrow-left":59199,"arrow-leftwards":59200,"arrow-right":59201,"arrow-rightwards":59202,"arrow-up":59203,"arrow-upwards":59204,"article-outlined":59205,"at-sign":59206,"auto-graph-outlined":59207,"beer-outlined":59208,"bell-active-outlined":59209,"bell-outlined":59210,"bell-slash-outlined":59211,"bill-management-outlined":59212,"billing-outlined":59213,"body-outlined":59214,"bold":59215,"bolt-outlined":59216,"book-outlined":59217,"bookmark-added-outlined":59218,"bookmark-outlined":59219,"box-check-outlined":59220,"box-outlined":59221,"bullet-points":59222,"cake-outlined":59223,"calendar-dates-outlined":59224,"calendar-star-outlined":59225,"call-outlined":59226,"call-split-outlined":59227,"camera-outlined":59228,"cancel":59229,"car-forward-outlined":59230,"cashback-outlined":59231,"charging-station-outlined":59232,"chat-bubble-outlined":59233,"chat-unread-outlined":59234,"checkmark":59235,"circle-add-outlined":59236,"circle-cancel-outlined":59237,"circle-down-outlined":59238,"circle-info-outlined":59239,"circle-left-outlined":59240,"circle-ok-outlined":59241,"circle-question-outlined":59242,"circle-remove-outlined":59243,"circle-right-outlined":59244,"circle-up-outlined":59245,"circle-warning-outlined":59246,"clock-2-outlined":59247,"clock-outlined":59248,"cog-outlined":59249,"coin-outlined":59250,"coin-super-outlined":59251,"comment-outlined":59252,"contacts-outlined":59253,"contacts-user-outlined":59254,"credit-card-outlined":59255,"cup-outlined":59256,"dentistry-outlined":59257,"direction-arrows-outlined":59258,"directory-outlined":59259,"document-outlined":59260,"dollar-box-outlined":59261,"dollar-card-outlined":59262,"dollar-coin-shine-outlined":59263,"dollar-credit-card-outlined":59264,"dollar-sign":59265,"double-buildings-outlined":59266,"double-left-arrows":59267,"double-right-arrows":59268,"download-box-outlined":59269,"download-outlined":59270,"edit-template-outlined":59271,"email-outlined":59272,"enter-arrow":59273,"envelope-outlined":59274,"expense-approval-outlined":59275,"expense-outlined":59276,"explore-outlined":59277,"extension-outlined":59278,"external-link":59279,"eye-invisible-outlined":59280,"eye-outlined":59281,"face-id":59282,"face-meh-outlined":59283,"face-open-smiley-outlined":59284,"face-sad-outlined":59285,"face-smiley-outlined":59286,"fastfood-outlined":59287,"feed-outlined":59288,"file-certified-outlined":59289,"file-clone-outlined":59290,"file-copy-outlined":59291,"file-dispose-outlined":59292,"file-dollar-certified-outlined":59293,"file-dollar-outlined":59294,"file-download-outlined":59295,"file-export-outlined":59296,"file-lock-outlined":59297,"file-outlined":59298,"file-search-outlined":59299,"file-secured-outlined":59300,"file-statutory-outlined":59301,"file-verified-outlined":59302,"filter-outlined":59303,"folder-outlined":59304,"folder-user-outlined":59305,"form-outlined":59306,"funnel-filter-outline":59307,"goal-outlined":59308,"graph-outlined":59309,"hand-holding-user-outlined":59310,"happy-sun-outlined":59311,"health-bag-outlined":59312,"heart-outlined":59313,"home-active-outlined":59314,"home-outlined":59315,"id-card-outlined":59316,"image-outlined":59317,"import-outlined":59318,"instapay-outlined":59319,"italic":59320,"job-search-outlined":59321,"leave-approval-outlined":59322,"link-1":59323,"link-2":59324,"list-outlined":59325,"live-help-outlined":59326,"local_mall_outlined":59327,"location-on-outlined":59328,"location-outlined":59329,"lock-outlined":59330,"locked-file-outlined":59331,"log-out":59332,"mail-outlined":59333,"map-outlined":59334,"media-content-outlined":59335,"menu-close":59336,"menu-expand":59337,"menu-fold-outlined":59338,"menu-unfold-outlined":59339,"moneybag-outlined":59340,"moon-outlined":59341,"more-horizontal":59342,"more-vertical":59343,"multiple-folders-outlined":59344,"multiple-users-outlined":59345,"near-me-outlined":59346,"node-outlined":59347,"number-points":59348,"number":59349,"overview-outlined":59350,"payment-summary-outlined":59351,"payslip-outlined":59352,"pencil-outlined":59353,"percentage":59354,"phone-outlined":59355,"piggy-bank-outlined":59356,"plane-outlined":59357,"play-circle-outlined":59358,"print-outlined":59359,"propane-tank-outlined":59360,"qr-code-outlined":59361,"qualification-outlined":59362,"re-assign":59363,"redeem":59364,"refresh":59365,"remove":59366,"reply-outlined":59367,"restart":59368,"resume-outlined":59369,"return-arrow":59370,"rostering-outlined":59371,"safety-outlined":59372,"save-outlined":59373,"schedule-outlined":59374,"search-outlined":59375,"search-secured-outlined":59376,"send-outlined":59377,"share-1":59378,"share-2":59379,"share-outlined-2":59380,"share-outlined":59381,"shopping_basket_outlined":59382,"show-chart-outlined":59383,"single-down-arrow":59384,"single-left-arrow":59385,"single-right-arrow":59386,"single-up-arrow":59387,"smart-match-outlined":59388,"sparkle-outlined":59389,"speaker-active-outlined":59390,"speaker-outlined":59391,"star-circle-outlined":59392,"star-outlined":59393,"stash-outlined":59394,"stopwatch-outlined":59395,"strikethrough":59396,"styler-outlined":59397,"suitcase-clock-outlined":59398,"suitcase-outlined":59399,"survey-outlined":59400,"switch-outlined":59401,"sync":59402,"tag-outlined":59403,"target-outlined":59404,"tennis-outlined":59405,"ticket-outlined":59406,"timesheet-outlined":59407,"timesheets-outlined":59408,"today-outlined":59409,"transfer":59410,"trash-bin-outlined":59411,"umbrela-outlined":59412,"unavailability-outlined":59413,"unavailable":59414,"underline":59415,"union-outlined":59416,"unlock-outlined":59417,"upload-outlined":59418,"user-circle-outlined":59419,"user-gear-outlined":59420,"user-outlined":59421,"user-rectangle-outlined":59422,"video-1-outlined":59423,"video-2-outlined":59424,"volunteer-outlined":59425,"wallet-outlined":59426,"wellness-outlined":59427}
@@ -427,6 +427,7 @@ const IconList = [
427
427
  'video-2-outlined',
428
428
  'volunteer-outlined',
429
429
  'wallet-outlined',
430
+ 'wellness-outlined',
430
431
  ] as const;
431
432
 
432
433
  export default IconList;
@@ -133,7 +133,7 @@ exports[`Success renders full screen success page correctly 1`] = `
133
133
  themeLevel="h4"
134
134
  themeTypeface="playful"
135
135
  >
136
- We’re sorry, something went wrong
136
+ Two-Factor Authentication
137
137
  </Text>
138
138
  <Text
139
139
  allowFontScaling={false}
@@ -159,7 +159,7 @@ exports[`Success renders full screen success page correctly 1`] = `
159
159
  themeTypeface="neutral"
160
160
  themeVariant="regular"
161
161
  >
162
- Please try again later
162
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
163
163
  </Text>
164
164
  </View>
165
165
  </View>
@@ -187,7 +187,7 @@ exports[`Success renders full screen success page correctly 1`] = `
187
187
  </View>
188
188
  `;
189
189
 
190
- exports[`Success renders succe screen with custom image element correctly 1`] = `
190
+ exports[`Success renders success screen with custom image element correctly 1`] = `
191
191
  <View
192
192
  style={
193
193
  {
@@ -280,7 +280,7 @@ exports[`Success renders succe screen with custom image element correctly 1`] =
280
280
  themeLevel="h4"
281
281
  themeTypeface="playful"
282
282
  >
283
- We’re sorry, something went wrong
283
+ Two-Factor Authentication
284
284
  </Text>
285
285
  <Text
286
286
  allowFontScaling={false}
@@ -306,7 +306,7 @@ exports[`Success renders succe screen with custom image element correctly 1`] =
306
306
  themeTypeface="neutral"
307
307
  themeVariant="regular"
308
308
  >
309
- Please try again later
309
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
310
310
  </Text>
311
311
  </View>
312
312
  </View>
@@ -434,7 +434,7 @@ exports[`Success renders success screen with image correctly 1`] = `
434
434
  themeLevel="h4"
435
435
  themeTypeface="playful"
436
436
  >
437
- We’re sorry, something went wrong
437
+ Two-Factor Authentication
438
438
  </Text>
439
439
  <Text
440
440
  allowFontScaling={false}
@@ -460,7 +460,150 @@ exports[`Success renders success screen with image correctly 1`] = `
460
460
  themeTypeface="neutral"
461
461
  themeVariant="regular"
462
462
  >
463
- Please try again later
463
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
464
+ </Text>
465
+ </View>
466
+ </View>
467
+ <View
468
+ pointerEvents="box-none"
469
+ position="bottom"
470
+ style={
471
+ [
472
+ {
473
+ "bottom": 0,
474
+ "elevation": 9999,
475
+ "flexDirection": "column-reverse",
476
+ "left": 0,
477
+ "paddingHorizontal": 24,
478
+ "paddingVertical": 16,
479
+ "position": "absolute",
480
+ "right": 0,
481
+ "top": 0,
482
+ },
483
+ undefined,
484
+ ]
485
+ }
486
+ />
487
+ </View>
488
+ `;
489
+
490
+ exports[`Success renders title and description as ReactElement correctly 1`] = `
491
+ <View
492
+ style={
493
+ {
494
+ "flex": 1,
495
+ }
496
+ }
497
+ >
498
+ <View
499
+ style={
500
+ [
501
+ {
502
+ "backgroundColor": "#f6f6f7",
503
+ "display": "flex",
504
+ "flex": 1,
505
+ "flexDirection": "column",
506
+ },
507
+ undefined,
508
+ ]
509
+ }
510
+ themeVariant="in-page"
511
+ >
512
+ <View
513
+ style={
514
+ [
515
+ {
516
+ "alignItems": "center",
517
+ "display": "flex",
518
+ "flex": 1,
519
+ "flexDirection": "column",
520
+ "justifyContent": "center",
521
+ "padding": 24,
522
+ },
523
+ undefined,
524
+ ]
525
+ }
526
+ >
527
+ <Text
528
+ allowFontScaling={false}
529
+ style={
530
+ [
531
+ {
532
+ "color": "#001f23",
533
+ "fontFamily": "RebondGrotesque-SemiBold",
534
+ "fontSize": 24,
535
+ "letterSpacing": 0.24,
536
+ "lineHeight": 32,
537
+ },
538
+ [
539
+ {
540
+ "color": "#001f23",
541
+ "marginBottom": 8,
542
+ "textAlign": "center",
543
+ },
544
+ undefined,
545
+ ],
546
+ ]
547
+ }
548
+ themeIntent="body"
549
+ themeLevel="h4"
550
+ themeTypeface="playful"
551
+ >
552
+ Two-Factor Authentication
553
+ </Text>
554
+ <Text
555
+ allowFontScaling={false}
556
+ style={
557
+ [
558
+ {
559
+ "color": "#001f23",
560
+ "fontFamily": "BeVietnamPro-Regular",
561
+ "fontSize": 16,
562
+ "letterSpacing": 0.48,
563
+ "lineHeight": 24,
564
+ },
565
+ undefined,
566
+ ]
567
+ }
568
+ themeIntent="body"
569
+ themeTypeface="neutral"
570
+ themeVariant="regular"
571
+ >
572
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
573
+ ,
574
+ <Text
575
+ allowFontScaling={false}
576
+ onPress={
577
+ [MockFunction] {
578
+ "calls": [
579
+ [],
580
+ ],
581
+ "results": [
582
+ {
583
+ "type": "return",
584
+ "value": undefined,
585
+ },
586
+ ],
587
+ }
588
+ }
589
+ style={
590
+ [
591
+ {
592
+ "color": "#001f23",
593
+ "fontFamily": "BeVietnamPro-Regular",
594
+ "fontSize": 16,
595
+ "letterSpacing": 0.48,
596
+ "lineHeight": 24,
597
+ },
598
+ undefined,
599
+ ]
600
+ }
601
+ themeIntent="body"
602
+ themeTypeface="neutral"
603
+ themeVariant="regular"
604
+ >
605
+ click here
606
+ </Text>
464
607
  </Text>
465
608
  </View>
466
609
  </View>
@@ -549,7 +692,7 @@ exports[`Success renders title only correctly 1`] = `
549
692
  themeLevel="h4"
550
693
  themeTypeface="playful"
551
694
  >
552
- We’re sorry, something went wrong
695
+ Two-Factor Authentication
553
696
  </Text>
554
697
  <Text
555
698
  allowFontScaling={false}
@@ -575,7 +718,7 @@ exports[`Success renders title only correctly 1`] = `
575
718
  themeTypeface="neutral"
576
719
  themeVariant="regular"
577
720
  >
578
- Please try again later
721
+ Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.
579
722
  </Text>
580
723
  </View>
581
724
  </View>
@@ -4,9 +4,10 @@ import renderWithTheme from '../../../testHelpers/renderWithTheme';
4
4
  import Success from '..';
5
5
  import Image from '../../Image';
6
6
  import Portal from '../../Portal';
7
+ import Typography from '../../Typography';
7
8
 
8
- const title = `We’re sorry, something went wrong`;
9
- const description = 'Please try again later';
9
+ const title = `Two-Factor Authentication`;
10
+ const description = `Protecting your sensitive data is important to us. Verifying your mobile number or using an authenticator app makes it harder for attackers to access personal and sensitive information.`;
10
11
 
11
12
  describe('Success', () => {
12
13
  it('renders title only correctly', () => {
@@ -14,10 +15,31 @@ describe('Success', () => {
14
15
  <Success title={title} description={description} />
15
16
  );
16
17
 
18
+ expect(toJSON()).toMatchSnapshot();
17
19
  expect(getByText(title)).toBeTruthy();
18
20
  expect(getByText(description)).toBeTruthy();
21
+ });
22
+
23
+ it('renders title and description as ReactElement correctly', () => {
24
+ const clickHereSpy = jest.fn();
25
+ const { toJSON, getByText } = renderWithTheme(
26
+ <Success
27
+ title="Two-Factor Authentication"
28
+ description={
29
+ <Typography.Body>
30
+ {description},
31
+ <Typography.Body onPress={clickHereSpy}>click here</Typography.Body>
32
+ </Typography.Body>
33
+ }
34
+ />
35
+ );
36
+
37
+ expect(getByText(title)).toBeTruthy();
38
+ fireEvent.press(getByText('click here'));
39
+ expect(clickHereSpy).toBeCalledTimes(1);
19
40
  expect(toJSON()).toMatchSnapshot();
20
41
  });
42
+
21
43
  it('renders success screen with image correctly', () => {
22
44
  const { toJSON, getByText, getByTestId } = renderWithTheme(
23
45
  <Success title={title} description={description} image="path_to_image" />
@@ -28,7 +50,8 @@ describe('Success', () => {
28
50
  expect(getByTestId('success-image')).toBeTruthy();
29
51
  expect(toJSON()).toMatchSnapshot();
30
52
  });
31
- it('renders succe screen with custom image element correctly', () => {
53
+
54
+ it('renders success screen with custom image element correctly', () => {
32
55
  const image = (
33
56
  <Image
34
57
  source={{
@@ -45,6 +68,7 @@ describe('Success', () => {
45
68
  expect(getByTestId('success-image')).toBeTruthy();
46
69
  expect(toJSON()).toMatchSnapshot();
47
70
  });
71
+
48
72
  it('renders full screen success page correctly', () => {
49
73
  const { toJSON, getByText, getByTestId } = renderWithTheme(
50
74
  <Portal.Provider>
@@ -62,6 +86,7 @@ describe('Success', () => {
62
86
  expect(getByTestId('success-image')).toBeTruthy();
63
87
  expect(toJSON()).toMatchSnapshot();
64
88
  });
89
+
65
90
  it('handles CTA press correctly', () => {
66
91
  const onCtaPress = jest.fn();
67
92
  const onSecondCtaPress = jest.fn();
@@ -34,7 +34,7 @@ export interface SuccessProps extends ViewProps {
34
34
  /**
35
35
  * Success's description.
36
36
  */
37
- description?: string;
37
+ description?: string | ReactElement;
38
38
  /**
39
39
  * Success's variant.
40
40
  */
@@ -107,9 +107,10 @@ const SuccessPage = ({
107
107
  <StyledSuccessTitle level="h4" typeface="playful">
108
108
  {title}
109
109
  </StyledSuccessTitle>
110
-
111
- {!!description && (
110
+ {typeof description === 'string' ? (
112
111
  <StyledSuccessDescription>{description}</StyledSuccessDescription>
112
+ ) : (
113
+ description
113
114
  )}
114
115
  </StyledSuccessContent>
115
116
 
@@ -451,17 +451,12 @@ describe('TextInput', () => {
451
451
 
452
452
  describe('ref', () => {
453
453
  it('ref methods work correctly', () => {
454
- const mockChildMethod = jest.fn();
455
- jest.spyOn(React, 'useRef').mockReturnValue({
456
- current: {
457
- clear: mockChildMethod,
458
- },
459
- });
460
454
  const ref = React.createRef<
461
455
  TextInputHandles & {
462
456
  getNativeTextInputRef(): RNTextInput;
463
457
  }
464
458
  >();
459
+
465
460
  const wrapper = renderWithTheme(
466
461
  <TextInput label="Amount (AUD)" value="2000" ref={ref} />
467
462
  );
package/tsconfig.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "extends": "expo/tsconfig.base",
3
2
  "compilerOptions": {
4
3
  "declaration": true,
5
4
  "jsx": "react-native",
@@ -13,8 +12,17 @@
13
12
  "target": "esnext",
14
13
  "types": ["jest"],
15
14
  "paths": {
16
- "react": ["./node_modules/@types/react"]
17
- }
15
+ "react": ["./node_modules/@types/react"],
16
+ "react-native": ["./node_modules/react-native/types"],
17
+ },
18
+ "allowJs": true,
19
+ "esModuleInterop": true,
20
+ "lib": ["DOM", "ESNext"],
21
+ "moduleResolution": "node",
22
+ "noEmit": true,
23
+ "resolveJsonModule": true,
24
+ "skipLibCheck": true,
18
25
  },
19
- "include": ["src"]
26
+ "include": ["src"],
27
+ "exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]
20
28
  }
@@ -26,9 +26,9 @@ declare const StyledCustomSizeCarouselImage: import("@emotion/native").StyledCom
26
26
  theme?: import("@emotion/react").Theme | undefined;
27
27
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
28
  } & {
29
- height?: number | `${number}%` | undefined;
30
- width?: number | `${number}%` | undefined;
31
- resizeMode?: ImageResizeMode | undefined;
29
+ themeHeight?: number | `${number}%` | undefined;
30
+ themeWidth?: number | `${number}%` | undefined;
31
+ themeResizeMode?: ImageResizeMode | undefined;
32
32
  }, {}, {}>;
33
33
  declare const StyledCarouselContentWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
34
34
  theme?: import("@emotion/react").Theme | undefined;