@hero-design/rn 8.22.0 → 8.24.0-alpha.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.
Files changed (319) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/.turbo/turbo-build:types.log +2 -0
  3. package/.turbo/turbo-lint.log +146 -0
  4. package/.turbo/turbo-publish:npm.log +9 -0
  5. package/.turbo/turbo-test.log +451 -0
  6. package/.turbo/turbo-type-check.log +1 -0
  7. package/es/index.js +527 -165
  8. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  9. package/lib/index.js +527 -164
  10. package/package.json +5 -5
  11. package/src/components/Alert/index.tsx +6 -0
  12. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +21 -9
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +7 -3
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +7 -3
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +7 -3
  16. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  17. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
  18. package/src/components/List/ListItem.tsx +12 -8
  19. package/src/components/RichTextEditor/RichTextEditor.tsx +10 -7
  20. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +10 -8
  21. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +37 -16
  22. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +37 -16
  23. package/src/components/Success/StyledSuccess.tsx +87 -0
  24. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +497 -0
  25. package/src/components/Success/__tests__/index.spec.tsx +78 -0
  26. package/src/components/Success/index.tsx +129 -0
  27. package/src/components/Tabs/ScrollableTabs.tsx +10 -149
  28. package/src/components/Tabs/ScrollableTabsHeader.tsx +214 -0
  29. package/src/components/Tabs/ScrollableTabsV2/SceneView.tsx +61 -0
  30. package/src/components/Tabs/ScrollableTabsV2/ScrollableTabsV2.tsx +120 -0
  31. package/src/components/Tabs/ScrollableTabsV2/__tests__/SceneView.spec.tsx +76 -0
  32. package/src/components/Tabs/ScrollableTabsV2/__tests__/ScrollableTabsV2.spec.tsx +166 -0
  33. package/src/components/Tabs/ScrollableTabsV2/__tests__/__snapshots__/SceneView.spec.tsx.snap +161 -0
  34. package/src/components/Tabs/ScrollableTabsV2/__tests__/__snapshots__/ScrollableTabsV2.spec.tsx.snap +2497 -0
  35. package/src/components/Tabs/ScrollableTabsV2/index.tsx +5 -0
  36. package/src/components/Tabs/__tests__/ScrollableTabsHeader.spec.tsx +80 -0
  37. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +587 -0
  38. package/src/components/Tabs/index.tsx +2 -0
  39. package/src/components/Tag/StyledTag.tsx +1 -1
  40. package/src/components/Tag/__tests__/Tag.spec.tsx +22 -71
  41. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +106 -53
  42. package/src/components/TextInput/StyledTextInput.tsx +40 -29
  43. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +48 -57
  44. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +84 -58
  45. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +587 -70
  46. package/src/components/TextInput/__tests__/index.spec.tsx +45 -4
  47. package/src/components/TextInput/index.tsx +31 -16
  48. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +14 -6
  49. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +14 -6
  50. package/src/index.ts +2 -0
  51. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +41 -6
  52. package/src/theme/components/empty.ts +1 -1
  53. package/src/theme/components/error.ts +1 -1
  54. package/src/theme/components/success.ts +40 -0
  55. package/src/theme/components/tag.ts +1 -1
  56. package/src/theme/components/textInput.ts +10 -4
  57. package/src/theme/getTheme.ts +3 -0
  58. package/src/utils/hooks.ts +1 -1
  59. package/testUtils/setup.tsx +6 -0
  60. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  61. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  62. package/types/components/Accordion/index.d.ts +0 -0
  63. package/types/components/Alert/StyledAlert.d.ts +0 -0
  64. package/types/components/Alert/index.d.ts +0 -0
  65. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  66. package/types/components/Attachment/index.d.ts +0 -0
  67. package/types/components/Avatar/Avatar.d.ts +0 -0
  68. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  69. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  70. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  71. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  72. package/types/components/Avatar/index.d.ts +0 -0
  73. package/types/components/Badge/Status.d.ts +0 -0
  74. package/types/components/Badge/StyledBadge.d.ts +0 -0
  75. package/types/components/Badge/index.d.ts +0 -0
  76. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  77. package/types/components/BottomNavigation/index.d.ts +0 -0
  78. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  79. package/types/components/BottomSheet/Footer.d.ts +0 -0
  80. package/types/components/BottomSheet/Header.d.ts +0 -0
  81. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  82. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  83. package/types/components/BottomSheet/index.d.ts +0 -0
  84. package/types/components/Box/StyledBox.d.ts +0 -0
  85. package/types/components/Box/config.d.ts +0 -0
  86. package/types/components/Box/index.d.ts +0 -0
  87. package/types/components/Box/types.d.ts +0 -0
  88. package/types/components/Button/Button.d.ts +0 -0
  89. package/types/components/Button/IconButton.d.ts +0 -0
  90. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  91. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  92. package/types/components/Button/StyledButton.d.ts +0 -0
  93. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  94. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  95. package/types/components/Button/index.d.ts +0 -0
  96. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  97. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  98. package/types/components/Calendar/helpers.d.ts +0 -0
  99. package/types/components/Calendar/index.d.ts +0 -0
  100. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  101. package/types/components/Card/DataCard/index.d.ts +0 -0
  102. package/types/components/Card/StyledCard.d.ts +0 -0
  103. package/types/components/Card/index.d.ts +0 -0
  104. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  105. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  106. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  107. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  108. package/types/components/Carousel/contants.d.ts +0 -0
  109. package/types/components/Carousel/index.d.ts +0 -0
  110. package/types/components/Carousel/types.d.ts +0 -0
  111. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
  112. package/types/components/Checkbox/index.d.ts +0 -0
  113. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  114. package/types/components/Collapse/index.d.ts +0 -0
  115. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  116. package/types/components/ContentNavigator/index.d.ts +0 -0
  117. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  118. package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
  119. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  120. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  121. package/types/components/DatePicker/index.d.ts +0 -0
  122. package/types/components/DatePicker/types.d.ts +0 -0
  123. package/types/components/Divider/StyledDivider.d.ts +0 -0
  124. package/types/components/Divider/index.d.ts +0 -0
  125. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  126. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  127. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  128. package/types/components/Drawer/index.d.ts +0 -0
  129. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  130. package/types/components/Empty/index.d.ts +0 -0
  131. package/types/components/Error/StyledError.d.ts +0 -0
  132. package/types/components/Error/index.d.ts +0 -0
  133. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  134. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  135. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
  136. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  137. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  138. package/types/components/FAB/FAB.d.ts +0 -0
  139. package/types/components/FAB/StyledFAB.d.ts +0 -0
  140. package/types/components/FAB/index.d.ts +0 -0
  141. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  142. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  143. package/types/components/Icon/IconList.d.ts +0 -0
  144. package/types/components/Icon/index.d.ts +0 -0
  145. package/types/components/Icon/utils.d.ts +0 -0
  146. package/types/components/Image/index.d.ts +0 -0
  147. package/types/components/List/BasicListItem.d.ts +0 -0
  148. package/types/components/List/ListItem.d.ts +0 -0
  149. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  150. package/types/components/List/StyledListItem.d.ts +0 -0
  151. package/types/components/List/index.d.ts +0 -0
  152. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  153. package/types/components/PageControl/index.d.ts +0 -0
  154. package/types/components/PinInput/PinCell.d.ts +0 -0
  155. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  156. package/types/components/PinInput/index.d.ts +0 -0
  157. package/types/components/Progress/ProgressBar.d.ts +0 -0
  158. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  159. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  160. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  161. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  162. package/types/components/Progress/constants.d.ts +0 -0
  163. package/types/components/Progress/index.d.ts +0 -0
  164. package/types/components/Progress/types.d.ts +0 -0
  165. package/types/components/Radio/Radio.d.ts +0 -0
  166. package/types/components/Radio/RadioGroup.d.ts +0 -0
  167. package/types/components/Radio/StyledRadio.d.ts +0 -0
  168. package/types/components/Radio/index.d.ts +0 -0
  169. package/types/components/Radio/types.d.ts +0 -0
  170. package/types/components/RefreshControl/index.d.ts +0 -0
  171. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  172. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  173. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  174. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  175. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  176. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  177. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  178. package/types/components/RichTextEditor/constants.d.ts +0 -0
  179. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  180. package/types/components/RichTextEditor/index.d.ts +0 -0
  181. package/types/components/RichTextEditor/types.d.ts +0 -0
  182. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  183. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  184. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  185. package/types/components/SectionHeading/index.d.ts +0 -0
  186. package/types/components/Select/BaseOptionList.d.ts +0 -0
  187. package/types/components/Select/Footer.d.ts +0 -0
  188. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  189. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  190. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  191. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  192. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  193. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  194. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  195. package/types/components/Select/StyledSelect.d.ts +0 -0
  196. package/types/components/Select/helpers.d.ts +0 -0
  197. package/types/components/Select/index.d.ts +0 -0
  198. package/types/components/Select/types.d.ts +0 -0
  199. package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
  200. package/types/components/Skeleton/index.d.ts +0 -0
  201. package/types/components/Slider/index.d.ts +0 -0
  202. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  203. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  204. package/types/components/Spinner/index.d.ts +0 -0
  205. package/types/components/Success/StyledSuccess.d.ts +54 -0
  206. package/types/components/Success/index.d.ts +42 -0
  207. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  208. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  209. package/types/components/Swipeable/index.d.ts +0 -0
  210. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  211. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  212. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  213. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  214. package/types/components/Switch/index.d.ts +0 -0
  215. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  216. package/types/components/Tabs/SceneView.d.ts +9 -0
  217. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  218. package/types/components/Tabs/ScrollableTabsHeader.d.ts +35 -0
  219. package/types/components/Tabs/ScrollableTabsV2/SceneView.d.ts +10 -0
  220. package/types/components/Tabs/ScrollableTabsV2/ScrollableTabsV2.d.ts +9 -0
  221. package/types/components/Tabs/ScrollableTabsV2/index.d.ts +4 -0
  222. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  223. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  224. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  225. package/types/components/Tabs/index.d.ts +3 -0
  226. package/types/components/Tabs/utils.d.ts +0 -0
  227. package/types/components/Tag/StyledTag.d.ts +0 -0
  228. package/types/components/Tag/index.d.ts +0 -0
  229. package/types/components/TextInput/StyledTextInput.d.ts +12 -7
  230. package/types/components/TextInput/index.d.ts +12 -4
  231. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  232. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  233. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  234. package/types/components/TimePicker/index.d.ts +0 -0
  235. package/types/components/TimePicker/types.d.ts +0 -0
  236. package/types/components/Toast/StyledToast.d.ts +0 -0
  237. package/types/components/Toast/Toast.d.ts +0 -0
  238. package/types/components/Toast/ToastContainer.d.ts +0 -0
  239. package/types/components/Toast/ToastContext.d.ts +0 -0
  240. package/types/components/Toast/ToastProvider.d.ts +0 -0
  241. package/types/components/Toast/index.d.ts +0 -0
  242. package/types/components/Toast/types.d.ts +0 -0
  243. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  244. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  245. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  246. package/types/components/Toolbar/index.d.ts +0 -0
  247. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  248. package/types/components/Typography/Text/index.d.ts +0 -0
  249. package/types/components/Typography/index.d.ts +0 -0
  250. package/types/index.d.ts +2 -1
  251. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  252. package/types/theme/ThemeProvider.d.ts +0 -0
  253. package/types/theme/ThemeSwitcher.d.ts +0 -0
  254. package/types/theme/components/accordion.d.ts +0 -0
  255. package/types/theme/components/alert.d.ts +0 -0
  256. package/types/theme/components/attachment.d.ts +0 -0
  257. package/types/theme/components/avatar.d.ts +0 -0
  258. package/types/theme/components/badge.d.ts +0 -0
  259. package/types/theme/components/bottomNavigation.d.ts +0 -0
  260. package/types/theme/components/bottomSheet.d.ts +0 -0
  261. package/types/theme/components/button.d.ts +0 -0
  262. package/types/theme/components/calendar.d.ts +0 -0
  263. package/types/theme/components/card.d.ts +0 -0
  264. package/types/theme/components/cardCarousel.d.ts +0 -0
  265. package/types/theme/components/carousel.d.ts +0 -0
  266. package/types/theme/components/checkbox.d.ts +0 -0
  267. package/types/theme/components/contentNavigator.d.ts +0 -0
  268. package/types/theme/components/datePicker.d.ts +0 -0
  269. package/types/theme/components/divider.d.ts +0 -0
  270. package/types/theme/components/drawer.d.ts +0 -0
  271. package/types/theme/components/empty.d.ts +0 -0
  272. package/types/theme/components/error.d.ts +0 -0
  273. package/types/theme/components/fab.d.ts +0 -0
  274. package/types/theme/components/icon.d.ts +0 -0
  275. package/types/theme/components/image.d.ts +0 -0
  276. package/types/theme/components/list.d.ts +0 -0
  277. package/types/theme/components/pageControl.d.ts +0 -0
  278. package/types/theme/components/pinInput.d.ts +0 -0
  279. package/types/theme/components/progress.d.ts +0 -0
  280. package/types/theme/components/radio.d.ts +0 -0
  281. package/types/theme/components/refreshControl.d.ts +0 -0
  282. package/types/theme/components/richTextEditor.d.ts +0 -0
  283. package/types/theme/components/sectionHeading.d.ts +0 -0
  284. package/types/theme/components/select.d.ts +0 -0
  285. package/types/theme/components/skeleton.d.ts +0 -0
  286. package/types/theme/components/slider.d.ts +0 -0
  287. package/types/theme/components/spinner.d.ts +0 -0
  288. package/types/theme/components/success.d.ts +32 -0
  289. package/types/theme/components/swipeable.d.ts +0 -0
  290. package/types/theme/components/switch.d.ts +0 -0
  291. package/types/theme/components/tabs.d.ts +0 -0
  292. package/types/theme/components/tag.d.ts +0 -0
  293. package/types/theme/components/textInput.d.ts +5 -0
  294. package/types/theme/components/timePicker.d.ts +0 -0
  295. package/types/theme/components/toast.d.ts +0 -0
  296. package/types/theme/components/toolbar.d.ts +0 -0
  297. package/types/theme/components/typography.d.ts +0 -0
  298. package/types/theme/getTheme.d.ts +2 -0
  299. package/types/theme/global/borders.d.ts +0 -0
  300. package/types/theme/global/colors/eBens.d.ts +0 -0
  301. package/types/theme/global/colors/global.d.ts +0 -0
  302. package/types/theme/global/colors/globalDark.d.ts +0 -0
  303. package/types/theme/global/colors/jobs.d.ts +0 -0
  304. package/types/theme/global/colors/swag.d.ts +0 -0
  305. package/types/theme/global/colors/swagDark.d.ts +0 -0
  306. package/types/theme/global/colors/types.d.ts +0 -0
  307. package/types/theme/global/colors/wallet.d.ts +0 -0
  308. package/types/theme/global/colors/work.d.ts +0 -0
  309. package/types/theme/global/index.d.ts +0 -0
  310. package/types/theme/global/scale.d.ts +0 -0
  311. package/types/theme/global/sizes.d.ts +0 -0
  312. package/types/theme/global/space.d.ts +0 -0
  313. package/types/theme/global/typography.d.ts +0 -0
  314. package/types/theme/index.d.ts +0 -0
  315. package/types/types.d.ts +0 -0
  316. package/types/utils/functions.d.ts +0 -0
  317. package/types/utils/helpers.d.ts +0 -0
  318. package/types/utils/hooks.d.ts +0 -0
  319. package/types/utils/scale.d.ts +0 -0
package/lib/index.js CHANGED
@@ -2211,7 +2211,7 @@ var getDrawerTheme = function getDrawerTheme(theme) {
2211
2211
 
2212
2212
  var getEmptyTheme = function getEmptyTheme(theme) {
2213
2213
  var space = {
2214
- titleMargin: theme.space.medium,
2214
+ titleMargin: theme.space.small,
2215
2215
  imageMargin: theme.space.large,
2216
2216
  wrapperPadding: theme.space.medium
2217
2217
  };
@@ -2244,7 +2244,7 @@ var getEmptyTheme = function getEmptyTheme(theme) {
2244
2244
  var getErrorTheme = function getErrorTheme(theme) {
2245
2245
  var space = {
2246
2246
  titleMarginBottom: theme.space.small,
2247
- imageMarginBottom: theme.space.xlarge,
2247
+ imageMarginBottom: theme.space.large,
2248
2248
  wrapperPadding: theme.space.large,
2249
2249
  button: {
2250
2250
  wrapperHorizontalPadding: theme.space.medium,
@@ -2723,6 +2723,44 @@ var getSpinnerTheme = function getSpinnerTheme(theme) {
2723
2723
  };
2724
2724
  };
2725
2725
 
2726
+ var getSuccessTheme = function getSuccessTheme(theme) {
2727
+ var space = {
2728
+ titleMarginBottom: theme.space.small,
2729
+ imageMarginBottom: theme.space.xlarge,
2730
+ wrapperPadding: theme.space.large,
2731
+ button: {
2732
+ wrapperHorizontalPadding: theme.space.medium,
2733
+ wrapperVerticalPadding: theme.space.xxxlarge,
2734
+ margin: theme.space.medium,
2735
+ padding: theme.space.medium
2736
+ }
2737
+ };
2738
+ var sizes = {
2739
+ image: theme.sizes['19xlarge']
2740
+ };
2741
+ var colors = {
2742
+ title: theme.colors.onDefaultGlobalSurface,
2743
+ description: theme.colors.mutedOnDefaultGlobalSurface,
2744
+ fullScreenBackground: theme.colors.decorativePrimarySurface,
2745
+ inPageBackground: theme.colors.neutralGlobalSurface
2746
+ };
2747
+ var fontSizes = {
2748
+ title: theme.fontSizes.xxxlarge,
2749
+ description: theme.fontSizes.xlarge
2750
+ };
2751
+ var fonts = {
2752
+ title: theme.fonts.playful.semiBold,
2753
+ description: theme.fonts.playful.regular
2754
+ };
2755
+ return {
2756
+ fontSizes: fontSizes,
2757
+ colors: colors,
2758
+ sizes: sizes,
2759
+ space: space,
2760
+ fonts: fonts
2761
+ };
2762
+ };
2763
+
2726
2764
  var getSwipeableTheme = function getSwipeableTheme(theme) {
2727
2765
  var colors = {
2728
2766
  success: theme.colors.success,
@@ -2817,7 +2855,7 @@ var getTagTheme = function getTagTheme(theme) {
2817
2855
  "default": theme.borderWidths.base
2818
2856
  };
2819
2857
  var colors = {
2820
- primary: theme.colors.primary,
2858
+ primary: theme.colors.onDefaultGlobalSurface,
2821
2859
  primaryBackground: undefined,
2822
2860
  info: theme.colors.onInfoSurface,
2823
2861
  infoBackground: theme.colors.infoSurface,
@@ -2910,12 +2948,15 @@ var getTextInputTheme = function getTextInputTheme(theme) {
2910
2948
  containerMarginTop: theme.space.small,
2911
2949
  labelInsideTextInputMarginTop: -theme.space.xxsmall
2912
2950
  };
2951
+ var fonts = {
2952
+ text: theme.fonts.neutral.regular
2953
+ };
2913
2954
  var fontSizes = {
2914
- text: theme.fontSizes.medium,
2915
- labelInsideTextInput: theme.fontSizes.medium,
2955
+ text: theme.fontSizes.large,
2956
+ labelInsideTextInput: theme.fontSizes.large,
2916
2957
  error: theme.fontSizes.small,
2917
2958
  maxLength: theme.fontSizes.small,
2918
- asteriskLabel: theme.fontSizes.medium
2959
+ asteriskLabel: theme.fontSizes.large
2919
2960
  };
2920
2961
  var borderWidths = {
2921
2962
  container: {
@@ -2927,11 +2968,14 @@ var getTextInputTheme = function getTextInputTheme(theme) {
2927
2968
  container: theme.radii.medium
2928
2969
  };
2929
2970
  var sizes = {
2930
- errorAndHelpTextContainerHeight: theme.sizes.medium
2971
+ errorAndHelpTextContainerHeight: theme.sizes.medium,
2972
+ textareaHeight: theme.sizes['15xlarge'],
2973
+ textInputMaxHeight: theme.sizes['15xlarge']
2931
2974
  };
2932
2975
  return {
2933
2976
  colors: colors,
2934
2977
  space: space,
2978
+ fonts: fonts,
2935
2979
  fontSizes: fontSizes,
2936
2980
  borderWidths: borderWidths,
2937
2981
  radii: radii,
@@ -3106,6 +3150,7 @@ var getTheme$1 = function getTheme() {
3106
3150
  skeleton: getSkeletonTheme(globalTheme),
3107
3151
  slider: getSliderTheme(globalTheme),
3108
3152
  spinner: getSpinnerTheme(globalTheme),
3153
+ success: getSuccessTheme(globalTheme),
3109
3154
  swipeable: getSwipeableTheme(globalTheme),
3110
3155
  "switch": getSwitchTheme(globalTheme),
3111
3156
  tabs: getTabsTheme(globalTheme),
@@ -6030,7 +6075,7 @@ var useDeprecation = function useDeprecation(message) {
6030
6075
  React.useEffect(function () {
6031
6076
  // eslint-disable-next-line no-console
6032
6077
  if (cond) {
6033
- console.error(message);
6078
+ console.warn(message);
6034
6079
  }
6035
6080
  }, [message, cond]);
6036
6081
  };
@@ -6126,7 +6171,7 @@ var StyledText$3 = index$a(reactNative.Text)(function (_ref) {
6126
6171
  });
6127
6172
  });
6128
6173
 
6129
- var _excluded$s = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6174
+ var _excluded$t = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6130
6175
  var Text = function Text(_ref) {
6131
6176
  var children = _ref.children,
6132
6177
  _ref$fontSize = _ref.fontSize,
@@ -6139,7 +6184,7 @@ var Text = function Text(_ref) {
6139
6184
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6140
6185
  _ref$allowFontScaling = _ref.allowFontScaling,
6141
6186
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6142
- nativeProps = _objectWithoutProperties(_ref, _excluded$s);
6187
+ nativeProps = _objectWithoutProperties(_ref, _excluded$t);
6143
6188
  return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
6144
6189
  themeFontSize: fontSize,
6145
6190
  themeFontWeight: fontWeight,
@@ -6661,10 +6706,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
6661
6706
  };
6662
6707
  });
6663
6708
 
6664
- var _excluded$r = ["style"];
6709
+ var _excluded$s = ["style"];
6665
6710
  var AnimatedIcon = function AnimatedIcon(_ref) {
6666
6711
  var style = _ref.style,
6667
- otherProps = _objectWithoutProperties(_ref, _excluded$r);
6712
+ otherProps = _objectWithoutProperties(_ref, _excluded$s);
6668
6713
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
6669
6714
  React.useEffect(function () {
6670
6715
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
@@ -6770,7 +6815,7 @@ var AccordionItem = function AccordionItem(_ref) {
6770
6815
  }, content));
6771
6816
  };
6772
6817
 
6773
- var _excluded$q = ["key"];
6818
+ var _excluded$r = ["key"];
6774
6819
  var Accordion = function Accordion(_ref) {
6775
6820
  var items = _ref.items,
6776
6821
  activeItemKey = _ref.activeItemKey,
@@ -6791,7 +6836,7 @@ var Accordion = function Accordion(_ref) {
6791
6836
  testID: testID
6792
6837
  }, items.map(function (_ref2, index) {
6793
6838
  var key = _ref2.key,
6794
- props = _objectWithoutProperties(_ref2, _excluded$q);
6839
+ props = _objectWithoutProperties(_ref2, _excluded$r);
6795
6840
  var open = _activeItemKey === key;
6796
6841
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
6797
6842
  key: key
@@ -6886,6 +6931,7 @@ var Alert = function Alert(_ref2) {
6886
6931
  variant = _ref2$variant === void 0 ? 'rounded' : _ref2$variant,
6887
6932
  style = _ref2.style,
6888
6933
  testID = _ref2.testID;
6934
+ useDeprecation("Alert's notification intent is deprecated and will be removed in the next major release. Please use other intents instead.", intent === 'notification');
6889
6935
  return /*#__PURE__*/React__default["default"].createElement(Container$1, {
6890
6936
  themeVariant: variant,
6891
6937
  themeIntent: intent,
@@ -7188,7 +7234,7 @@ var StyledStatus = index$a(reactNative.Animated.View)(function (_ref3) {
7188
7234
  };
7189
7235
  });
7190
7236
 
7191
- var _excluded$p = ["children", "visible", "intent", "style", "testID"];
7237
+ var _excluded$q = ["children", "visible", "intent", "style", "testID"];
7192
7238
  var Status = function Status(_ref) {
7193
7239
  var children = _ref.children,
7194
7240
  _ref$visible = _ref.visible,
@@ -7197,7 +7243,7 @@ var Status = function Status(_ref) {
7197
7243
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7198
7244
  style = _ref.style,
7199
7245
  testID = _ref.testID,
7200
- nativeProps = _objectWithoutProperties(_ref, _excluded$p);
7246
+ nativeProps = _objectWithoutProperties(_ref, _excluded$q);
7201
7247
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7202
7248
  opacity = _React$useRef.current;
7203
7249
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7230,7 +7276,7 @@ var Status = function Status(_ref) {
7230
7276
  }));
7231
7277
  };
7232
7278
 
7233
- var _excluded$o = ["content", "visible", "max", "intent", "style", "testID"];
7279
+ var _excluded$p = ["content", "visible", "max", "intent", "style", "testID"];
7234
7280
  var DEFAULT_MAX_NUMBER = 99;
7235
7281
  var getPaddingState = function getPaddingState(content) {
7236
7282
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -7245,7 +7291,7 @@ var Badge = function Badge(_ref) {
7245
7291
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7246
7292
  style = _ref.style,
7247
7293
  testID = _ref.testID,
7248
- nativeProps = _objectWithoutProperties(_ref, _excluded$o);
7294
+ nativeProps = _objectWithoutProperties(_ref, _excluded$p);
7249
7295
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7250
7296
  opacity = _React$useRef.current;
7251
7297
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7349,7 +7395,7 @@ function omit(keys, obj) {
7349
7395
  return result;
7350
7396
  }
7351
7397
 
7352
- var _excluded$n = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7398
+ var _excluded$o = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7353
7399
  var getInactiveIcon = function getInactiveIcon(icon) {
7354
7400
  var inactiveIcon = "".concat(icon, "-outlined");
7355
7401
  return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
@@ -7360,7 +7406,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
7360
7406
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
7361
7407
  selectedTabKey = _ref.selectedTabKey,
7362
7408
  tabs = _ref.tabs,
7363
- nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7409
+ nativeProps = _objectWithoutProperties(_ref, _excluded$o);
7364
7410
  var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
7365
7411
  /**
7366
7412
  * List of loaded tabs, tabs will be loaded when navigated to.
@@ -7447,13 +7493,13 @@ var StyledDivider = index$a(reactNative.View)(function (_ref) {
7447
7493
  }, horizontalMargin), verticalMargin);
7448
7494
  });
7449
7495
 
7450
- var _excluded$m = ["marginHorizontal", "marginVertical", "style", "testID"];
7496
+ var _excluded$n = ["marginHorizontal", "marginVertical", "style", "testID"];
7451
7497
  var Divider = function Divider(_ref) {
7452
7498
  var marginHorizontal = _ref.marginHorizontal,
7453
7499
  marginVertical = _ref.marginVertical,
7454
7500
  style = _ref.style,
7455
7501
  testID = _ref.testID,
7456
- nativeProps = _objectWithoutProperties(_ref, _excluded$m);
7502
+ nativeProps = _objectWithoutProperties(_ref, _excluded$n);
7457
7503
  return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
7458
7504
  themeMarginHorizontal: marginHorizontal,
7459
7505
  themeMarginVertical: marginVertical,
@@ -7583,7 +7629,7 @@ var StyledLoadingDot = index$a(reactNative.View)(function (_ref2) {
7583
7629
  }, themeStyling());
7584
7630
  });
7585
7631
 
7586
- var _excluded$l = ["count", "size", "testID", "themeVariant"];
7632
+ var _excluded$m = ["count", "size", "testID", "themeVariant"];
7587
7633
  var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
7588
7634
  var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
7589
7635
  var renderDotComponent = function renderDotComponent(_ref) {
@@ -7615,7 +7661,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
7615
7661
  size = _ref2$size === void 0 ? 12 : _ref2$size,
7616
7662
  testID = _ref2.testID,
7617
7663
  themeVariant = _ref2.themeVariant,
7618
- nativeProps = _objectWithoutProperties(_ref2, _excluded$l);
7664
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$m);
7619
7665
  var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
7620
7666
  React.useEffect(function () {
7621
7667
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
@@ -8042,11 +8088,11 @@ var Header = function Header(_ref) {
8042
8088
  })) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
8043
8089
  };
8044
8090
 
8045
- var _excluded$k = ["scrollEventThrottle"];
8091
+ var _excluded$l = ["scrollEventThrottle"];
8046
8092
  var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
8047
8093
  var _ref$scrollEventThrot = _ref.scrollEventThrottle,
8048
8094
  scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
8049
- props = _objectWithoutProperties(_ref, _excluded$k);
8095
+ props = _objectWithoutProperties(_ref, _excluded$l);
8050
8096
  var _useContext = React.useContext(BottomSheetContext),
8051
8097
  setInternalShowDivider = _useContext.setInternalShowDivider;
8052
8098
  var onScrollBeginDrag = React.useCallback(function (e) {
@@ -8361,7 +8407,7 @@ var borderWidths = {
8361
8407
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8362
8408
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8363
8409
 
8364
- var _excluded$j = ["theme"];
8410
+ var _excluded$k = ["theme"];
8365
8411
  var getThemeValue = function getThemeValue(theme, key, props) {
8366
8412
  var propConfig = config[key];
8367
8413
  var propValue = props[key];
@@ -8388,18 +8434,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8388
8434
  var configKeys = Object.keys(config);
8389
8435
  var StyledBox = index$a(reactNative.View)(function (_ref5) {
8390
8436
  var theme = _ref5.theme,
8391
- otherProps = _objectWithoutProperties(_ref5, _excluded$j);
8437
+ otherProps = _objectWithoutProperties(_ref5, _excluded$k);
8392
8438
  var styleProps = pick(configKeys, otherProps);
8393
8439
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8394
8440
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8395
8441
  });
8396
8442
 
8397
- var _excluded$i = ["children", "style", "testID"];
8443
+ var _excluded$j = ["children", "style", "testID"];
8398
8444
  var Box = function Box(_ref) {
8399
8445
  var children = _ref.children,
8400
8446
  style = _ref.style,
8401
8447
  testID = _ref.testID,
8402
- otherProps = _objectWithoutProperties(_ref, _excluded$i);
8448
+ otherProps = _objectWithoutProperties(_ref, _excluded$j);
8403
8449
  return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
8404
8450
  style: style,
8405
8451
  testID: testID
@@ -10967,7 +11013,7 @@ var Calendar = function Calendar(_ref) {
10967
11013
  })));
10968
11014
  };
10969
11015
 
10970
- var _excluded$h = ["rounded", "size", "testID", "style"];
11016
+ var _excluded$i = ["rounded", "size", "testID", "style"];
10971
11017
  var Image = function Image(_ref) {
10972
11018
  var _ref$rounded = _ref.rounded,
10973
11019
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -10975,7 +11021,7 @@ var Image = function Image(_ref) {
10975
11021
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
10976
11022
  testID = _ref.testID,
10977
11023
  style = _ref.style,
10978
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$h);
11024
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$i);
10979
11025
  var theme = useTheme();
10980
11026
  var imageSize = theme.__hd__.image.sizes[size];
10981
11027
  return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
@@ -11179,12 +11225,12 @@ var Indicator = index$a(reactNative.View)(function (_ref2) {
11179
11225
  };
11180
11226
  });
11181
11227
 
11182
- var _excluded$g = ["intent", "children"];
11228
+ var _excluded$h = ["intent", "children"];
11183
11229
  var DataCard = function DataCard(_ref) {
11184
11230
  var _ref$intent = _ref.intent,
11185
11231
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11186
11232
  children = _ref.children,
11187
- nativeProps = _objectWithoutProperties(_ref, _excluded$g);
11233
+ nativeProps = _objectWithoutProperties(_ref, _excluded$h);
11188
11234
  return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
11189
11235
  themeIntent: intent,
11190
11236
  testID: "data-card-indicator"
@@ -11202,11 +11248,11 @@ var StyledCard$1 = index$a(reactNative.View)(function (_ref) {
11202
11248
  });
11203
11249
  });
11204
11250
 
11205
- var _excluded$f = ["intent", "children"];
11251
+ var _excluded$g = ["intent", "children"];
11206
11252
  var Card = function Card(_ref) {
11207
11253
  var intent = _ref.intent,
11208
11254
  children = _ref.children,
11209
- nativeProps = _objectWithoutProperties(_ref, _excluded$f);
11255
+ nativeProps = _objectWithoutProperties(_ref, _excluded$g);
11210
11256
  return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
11211
11257
  themeIntent: intent
11212
11258
  }), children);
@@ -11394,7 +11440,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11394
11440
  }));
11395
11441
  });
11396
11442
 
11397
- var _excluded$e = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
11443
+ var _excluded$f = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
11398
11444
  function useStateFromProp(initialValue) {
11399
11445
  var _useState = React.useState(initialValue),
11400
11446
  _useState2 = _slicedToArray(_useState, 2),
@@ -11419,7 +11465,7 @@ var Carousel = function Carousel(_ref) {
11419
11465
  shouldShowPagination = _ref$shouldShowPagina === void 0 ? noop : _ref$shouldShowPagina,
11420
11466
  _ref$pageControlPosit = _ref.pageControlPosition,
11421
11467
  pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
11422
- nativeProps = _objectWithoutProperties(_ref, _excluded$e);
11468
+ nativeProps = _objectWithoutProperties(_ref, _excluded$f);
11423
11469
  useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
11424
11470
  useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
11425
11471
  var carouselRef = React.useRef(null);
@@ -11605,47 +11651,48 @@ var StyledLabelContainer = index$a(reactNative.View)(function (_ref2) {
11605
11651
  });
11606
11652
  var StyledLabel = index$a(Typography.Text)(function (_ref3) {
11607
11653
  var theme = _ref3.theme,
11608
- themeVariant = _ref3.themeVariant;
11654
+ themeState = _ref3.themeState;
11609
11655
  return {
11610
- color: theme.__hd__.textInput.colors.labels[themeVariant]
11656
+ color: theme.__hd__.textInput.colors.labels[themeState]
11611
11657
  };
11612
11658
  });
11613
11659
  var StyledAsteriskLabel = index$a(Typography.Text)(function (_ref4) {
11614
11660
  var theme = _ref4.theme,
11615
- themeVariant = _ref4.themeVariant;
11661
+ themeState = _ref4.themeState;
11616
11662
  return {
11617
- color: theme.__hd__.textInput.colors.asterisks[themeVariant]
11663
+ color: theme.__hd__.textInput.colors.asterisks[themeState]
11618
11664
  };
11619
11665
  });
11620
- var StyledLabelContainerInsideTextInput = index$a(reactNative.View)(function () {
11666
+ var StyledLabelContainerInsideTextInput = index$a(reactNative.View)(function (_ref5) {
11667
+ var themeVariant = _ref5.themeVariant;
11621
11668
  return _objectSpread2({
11622
11669
  flexDirection: 'row',
11623
11670
  zIndex: 9999,
11624
- alignItems: 'center'
11671
+ alignItems: themeVariant === 'text' ? 'center' : 'flex-start'
11625
11672
  }, reactNative.StyleSheet.absoluteFillObject);
11626
11673
  });
11627
- var StyledLabelInsideTextInput = index$a(Typography.Text)(function (_ref5) {
11628
- var theme = _ref5.theme,
11629
- themeVariant = _ref5.themeVariant;
11674
+ var StyledLabelInsideTextInput = index$a(Typography.Text)(function (_ref6) {
11675
+ var theme = _ref6.theme,
11676
+ themeState = _ref6.themeState;
11630
11677
  return {
11631
11678
  textAlignVertical: 'center',
11632
11679
  alignContent: 'center',
11633
11680
  fontSize: theme.__hd__.textInput.fontSizes.labelInsideTextInput,
11634
11681
  alignItems: 'center',
11635
- color: theme.__hd__.textInput.colors.labelsInsideTextInput[themeVariant],
11682
+ color: theme.__hd__.textInput.colors.labelsInsideTextInput[themeState],
11636
11683
  marginTop: theme.__hd__.textInput.space.labelInsideTextInputMarginTop
11637
11684
  };
11638
11685
  });
11639
- var StyledAsteriskLabelInsideTextInput = index$a(Typography.Text)(function (_ref6) {
11640
- var theme = _ref6.theme,
11641
- themeVariant = _ref6.themeVariant;
11686
+ var StyledAsteriskLabelInsideTextInput = index$a(Typography.Text)(function (_ref7) {
11687
+ var theme = _ref7.theme,
11688
+ themeState = _ref7.themeState;
11642
11689
  return {
11643
- color: theme.__hd__.textInput.colors.asterisks[themeVariant],
11690
+ color: theme.__hd__.textInput.colors.asterisks[themeState],
11644
11691
  fontSize: theme.__hd__.textInput.fontSizes.asteriskLabel
11645
11692
  };
11646
11693
  });
11647
- var StyledErrorContainer$2 = index$a(reactNative.View)(function (_ref7) {
11648
- var theme = _ref7.theme;
11694
+ var StyledErrorContainer$2 = index$a(reactNative.View)(function (_ref8) {
11695
+ var theme = _ref8.theme;
11649
11696
  return {
11650
11697
  marginRight: theme.__hd__.textInput.space.errorContainerMarginRight,
11651
11698
  flexDirection: 'row',
@@ -11654,19 +11701,19 @@ var StyledErrorContainer$2 = index$a(reactNative.View)(function (_ref7) {
11654
11701
  flexGrow: 4
11655
11702
  };
11656
11703
  });
11657
- var StyledError = index$a(Typography.Text)(function (_ref8) {
11658
- var theme = _ref8.theme;
11704
+ var StyledError = index$a(Typography.Text)(function (_ref9) {
11705
+ var theme = _ref9.theme;
11659
11706
  return {
11660
11707
  color: theme.__hd__.textInput.colors.error,
11661
11708
  fontSize: theme.__hd__.textInput.fontSizes.error,
11662
11709
  marginLeft: theme.__hd__.textInput.space.errorMarginLeft
11663
11710
  };
11664
11711
  });
11665
- var StyledMaxLengthMessage = index$a(Typography.Text)(function (_ref9) {
11666
- var theme = _ref9.theme,
11667
- themeVariant = _ref9.themeVariant;
11712
+ var StyledMaxLengthMessage = index$a(Typography.Text)(function (_ref10) {
11713
+ var theme = _ref10.theme,
11714
+ themeState = _ref10.themeState;
11668
11715
  return {
11669
- color: theme.__hd__.textInput.colors.maxLengthLabels[themeVariant],
11716
+ color: theme.__hd__.textInput.colors.maxLengthLabels[themeState],
11670
11717
  fontSize: theme.__hd__.textInput.fontSizes.maxLength,
11671
11718
  marginRight: theme.__hd__.textInput.space.maxLengthLabelMarginLeft,
11672
11719
  alignSelf: 'flex-end',
@@ -11675,36 +11722,40 @@ var StyledMaxLengthMessage = index$a(Typography.Text)(function (_ref9) {
11675
11722
  textAlign: 'right'
11676
11723
  };
11677
11724
  });
11678
- var StyledHelperText = index$a(Typography.Text)(function (_ref10) {
11679
- var theme = _ref10.theme;
11725
+ var StyledHelperText = index$a(Typography.Text)(function (_ref11) {
11726
+ var theme = _ref11.theme;
11680
11727
  return {
11681
11728
  fontSize: theme.__hd__.textInput.fontSizes.error
11682
11729
  };
11683
11730
  });
11684
- var StyledTextInput = index$a(reactNative.TextInput)(function (_ref11) {
11685
- var theme = _ref11.theme;
11731
+ var StyledTextInput = index$a(reactNative.TextInput)(function (_ref12) {
11732
+ var theme = _ref12.theme,
11733
+ themeVariant = _ref12.themeVariant;
11686
11734
  return {
11687
- textAlignVertical: 'center',
11735
+ textAlignVertical: themeVariant === 'text' ? 'center' : 'top',
11688
11736
  fontSize: theme.__hd__.textInput.fontSizes.text,
11689
11737
  alignSelf: 'stretch',
11690
11738
  flexGrow: 2,
11691
11739
  marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
11692
- paddingVertical: 0
11740
+ paddingVertical: 0,
11741
+ maxHeight: theme.__hd__.textInput.sizes.textInputMaxHeight,
11742
+ height: themeVariant === 'text' ? undefined : theme.__hd__.textInput.sizes.textareaHeight,
11743
+ fontFamily: theme.__hd__.textInput.fonts.text
11693
11744
  };
11694
11745
  });
11695
- var StyledBorderBackDrop = index$a(reactNative.View)(function (_ref12) {
11746
+ var StyledBorderBackDrop = index$a(reactNative.View)(function (_ref13) {
11696
11747
  var _theme$__hd__$textInp;
11697
- var theme = _ref12.theme,
11698
- themeFocused = _ref12.themeFocused,
11699
- themeVariant = _ref12.themeVariant;
11748
+ var theme = _ref13.theme,
11749
+ themeFocused = _ref13.themeFocused,
11750
+ themeState = _ref13.themeState;
11700
11751
  return _objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
11701
11752
  borderWidth: themeFocused ? theme.__hd__.textInput.borderWidths.container.focused : theme.__hd__.textInput.borderWidths.container.normal,
11702
11753
  borderRadius: theme.__hd__.textInput.radii.container,
11703
- borderColor: (_theme$__hd__$textInp = theme.__hd__.textInput.colors.borders[themeVariant]) !== null && _theme$__hd__$textInp !== void 0 ? _theme$__hd__$textInp : theme.__hd__.textInput.colors.borders["default"]
11754
+ borderColor: (_theme$__hd__$textInp = theme.__hd__.textInput.colors.borders[themeState]) !== null && _theme$__hd__$textInp !== void 0 ? _theme$__hd__$textInp : theme.__hd__.textInput.colors.borders["default"]
11704
11755
  });
11705
11756
  });
11706
- var StyledTextInputContainer = index$a(reactNative.View)(function (_ref13) {
11707
- var theme = _ref13.theme;
11757
+ var StyledTextInputContainer = index$a(reactNative.View)(function (_ref14) {
11758
+ var theme = _ref14.theme;
11708
11759
  return {
11709
11760
  flexDirection: 'row',
11710
11761
  alignItems: 'center',
@@ -11722,8 +11773,8 @@ var StyledTextInputAndLabelContainer = index$a(reactNative.View)(function () {
11722
11773
  flexShrink: 1
11723
11774
  };
11724
11775
  });
11725
- var StyledErrorAndHelpTextContainer = index$a(reactNative.View)(function (_ref14) {
11726
- var theme = _ref14.theme;
11776
+ var StyledErrorAndHelpTextContainer = index$a(reactNative.View)(function (_ref15) {
11777
+ var theme = _ref15.theme;
11727
11778
  return {
11728
11779
  paddingLeft: theme.__hd__.textInput.space.errorAndHelpTextContainerPaddingLeft,
11729
11780
  minHeight: theme.__hd__.textInput.sizes.errorAndHelpTextContainerHeight
@@ -11736,8 +11787,8 @@ var StyledErrorAndMaxLengthContainer = index$a(reactNative.View)(function () {
11736
11787
  };
11737
11788
  });
11738
11789
 
11739
- var _excluded$d = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling"];
11740
- var getVariant$1 = function getVariant(_ref) {
11790
+ var _excluded$e = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
11791
+ var getState$1 = function getState(_ref) {
11741
11792
  var disabled = _ref.disabled,
11742
11793
  error = _ref.error,
11743
11794
  editable = _ref.editable,
@@ -11778,13 +11829,17 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11778
11829
  _ref2$loading = _ref2.loading,
11779
11830
  loading = _ref2$loading === void 0 ? false : _ref2$loading,
11780
11831
  maxLength = _ref2.maxLength,
11832
+ _ref2$hideCharacterCo = _ref2.hideCharacterCount,
11833
+ hideCharacterCount = _ref2$hideCharacterCo === void 0 ? false : _ref2$hideCharacterCo,
11781
11834
  helpText = _ref2.helpText,
11782
11835
  value = _ref2.value,
11783
11836
  defaultValue = _ref2.defaultValue,
11784
11837
  renderInputValue = _ref2.renderInputValue,
11785
11838
  _ref2$allowFontScalin = _ref2.allowFontScaling,
11786
11839
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
11787
- nativeProps = _objectWithoutProperties(_ref2, _excluded$d);
11840
+ _ref2$variant = _ref2.variant,
11841
+ variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
11842
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$e);
11788
11843
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
11789
11844
  var isEmptyValue = displayText.length === 0;
11790
11845
  var actualSuffix = loading ? 'loading' : suffix;
@@ -11792,7 +11847,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11792
11847
  _React$useState2 = _slicedToArray(_React$useState, 2),
11793
11848
  isFocused = _React$useState2[0],
11794
11849
  setIsFocused = _React$useState2[1];
11795
- var variant = getVariant$1({
11850
+ var state = getState$1({
11796
11851
  disabled: disabled,
11797
11852
  error: error,
11798
11853
  editable: editable,
@@ -11800,7 +11855,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11800
11855
  isFocused: isFocused,
11801
11856
  isEmptyValue: isEmptyValue
11802
11857
  });
11803
- var shouldShowMaxLength = maxLength !== undefined;
11858
+ var shouldShowMaxLength = maxLength !== undefined && !hideCharacterCount;
11804
11859
  var theme = useTheme();
11805
11860
  var innerTextInput = React__default["default"].useRef();
11806
11861
  React__default["default"].useImperativeHandle(ref, function () {
@@ -11868,7 +11923,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11868
11923
  }, textStyleWithoutBorderStyle]),
11869
11924
  testID: 'text-input',
11870
11925
  accessibilityState: {
11871
- disabled: variant === 'disabled' || variant === 'readonly'
11926
+ disabled: state === 'disabled' || state === 'readonly'
11872
11927
  },
11873
11928
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11874
11929
  // @ts-ignore
@@ -11897,11 +11952,11 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11897
11952
  });
11898
11953
  return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
11899
11954
  style: styleWithoutBackgroundColor,
11900
- pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
11955
+ pointerEvents: state === 'disabled' || state === 'readonly' ? 'none' : 'auto',
11901
11956
  testID: testID
11902
11957
  }, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
11903
11958
  themeFocused: isFocused,
11904
- themeVariant: variant,
11959
+ themeState: state,
11905
11960
  testID: "text-input-border",
11906
11961
  style: [{
11907
11962
  backgroundColor: backgroundColor
@@ -11913,36 +11968,39 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11913
11968
  backgroundColor: backgroundColor
11914
11969
  }
11915
11970
  }, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabel, {
11916
- themeVariant: variant,
11971
+ themeState: state,
11917
11972
  fontSize: "small"
11918
11973
  }, "*"), !!label && /*#__PURE__*/React__default["default"].createElement(StyledLabel, {
11919
11974
  nativeID: accessibilityLabelledBy,
11920
11975
  testID: "input-label",
11921
11976
  fontSize: "small",
11922
- themeVariant: variant,
11977
+ themeState: state,
11923
11978
  style: {
11924
11979
  backgroundColor: backgroundColor
11925
11980
  }
11926
11981
  }, label)), typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
11927
- intent: variant === 'disabled' ? 'disabled-text' : 'text',
11982
+ intent: state === 'disabled' ? 'disabled-text' : 'text',
11928
11983
  testID: "input-prefix",
11929
11984
  icon: prefix,
11930
11985
  size: "xsmall"
11931
11986
  }) : prefix, /*#__PURE__*/React__default["default"].createElement(StyledTextInputAndLabelContainer, null, !isFocused && isEmptyValue && /*#__PURE__*/React__default["default"].createElement(StyledLabelContainerInsideTextInput, {
11987
+ themeVariant: variant,
11932
11988
  pointerEvents: "none"
11933
11989
  }, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabelInsideTextInput, {
11934
- themeVariant: variant
11990
+ themeState: state
11935
11991
  }, "*"), !!label && /*#__PURE__*/React__default["default"].createElement(StyledLabelInsideTextInput, {
11936
11992
  nativeID: accessibilityLabelledBy,
11937
11993
  testID: "input-label",
11938
11994
  fontSize: "medium",
11939
- themeVariant: variant
11995
+ themeState: state
11940
11996
  }, label)), renderInputValue ? renderInputValue(nativeInputProps) : /*#__PURE__*/React__default["default"].createElement(StyledTextInput, _extends$1({}, nativeInputProps, {
11997
+ themeVariant: variant,
11998
+ multiline: variant === 'textarea' || nativeProps.multiline,
11941
11999
  ref: function ref(reference) {
11942
12000
  innerTextInput.current = reference;
11943
12001
  }
11944
12002
  }))), typeof actualSuffix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
11945
- intent: variant === 'disabled' ? 'disabled-text' : 'text',
12003
+ intent: state === 'disabled' ? 'disabled-text' : 'text',
11946
12004
  testID: "input-suffix",
11947
12005
  icon: actualSuffix,
11948
12006
  spin: actualSuffix === 'loading',
@@ -11955,7 +12013,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11955
12013
  }), /*#__PURE__*/React__default["default"].createElement(StyledError, {
11956
12014
  testID: "input-error-message"
11957
12015
  }, error)) : !!helpText && /*#__PURE__*/React__default["default"].createElement(StyledHelperText, null, helpText), shouldShowMaxLength && /*#__PURE__*/React__default["default"].createElement(StyledMaxLengthMessage, {
11958
- themeVariant: variant,
12016
+ themeState: state,
11959
12017
  fontSize: "small"
11960
12018
  }, displayText.length, "/", maxLength))));
11961
12019
  });
@@ -12209,11 +12267,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
12209
12267
  }))));
12210
12268
  };
12211
12269
 
12212
- var _excluded$c = ["variant"];
12270
+ var _excluded$d = ["variant"];
12213
12271
  var DatePicker = function DatePicker(_ref) {
12214
12272
  var _ref$variant = _ref.variant,
12215
12273
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
12216
- props = _objectWithoutProperties(_ref, _excluded$c);
12274
+ props = _objectWithoutProperties(_ref, _excluded$d);
12217
12275
  if (variant === 'calendar') {
12218
12276
  return /*#__PURE__*/React__default["default"].createElement(DatePickerCalendar, props);
12219
12277
  }
@@ -12652,9 +12710,9 @@ var StyledErrorDescription = index$a(Typography.Text)(function (_ref9) {
12652
12710
  };
12653
12711
  });
12654
12712
 
12655
- var _excluded$b = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
12713
+ var _excluded$c = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
12656
12714
  _excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
12657
- var renderImage = function renderImage(image) {
12715
+ var renderImage$1 = function renderImage(image) {
12658
12716
  if ( /*#__PURE__*/React.isValidElement(image)) {
12659
12717
  return /*#__PURE__*/React__default["default"].cloneElement(image, {
12660
12718
  testID: 'error-image'
@@ -12678,14 +12736,14 @@ var ErrorPage = function ErrorPage(_ref) {
12678
12736
  onCtaPress = _ref.onCtaPress,
12679
12737
  secondaryCtaText = _ref.secondaryCtaText,
12680
12738
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
12681
- nativeProps = _objectWithoutProperties(_ref, _excluded$b);
12739
+ nativeProps = _objectWithoutProperties(_ref, _excluded$c);
12682
12740
  var showCta = ctaText && onCtaPress !== undefined;
12683
12741
  var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
12684
12742
  var showButtonContainer = showCta || showSecondaryCta;
12685
12743
  return /*#__PURE__*/React__default["default"].createElement(StyledErrorContainer$1, _extends$1({
12686
12744
  testID: testID,
12687
12745
  themeVariant: variant
12688
- }, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
12746
+ }, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledErrorContent, null, image && /*#__PURE__*/React__default["default"].createElement(StyledErrorImageContainer, null, renderImage$1(image)), /*#__PURE__*/React__default["default"].createElement(StyledErrorTitle, null, title), description && /*#__PURE__*/React__default["default"].createElement(StyledErrorDescription, null, description)), showButtonContainer && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonContainer, null, showCta && /*#__PURE__*/React__default["default"].createElement(StyledErrorButtonPrimary, {
12689
12747
  variant: "filled",
12690
12748
  text: ctaText,
12691
12749
  onPress: onCtaPress
@@ -12832,11 +12890,11 @@ var StyledFABContainer = index$a(Box)(function (_ref4) {
12832
12890
  };
12833
12891
  });
12834
12892
 
12835
- var _excluded$a = ["active"];
12893
+ var _excluded$b = ["active"];
12836
12894
  var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
12837
12895
  var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
12838
12896
  var active = _ref.active,
12839
- iconProps = _objectWithoutProperties(_ref, _excluded$a);
12897
+ iconProps = _objectWithoutProperties(_ref, _excluded$b);
12840
12898
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
12841
12899
  React.useEffect(function () {
12842
12900
  var animation = reactNative.Animated.timing(rotateAnimation.current, {
@@ -13193,10 +13251,10 @@ var ListItem = function ListItem(_ref) {
13193
13251
  }, prefix && /*#__PURE__*/React__default["default"].createElement(StyledPrefixContainer$1, null, typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
13194
13252
  icon: prefix,
13195
13253
  intent: disabled ? 'disabled-text' : 'primary'
13196
- }) : prefix), /*#__PURE__*/React__default["default"].createElement(StyledTitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
13254
+ }) : prefix), /*#__PURE__*/React__default["default"].createElement(StyledTitleContainer$1, null, typeof title === 'string' ? /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
13197
13255
  intent: "body",
13198
13256
  fontSize: "large"
13199
- }, title), !!subtitle && /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
13257
+ }, title) : title, !!subtitle && /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
13200
13258
  intent: "subdued",
13201
13259
  fontSize: "small"
13202
13260
  }, subtitle)), suffix && /*#__PURE__*/React__default["default"].createElement(StyledSuffixContainer$1, null, typeof suffix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
@@ -13576,7 +13634,7 @@ var StyledStrokeEnd = index$a(reactNative.View)(function (_ref6) {
13576
13634
  };
13577
13635
  });
13578
13636
 
13579
- var _excluded$9 = ["value", "renderValue", "intent", "style", "testID"];
13637
+ var _excluded$a = ["value", "renderValue", "intent", "style", "testID"];
13580
13638
  var HalfCircle = function HalfCircle(_ref) {
13581
13639
  var type = _ref.type,
13582
13640
  themeIntent = _ref.themeIntent;
@@ -13597,7 +13655,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
13597
13655
  intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
13598
13656
  style = _ref2.style,
13599
13657
  testID = _ref2.testID,
13600
- nativeProps = _objectWithoutProperties(_ref2, _excluded$9);
13658
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$a);
13601
13659
  var theme = useTheme$1();
13602
13660
  var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
13603
13661
  var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
@@ -13714,14 +13772,14 @@ var StyledInner = index$a(reactNative.Animated.View)(function (_ref2) {
13714
13772
  };
13715
13773
  });
13716
13774
 
13717
- var _excluded$8 = ["value", "intent", "style", "testID"];
13775
+ var _excluded$9 = ["value", "intent", "style", "testID"];
13718
13776
  var ProgressBar = function ProgressBar(_ref) {
13719
13777
  var value = _ref.value,
13720
13778
  _ref$intent = _ref.intent,
13721
13779
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
13722
13780
  style = _ref.style,
13723
13781
  testID = _ref.testID,
13724
- nativeProps = _objectWithoutProperties(_ref, _excluded$8);
13782
+ nativeProps = _objectWithoutProperties(_ref, _excluded$9);
13725
13783
  var _useState = React.useState(0),
13726
13784
  _useState2 = _slicedToArray(_useState, 2),
13727
13785
  width = _useState2[0],
@@ -13912,14 +13970,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
13912
13970
  }, dotProps))));
13913
13971
  };
13914
13972
 
13915
- var _excluded$7 = ["testID", "size", "intent"];
13973
+ var _excluded$8 = ["testID", "size", "intent"];
13916
13974
  var Spinner = function Spinner(_ref) {
13917
13975
  var testID = _ref.testID,
13918
13976
  _ref$size = _ref.size,
13919
13977
  size = _ref$size === void 0 ? 'medium' : _ref$size,
13920
13978
  _ref$intent = _ref.intent,
13921
13979
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
13922
- nativeProps = _objectWithoutProperties(_ref, _excluded$7);
13980
+ nativeProps = _objectWithoutProperties(_ref, _excluded$8);
13923
13981
  return /*#__PURE__*/React__default["default"].createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default["default"].createElement(StyledSpinnerContainer, {
13924
13982
  testID: testID
13925
13983
  }, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, {
@@ -13952,7 +14010,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
13952
14010
  }, children);
13953
14011
  };
13954
14012
 
13955
- var _excluded$6 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
14013
+ var _excluded$7 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
13956
14014
  var renderActions = function renderActions(actions, width, progress, direction) {
13957
14015
  var trans = progress.interpolate({
13958
14016
  inputRange: [0, 1],
@@ -13977,7 +14035,7 @@ var Swipeable = function Swipeable(_ref) {
13977
14035
  leftActionsWidth = _ref.leftActionsWidth,
13978
14036
  rightActions = _ref.rightActions,
13979
14037
  rightActionsWidth = _ref.rightActionsWidth,
13980
- swipeableProps = _objectWithoutProperties(_ref, _excluded$6);
14038
+ swipeableProps = _objectWithoutProperties(_ref, _excluded$7);
13981
14039
  var _useWindowDimensions = reactNative.useWindowDimensions(),
13982
14040
  width = _useWindowDimensions.width;
13983
14041
  var swipeableRef = React.useRef(null);
@@ -14282,7 +14340,7 @@ var StyledSectionList = index$a(reactNative.SectionList)(function (_ref4) {
14282
14340
  };
14283
14341
  });
14284
14342
 
14285
- var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
14343
+ var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
14286
14344
  var BaseOptionList = function BaseOptionList(_ref) {
14287
14345
  var keyExtractor = _ref.keyExtractor,
14288
14346
  loading = _ref.loading,
@@ -14291,7 +14349,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
14291
14349
  sections = _ref.sections,
14292
14350
  renderItem = _ref.renderItem,
14293
14351
  sectionListRef = _ref.sectionListRef,
14294
- rest = _objectWithoutProperties(_ref, _excluded$5);
14352
+ rest = _objectWithoutProperties(_ref, _excluded$6);
14295
14353
  var theme = useTheme$1();
14296
14354
  var _useState = React.useState(false),
14297
14355
  _useState2 = _slicedToArray(_useState, 2),
@@ -14360,7 +14418,7 @@ var Option$2 = function Option(_ref) {
14360
14418
  return highlighted === true ? /*#__PURE__*/React__default["default"].createElement(List.Item, props) : /*#__PURE__*/React__default["default"].createElement(List.BasicItem, props);
14361
14419
  };
14362
14420
 
14363
- var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14421
+ var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14364
14422
  var OptionList$1 = function OptionList(_ref) {
14365
14423
  var keyExtractor = _ref.keyExtractor,
14366
14424
  loading = _ref.loading,
@@ -14371,7 +14429,7 @@ var OptionList$1 = function OptionList(_ref) {
14371
14429
  renderOption = _ref.renderOption,
14372
14430
  value = _ref.value,
14373
14431
  sectionListRef = _ref.sectionListRef,
14374
- rest = _objectWithoutProperties(_ref, _excluded$4);
14432
+ rest = _objectWithoutProperties(_ref, _excluded$5);
14375
14433
  var renderItem = function renderItem(info) {
14376
14434
  var item = info.item;
14377
14435
  var selected = value.includes(info.item.value);
@@ -14559,7 +14617,7 @@ var StyledOptionList = index$a(BaseOptionList)(function (_ref) {
14559
14617
  };
14560
14618
  });
14561
14619
 
14562
- var _excluded$3 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14620
+ var _excluded$4 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
14563
14621
  var OptionList = function OptionList(_ref) {
14564
14622
  var keyExtractor = _ref.keyExtractor,
14565
14623
  loading = _ref.loading,
@@ -14570,7 +14628,7 @@ var OptionList = function OptionList(_ref) {
14570
14628
  renderOption = _ref.renderOption,
14571
14629
  value = _ref.value,
14572
14630
  sectionListRef = _ref.sectionListRef,
14573
- rest = _objectWithoutProperties(_ref, _excluded$3);
14631
+ rest = _objectWithoutProperties(_ref, _excluded$4);
14574
14632
  var renderItem = function renderItem(info) {
14575
14633
  var item = info.item;
14576
14634
  var selected = item.value === value;
@@ -14735,7 +14793,7 @@ var StyledGradientContainer = index$a(Box)(function (_ref2) {
14735
14793
  };
14736
14794
  });
14737
14795
 
14738
- var _excluded$2 = ["intent", "variant", "style", "onLayout"];
14796
+ var _excluded$3 = ["intent", "variant", "style", "onLayout"];
14739
14797
  var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default["default"]);
14740
14798
  var gradientPositions = {
14741
14799
  start: {
@@ -14767,7 +14825,7 @@ var Skeleton = function Skeleton(_ref) {
14767
14825
  variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
14768
14826
  style = _ref.style,
14769
14827
  onLayout = _ref.onLayout,
14770
- props = _objectWithoutProperties(_ref, _excluded$2);
14828
+ props = _objectWithoutProperties(_ref, _excluded$3);
14771
14829
  var theme = useTheme();
14772
14830
  var colors = React.useMemo(function () {
14773
14831
  return getGradientColors(theme, intent);
@@ -14831,6 +14889,134 @@ var Skeleton = function Skeleton(_ref) {
14831
14889
  })));
14832
14890
  };
14833
14891
 
14892
+ var StyledSuccessContainer = index$a(reactNative.View)(function (_ref) {
14893
+ var theme = _ref.theme,
14894
+ themeVariant = _ref.themeVariant;
14895
+ return {
14896
+ display: 'flex',
14897
+ flex: 1,
14898
+ flexDirection: 'column',
14899
+ backgroundColor: themeVariant === 'in-page' ? theme.__hd__.success.colors.inPageBackground : theme.__hd__.success.colors.fullScreenBackground
14900
+ };
14901
+ });
14902
+ var StyledSuccessImage = index$a(Image)(function (_ref2) {
14903
+ var theme = _ref2.theme;
14904
+ return {
14905
+ marginBottom: theme.__hd__.success.space.imageMarginBottom,
14906
+ width: theme.__hd__.success.sizes.image,
14907
+ height: theme.__hd__.success.sizes.image,
14908
+ resizeMode: 'contain'
14909
+ };
14910
+ });
14911
+ var StyledSuccessContent = index$a(reactNative.View)(function (_ref3) {
14912
+ var theme = _ref3.theme;
14913
+ return {
14914
+ display: 'flex',
14915
+ flex: 1,
14916
+ flexDirection: 'column',
14917
+ justifyContent: 'center',
14918
+ alignItems: 'center',
14919
+ padding: theme.__hd__.success.space.wrapperPadding
14920
+ };
14921
+ });
14922
+ var StyledSuccessImageContainer = index$a(reactNative.View)(function (_ref4) {
14923
+ var theme = _ref4.theme;
14924
+ return {
14925
+ marginBottom: theme.__hd__.success.space.imageMarginBottom,
14926
+ width: theme.__hd__.success.sizes.image,
14927
+ height: theme.__hd__.success.sizes.image
14928
+ };
14929
+ });
14930
+ var StyledSuccessTitle = index$a(Typography.Text)(function (_ref5) {
14931
+ var theme = _ref5.theme;
14932
+ return {
14933
+ fontFamily: theme.__hd__.success.fonts.title,
14934
+ fontSize: theme.__hd__.success.fontSizes.title,
14935
+ textAlign: 'center',
14936
+ marginBottom: theme.__hd__.success.space.titleMarginBottom,
14937
+ color: theme.__hd__.success.colors.title
14938
+ };
14939
+ });
14940
+ var StyledSuccessDescription = index$a(Typography.Text)(function (_ref6) {
14941
+ var theme = _ref6.theme;
14942
+ return {
14943
+ fontFamily: theme.__hd__.success.fonts.description,
14944
+ fontSize: theme.__hd__.success.fontSizes.description,
14945
+ textAlign: 'center',
14946
+ color: theme.__hd__.success.colors.description
14947
+ };
14948
+ });
14949
+ var StyledSuccessButtonContainer = index$a(reactNative.View)(function (_ref7) {
14950
+ var theme = _ref7.theme;
14951
+ return {
14952
+ display: 'flex',
14953
+ flexDirection: 'column',
14954
+ justifyContent: 'center',
14955
+ alignItems: 'center',
14956
+ paddingHorizontal: theme.__hd__.success.space.button.wrapperHorizontalPadding,
14957
+ paddingVertical: theme.__hd__.success.space.button.wrapperVerticalPadding
14958
+ };
14959
+ });
14960
+ var StyledSuccessButtonPrimary = index$a(CompoundButton)(function (_ref8) {
14961
+ var theme = _ref8.theme;
14962
+ return {
14963
+ padding: theme.__hd__.success.space.button.padding
14964
+ };
14965
+ });
14966
+ var StyledSuccessModal = index$a(reactNative.Modal)({
14967
+ height: '100%',
14968
+ width: '100%'
14969
+ });
14970
+
14971
+ var _excluded$2 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress"];
14972
+ var renderImage = function renderImage(image) {
14973
+ if ( /*#__PURE__*/React.isValidElement(image)) {
14974
+ return /*#__PURE__*/React__default["default"].cloneElement(image, {
14975
+ testID: 'success-image'
14976
+ });
14977
+ }
14978
+ return /*#__PURE__*/React__default["default"].createElement(StyledSuccessImage, {
14979
+ source: typeof image === 'string' ? {
14980
+ uri: image
14981
+ } : image,
14982
+ testID: "success-image"
14983
+ });
14984
+ };
14985
+ var SuccessPage = function SuccessPage(_ref) {
14986
+ var _ref$variant = _ref.variant,
14987
+ variant = _ref$variant === void 0 ? 'in-page' : _ref$variant,
14988
+ title = _ref.title,
14989
+ description = _ref.description,
14990
+ image = _ref.image,
14991
+ testID = _ref.testID,
14992
+ ctaText = _ref.ctaText,
14993
+ _ref$onCtaPress = _ref.onCtaPress,
14994
+ onCtaPress = _ref$onCtaPress === void 0 ? noop$1 : _ref$onCtaPress,
14995
+ nativeProps = _objectWithoutProperties(_ref, _excluded$2);
14996
+ return /*#__PURE__*/React__default["default"].createElement(StyledSuccessContainer, _extends$1({
14997
+ testID: testID,
14998
+ themeVariant: variant
14999
+ }, nativeProps), /*#__PURE__*/React__default["default"].createElement(StyledSuccessContent, null, !!image && /*#__PURE__*/React__default["default"].createElement(StyledSuccessImageContainer, null, renderImage(image)), /*#__PURE__*/React__default["default"].createElement(StyledSuccessTitle, null, title), !!description && /*#__PURE__*/React__default["default"].createElement(StyledSuccessDescription, null, description)), !!ctaText && /*#__PURE__*/React__default["default"].createElement(StyledSuccessButtonContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledSuccessButtonPrimary, {
15000
+ text: ctaText,
15001
+ onPress: onCtaPress
15002
+ })));
15003
+ };
15004
+ /**
15005
+ * Renders success page
15006
+ *
15007
+ * @param {SuccessProps} props
15008
+ * @return {*} {ReactElement}
15009
+ */
15010
+ var Success = function Success(props) {
15011
+ var variant = props.variant;
15012
+ if (variant === 'full-screen') {
15013
+ return /*#__PURE__*/React__default["default"].createElement(StyledSuccessModal, {
15014
+ animationType: "slide"
15015
+ }, /*#__PURE__*/React__default["default"].createElement(SuccessPage, props));
15016
+ }
15017
+ return /*#__PURE__*/React__default["default"].createElement(SuccessPage, props);
15018
+ };
15019
+
14834
15020
  var StyledWrapper$1 = index$a(reactNative.View)(function (_ref) {
14835
15021
  var theme = _ref.theme;
14836
15022
  return {
@@ -15179,48 +15365,35 @@ var getTabItem$1 = function getTabItem(_ref) {
15179
15365
  color: color
15180
15366
  });
15181
15367
  };
15182
- var ScrollableTab = function ScrollableTab(_ref2) {
15368
+ var ScrollableTabHeader = function ScrollableTabHeader(_ref2) {
15183
15369
  var onTabPress = _ref2.onTabPress,
15184
- selectedTabKey = _ref2.selectedTabKey,
15370
+ selectedIndex = _ref2.selectedIndex,
15185
15371
  tabs = _ref2.tabs,
15186
- containerStyle = _ref2.containerStyle,
15187
15372
  barStyle = _ref2.barStyle,
15188
- _ref2$lazy = _ref2.lazy,
15189
- lazy = _ref2$lazy === void 0 ? false : _ref2$lazy,
15190
- _ref2$lazyPreloadDist = _ref2.lazyPreloadDistance,
15191
- lazyPreloadDistance = _ref2$lazyPreloadDist === void 0 ? 1 : _ref2$lazyPreloadDist,
15192
- _ref2$swipeEnabled = _ref2.swipeEnabled,
15193
- swipeEnabled = _ref2$swipeEnabled === void 0 ? true : _ref2$swipeEnabled,
15194
- componentTestID = _ref2.testID;
15373
+ testID = _ref2.testID,
15374
+ _ref2$insets = _ref2.insets,
15375
+ insets = _ref2$insets === void 0 ? {
15376
+ top: 0,
15377
+ bottom: 0,
15378
+ right: 0,
15379
+ left: 0
15380
+ } : _ref2$insets;
15195
15381
  var flatListRef = React__default["default"].useRef(null);
15196
- var pagerViewRef = React__default["default"].useRef(null);
15197
- var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
15198
15382
  var theme = useTheme$1();
15199
- var selectedTabIndex = tabs.findIndex(function (item) {
15200
- return item.key === selectedTabKey;
15201
- });
15202
15383
  var tabsAnims = useAnimatedValueArray(tabs.map(function (_, i) {
15203
- return i === selectedTabIndex ? 1 : 0;
15384
+ return i === selectedIndex ? 1 : 0;
15204
15385
  }));
15205
15386
  React__default["default"].useEffect(function () {
15206
- var timeoutHandle = null;
15207
- if (selectedTabIndex !== -1) {
15387
+ if (selectedIndex !== undefined && selectedIndex !== -1) {
15208
15388
  var _flatListRef$current;
15209
15389
  (_flatListRef$current = flatListRef.current) === null || _flatListRef$current === void 0 ? void 0 : _flatListRef$current.scrollToIndex({
15210
- index: selectedTabIndex,
15390
+ index: selectedIndex,
15211
15391
  viewPosition: 0.5
15212
15392
  });
15213
- // If the selected tab is changed too quickly, the setPage is crashed and not work anymore
15214
- // We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
15215
- timeoutHandle = setTimeout(function () {
15216
- var _pagerViewRef$current;
15217
- // use no animation to prevent unexpected behavior if users select tab too quickly
15218
- (_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
15219
- }, 200);
15220
15393
  }
15221
15394
  var animation = reactNative.Animated.parallel(_toConsumableArray(tabs.map(function (_, i) {
15222
15395
  return reactNative.Animated.timing(tabsAnims[i], {
15223
- toValue: i === selectedTabIndex ? 1 : 0,
15396
+ toValue: i === selectedIndex ? 1 : 0,
15224
15397
  duration: 150,
15225
15398
  useNativeDriver: true
15226
15399
  });
@@ -15228,19 +15401,13 @@ var ScrollableTab = function ScrollableTab(_ref2) {
15228
15401
  animation.start();
15229
15402
  return function () {
15230
15403
  animation.stop();
15231
- if (timeoutHandle) {
15232
- clearTimeout(timeoutHandle);
15233
- }
15234
15404
  };
15235
- }, [selectedTabIndex, pagerViewRef]);
15236
- return /*#__PURE__*/React__default["default"].createElement(TabContainer, {
15237
- style: containerStyle,
15238
- testID: componentTestID
15239
- }, /*#__PURE__*/React__default["default"].createElement(HeaderTabWrapper, {
15405
+ }, [selectedIndex]);
15406
+ return /*#__PURE__*/React__default["default"].createElement(HeaderTabWrapper, {
15240
15407
  themeInsets: insets,
15241
15408
  style: barStyle
15242
15409
  }, /*#__PURE__*/React__default["default"].createElement(reactNative.FlatList, {
15243
- testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined,
15410
+ testID: testID,
15244
15411
  ref: flatListRef,
15245
15412
  horizontal: true,
15246
15413
  data: tabs,
@@ -15265,11 +15432,11 @@ var ScrollableTab = function ScrollableTab(_ref2) {
15265
15432
  var tab = _ref4.item,
15266
15433
  index = _ref4.index;
15267
15434
  var key = tab.key,
15268
- testID = tab.testID,
15435
+ tabItemTestID = tab.testID,
15269
15436
  activeItem = tab.activeItem,
15270
15437
  originalInactiveItem = tab.inactiveItem,
15271
15438
  badge = tab.badge;
15272
- var active = selectedTabKey === key;
15439
+ var active = selectedIndex === index;
15273
15440
  var activeAnimated = tabsAnims[index];
15274
15441
  var outlineScale = active ? activeAnimated.interpolate({
15275
15442
  inputRange: [0, 1],
@@ -15286,7 +15453,7 @@ var ScrollableTab = function ScrollableTab(_ref2) {
15286
15453
  onPress: function onPress() {
15287
15454
  onTabPress(key);
15288
15455
  },
15289
- testID: testID
15456
+ testID: tabItemTestID
15290
15457
  }, /*#__PURE__*/React__default["default"].createElement(HeaderTabItem, {
15291
15458
  isFirstItem: index === 0
15292
15459
  }, /*#__PURE__*/React__default["default"].createElement(HeaderTabItemOutlineWrapper, null, /*#__PURE__*/React__default["default"].createElement(HeaderTabItemOutline, {
@@ -15302,7 +15469,55 @@ var ScrollableTab = function ScrollableTab(_ref2) {
15302
15469
  tabItem: tabItem
15303
15470
  }))));
15304
15471
  }
15305
- })), /*#__PURE__*/React__default["default"].createElement(ContentWrapper, {
15472
+ }));
15473
+ };
15474
+
15475
+ var ScrollableTab$1 = function ScrollableTab(_ref) {
15476
+ var onTabPress = _ref.onTabPress,
15477
+ selectedTabKey = _ref.selectedTabKey,
15478
+ tabs = _ref.tabs,
15479
+ containerStyle = _ref.containerStyle,
15480
+ barStyle = _ref.barStyle,
15481
+ _ref$lazy = _ref.lazy,
15482
+ lazy = _ref$lazy === void 0 ? false : _ref$lazy,
15483
+ _ref$lazyPreloadDista = _ref.lazyPreloadDistance,
15484
+ lazyPreloadDistance = _ref$lazyPreloadDista === void 0 ? 1 : _ref$lazyPreloadDista,
15485
+ _ref$swipeEnabled = _ref.swipeEnabled,
15486
+ swipeEnabled = _ref$swipeEnabled === void 0 ? true : _ref$swipeEnabled,
15487
+ componentTestID = _ref.testID;
15488
+ var pagerViewRef = React__default["default"].useRef(null);
15489
+ var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
15490
+ var selectedTabIndex = tabs.findIndex(function (item) {
15491
+ return item.key === selectedTabKey;
15492
+ });
15493
+ React__default["default"].useEffect(function () {
15494
+ var timeoutHandle = null;
15495
+ if (selectedTabIndex !== -1) {
15496
+ // If the selected tab is changed too quickly, the setPage is crashed and not work anymore
15497
+ // We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
15498
+ timeoutHandle = setTimeout(function () {
15499
+ var _pagerViewRef$current;
15500
+ // use no animation to prevent unexpected behavior if users select tab too quickly
15501
+ (_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
15502
+ }, 200);
15503
+ }
15504
+ return function () {
15505
+ if (timeoutHandle) {
15506
+ clearTimeout(timeoutHandle);
15507
+ }
15508
+ };
15509
+ }, [selectedTabIndex, pagerViewRef]);
15510
+ return /*#__PURE__*/React__default["default"].createElement(TabContainer, {
15511
+ style: containerStyle,
15512
+ testID: componentTestID
15513
+ }, /*#__PURE__*/React__default["default"].createElement(ScrollableTabHeader, {
15514
+ tabs: tabs,
15515
+ selectedIndex: selectedTabIndex,
15516
+ onTabPress: onTabPress,
15517
+ barStyle: barStyle,
15518
+ insets: insets,
15519
+ testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined
15520
+ }), /*#__PURE__*/React__default["default"].createElement(ContentWrapper, {
15306
15521
  initialPage: selectedTabIndex,
15307
15522
  ref: pagerViewRef,
15308
15523
  onPageSelected: function onPageSelected(e) {
@@ -15330,6 +15545,151 @@ var ScrollableTab = function ScrollableTab(_ref2) {
15330
15545
  })));
15331
15546
  };
15332
15547
 
15548
+ var SceneView = function SceneView(_ref) {
15549
+ var _ref$lazy = _ref.lazy,
15550
+ lazy = _ref$lazy === void 0 ? false : _ref$lazy,
15551
+ _ref$lazyPreloadDista = _ref.lazyPreloadDistance,
15552
+ lazyPreloadDistance = _ref$lazyPreloadDista === void 0 ? 1 : _ref$lazyPreloadDista,
15553
+ children = _ref.children,
15554
+ index = _ref.index,
15555
+ selectedIndex = _ref.selectedIndex,
15556
+ focused = _ref.focused,
15557
+ testID = _ref.testID;
15558
+ var _React$useState = React__default["default"].useState(Math.abs(selectedIndex - index) > lazyPreloadDistance),
15559
+ _React$useState2 = _slicedToArray(_React$useState, 2),
15560
+ isLoading = _React$useState2[0],
15561
+ setIsLoading = _React$useState2[1];
15562
+ if (isLoading && Math.abs(selectedIndex - index) <= lazyPreloadDistance) {
15563
+ // Always render the route when it becomes focused
15564
+ setIsLoading(false);
15565
+ }
15566
+ if (lazy && isLoading) {
15567
+ console.error('Lazy loading is not supported in this version of Tabs');
15568
+ }
15569
+ React__default["default"].useEffect(function () {
15570
+ var timer;
15571
+ if (!lazy && isLoading) {
15572
+ // If lazy mode is not enabled, render the scene with a delay if not loaded already
15573
+ // This improves the initial startup time as the scene is no longer blocking
15574
+ timer = setTimeout(function () {
15575
+ return setIsLoading(false);
15576
+ }, 0);
15577
+ }
15578
+ return function () {
15579
+ clearTimeout(timer);
15580
+ };
15581
+ }, [index, isLoading, lazy, focused]);
15582
+ return /*#__PURE__*/React__default["default"].createElement(TabScreen, {
15583
+ accessibilityElementsHidden: !focused,
15584
+ importantForAccessibility: focused ? 'auto' : 'no-hide-descendants',
15585
+ style: [{
15586
+ flex: 1,
15587
+ overflow: 'hidden'
15588
+ }, focused ? reactNative.StyleSheet.absoluteFill : null],
15589
+ testID: testID
15590
+ }, focused || !isLoading ? children : null);
15591
+ };
15592
+
15593
+ var TabContext = /*#__PURE__*/React__default["default"].createContext(null);
15594
+ var ScreenContext = /*#__PURE__*/React__default["default"].createContext(null);
15595
+ var useIsFocused = function useIsFocused() {
15596
+ var context = React__default["default"].useContext(TabContext);
15597
+ var key = React__default["default"].useContext(ScreenContext);
15598
+ if (!context || !key) {
15599
+ return;
15600
+ }
15601
+ var isFocused = context.selectedTabKey === key;
15602
+ return isFocused;
15603
+ };
15604
+ var ScrollableTab = function ScrollableTab(_ref) {
15605
+ var onTabPress = _ref.onTabPress,
15606
+ selectedTabKey = _ref.selectedTabKey,
15607
+ tabs = _ref.tabs,
15608
+ containerStyle = _ref.containerStyle,
15609
+ barStyle = _ref.barStyle,
15610
+ _ref$lazy = _ref.lazy,
15611
+ lazy = _ref$lazy === void 0 ? false : _ref$lazy,
15612
+ _ref$lazyPreloadDista = _ref.lazyPreloadDistance,
15613
+ lazyPreloadDistance = _ref$lazyPreloadDista === void 0 ? 1 : _ref$lazyPreloadDista,
15614
+ _ref$swipeEnabled = _ref.swipeEnabled,
15615
+ swipeEnabled = _ref$swipeEnabled === void 0 ? true : _ref$swipeEnabled,
15616
+ componentTestID = _ref.testID;
15617
+ var pagerViewRef = React__default["default"].useRef(null);
15618
+ var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
15619
+ var selectedTabIndex = tabs.findIndex(function (item) {
15620
+ return item.key === selectedTabKey;
15621
+ });
15622
+ React__default["default"].useEffect(function () {
15623
+ var timeoutHandle = null;
15624
+ if (selectedTabIndex !== -1) {
15625
+ // If the selected tab is changed too quickly, the setPage is crashed and not work anymore
15626
+ // We apply throttle to prevent this issue https://github.com/Thinkei/hero-design/issues/1715
15627
+ timeoutHandle = setTimeout(function () {
15628
+ var _pagerViewRef$current;
15629
+ // use no animation to prevent unexpected behavior if users select tab too quickly
15630
+ (_pagerViewRef$current = pagerViewRef.current) === null || _pagerViewRef$current === void 0 ? void 0 : _pagerViewRef$current.setPageWithoutAnimation(selectedTabIndex);
15631
+ }, 200);
15632
+ }
15633
+ return function () {
15634
+ if (timeoutHandle) {
15635
+ clearTimeout(timeoutHandle);
15636
+ }
15637
+ };
15638
+ }, [selectedTabIndex, pagerViewRef]);
15639
+ var indexRef = React__default["default"].useRef(selectedTabIndex);
15640
+ var tabContextProviderValue = React__default["default"].useMemo(function () {
15641
+ return {
15642
+ selectedTabKey: selectedTabKey
15643
+ };
15644
+ }, [selectedTabKey]);
15645
+ return /*#__PURE__*/React__default["default"].createElement(TabContext.Provider, {
15646
+ value: tabContextProviderValue
15647
+ }, /*#__PURE__*/React__default["default"].createElement(TabContainer, {
15648
+ style: containerStyle,
15649
+ testID: componentTestID
15650
+ }, /*#__PURE__*/React__default["default"].createElement(ScrollableTabHeader, {
15651
+ tabs: tabs,
15652
+ selectedIndex: selectedTabIndex,
15653
+ onTabPress: onTabPress,
15654
+ barStyle: barStyle,
15655
+ insets: insets,
15656
+ testID: componentTestID ? "".concat(componentTestID, "-tab-bar") : undefined
15657
+ }), /*#__PURE__*/React__default["default"].createElement(ContentWrapper, {
15658
+ initialPage: selectedTabIndex,
15659
+ ref: pagerViewRef,
15660
+ onPageSelected: function onPageSelected(e) {
15661
+ var index = e.nativeEvent.position;
15662
+ var selectedItem = tabs[index];
15663
+ if (selectedItem) {
15664
+ setTimeout(function () {
15665
+ onTabPress(selectedItem.key);
15666
+ });
15667
+ }
15668
+ indexRef.current = index;
15669
+ },
15670
+ scrollEnabled: swipeEnabled
15671
+ }, tabs.map(function (tab, index) {
15672
+ var key = tab.key,
15673
+ component = tab.component,
15674
+ testID = tab.testID;
15675
+ return /*#__PURE__*/React__default["default"].createElement(ScreenContext.Provider, {
15676
+ value: key
15677
+ }, /*#__PURE__*/React__default["default"].createElement(SceneView, {
15678
+ testID: testID,
15679
+ key: key,
15680
+ index: index,
15681
+ selectedIndex: indexRef.current,
15682
+ lazy: lazy,
15683
+ lazyPreloadDistance: lazyPreloadDistance,
15684
+ focused: selectedTabKey === key
15685
+ }, component));
15686
+ }))));
15687
+ };
15688
+
15689
+ var ScrollableTabsV2 = Object.assign(ScrollableTab, {
15690
+ useIsFocused: useIsFocused
15691
+ });
15692
+
15333
15693
  var getTabItem = function getTabItem(_ref) {
15334
15694
  var item = _ref.item,
15335
15695
  color = _ref.color,
@@ -15456,12 +15816,13 @@ var Tabs = function Tabs(_ref2) {
15456
15816
  })));
15457
15817
  };
15458
15818
  var index$2 = Object.assign(Tabs, {
15459
- Scroll: ScrollableTab
15819
+ Scroll: ScrollableTab$1,
15820
+ ScrollV2: ScrollableTabsV2
15460
15821
  });
15461
15822
 
15462
15823
  var getFilledStyles = function getFilledStyles(themeIntent, theme) {
15463
15824
  return {
15464
- textColor: theme.__hd__.tag.colors.text,
15825
+ textColor: theme.__hd__.tag.colors[themeIntent],
15465
15826
  borderColor: theme.__hd__.tag.colors["".concat(themeIntent, "Background")],
15466
15827
  backgroundColor: theme.__hd__.tag.colors["".concat(themeIntent, "Background")]
15467
15828
  };
@@ -32311,7 +32672,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
32311
32672
  var isEmptyValue = React.useMemo(function () {
32312
32673
  return lib.exports.isEmptyContent(value);
32313
32674
  }, [value]);
32314
- var variant = React.useMemo(function () {
32675
+ var state = React.useMemo(function () {
32315
32676
  if (error) {
32316
32677
  return 'error';
32317
32678
  }
@@ -32419,25 +32780,26 @@ var RichTextEditor = function RichTextEditor(_ref) {
32419
32780
  return /*#__PURE__*/React__default["default"].createElement(StyledContainer$4, {
32420
32781
  testID: testID
32421
32782
  }, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
32422
- themeVariant: variant,
32783
+ themeState: state,
32423
32784
  themeFocused: isFocused
32424
32785
  }), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React__default["default"].createElement(StyledLabelContainer, {
32425
32786
  pointerEvents: "none"
32426
32787
  }, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabel, {
32427
- themeVariant: variant,
32788
+ themeState: state,
32428
32789
  fontSize: "small"
32429
32790
  }, "*"), !!label && /*#__PURE__*/React__default["default"].createElement(StyledLabel, {
32430
32791
  testID: "input-label",
32431
32792
  fontSize: "small",
32432
- themeVariant: variant
32793
+ themeState: state
32433
32794
  }, label)), /*#__PURE__*/React__default["default"].createElement(StyledTextInputAndLabelContainer, null, !isFocused && isEmptyValue && /*#__PURE__*/React__default["default"].createElement(StyledLabelContainerInsideTextInput, {
32795
+ themeVariant: "text",
32434
32796
  pointerEvents: "none"
32435
32797
  }, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabelInsideTextInput, {
32436
- themeVariant: variant
32798
+ themeState: state
32437
32799
  }, "*"), !!label && /*#__PURE__*/React__default["default"].createElement(StyledLabelInsideTextInput, {
32438
32800
  testID: "input-label",
32439
32801
  fontSize: "medium",
32440
- themeVariant: variant
32802
+ themeState: state
32441
32803
  }, label)), /*#__PURE__*/React__default["default"].createElement(reactNative.TouchableWithoutFeedback, {
32442
32804
  onPress: function onPress(e) {
32443
32805
  return e.stopPropagation();
@@ -32510,6 +32872,7 @@ exports.Select = index$4;
32510
32872
  exports.Skeleton = Skeleton;
32511
32873
  exports.Slider = Slider;
32512
32874
  exports.Spinner = Spinner;
32875
+ exports.Success = Success;
32513
32876
  exports.Swipeable = index$5;
32514
32877
  exports.Switch = index$3;
32515
32878
  exports.Tabs = index$2;