@hero-design/rn 8.52.0 → 8.52.2-rc2.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 (182) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +26 -0
  3. package/es/index.js +399 -709
  4. package/lib/index.js +397 -708
  5. package/package.json +7 -7
  6. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +0 -4
  7. package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +0 -2
  8. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  9. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
  10. package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  11. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +0 -2
  12. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  13. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +0 -3
  14. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  15. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +0 -6
  16. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +0 -2
  17. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +32 -21
  18. package/src/components/BottomSheet/index.tsx +1 -1
  19. package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +0 -21
  20. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +0 -10
  21. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +0 -10
  22. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  23. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -16
  24. package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -1
  25. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -32
  26. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +0 -5
  27. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +0 -7
  28. package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +0 -5
  29. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -1
  30. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  31. package/src/components/Carousel/CardCarousel.tsx +1 -5
  32. package/src/components/Carousel/StyledCardCarousel.tsx +1 -16
  33. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +92 -174
  34. package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +0 -4
  35. package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +0 -1
  36. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1 -803
  37. package/src/components/Carousel/__tests__/index.spec.tsx +37 -47
  38. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +0 -8
  39. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  40. package/src/components/Checkbox/index.tsx +1 -13
  41. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +0 -12
  42. package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +0 -2
  43. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  44. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -1
  45. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  46. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +0 -15
  47. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +0 -1
  48. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +0 -1
  49. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +309 -329
  50. package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +0 -12
  51. package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  52. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  53. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  54. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  55. package/src/components/Error/index.tsx +3 -20
  56. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  57. package/src/components/FAB/ActionGroup/index.tsx +1 -14
  58. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +0 -2
  59. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +0 -3
  60. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  61. package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  62. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  63. package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  64. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +0 -2
  65. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +0 -4
  66. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +0 -4
  67. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +0 -9
  68. package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  69. package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  70. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +0 -5
  71. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  72. package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  73. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +0 -5
  74. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -2
  75. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1
  76. package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  77. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  78. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -1
  79. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -1
  80. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +0 -2
  81. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +0 -4
  82. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
  83. package/src/components/SectionHeading/__tests__/index.spec.tsx +0 -1
  84. package/src/components/SectionHeading/index.tsx +32 -57
  85. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
  86. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
  87. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +128 -42
  88. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
  89. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
  90. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +96 -35
  91. package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
  92. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  93. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +0 -1
  94. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +0 -24
  95. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  96. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
  97. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +0 -3
  98. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  99. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +0 -4
  100. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
  101. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +0 -5
  102. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
  103. package/src/components/Tabs/__tests__/SceneView.spec.tsx +1 -1
  104. package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +0 -4
  105. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +0 -3
  106. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +0 -1
  107. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +0 -2
  108. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
  109. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +0 -10
  110. package/src/components/Tag/index.tsx +0 -12
  111. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -21
  112. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -17
  113. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +0 -2
  114. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +309 -330
  115. package/src/components/Toast/StyledToast.tsx +7 -9
  116. package/src/components/Toast/Toast.tsx +1 -4
  117. package/src/components/Toast/ToastContainer.tsx +2 -6
  118. package/src/components/Toast/ToastContext.ts +2 -5
  119. package/src/components/Toast/ToastProvider.tsx +2 -19
  120. package/src/components/Toast/__tests__/ToastContainer.spec.tsx +12 -15
  121. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +0 -7
  122. package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +6 -14
  123. package/src/components/Toast/types.ts +1 -5
  124. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +0 -3
  125. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +0 -8
  126. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +0 -16
  127. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +0 -19
  128. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +0 -10
  129. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +0 -13
  130. package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +0 -8
  131. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +0 -11
  132. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +0 -20
  133. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +0 -20
  134. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +0 -23
  135. package/src/index.ts +0 -2
  136. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -112
  137. package/src/theme/components/badge.ts +1 -28
  138. package/src/theme/components/button.ts +0 -24
  139. package/src/theme/components/cardCarousel.ts +1 -8
  140. package/src/theme/components/carousel.ts +1 -28
  141. package/src/theme/components/empty.ts +1 -23
  142. package/src/theme/components/error.ts +1 -32
  143. package/src/theme/components/fab.ts +2 -13
  144. package/src/theme/components/pinInput.ts +0 -32
  145. package/src/theme/components/success.ts +1 -23
  146. package/src/theme/components/tag.ts +1 -28
  147. package/src/theme/components/textInput.ts +0 -5
  148. package/src/theme/getTheme.ts +18 -21
  149. package/src/types.ts +0 -2
  150. package/types/components/Carousel/StyledCardCarousel.d.ts +1 -7
  151. package/types/components/Checkbox/index.d.ts +1 -6
  152. package/types/components/Error/index.d.ts +3 -9
  153. package/types/components/FAB/ActionGroup/index.d.ts +0 -5
  154. package/types/components/SectionHeading/index.d.ts +1 -11
  155. package/types/components/Tag/index.d.ts +1 -6
  156. package/types/components/Toast/StyledToast.d.ts +0 -2
  157. package/types/components/Toast/ToastContext.d.ts +2 -2
  158. package/types/components/Toast/ToastProvider.d.ts +1 -1
  159. package/types/components/Toast/index.d.ts +1 -1
  160. package/types/components/Toast/types.d.ts +1 -5
  161. package/types/index.d.ts +1 -2
  162. package/types/theme/components/badge.d.ts +0 -24
  163. package/types/theme/components/button.d.ts +0 -20
  164. package/types/theme/components/cardCarousel.d.ts +0 -10
  165. package/types/theme/components/carousel.d.ts +0 -24
  166. package/types/theme/components/empty.d.ts +0 -19
  167. package/types/theme/components/error.d.ts +0 -27
  168. package/types/theme/components/fab.d.ts +8 -19
  169. package/types/theme/components/pinInput.d.ts +0 -27
  170. package/types/theme/components/success.d.ts +0 -19
  171. package/types/theme/components/tag.d.ts +0 -24
  172. package/types/theme/components/textInput.d.ts +0 -5
  173. package/types/theme/getTheme.d.ts +18 -20
  174. package/types/types.d.ts +1 -2
  175. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +0 -60
  176. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +0 -413
  177. package/src/components/BottomNavigation/__tests__/index.spec.tsx +0 -97
  178. package/src/components/BottomNavigation/index.tsx +0 -166
  179. package/src/theme/components/bottomNavigation.ts +0 -27
  180. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
  181. package/types/components/BottomNavigation/index.d.ts +0 -45
  182. package/types/theme/components/bottomNavigation.d.ts +0 -23
package/es/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as reactNative from 'react-native';
2
- import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, Modal as Modal$1, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, Keyboard, SectionList, RefreshControl as RefreshControl$1 } from 'react-native';
2
+ import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, Image as Image$1, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, BackHandler, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder, Modal as Modal$1, InteractionManager, Keyboard, SectionList, TouchableWithoutFeedback, RefreshControl as RefreshControl$1 } from 'react-native';
3
3
  import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, memo, useReducer, useLayoutEffect, useImperativeHandle, isValidElement } from 'react';
4
4
  import { createIconSet } from 'react-native-vector-icons';
5
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
5
  import { MonthYearPickerViewIOS, MonthYearPickerDialogueAndroid } from '@hero-design/react-native-month-year-picker';
7
6
  import DateTimePicker from '@react-native-community/datetimepicker';
8
7
  import RnSlider from '@react-native-community/slider';
9
8
  import { RectButton, GestureHandlerRootView, Swipeable as Swipeable$1 } from 'react-native-gesture-handler';
10
9
  import LinearGradient from 'react-native-linear-gradient';
10
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
11
11
  import PagerView from 'react-native-pager-view';
12
12
  import { EventEmitter } from 'events';
13
13
  import { WebView } from 'react-native-webview';
@@ -2170,15 +2170,6 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2170
2170
  archived: theme.colors.onArchivedSurface,
2171
2171
  text: theme.colors.onDarkGlobalSurface
2172
2172
  };
2173
- var fonts = {
2174
- "default": theme.fonts.neutral.semiBold
2175
- };
2176
- var fontSizes = {
2177
- "default": theme.fontSizes.small
2178
- };
2179
- var lineHeights = {
2180
- "default": theme.lineHeights.small
2181
- };
2182
2173
  var sizes = {
2183
2174
  height: theme.fontSizes.small + theme.sizes.small,
2184
2175
  minWidth: theme.fontSizes.small + theme.sizes.small,
@@ -2192,37 +2183,6 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2192
2183
  };
2193
2184
  return {
2194
2185
  colors: colors,
2195
- fonts: fonts,
2196
- fontSizes: fontSizes,
2197
- sizes: sizes,
2198
- space: space,
2199
- lineHeights: lineHeights
2200
- };
2201
- };
2202
-
2203
- var getBottomNavigationTheme = function getBottomNavigationTheme(theme) {
2204
- var colors = {
2205
- shadow: theme.colors.primary,
2206
- background: theme.colors.defaultGlobalSurface
2207
- };
2208
- var sizes = {
2209
- height: theme.sizes['6xlarge']
2210
- };
2211
- var shadows = {
2212
- offset: {
2213
- width: 0,
2214
- height: 3
2215
- },
2216
- opacity: 0.27,
2217
- radius: 4.65,
2218
- elevation: 10
2219
- };
2220
- var space = {
2221
- titleMarginTop: theme.space.xsmall
2222
- };
2223
- return {
2224
- colors: colors,
2225
- shadows: shadows,
2226
2186
  sizes: sizes,
2227
2187
  space: space
2228
2188
  };
@@ -2266,15 +2226,6 @@ var getBottomSheetTheme = function getBottomSheetTheme(theme) {
2266
2226
  };
2267
2227
 
2268
2228
  var getButtonTheme = function getButtonTheme(theme) {
2269
- var fonts = {
2270
- "default": theme.fonts.neutral.semiBold,
2271
- utility: theme.fonts.neutral.regular
2272
- };
2273
- var fontSize = {
2274
- "default": theme.fontSizes.xlarge,
2275
- utility: theme.fontSizes.large,
2276
- textVariant: theme.fontSizes.large
2277
- };
2278
2229
  var borderWidth = {
2279
2230
  "default": theme.space.xxsmall
2280
2231
  };
@@ -2321,8 +2272,6 @@ var getButtonTheme = function getButtonTheme(theme) {
2321
2272
  return {
2322
2273
  lineHeights: lineHeights,
2323
2274
  borderWidth: borderWidth,
2324
- fonts: fonts,
2325
- fontSize: fontSize,
2326
2275
  sizes: sizes,
2327
2276
  radii: radii,
2328
2277
  colors: colors,
@@ -2398,20 +2347,8 @@ var getCarouselTheme = function getCarouselTheme(theme) {
2398
2347
  pageControlPaddingVertical: theme.space.small,
2399
2348
  pageControlWrapperHeight: scale(48)
2400
2349
  };
2401
- var fontSizes = {
2402
- heading: theme.fontSizes['xxxxxlarge']
2403
- };
2404
- var fonts = {
2405
- heading: theme.fonts.playful.semiBold
2406
- };
2407
- var lineHeights = {
2408
- heading: theme.lineHeights['6xlarge']
2409
- };
2410
2350
  return {
2411
- space: space,
2412
- fonts: fonts,
2413
- fontSizes: fontSizes,
2414
- lineHeights: lineHeights
2351
+ space: space
2415
2352
  };
2416
2353
  };
2417
2354
 
@@ -2424,18 +2361,10 @@ var getCardCarouselTheme = function getCardCarouselTheme(theme) {
2424
2361
  var colors = {
2425
2362
  carouselItemBackground: theme.colors.defaultSurface
2426
2363
  };
2427
- var shadows = {
2428
- color: theme.shadows["default"].shadowColor,
2429
- offset: theme.shadows["default"].shadowOffset,
2430
- opacity: theme.shadows["default"].shadowOpacity,
2431
- radius: theme.shadows["default"].shadowRadius,
2432
- elevation: theme.shadows["default"].elevation
2433
- };
2434
2364
  var radii = {
2435
2365
  card: theme.radii.medium
2436
2366
  };
2437
2367
  return {
2438
- shadows: shadows,
2439
2368
  colors: colors,
2440
2369
  space: space,
2441
2370
  radii: radii
@@ -2603,20 +2532,10 @@ var getEmptyTheme = function getEmptyTheme(theme) {
2603
2532
  subduedText: theme.colors.mutedOnDefaultGlobalSurface,
2604
2533
  invertedSubduedText: theme.colors.onDarkGlobalSurface
2605
2534
  };
2606
- var fontSizes = {
2607
- title: theme.fontSizes.xxxlarge,
2608
- description: theme.fontSizes.xlarge
2609
- };
2610
- var fonts = {
2611
- title: theme.fonts.playful.semiBold,
2612
- description: theme.fonts.playful.regular
2613
- };
2614
2535
  return {
2615
- fontSizes: fontSizes,
2616
2536
  colors: colors,
2617
2537
  sizes: sizes,
2618
- space: space,
2619
- fonts: fonts
2538
+ space: space
2620
2539
  };
2621
2540
  };
2622
2541
 
@@ -2641,25 +2560,10 @@ var getErrorTheme = function getErrorTheme(theme) {
2641
2560
  fullScreenBackground: theme.colors.decorativePrimarySurface,
2642
2561
  inPageBackground: theme.colors.neutralGlobalSurface
2643
2562
  };
2644
- var fontSizes = {
2645
- title: theme.fontSizes.xxxlarge,
2646
- description: theme.fontSizes.xlarge
2647
- };
2648
- var fonts = {
2649
- title: theme.fonts.playful.semiBold,
2650
- description: theme.fonts.playful.regular
2651
- };
2652
- var lineHeight = {
2653
- title: theme.lineHeights.xxxlarge,
2654
- description: theme.lineHeights.xlarge
2655
- };
2656
2563
  return {
2657
- fontSizes: fontSizes,
2658
2564
  colors: colors,
2659
2565
  sizes: sizes,
2660
- space: space,
2661
- fonts: fonts,
2662
- lineHeight: lineHeight
2566
+ space: space
2663
2567
  };
2664
2568
  };
2665
2569
 
@@ -2716,10 +2620,10 @@ var getFABTheme = function getFABTheme(theme) {
2716
2620
  };
2717
2621
  return {
2718
2622
  radii: radii,
2719
- fonts: fonts,
2720
- fontSizes: fontSizes,
2721
2623
  colors: colors,
2722
2624
  sizes: sizes,
2625
+ fonts: fonts,
2626
+ fontSizes: fontSizes,
2723
2627
  lineHeights: lineHeights,
2724
2628
  shadows: shadows,
2725
2629
  space: space
@@ -2844,18 +2748,6 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2844
2748
  error: theme.colors.onErrorSurface,
2845
2749
  disabled: theme.colors.disabledOnDefaultGlobalSurface
2846
2750
  };
2847
- var fonts = {
2848
- cellText: theme.fonts.neutral.semiBold,
2849
- errorMessage: theme.fonts.neutral.regular
2850
- };
2851
- var fontSizes = {
2852
- cellText: theme.fontSizes.xxxxlarge,
2853
- errorMessage: theme.fontSizes.small
2854
- };
2855
- var lineHeights = {
2856
- cellText: theme.lineHeights.xxxxlarge,
2857
- errorMessage: theme.fontSizes.small
2858
- };
2859
2751
  var sizes = {
2860
2752
  cellWidth: theme.sizes.xxlarge,
2861
2753
  cellHeight: theme.sizes.xxxlarge,
@@ -2871,10 +2763,7 @@ var getPinInputTheme = function getPinInputTheme(theme) {
2871
2763
  };
2872
2764
  return {
2873
2765
  borderWidths: borderWidths,
2874
- lineHeights: lineHeights,
2875
2766
  colors: colors,
2876
- fonts: fonts,
2877
- fontSizes: fontSizes,
2878
2767
  sizes: sizes,
2879
2768
  space: space,
2880
2769
  radii: radii
@@ -3133,20 +3022,10 @@ var getSuccessTheme = function getSuccessTheme(theme) {
3133
3022
  fullScreenBackground: theme.colors.decorativePrimarySurface,
3134
3023
  inPageBackground: theme.colors.neutralGlobalSurface
3135
3024
  };
3136
- var fontSizes = {
3137
- title: theme.fontSizes.xxxlarge,
3138
- description: theme.fontSizes.xlarge
3139
- };
3140
- var fonts = {
3141
- title: theme.fonts.playful.semiBold,
3142
- description: theme.fonts.playful.regular
3143
- };
3144
3025
  return {
3145
- fontSizes: fontSizes,
3146
3026
  colors: colors,
3147
3027
  sizes: sizes,
3148
- space: space,
3149
- fonts: fonts
3028
+ space: space
3150
3029
  };
3151
3030
  };
3152
3031
 
@@ -3267,15 +3146,6 @@ var getTagTheme = function getTagTheme(theme) {
3267
3146
  archivedBackground: theme.colors.archivedSurface,
3268
3147
  text: theme.colors.onDefaultGlobalSurface
3269
3148
  };
3270
- var fonts = {
3271
- "default": theme.fonts.neutral.semiBold
3272
- };
3273
- var fontSizes = {
3274
- "default": theme.fontSizes.small
3275
- };
3276
- var lineHeights = {
3277
- "default": theme.lineHeights.small
3278
- };
3279
3149
  var space = {
3280
3150
  horizontalPadding: theme.space.small,
3281
3151
  verticalPadding: theme.space.xsmall
@@ -3286,11 +3156,8 @@ var getTagTheme = function getTagTheme(theme) {
3286
3156
  return {
3287
3157
  borderWidths: borderWidths,
3288
3158
  colors: colors,
3289
- fonts: fonts,
3290
- fontSizes: fontSizes,
3291
3159
  space: space,
3292
- radii: radii,
3293
- lineHeights: lineHeights
3160
+ radii: radii
3294
3161
  };
3295
3162
  };
3296
3163
 
@@ -3354,12 +3221,7 @@ var getTextInputTheme = function getTextInputTheme(theme) {
3354
3221
  text: theme.fonts.neutral.regular
3355
3222
  };
3356
3223
  var fontSizes = {
3357
- text: theme.fontSizes.large,
3358
- labelInsideTextInput: theme.fontSizes.large,
3359
- error: theme.fontSizes.small,
3360
- maxLength: theme.fontSizes.small,
3361
- asteriskLabel: theme.fontSizes.large,
3362
- topLabel: theme.fontSizes.small
3224
+ text: theme.fontSizes.large
3363
3225
  };
3364
3226
  var borderWidths = {
3365
3227
  container: {
@@ -3661,7 +3523,6 @@ var getTheme$1 = function getTheme() {
3661
3523
  attachment: getAttachmentTheme(globalTheme),
3662
3524
  avatar: getAvatarTheme(globalTheme),
3663
3525
  badge: getBadgeTheme(globalTheme),
3664
- bottomNavigation: getBottomNavigationTheme(globalTheme),
3665
3526
  bottomSheet: getBottomSheetTheme(globalTheme),
3666
3527
  button: getButtonTheme(globalTheme),
3667
3528
  calendar: getCalendarTheme(globalTheme),
@@ -6705,7 +6566,7 @@ var StyledText$3 = index$a(Text$1)(function (_ref) {
6705
6566
  });
6706
6567
  });
6707
6568
 
6708
- var _excluded$A = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6569
+ var _excluded$z = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6709
6570
  var Text = function Text(_ref) {
6710
6571
  var children = _ref.children,
6711
6572
  _ref$fontSize = _ref.fontSize,
@@ -6718,7 +6579,7 @@ var Text = function Text(_ref) {
6718
6579
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6719
6580
  _ref$allowFontScaling = _ref.allowFontScaling,
6720
6581
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6721
- nativeProps = _objectWithoutProperties(_ref, _excluded$A);
6582
+ nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6722
6583
  useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
6723
6584
  return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
6724
6585
  themeFontSize: fontSize,
@@ -6748,7 +6609,7 @@ var StyledCaption = index$a(Text$1)(function (_ref) {
6748
6609
  };
6749
6610
  });
6750
6611
 
6751
- var _excluded$z = ["children", "fontWeight", "intent", "allowFontScaling"];
6612
+ var _excluded$y = ["children", "fontWeight", "intent", "allowFontScaling"];
6752
6613
  var Caption = function Caption(_ref) {
6753
6614
  var children = _ref.children,
6754
6615
  _ref$fontWeight = _ref.fontWeight,
@@ -6757,7 +6618,7 @@ var Caption = function Caption(_ref) {
6757
6618
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6758
6619
  _ref$allowFontScaling = _ref.allowFontScaling,
6759
6620
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6760
- nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6621
+ nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6761
6622
  return /*#__PURE__*/React.createElement(StyledCaption, _extends$1({}, nativeProps, {
6762
6623
  themeFontWeight: fontWeight,
6763
6624
  themeIntent: intent,
@@ -6776,14 +6637,14 @@ var StyledLabel$1 = index$a(Text$1)(function (_ref) {
6776
6637
  };
6777
6638
  });
6778
6639
 
6779
- var _excluded$y = ["children", "intent", "allowFontScaling"];
6640
+ var _excluded$x = ["children", "intent", "allowFontScaling"];
6780
6641
  var Label = function Label(_ref) {
6781
6642
  var children = _ref.children,
6782
6643
  _ref$intent = _ref.intent,
6783
6644
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6784
6645
  _ref$allowFontScaling = _ref.allowFontScaling,
6785
6646
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6786
- nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6647
+ nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6787
6648
  return /*#__PURE__*/React.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
6788
6649
  themeIntent: intent,
6789
6650
  allowFontScaling: allowFontScaling
@@ -6804,7 +6665,7 @@ var StyledTitle$1 = index$a(Text$1)(function (_ref) {
6804
6665
  };
6805
6666
  });
6806
6667
 
6807
- var _excluded$x = ["children", "intent", "allowFontScaling", "level", "typeface"];
6668
+ var _excluded$w = ["children", "intent", "allowFontScaling", "level", "typeface"];
6808
6669
  var Title = function Title(_ref) {
6809
6670
  var children = _ref.children,
6810
6671
  _ref$intent = _ref.intent,
@@ -6815,7 +6676,7 @@ var Title = function Title(_ref) {
6815
6676
  level = _ref$level === void 0 ? 'h1' : _ref$level,
6816
6677
  _ref$typeface = _ref.typeface,
6817
6678
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6818
- nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6679
+ nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6819
6680
  return /*#__PURE__*/React.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
6820
6681
  themeLevel: level,
6821
6682
  themeTypeface: typeface,
@@ -6850,7 +6711,7 @@ var StyledBody = index$a(Text$1)(function (_ref) {
6850
6711
  };
6851
6712
  });
6852
6713
 
6853
- var _excluded$w = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6714
+ var _excluded$v = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6854
6715
  var Body = function Body(_ref) {
6855
6716
  var children = _ref.children,
6856
6717
  _ref$intent = _ref.intent,
@@ -6861,7 +6722,7 @@ var Body = function Body(_ref) {
6861
6722
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6862
6723
  _ref$variant = _ref.variant,
6863
6724
  variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
6864
- nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6725
+ nativeProps = _objectWithoutProperties(_ref, _excluded$v);
6865
6726
  return /*#__PURE__*/React.createElement(StyledBody, _extends$1({}, nativeProps, {
6866
6727
  themeTypeface: typeface,
6867
6728
  themeIntent: intent,
@@ -7406,10 +7267,10 @@ var StyledHeroIcon = index$a(HeroIcon)(function (_ref) {
7406
7267
  };
7407
7268
  });
7408
7269
 
7409
- var _excluded$v = ["style"];
7270
+ var _excluded$u = ["style"];
7410
7271
  var AnimatedIcon = function AnimatedIcon(_ref) {
7411
7272
  var style = _ref.style,
7412
- otherProps = _objectWithoutProperties(_ref, _excluded$v);
7273
+ otherProps = _objectWithoutProperties(_ref, _excluded$u);
7413
7274
  var rotateAnimation = useRef(new Animated.Value(0));
7414
7275
  useEffect(function () {
7415
7276
  var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
@@ -7514,7 +7375,7 @@ var AccordionItem = function AccordionItem(_ref) {
7514
7375
  }, content));
7515
7376
  };
7516
7377
 
7517
- var _excluded$u = ["key"];
7378
+ var _excluded$t = ["key"];
7518
7379
  var Accordion = function Accordion(_ref) {
7519
7380
  var items = _ref.items,
7520
7381
  activeItemKey = _ref.activeItemKey,
@@ -7535,7 +7396,7 @@ var Accordion = function Accordion(_ref) {
7535
7396
  testID: testID
7536
7397
  }, items.map(function (_ref2, index) {
7537
7398
  var key = _ref2.key,
7538
- props = _objectWithoutProperties(_ref2, _excluded$u);
7399
+ props = _objectWithoutProperties(_ref2, _excluded$t);
7539
7400
  var open = _activeItemKey === key;
7540
7401
  return /*#__PURE__*/React.createElement(React.Fragment, {
7541
7402
  key: key
@@ -7813,7 +7674,7 @@ var Avatar = function Avatar(_ref) {
7813
7674
  }));
7814
7675
  };
7815
7676
 
7816
- var isIOS = Platform.OS === 'ios';
7677
+ Platform.OS === 'ios';
7817
7678
  var isAndroid = Platform.OS === 'android';
7818
7679
  function pick(keys, obj) {
7819
7680
  return keys.filter(function (key) {
@@ -8005,7 +7866,7 @@ var borderWidths = {
8005
7866
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8006
7867
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8007
7868
 
8008
- var _excluded$t = ["theme"];
7869
+ var _excluded$s = ["theme"];
8009
7870
  var getThemeValue = function getThemeValue(theme, key, props) {
8010
7871
  var propConfig = config[key];
8011
7872
  var propValue = props[key];
@@ -8032,18 +7893,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8032
7893
  var configKeys = Object.keys(config);
8033
7894
  var StyledBox = index$a(View)(function (_ref5) {
8034
7895
  var theme = _ref5.theme,
8035
- otherProps = _objectWithoutProperties(_ref5, _excluded$t);
7896
+ otherProps = _objectWithoutProperties(_ref5, _excluded$s);
8036
7897
  var styleProps = pick(configKeys, otherProps);
8037
7898
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8038
7899
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8039
7900
  });
8040
7901
 
8041
- var _excluded$s = ["children", "style", "testID"];
7902
+ var _excluded$r = ["children", "style", "testID"];
8042
7903
  var Box = function Box(_ref) {
8043
7904
  var children = _ref.children,
8044
7905
  style = _ref.style,
8045
7906
  testID = _ref.testID,
8046
- otherProps = _objectWithoutProperties(_ref, _excluded$s);
7907
+ otherProps = _objectWithoutProperties(_ref, _excluded$r);
8047
7908
  return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
8048
7909
  style: style,
8049
7910
  testID: testID
@@ -8257,7 +8118,7 @@ var StyledStatus = index$a(Animated.View)(function (_ref3) {
8257
8118
  };
8258
8119
  });
8259
8120
 
8260
- var _excluded$r = ["children", "visible", "intent", "style", "testID"];
8121
+ var _excluded$q = ["children", "visible", "intent", "style", "testID"];
8261
8122
  var Status = function Status(_ref) {
8262
8123
  var children = _ref.children,
8263
8124
  _ref$visible = _ref.visible,
@@ -8266,7 +8127,7 @@ var Status = function Status(_ref) {
8266
8127
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
8267
8128
  style = _ref.style,
8268
8129
  testID = _ref.testID,
8269
- nativeProps = _objectWithoutProperties(_ref, _excluded$r);
8130
+ nativeProps = _objectWithoutProperties(_ref, _excluded$q);
8270
8131
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
8271
8132
  opacity = _React$useRef.current;
8272
8133
  var isFirstRendering = React.useRef(true);
@@ -8299,7 +8160,7 @@ var Status = function Status(_ref) {
8299
8160
  }));
8300
8161
  };
8301
8162
 
8302
- var _excluded$q = ["content", "visible", "max", "intent", "style", "testID"];
8163
+ var _excluded$p = ["content", "visible", "max", "intent", "style", "testID"];
8303
8164
  var DEFAULT_MAX_NUMBER = 99;
8304
8165
  var getPaddingState = function getPaddingState(content) {
8305
8166
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -8314,7 +8175,7 @@ var Badge = function Badge(_ref) {
8314
8175
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
8315
8176
  style = _ref.style,
8316
8177
  testID = _ref.testID,
8317
- nativeProps = _objectWithoutProperties(_ref, _excluded$q);
8178
+ nativeProps = _objectWithoutProperties(_ref, _excluded$p);
8318
8179
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
8319
8180
  opacity = _React$useRef.current;
8320
8181
  var isFirstRendering = React.useRef(true);
@@ -8350,136 +8211,6 @@ var Badge$1 = Object.assign(Badge, {
8350
8211
  Status: Status
8351
8212
  });
8352
8213
 
8353
- var isHeroIcon = function isHeroIcon(x) {
8354
- return IconList.includes(x);
8355
- };
8356
-
8357
- var BottomNavigationTab = index$a(View)(function (_ref) {
8358
- var themeVisibility = _ref.themeVisibility;
8359
- return {
8360
- flex: 1,
8361
- display: themeVisibility === false ? 'none' : 'flex'
8362
- };
8363
- });
8364
- var BottomNavigationContainer = index$a(View)({
8365
- flex: 1,
8366
- overflow: 'hidden'
8367
- });
8368
- var ContentWrapper$2 = index$a(View)({
8369
- flex: 1
8370
- });
8371
- var BottomBarWrapper = index$a(View)(function (_ref2) {
8372
- var themeInsets = _ref2.themeInsets,
8373
- theme = _ref2.theme;
8374
- return {
8375
- height: theme.__hd__.bottomNavigation.sizes.height + themeInsets.bottom,
8376
- paddingBottom: themeInsets.bottom,
8377
- paddingLeft: Math.max(themeInsets.left, themeInsets.right),
8378
- paddingRight: Math.max(themeInsets.left, themeInsets.right),
8379
- backgroundColor: theme.__hd__.bottomNavigation.colors.background,
8380
- shadowColor: theme.__hd__.bottomNavigation.colors.shadow,
8381
- shadowOffset: theme.__hd__.bottomNavigation.shadows.offset,
8382
- shadowOpacity: theme.__hd__.bottomNavigation.shadows.opacity,
8383
- shadowRadius: theme.__hd__.bottomNavigation.shadows.radius,
8384
- elevation: theme.__hd__.bottomNavigation.shadows.elevation
8385
- };
8386
- });
8387
- var BottomBar = index$a(View)({
8388
- flex: 1,
8389
- flexDirection: 'row',
8390
- overflow: 'hidden',
8391
- alignItems: 'center'
8392
- });
8393
- var BottomBarItem = index$a(View)({
8394
- flex: 1,
8395
- alignItems: 'center'
8396
- });
8397
- var StyledBottomBarText = index$a(Typography.Caption)(function (_ref3) {
8398
- var theme = _ref3.theme;
8399
- return {
8400
- marginTop: theme.__hd__.bottomNavigation.space.titleMarginTop
8401
- };
8402
- });
8403
-
8404
- var _excluded$p = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
8405
- var getInactiveIcon = function getInactiveIcon(icon) {
8406
- var inactiveIcon = "".concat(icon, "-outlined");
8407
- return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
8408
- };
8409
- var BottomNavigation = function BottomNavigation(_ref) {
8410
- var onTabPress = _ref.onTabPress,
8411
- _ref$renderActiveTabO = _ref.renderActiveTabOnly,
8412
- renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
8413
- selectedTabKey = _ref.selectedTabKey,
8414
- tabs = _ref.tabs,
8415
- nativeProps = _objectWithoutProperties(_ref, _excluded$p);
8416
- useDeprecation('BottomNavigation is deprecated and will be removed in the next major release. Please remove it.');
8417
- var insets = useSafeAreaInsets();
8418
- /**
8419
- * List of loaded tabs, tabs will be loaded when navigated to.
8420
- */
8421
- var _React$useState = React.useState([selectedTabKey]),
8422
- _React$useState2 = _slicedToArray(_React$useState, 2),
8423
- loaded = _React$useState2[0],
8424
- setLoaded = _React$useState2[1];
8425
- if (!loaded.includes(selectedTabKey)) {
8426
- // Set the current tab to be loaded if it was not loaded before
8427
- setLoaded(function (loadedState) {
8428
- return [].concat(_toConsumableArray(loadedState), [selectedTabKey]);
8429
- });
8430
- }
8431
- return /*#__PURE__*/React.createElement(BottomNavigationContainer, nativeProps, /*#__PURE__*/React.createElement(ContentWrapper$2, null, tabs.map(function (tab) {
8432
- var key = tab.key,
8433
- component = tab.component,
8434
- testID = tab.testID;
8435
- var active = selectedTabKey === key;
8436
- if (renderActiveTabOnly && !active) {
8437
- return null;
8438
- }
8439
- if (!loaded.includes(key)) {
8440
- // Don't render a screen if we've never navigated to it
8441
- return null;
8442
- }
8443
- return /*#__PURE__*/React.createElement(BottomNavigationTab, {
8444
- key: key,
8445
- testID: testID ? "route-screen-".concat(testID) : undefined,
8446
- pointerEvents: active ? 'auto' : 'none',
8447
- accessibilityElementsHidden: !active,
8448
- importantForAccessibility: active ? 'auto' : 'no-hide-descendants',
8449
- collapsable: false,
8450
- removeClippedSubviews:
8451
- // On iOS, set removeClippedSubviews to true only when not focused
8452
- // This is an workaround for a bug where the clipped view never re-appears.
8453
- isIOS ? selectedTabKey !== key : true,
8454
- themeVisibility: active
8455
- }, component);
8456
- })), /*#__PURE__*/React.createElement(BottomBarWrapper, {
8457
- themeInsets: insets
8458
- }, /*#__PURE__*/React.createElement(BottomBar, null, tabs.map(function (tab) {
8459
- var key = tab.key,
8460
- icon = tab.icon,
8461
- title = tab.title,
8462
- testID = tab.testID;
8463
- var active = selectedTabKey === key;
8464
- var inactiveIcon = getInactiveIcon(icon);
8465
- return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
8466
- key: key,
8467
- onPress: function onPress() {
8468
- return onTabPress(key);
8469
- },
8470
- testID: testID
8471
- }, /*#__PURE__*/React.createElement(BottomBarItem, null, /*#__PURE__*/React.createElement(Icon, {
8472
- icon: active ? icon : inactiveIcon,
8473
- intent: active ? 'primary' : 'text',
8474
- testID: "hero-icon-".concat(icon)
8475
- }), !!title && /*#__PURE__*/React.createElement(StyledBottomBarText, {
8476
- fontWeight: "semi-bold",
8477
- intent: active ? 'primary' : 'body',
8478
- numberOfLines: 1
8479
- }, title)));
8480
- }))));
8481
- };
8482
-
8483
8214
  var BottomSheetContext = /*#__PURE__*/createContext({});
8484
8215
 
8485
8216
  var StyledDivider = index$a(View)(function (_ref) {
@@ -9133,6 +8864,332 @@ var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
9133
8864
  }));
9134
8865
  };
9135
8866
 
8867
+ var customAlphabet = function customAlphabet(alphabet) {
8868
+ var defaultSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 21;
8869
+ return function () {
8870
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSize;
8871
+ var id = '';
8872
+ var i = size;
8873
+ while (i--) {
8874
+ id += alphabet[Math.random() * alphabet.length | 0];
8875
+ }
8876
+ return id;
8877
+ };
8878
+ };
8879
+
8880
+ var ACTIONS;
8881
+ (function (ACTIONS) {
8882
+ ACTIONS[ACTIONS["REGISTER_HOST"] = 0] = "REGISTER_HOST";
8883
+ ACTIONS[ACTIONS["DEREGISTER_HOST"] = 1] = "DEREGISTER_HOST";
8884
+ ACTIONS[ACTIONS["ADD_UPDATE_PORTAL"] = 2] = "ADD_UPDATE_PORTAL";
8885
+ ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
8886
+ })(ACTIONS || (ACTIONS = {}));
8887
+ var INITIAL_STATE = {};
8888
+
8889
+ var PortalStateContext = /*#__PURE__*/createContext(null);
8890
+ var PortalDispatchContext = /*#__PURE__*/createContext(null);
8891
+
8892
+ var usePortal = function usePortal() {
8893
+ var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
8894
+ var dispatch = useContext(PortalDispatchContext);
8895
+ if (dispatch === null) {
8896
+ throw new Error("You must add 'PortalProvider' to the root component.");
8897
+ }
8898
+ var registerHost = useCallback(function () {
8899
+ dispatch({
8900
+ type: ACTIONS.REGISTER_HOST,
8901
+ hostName: hostName
8902
+ });
8903
+ }, []);
8904
+ var deregisterHost = useCallback(function () {
8905
+ dispatch({
8906
+ type: ACTIONS.DEREGISTER_HOST,
8907
+ hostName: hostName
8908
+ });
8909
+ }, []);
8910
+ var addUpdatePortal = useCallback(function (name, node) {
8911
+ dispatch({
8912
+ type: ACTIONS.ADD_UPDATE_PORTAL,
8913
+ hostName: hostName,
8914
+ portalName: name,
8915
+ node: node
8916
+ });
8917
+ }, []);
8918
+ var removePortal = useCallback(function (name) {
8919
+ dispatch({
8920
+ type: ACTIONS.REMOVE_PORTAL,
8921
+ hostName: hostName,
8922
+ portalName: name
8923
+ });
8924
+ }, []);
8925
+ return {
8926
+ registerHost: registerHost,
8927
+ deregisterHost: deregisterHost,
8928
+ addPortal: addUpdatePortal,
8929
+ updatePortal: addUpdatePortal,
8930
+ removePortal: removePortal
8931
+ };
8932
+ };
8933
+
8934
+ var usePortalState = function usePortalState(hostName) {
8935
+ var state = useContext(PortalStateContext);
8936
+ if (state === null) {
8937
+ throw new Error("You must add 'PortalProvider' to the root component.");
8938
+ }
8939
+ return state[hostName] || [];
8940
+ };
8941
+
8942
+ var PortalHostComponent = function PortalHostComponent(_ref) {
8943
+ var name = _ref.name;
8944
+ var state = usePortalState(name);
8945
+ var _usePortal = usePortal(name),
8946
+ registerHost = _usePortal.registerHost,
8947
+ deregisterHost = _usePortal.deregisterHost;
8948
+ useEffect(function () {
8949
+ registerHost();
8950
+ return function () {
8951
+ deregisterHost();
8952
+ };
8953
+ }, []);
8954
+ return /*#__PURE__*/React.createElement(React.Fragment, null, state.map(function (item) {
8955
+ return item.node;
8956
+ }));
8957
+ };
8958
+ var PortalHost = /*#__PURE__*/memo(PortalHostComponent);
8959
+ PortalHost.displayName = 'PortalHost';
8960
+
8961
+ var registerHostIfNotExist = function registerHostIfNotExist(state, hostName) {
8962
+ if (!(hostName in state)) {
8963
+ return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, []));
8964
+ }
8965
+ return _objectSpread2({}, state);
8966
+ };
8967
+ var deregisterHost = function deregisterHost(state, hostName) {
8968
+ return _objectSpread2({}, omit([hostName], state));
8969
+ };
8970
+ var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
8971
+ var newState = registerHostIfNotExist(state, hostName);
8972
+ var index = newState[hostName].findIndex(function (item) {
8973
+ return item.name === portalName;
8974
+ });
8975
+ if (index !== -1) {
8976
+ return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, newState[hostName].map(function (item, i) {
8977
+ if (index === i) {
8978
+ return _objectSpread2(_objectSpread2({}, item), {}, {
8979
+ node: node
8980
+ });
8981
+ }
8982
+ return item;
8983
+ })));
8984
+ }
8985
+ return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, [].concat(_toConsumableArray(newState[hostName]), [{
8986
+ name: portalName,
8987
+ node: node
8988
+ }])));
8989
+ };
8990
+ var removePortal = function removePortal(state, hostName, portalName) {
8991
+ if (!(hostName in state)) {
8992
+ return _objectSpread2({}, state);
8993
+ }
8994
+ return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, state[hostName].filter(function (item) {
8995
+ return item.name !== portalName;
8996
+ })));
8997
+ };
8998
+ var reducer = function reducer(state, action) {
8999
+ var type = action.type;
9000
+ switch (type) {
9001
+ case ACTIONS.REGISTER_HOST:
9002
+ return registerHostIfNotExist(state, action.hostName);
9003
+ case ACTIONS.DEREGISTER_HOST:
9004
+ return deregisterHost(state, action.hostName);
9005
+ case ACTIONS.ADD_UPDATE_PORTAL:
9006
+ return addUpdatePortal(state, action.hostName, action.portalName, action.node);
9007
+ case ACTIONS.REMOVE_PORTAL:
9008
+ return removePortal(state, action.hostName, action.portalName);
9009
+ default:
9010
+ return _objectSpread2({}, state);
9011
+ }
9012
+ };
9013
+
9014
+ var PortalProviderComponent = function PortalProviderComponent(_ref) {
9015
+ var _ref$rootHostName = _ref.rootHostName,
9016
+ rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
9017
+ children = _ref.children;
9018
+ var _useReducer = useReducer(reducer, INITIAL_STATE),
9019
+ _useReducer2 = _slicedToArray(_useReducer, 2),
9020
+ state = _useReducer2[0],
9021
+ dispatch = _useReducer2[1];
9022
+ return /*#__PURE__*/React.createElement(PortalDispatchContext.Provider, {
9023
+ value: dispatch
9024
+ }, /*#__PURE__*/React.createElement(PortalStateContext.Provider, {
9025
+ value: state
9026
+ }, children, /*#__PURE__*/React.createElement(PortalHost, {
9027
+ name: rootHostName
9028
+ })));
9029
+ };
9030
+ var PortalProvider = /*#__PURE__*/memo(PortalProviderComponent);
9031
+ PortalProvider.displayName = 'PortalProvider';
9032
+
9033
+ var nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz0123456789', 10);
9034
+ var PortalComponent = function PortalComponent(_ref) {
9035
+ var name = _ref.name,
9036
+ hostName = _ref.hostName,
9037
+ children = _ref.children,
9038
+ theme = _ref.theme;
9039
+ var defaultTheme = useTheme();
9040
+ var _usePortal = usePortal(hostName),
9041
+ addUpdatePortal = _usePortal.addPortal,
9042
+ removePortal = _usePortal.removePortal;
9043
+ var nameOrRandom = useMemo(function () {
9044
+ return name || nanoid();
9045
+ }, [name]);
9046
+ var ChildrenComponent = useMemo(function () {
9047
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
9048
+ theme: theme || defaultTheme
9049
+ }, children);
9050
+ }, [theme, children, defaultTheme]);
9051
+ useLayoutEffect(function () {
9052
+ addUpdatePortal(nameOrRandom, ChildrenComponent);
9053
+ return function () {
9054
+ removePortal(nameOrRandom);
9055
+ };
9056
+ }, [addUpdatePortal]);
9057
+ useLayoutEffect(function () {
9058
+ addUpdatePortal(nameOrRandom, ChildrenComponent);
9059
+ }, [ChildrenComponent]);
9060
+ return null;
9061
+ };
9062
+ var Portal = /*#__PURE__*/memo(PortalComponent);
9063
+ Portal.displayName = 'Portal';
9064
+ var Portal$1 = Object.assign(Portal, {
9065
+ Provider: PortalProvider,
9066
+ Host: PortalHost
9067
+ });
9068
+
9069
+ var _excluded$l = ["visible"];
9070
+ var DEFAULT_BACKDROP_OPACITY = 0.4;
9071
+ var DEFAULT_ANIMATION_CONFIG = {
9072
+ easing: Easing.inOut(Easing.cubic),
9073
+ useNativeDriver: Platform.OS !== 'web',
9074
+ duration: 400
9075
+ };
9076
+ var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
9077
+ var children = _ref.children,
9078
+ onShow = _ref.onShow,
9079
+ onRequestClose = _ref.onRequestClose,
9080
+ testID = _ref.testID,
9081
+ _ref$animationType = _ref.animationType,
9082
+ animationType = _ref$animationType === void 0 ? 'none' : _ref$animationType,
9083
+ _ref$transparent = _ref.transparent,
9084
+ transparent = _ref$transparent === void 0 ? false : _ref$transparent,
9085
+ onDismiss = _ref.onDismiss;
9086
+ var theme = useTheme();
9087
+ var animatedBackdropValue = useRef(new Animated.Value(0)).current;
9088
+ var animatedModalValue = useRef(new Animated.Value(0)).current;
9089
+ // Show or hide the backdrop and modal content
9090
+ var animateBackdropAndContent = useCallback(function (_ref2) {
9091
+ var toValue = _ref2.toValue,
9092
+ callback = _ref2.callback;
9093
+ if (animationType !== 'none') {
9094
+ // Backdrop animation
9095
+ if (!transparent) {
9096
+ Animated.timing(animatedBackdropValue, _objectSpread2({
9097
+ toValue: toValue
9098
+ }, DEFAULT_ANIMATION_CONFIG)).start();
9099
+ }
9100
+ // Modal content animation
9101
+ Animated.timing(animatedModalValue, _objectSpread2({
9102
+ toValue: toValue
9103
+ }, DEFAULT_ANIMATION_CONFIG)).start(callback);
9104
+ } else {
9105
+ callback === null || callback === void 0 || callback();
9106
+ }
9107
+ }, [animationType, onShow, transparent]);
9108
+ var backdropOpacityAnimation = animatedBackdropValue.interpolate({
9109
+ inputRange: [0, 1],
9110
+ outputRange: [0, DEFAULT_BACKDROP_OPACITY]
9111
+ });
9112
+ var modalAnimation = animatedModalValue.interpolate({
9113
+ inputRange: [0, 1],
9114
+ outputRange: animationType === 'slide' ? [Dimensions.get('window').height, 0] : [0, 1]
9115
+ });
9116
+ useImperativeHandle(ref, function () {
9117
+ return {
9118
+ show: function show() {
9119
+ animateBackdropAndContent({
9120
+ toValue: 1,
9121
+ callback: onShow
9122
+ });
9123
+ },
9124
+ hide: function hide(wrapperCallback) {
9125
+ animateBackdropAndContent({
9126
+ toValue: 0,
9127
+ callback: function callback() {
9128
+ if (Platform.OS === 'ios') {
9129
+ onDismiss === null || onDismiss === void 0 || onDismiss();
9130
+ }
9131
+ wrapperCallback();
9132
+ }
9133
+ });
9134
+ }
9135
+ };
9136
+ }, [onDismiss, onShow, animateBackdropAndContent]);
9137
+ // Back button handler
9138
+ useEffect(function () {
9139
+ var backHandler = BackHandler.addEventListener('hardwareBackPress', function () {
9140
+ onRequestClose === null || onRequestClose === void 0 || onRequestClose();
9141
+ return true;
9142
+ });
9143
+ return function () {
9144
+ return backHandler.remove();
9145
+ };
9146
+ }, [onRequestClose]);
9147
+ return /*#__PURE__*/React.createElement(Portal$1, null, /*#__PURE__*/React.createElement(Animated.View, {
9148
+ style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
9149
+ backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
9150
+ opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
9151
+ })
9152
+ }), /*#__PURE__*/React.createElement(Animated.View, {
9153
+ testID: testID,
9154
+ style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
9155
+ opacity: animationType === 'fade' ? modalAnimation : 1,
9156
+ transform: [{
9157
+ translateY: animationType === 'slide' ? modalAnimation : 0
9158
+ }]
9159
+ })
9160
+ }, children));
9161
+ });
9162
+ var ModalWrapper = function ModalWrapper(_ref3) {
9163
+ var _ref3$visible = _ref3.visible,
9164
+ visible = _ref3$visible === void 0 ? true : _ref3$visible,
9165
+ props = _objectWithoutProperties(_ref3, _excluded$l);
9166
+ var modalRef = useRef(null);
9167
+ var _useState = useState(visible),
9168
+ _useState2 = _slicedToArray(_useState, 2),
9169
+ internalVisible = _useState2[0],
9170
+ setInternalVisible = _useState2[1];
9171
+ useEffect(function () {
9172
+ if (visible) {
9173
+ setInternalVisible(true);
9174
+ } else {
9175
+ var _modalRef$current;
9176
+ // Wait for animation to finish before hiding the modal
9177
+ (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 || _modalRef$current.hide(function () {
9178
+ return setInternalVisible(false);
9179
+ });
9180
+ }
9181
+ }, [visible]);
9182
+ useEffect(function () {
9183
+ if (internalVisible) {
9184
+ var _modalRef$current2;
9185
+ (_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || _modalRef$current2.show();
9186
+ }
9187
+ }, [internalVisible]);
9188
+ return internalVisible ? /*#__PURE__*/React.createElement(Modal, _extends$1({
9189
+ ref: modalRef
9190
+ }, props)) : null;
9191
+ };
9192
+
9136
9193
  var BottomSheet = function BottomSheet(_ref) {
9137
9194
  var open = _ref.open,
9138
9195
  header = _ref.header,
@@ -9209,7 +9266,7 @@ var BottomSheet = function BottomSheet(_ref) {
9209
9266
  setInternalShowDivider: setInternalShowDivider
9210
9267
  };
9211
9268
  }, [setInternalShowDivider]);
9212
- return /*#__PURE__*/React.createElement(Modal$1, {
9269
+ return /*#__PURE__*/React.createElement(ModalWrapper, {
9213
9270
  visible: visible,
9214
9271
  onRequestClose: onRequestClose,
9215
9272
  transparent: true,
@@ -11898,12 +11955,12 @@ var Indicator = index$a(View)(function (_ref2) {
11898
11955
  };
11899
11956
  });
11900
11957
 
11901
- var _excluded$l = ["intent", "children"];
11958
+ var _excluded$k = ["intent", "children"];
11902
11959
  var DataCard = function DataCard(_ref) {
11903
11960
  var _ref$intent = _ref.intent,
11904
11961
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11905
11962
  children = _ref.children,
11906
- nativeProps = _objectWithoutProperties(_ref, _excluded$l);
11963
+ nativeProps = _objectWithoutProperties(_ref, _excluded$k);
11907
11964
  return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
11908
11965
  themeIntent: intent,
11909
11966
  testID: "data-card-indicator"
@@ -11921,11 +11978,11 @@ var StyledCard$1 = index$a(View)(function (_ref) {
11921
11978
  });
11922
11979
  });
11923
11980
 
11924
- var _excluded$k = ["intent", "children"];
11981
+ var _excluded$j = ["intent", "children"];
11925
11982
  var Card = function Card(_ref) {
11926
11983
  var intent = _ref.intent,
11927
11984
  children = _ref.children,
11928
- nativeProps = _objectWithoutProperties(_ref, _excluded$k);
11985
+ nativeProps = _objectWithoutProperties(_ref, _excluded$j);
11929
11986
  return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
11930
11987
  themeIntent: intent
11931
11988
  }), children);
@@ -12010,20 +12067,8 @@ var StyledCard = index$a(Card$1)(function (_ref2) {
12010
12067
  flex: 1
12011
12068
  };
12012
12069
  });
12013
- var StyledShadow = index$a(View)(function (_ref3) {
12070
+ var StyledItemWrapper = index$a(View)(function (_ref3) {
12014
12071
  var theme = _ref3.theme;
12015
- return {
12016
- borderRadius: theme.__hd__.cardCarousel.radii.card,
12017
- shadowColor: theme.__hd__.cardCarousel.shadows.color,
12018
- shadowOffset: theme.__hd__.cardCarousel.shadows.offset,
12019
- shadowRadius: theme.__hd__.cardCarousel.shadows.radius,
12020
- shadowOpacity: theme.__hd__.cardCarousel.shadows.opacity,
12021
- elevation: theme.__hd__.cardCarousel.shadows.elevation,
12022
- flex: 1
12023
- };
12024
- });
12025
- var StyledItemWrapper = index$a(View)(function (_ref4) {
12026
- var theme = _ref4.theme;
12027
12072
  return {
12028
12073
  padding: theme.__hd__.cardCarousel.space.carouselItemSpacing
12029
12074
  };
@@ -12144,7 +12189,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
12144
12189
  style: {
12145
12190
  width: itemWidth
12146
12191
  }
12147
- }, /*#__PURE__*/React.createElement(StyledShadow, null, /*#__PURE__*/React.createElement(StyledCard, null, item)));
12192
+ }, /*#__PURE__*/React.createElement(StyledCard, null, item));
12148
12193
  }, [itemWidth]);
12149
12194
  var contentContainerPaddingHorizontal = theme.__hd__.cardCarousel.space.contentContainerPaddingHorizontal;
12150
12195
  return /*#__PURE__*/React.createElement(StyledWrapper$8, {
@@ -12202,7 +12247,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
12202
12247
  });
12203
12248
  CardCarousel.displayName = 'CardCarousel';
12204
12249
 
12205
- var _excluded$j = ["rounded", "size", "testID", "style"];
12250
+ var _excluded$i = ["rounded", "size", "testID", "style"];
12206
12251
  var Image = function Image(_ref) {
12207
12252
  var _ref$rounded = _ref.rounded,
12208
12253
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -12210,7 +12255,7 @@ var Image = function Image(_ref) {
12210
12255
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
12211
12256
  testID = _ref.testID,
12212
12257
  style = _ref.style,
12213
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$j);
12258
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$i);
12214
12259
  var theme = useTheme();
12215
12260
  var imageSize = theme.__hd__.image.sizes[size];
12216
12261
  return /*#__PURE__*/React.createElement(Image$1, _extends$1({
@@ -12330,7 +12375,7 @@ var CarouselItem = function CarouselItem(_ref) {
12330
12375
  }, heading), body ? /*#__PURE__*/React.createElement(Typography.Body, null, body) : null));
12331
12376
  };
12332
12377
 
12333
- var _excluded$i = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
12378
+ var _excluded$h = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
12334
12379
  function useStateFromProp(initialValue) {
12335
12380
  var _useState = useState(initialValue),
12336
12381
  _useState2 = _slicedToArray(_useState, 2),
@@ -12357,7 +12402,7 @@ var Carousel = function Carousel(_ref) {
12357
12402
  testID = _ref.testID,
12358
12403
  _ref$pageControlPosit = _ref.pageControlPosition,
12359
12404
  pageControlPosition = _ref$pageControlPosit === void 0 ? 'top' : _ref$pageControlPosit,
12360
- nativeProps = _objectWithoutProperties(_ref, _excluded$i);
12405
+ nativeProps = _objectWithoutProperties(_ref, _excluded$h);
12361
12406
  useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
12362
12407
  useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
12363
12408
  var theme = useTheme();
@@ -12552,7 +12597,7 @@ var StyledIcon$1 = index$a(Icon)(function (_ref4) {
12552
12597
  };
12553
12598
  });
12554
12599
 
12555
- var _excluded$h = ["label", "variant", "selected", "icon", "onPress"];
12600
+ var _excluded$g = ["label", "variant", "selected", "icon", "onPress"];
12556
12601
  var Chip = function Chip(_ref) {
12557
12602
  var label = _ref.label,
12558
12603
  _ref$variant = _ref.variant,
@@ -12561,7 +12606,7 @@ var Chip = function Chip(_ref) {
12561
12606
  selected = _ref$selected === void 0 ? false : _ref$selected,
12562
12607
  icon = _ref.icon,
12563
12608
  onPress = _ref.onPress,
12564
- otherProps = _objectWithoutProperties(_ref, _excluded$h);
12609
+ otherProps = _objectWithoutProperties(_ref, _excluded$g);
12565
12610
  var internalIcon = React.useMemo(function () {
12566
12611
  if (icon && variant === 'filled') {
12567
12612
  return icon;
@@ -12648,8 +12693,6 @@ var getThemeState = function getThemeState(_ref) {
12648
12693
  var Checkbox = function Checkbox(_ref2) {
12649
12694
  var checked = _ref2.checked,
12650
12695
  description = _ref2.description,
12651
- _ref2$withBorder = _ref2.withBorder,
12652
- withBorder = _ref2$withBorder === void 0 ? false : _ref2$withBorder,
12653
12696
  _ref2$disabled = _ref2.disabled,
12654
12697
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
12655
12698
  onPress = _ref2.onPress,
@@ -12657,7 +12700,6 @@ var Checkbox = function Checkbox(_ref2) {
12657
12700
  testID = _ref2.testID,
12658
12701
  _ref2$readonly = _ref2.readonly,
12659
12702
  readonly = _ref2$readonly === void 0 ? false : _ref2$readonly;
12660
- useDeprecation("Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.", withBorder === true);
12661
12703
  var themeState = getThemeState({
12662
12704
  disabled: disabled,
12663
12705
  readonly: readonly
@@ -12808,7 +12850,7 @@ var StyledErrorAndMaxLengthContainer = index$a(View)(function () {
12808
12850
  };
12809
12851
  });
12810
12852
 
12811
- var _excluded$g = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12853
+ var _excluded$f = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12812
12854
  var getState$1 = function getState(_ref) {
12813
12855
  var disabled = _ref.disabled,
12814
12856
  error = _ref.error,
@@ -12861,7 +12903,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
12861
12903
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
12862
12904
  _ref2$variant = _ref2.variant,
12863
12905
  variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
12864
- nativeProps = _objectWithoutProperties(_ref2, _excluded$g);
12906
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$f);
12865
12907
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
12866
12908
  var isEmptyValue = displayText.length === 0;
12867
12909
  var actualSuffix = loading ? 'loading' : suffix;
@@ -13406,11 +13448,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
13406
13448
  }))));
13407
13449
  };
13408
13450
 
13409
- var _excluded$f = ["variant"];
13451
+ var _excluded$e = ["variant"];
13410
13452
  var DatePicker = function DatePicker(_ref) {
13411
13453
  var _ref$variant = _ref.variant,
13412
13454
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
13413
- props = _objectWithoutProperties(_ref, _excluded$f);
13455
+ props = _objectWithoutProperties(_ref, _excluded$e);
13414
13456
  if (variant === 'calendar') {
13415
13457
  return /*#__PURE__*/React.createElement(DatePickerCalendar, props);
13416
13458
  }
@@ -13762,332 +13804,6 @@ var Empty = function Empty(_ref) {
13762
13804
  }, description));
13763
13805
  };
13764
13806
 
13765
- var customAlphabet = function customAlphabet(alphabet) {
13766
- var defaultSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 21;
13767
- return function () {
13768
- var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSize;
13769
- var id = '';
13770
- var i = size;
13771
- while (i--) {
13772
- id += alphabet[Math.random() * alphabet.length | 0];
13773
- }
13774
- return id;
13775
- };
13776
- };
13777
-
13778
- var ACTIONS;
13779
- (function (ACTIONS) {
13780
- ACTIONS[ACTIONS["REGISTER_HOST"] = 0] = "REGISTER_HOST";
13781
- ACTIONS[ACTIONS["DEREGISTER_HOST"] = 1] = "DEREGISTER_HOST";
13782
- ACTIONS[ACTIONS["ADD_UPDATE_PORTAL"] = 2] = "ADD_UPDATE_PORTAL";
13783
- ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
13784
- })(ACTIONS || (ACTIONS = {}));
13785
- var INITIAL_STATE = {};
13786
-
13787
- var PortalStateContext = /*#__PURE__*/createContext(null);
13788
- var PortalDispatchContext = /*#__PURE__*/createContext(null);
13789
-
13790
- var usePortal = function usePortal() {
13791
- var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
13792
- var dispatch = useContext(PortalDispatchContext);
13793
- if (dispatch === null) {
13794
- throw new Error("You must add 'PortalProvider' to the root component.");
13795
- }
13796
- var registerHost = useCallback(function () {
13797
- dispatch({
13798
- type: ACTIONS.REGISTER_HOST,
13799
- hostName: hostName
13800
- });
13801
- }, []);
13802
- var deregisterHost = useCallback(function () {
13803
- dispatch({
13804
- type: ACTIONS.DEREGISTER_HOST,
13805
- hostName: hostName
13806
- });
13807
- }, []);
13808
- var addUpdatePortal = useCallback(function (name, node) {
13809
- dispatch({
13810
- type: ACTIONS.ADD_UPDATE_PORTAL,
13811
- hostName: hostName,
13812
- portalName: name,
13813
- node: node
13814
- });
13815
- }, []);
13816
- var removePortal = useCallback(function (name) {
13817
- dispatch({
13818
- type: ACTIONS.REMOVE_PORTAL,
13819
- hostName: hostName,
13820
- portalName: name
13821
- });
13822
- }, []);
13823
- return {
13824
- registerHost: registerHost,
13825
- deregisterHost: deregisterHost,
13826
- addPortal: addUpdatePortal,
13827
- updatePortal: addUpdatePortal,
13828
- removePortal: removePortal
13829
- };
13830
- };
13831
-
13832
- var usePortalState = function usePortalState(hostName) {
13833
- var state = useContext(PortalStateContext);
13834
- if (state === null) {
13835
- throw new Error("You must add 'PortalProvider' to the root component.");
13836
- }
13837
- return state[hostName] || [];
13838
- };
13839
-
13840
- var PortalHostComponent = function PortalHostComponent(_ref) {
13841
- var name = _ref.name;
13842
- var state = usePortalState(name);
13843
- var _usePortal = usePortal(name),
13844
- registerHost = _usePortal.registerHost,
13845
- deregisterHost = _usePortal.deregisterHost;
13846
- useEffect(function () {
13847
- registerHost();
13848
- return function () {
13849
- deregisterHost();
13850
- };
13851
- }, []);
13852
- return /*#__PURE__*/React.createElement(React.Fragment, null, state.map(function (item) {
13853
- return item.node;
13854
- }));
13855
- };
13856
- var PortalHost = /*#__PURE__*/memo(PortalHostComponent);
13857
- PortalHost.displayName = 'PortalHost';
13858
-
13859
- var registerHostIfNotExist = function registerHostIfNotExist(state, hostName) {
13860
- if (!(hostName in state)) {
13861
- return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, []));
13862
- }
13863
- return _objectSpread2({}, state);
13864
- };
13865
- var deregisterHost = function deregisterHost(state, hostName) {
13866
- return _objectSpread2({}, omit([hostName], state));
13867
- };
13868
- var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
13869
- var newState = registerHostIfNotExist(state, hostName);
13870
- var index = newState[hostName].findIndex(function (item) {
13871
- return item.name === portalName;
13872
- });
13873
- if (index !== -1) {
13874
- return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, newState[hostName].map(function (item, i) {
13875
- if (index === i) {
13876
- return _objectSpread2(_objectSpread2({}, item), {}, {
13877
- node: node
13878
- });
13879
- }
13880
- return item;
13881
- })));
13882
- }
13883
- return _objectSpread2(_objectSpread2({}, newState), {}, _defineProperty({}, hostName, [].concat(_toConsumableArray(newState[hostName]), [{
13884
- name: portalName,
13885
- node: node
13886
- }])));
13887
- };
13888
- var removePortal = function removePortal(state, hostName, portalName) {
13889
- if (!(hostName in state)) {
13890
- return _objectSpread2({}, state);
13891
- }
13892
- return _objectSpread2(_objectSpread2({}, state), {}, _defineProperty({}, hostName, state[hostName].filter(function (item) {
13893
- return item.name !== portalName;
13894
- })));
13895
- };
13896
- var reducer = function reducer(state, action) {
13897
- var type = action.type;
13898
- switch (type) {
13899
- case ACTIONS.REGISTER_HOST:
13900
- return registerHostIfNotExist(state, action.hostName);
13901
- case ACTIONS.DEREGISTER_HOST:
13902
- return deregisterHost(state, action.hostName);
13903
- case ACTIONS.ADD_UPDATE_PORTAL:
13904
- return addUpdatePortal(state, action.hostName, action.portalName, action.node);
13905
- case ACTIONS.REMOVE_PORTAL:
13906
- return removePortal(state, action.hostName, action.portalName);
13907
- default:
13908
- return _objectSpread2({}, state);
13909
- }
13910
- };
13911
-
13912
- var PortalProviderComponent = function PortalProviderComponent(_ref) {
13913
- var _ref$rootHostName = _ref.rootHostName,
13914
- rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
13915
- children = _ref.children;
13916
- var _useReducer = useReducer(reducer, INITIAL_STATE),
13917
- _useReducer2 = _slicedToArray(_useReducer, 2),
13918
- state = _useReducer2[0],
13919
- dispatch = _useReducer2[1];
13920
- return /*#__PURE__*/React.createElement(PortalDispatchContext.Provider, {
13921
- value: dispatch
13922
- }, /*#__PURE__*/React.createElement(PortalStateContext.Provider, {
13923
- value: state
13924
- }, children, /*#__PURE__*/React.createElement(PortalHost, {
13925
- name: rootHostName
13926
- })));
13927
- };
13928
- var PortalProvider = /*#__PURE__*/memo(PortalProviderComponent);
13929
- PortalProvider.displayName = 'PortalProvider';
13930
-
13931
- var nanoid = customAlphabet('abcdefghijklmnopqrstuvwxyz0123456789', 10);
13932
- var PortalComponent = function PortalComponent(_ref) {
13933
- var name = _ref.name,
13934
- hostName = _ref.hostName,
13935
- children = _ref.children,
13936
- theme = _ref.theme;
13937
- var defaultTheme = useTheme();
13938
- var _usePortal = usePortal(hostName),
13939
- addUpdatePortal = _usePortal.addPortal,
13940
- removePortal = _usePortal.removePortal;
13941
- var nameOrRandom = useMemo(function () {
13942
- return name || nanoid();
13943
- }, [name]);
13944
- var ChildrenComponent = useMemo(function () {
13945
- return /*#__PURE__*/React.createElement(ThemeProvider, {
13946
- theme: theme || defaultTheme
13947
- }, children);
13948
- }, [theme, children, defaultTheme]);
13949
- useLayoutEffect(function () {
13950
- addUpdatePortal(nameOrRandom, ChildrenComponent);
13951
- return function () {
13952
- removePortal(nameOrRandom);
13953
- };
13954
- }, [addUpdatePortal]);
13955
- useLayoutEffect(function () {
13956
- addUpdatePortal(nameOrRandom, ChildrenComponent);
13957
- }, [ChildrenComponent]);
13958
- return null;
13959
- };
13960
- var Portal = /*#__PURE__*/memo(PortalComponent);
13961
- Portal.displayName = 'Portal';
13962
- var Portal$1 = Object.assign(Portal, {
13963
- Provider: PortalProvider,
13964
- Host: PortalHost
13965
- });
13966
-
13967
- var _excluded$e = ["visible"];
13968
- var DEFAULT_BACKDROP_OPACITY = 0.4;
13969
- var DEFAULT_ANIMATION_CONFIG = {
13970
- easing: Easing.inOut(Easing.cubic),
13971
- useNativeDriver: Platform.OS !== 'web',
13972
- duration: 400
13973
- };
13974
- var Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {
13975
- var children = _ref.children,
13976
- onShow = _ref.onShow,
13977
- onRequestClose = _ref.onRequestClose,
13978
- testID = _ref.testID,
13979
- _ref$animationType = _ref.animationType,
13980
- animationType = _ref$animationType === void 0 ? 'none' : _ref$animationType,
13981
- _ref$transparent = _ref.transparent,
13982
- transparent = _ref$transparent === void 0 ? false : _ref$transparent,
13983
- onDismiss = _ref.onDismiss;
13984
- var theme = useTheme();
13985
- var animatedBackdropValue = useRef(new Animated.Value(0)).current;
13986
- var animatedModalValue = useRef(new Animated.Value(0)).current;
13987
- // Show or hide the backdrop and modal content
13988
- var animateBackdropAndContent = useCallback(function (_ref2) {
13989
- var toValue = _ref2.toValue,
13990
- callback = _ref2.callback;
13991
- if (animationType !== 'none') {
13992
- // Backdrop animation
13993
- if (!transparent) {
13994
- Animated.timing(animatedBackdropValue, _objectSpread2({
13995
- toValue: toValue
13996
- }, DEFAULT_ANIMATION_CONFIG)).start();
13997
- }
13998
- // Modal content animation
13999
- Animated.timing(animatedModalValue, _objectSpread2({
14000
- toValue: toValue
14001
- }, DEFAULT_ANIMATION_CONFIG)).start(callback);
14002
- } else {
14003
- callback === null || callback === void 0 || callback();
14004
- }
14005
- }, [animationType, onShow, transparent]);
14006
- var backdropOpacityAnimation = animatedBackdropValue.interpolate({
14007
- inputRange: [0, 1],
14008
- outputRange: [0, DEFAULT_BACKDROP_OPACITY]
14009
- });
14010
- var modalAnimation = animatedModalValue.interpolate({
14011
- inputRange: [0, 1],
14012
- outputRange: animationType === 'slide' ? [Dimensions.get('window').height, 0] : [0, 1]
14013
- });
14014
- useImperativeHandle(ref, function () {
14015
- return {
14016
- show: function show() {
14017
- animateBackdropAndContent({
14018
- toValue: 1,
14019
- callback: onShow
14020
- });
14021
- },
14022
- hide: function hide(wrapperCallback) {
14023
- animateBackdropAndContent({
14024
- toValue: 0,
14025
- callback: function callback() {
14026
- if (Platform.OS === 'ios') {
14027
- onDismiss === null || onDismiss === void 0 || onDismiss();
14028
- }
14029
- wrapperCallback();
14030
- }
14031
- });
14032
- }
14033
- };
14034
- }, [onDismiss, onShow, animateBackdropAndContent]);
14035
- // Back button handler
14036
- useEffect(function () {
14037
- var backHandler = BackHandler.addEventListener('hardwareBackPress', function () {
14038
- onRequestClose === null || onRequestClose === void 0 || onRequestClose();
14039
- return true;
14040
- });
14041
- return function () {
14042
- return backHandler.remove();
14043
- };
14044
- }, [onRequestClose]);
14045
- return /*#__PURE__*/React.createElement(Portal$1, null, /*#__PURE__*/React.createElement(Animated.View, {
14046
- style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
14047
- backgroundColor: transparent ? 'transparent' : theme.colors.overlayGlobalSurface,
14048
- opacity: animationType !== 'none' ? backdropOpacityAnimation : DEFAULT_BACKDROP_OPACITY
14049
- })
14050
- }), /*#__PURE__*/React.createElement(Animated.View, {
14051
- testID: testID,
14052
- style: _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
14053
- opacity: animationType === 'fade' ? modalAnimation : 1,
14054
- transform: [{
14055
- translateY: animationType === 'slide' ? modalAnimation : 0
14056
- }]
14057
- })
14058
- }, children));
14059
- });
14060
- var ModalWrapper = function ModalWrapper(_ref3) {
14061
- var _ref3$visible = _ref3.visible,
14062
- visible = _ref3$visible === void 0 ? true : _ref3$visible,
14063
- props = _objectWithoutProperties(_ref3, _excluded$e);
14064
- var modalRef = useRef(null);
14065
- var _useState = useState(visible),
14066
- _useState2 = _slicedToArray(_useState, 2),
14067
- internalVisible = _useState2[0],
14068
- setInternalVisible = _useState2[1];
14069
- useEffect(function () {
14070
- if (visible) {
14071
- setInternalVisible(true);
14072
- } else {
14073
- var _modalRef$current;
14074
- // Wait for animation to finish before hiding the modal
14075
- (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 || _modalRef$current.hide(function () {
14076
- return setInternalVisible(false);
14077
- });
14078
- }
14079
- }, [visible]);
14080
- useEffect(function () {
14081
- if (internalVisible) {
14082
- var _modalRef$current2;
14083
- (_modalRef$current2 = modalRef.current) === null || _modalRef$current2 === void 0 || _modalRef$current2.show();
14084
- }
14085
- }, [internalVisible]);
14086
- return internalVisible ? /*#__PURE__*/React.createElement(Modal, _extends$1({
14087
- ref: modalRef
14088
- }, props)) : null;
14089
- };
14090
-
14091
13807
  var StyledErrorModal = index$a(ModalWrapper)({
14092
13808
  height: '100%',
14093
13809
  width: '100%'
@@ -14171,7 +13887,7 @@ var StyledErrorDescription = index$a(Typography.Body)(function (_ref9) {
14171
13887
  });
14172
13888
 
14173
13889
  var _excluded$d = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
14174
- _excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
13890
+ _excluded2 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
14175
13891
  var renderImage$1 = function renderImage(image) {
14176
13892
  if ( /*#__PURE__*/isValidElement(image)) {
14177
13893
  return /*#__PURE__*/React.cloneElement(image, {
@@ -14225,9 +13941,7 @@ var ErrorPage = function ErrorPage(_ref) {
14225
13941
  * @return {*} {ReactElement}
14226
13942
  */
14227
13943
  var Error$1 = function Error(_ref2) {
14228
- var _ref2$visible = _ref2.visible,
14229
- visible = _ref2$visible === void 0 ? true : _ref2$visible,
14230
- _ref2$variant = _ref2.variant,
13944
+ var _ref2$variant = _ref2.variant,
14231
13945
  variant = _ref2$variant === void 0 ? 'in-page' : _ref2$variant,
14232
13946
  title = _ref2.title,
14233
13947
  description = _ref2.description,
@@ -14238,8 +13952,7 @@ var Error$1 = function Error(_ref2) {
14238
13952
  secondaryCtaText = _ref2.secondaryCtaText,
14239
13953
  onSecondaryCtaPress = _ref2.onSecondaryCtaPress,
14240
13954
  nativeProps = _objectWithoutProperties(_ref2, _excluded2);
14241
- useDeprecation("Visible prop is deprecated. Use conditional rendering instead", visible);
14242
- var _useState = useState(visible),
13955
+ var _useState = useState(true),
14243
13956
  _useState2 = _slicedToArray(_useState, 2),
14244
13957
  isVisible = _useState2[0],
14245
13958
  setIsVisible = _useState2[1];
@@ -14256,9 +13969,6 @@ var Error$1 = function Error(_ref2) {
14256
13969
  }
14257
13970
  setCtaPressed(null);
14258
13971
  }, [ctaPressed, onCtaPress, onSecondaryCtaPress]);
14259
- useEffect(function () {
14260
- setIsVisible(visible);
14261
- }, [visible]);
14262
13972
  // These useEffect lines prevents race condition error when callback contains navigation logic
14263
13973
  useEffect(function () {
14264
13974
  if (ctaPressed) {
@@ -14615,8 +14325,7 @@ var StyledBackdrop = index$a(AnimatedPressable)(function (_ref2) {
14615
14325
  });
14616
14326
 
14617
14327
  var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
14618
- var headerTitle = _ref.headerTitle,
14619
- onPress = _ref.onPress,
14328
+ var onPress = _ref.onPress,
14620
14329
  active = _ref.active,
14621
14330
  style = _ref.style,
14622
14331
  items = _ref.items,
@@ -14625,7 +14334,6 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
14625
14334
  onBackdropPress = _ref.onBackdropPress,
14626
14335
  _ref$fabIcon = _ref.fabIcon,
14627
14336
  fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
14628
- useDeprecation("FAB.ActionGroup's headerTitle prop will be removed in the next major release. Please remove it.", headerTitle !== undefined);
14629
14337
  var fabRef = useRef(null);
14630
14338
  var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
14631
14339
  React.useImperativeHandle(ref, function () {
@@ -14720,12 +14428,11 @@ var index$6 = Object.assign(FAB, {
14720
14428
  });
14721
14429
 
14722
14430
  var ToastContainerWrapper = index$a(View)(function (_ref) {
14723
- var theme = _ref.theme,
14724
- position = _ref.position;
14431
+ var theme = _ref.theme;
14725
14432
  return _objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
14726
14433
  paddingHorizontal: theme.__hd__.toast.space.wrapperVerticalPadding,
14727
14434
  paddingVertical: theme.__hd__.toast.space.wrapperHorizontalPadding,
14728
- flexDirection: position === 'bottom' ? 'column-reverse' : 'column',
14435
+ flexDirection: 'column-reverse',
14729
14436
  elevation: 9999
14730
14437
  });
14731
14438
  });
@@ -14778,15 +14485,6 @@ var CTAWrapper = index$a(TouchableOpacity)(function (_ref6) {
14778
14485
  };
14779
14486
  });
14780
14487
 
14781
- var ToastContext = /*#__PURE__*/createContext({});
14782
- var ToastConfigContext = /*#__PURE__*/createContext({});
14783
- var useToastConfig = function useToastConfig() {
14784
- return useContext(ToastConfigContext);
14785
- };
14786
- var useToast = function useToast() {
14787
- return useContext(ToastContext);
14788
- };
14789
-
14790
14488
  var getIntentIcon = function getIntentIcon(intent) {
14791
14489
  switch (intent) {
14792
14490
  case 'success':
@@ -14830,7 +14528,6 @@ var Toast$1 = function Toast(_ref2) {
14830
14528
  _ref2$distance = _ref2.distance,
14831
14529
  distance = _ref2$distance === void 0 ? 0 : _ref2$distance;
14832
14530
  var animatedValue = useRef(new Animated.Value(0)).current;
14833
- var toastConfig = useToastConfig();
14834
14531
  useEffect(function () {
14835
14532
  if (autoDismiss && duration >= 0) {
14836
14533
  var id = setTimeout(function () {
@@ -14856,7 +14553,7 @@ var Toast$1 = function Toast(_ref2) {
14856
14553
  });
14857
14554
  var interpolateY = animatedValue.interpolate({
14858
14555
  inputRange: [0, 1],
14859
- outputRange: toastConfig.position === 'top' ? [-20, distance] : [20, -distance]
14556
+ outputRange: [20, -distance]
14860
14557
  });
14861
14558
  return /*#__PURE__*/React.createElement(Container, {
14862
14559
  themeVariant: variant,
@@ -14914,8 +14611,6 @@ var SingleToastDisplay = function SingleToastDisplay(_ref) {
14914
14611
  var ToastContainer = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
14915
14612
  var _ref2$displayType = _ref2.displayType,
14916
14613
  displayType = _ref2$displayType === void 0 ? 'single' : _ref2$displayType,
14917
- _ref2$position = _ref2.position,
14918
- position = _ref2$position === void 0 ? 'bottom' : _ref2$position,
14919
14614
  style = _ref2.style;
14920
14615
  var theme = useTheme$1();
14921
14616
  var _useState = useState([]),
@@ -14948,7 +14643,6 @@ var ToastContainer = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
14948
14643
  });
14949
14644
  return /*#__PURE__*/React.createElement(ToastContainerWrapper, {
14950
14645
  pointerEvents: "box-none",
14951
- position: position,
14952
14646
  style: style
14953
14647
  }, displayType === 'single' ? /*#__PURE__*/React.createElement(SingleToastDisplay, {
14954
14648
  toastList: toastList,
@@ -14975,13 +14669,16 @@ var ToastContainer = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
14975
14669
  });
14976
14670
  ToastContainer.displayName = 'ToastContainer';
14977
14671
 
14672
+ var ToastContext = /*#__PURE__*/createContext({});
14673
+ var ToastConfigContext = /*#__PURE__*/createContext({});
14674
+ var useToast = function useToast() {
14675
+ return useContext(ToastContext);
14676
+ };
14677
+
14978
14678
  var ToastProvider = function ToastProvider(_ref) {
14979
14679
  var children = _ref.children,
14980
14680
  _ref$displayType = _ref.displayType,
14981
- displayType = _ref$displayType === void 0 ? 'single' : _ref$displayType,
14982
- _position = _ref.position;
14983
- var position = _position === undefined ? 'bottom' : _position;
14984
- useDeprecation("Toast's position prop is deprecated and will be removed in the next major release.\nPlease remove it.", _position !== undefined);
14681
+ displayType = _ref$displayType === void 0 ? 'single' : _ref$displayType;
14985
14682
  var toastRef = useRef(null);
14986
14683
  // @ts-expect-error: TODO: @tungv Fix this type error
14987
14684
  var _useState = useState(null),
@@ -14995,10 +14692,9 @@ var ToastProvider = function ToastProvider(_ref) {
14995
14692
  }, []);
14996
14693
  var config = useMemo(function () {
14997
14694
  return {
14998
- displayType: displayType,
14999
- position: position
14695
+ displayType: displayType
15000
14696
  };
15001
- }, [displayType, position]);
14697
+ }, [displayType]);
15002
14698
  return /*#__PURE__*/React.createElement(ToastContext.Provider, {
15003
14699
  value: refState
15004
14700
  }, /*#__PURE__*/React.createElement(View, {
@@ -15009,8 +14705,7 @@ var ToastProvider = function ToastProvider(_ref) {
15009
14705
  value: config
15010
14706
  }, /*#__PURE__*/React.createElement(ToastContainer, {
15011
14707
  ref: toastRef,
15012
- displayType: displayType,
15013
- position: position
14708
+ displayType: displayType
15014
14709
  }))));
15015
14710
  };
15016
14711
 
@@ -16117,18 +15812,12 @@ var SectionHeading = function SectionHeading(_ref) {
16117
15812
  var icon = _ref.icon,
16118
15813
  text = _ref.text,
16119
15814
  rightChildren = _ref.rightChildren,
16120
- _ref$fontSize = _ref.fontSize,
16121
- fontSize = _ref$fontSize === void 0 ? 'large' : _ref$fontSize,
16122
15815
  _ref$intent = _ref.intent,
16123
15816
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
16124
- _ref$fontWeight = _ref.fontWeight,
16125
- fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
16126
15817
  _ref$size = _ref.size,
16127
15818
  size = _ref$size === void 0 ? 'medium' : _ref$size,
16128
15819
  style = _ref.style,
16129
15820
  testID = _ref.testID;
16130
- useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
16131
- useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
16132
15821
  return /*#__PURE__*/React.createElement(StyledHeading, {
16133
15822
  themeSize: size,
16134
15823
  style: style,
@@ -17341,6 +17030,10 @@ var useAnimatedValueArray = function useAnimatedValueArray(initialValues) {
17341
17030
  return refs.current;
17342
17031
  };
17343
17032
 
17033
+ var isHeroIcon = function isHeroIcon(x) {
17034
+ return IconList.includes(x);
17035
+ };
17036
+
17344
17037
  var TabWithBadge = function TabWithBadge(_ref) {
17345
17038
  var config = _ref.config,
17346
17039
  tabItem = _ref.tabItem;
@@ -17761,17 +17454,14 @@ var StyledText = index$a(Typography.Caption)(function (_ref2) {
17761
17454
  };
17762
17455
  });
17763
17456
 
17764
- var _excluded$2 = ["content", "variant", "intent", "style", "testID"];
17457
+ var _excluded$2 = ["content", "intent", "style", "testID"];
17765
17458
  var Tag = function Tag(_ref) {
17766
17459
  var content = _ref.content,
17767
- _ref$variant = _ref.variant,
17768
- variant = _ref$variant === void 0 ? 'outlined' : _ref$variant,
17769
17460
  _ref$intent = _ref.intent,
17770
17461
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
17771
17462
  style = _ref.style,
17772
17463
  testID = _ref.testID,
17773
17464
  nativeProps = _objectWithoutProperties(_ref, _excluded$2);
17774
- useDeprecation("Tag's variant prop is deprecated and will be removed in the next major release. Please remove it.", variant !== undefined);
17775
17465
  return /*#__PURE__*/React.createElement(StyledView, _extends$1({}, nativeProps, {
17776
17466
  themeIntent: intent,
17777
17467
  style: style,
@@ -34326,4 +34016,4 @@ var index = Object.assign(RichTextEditorWithRef, {
34326
34016
  Toolbar: EditorToolbar
34327
34017
  });
34328
34018
 
34329
- export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Chip, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, HeroDesignProvider, Icon, Image, List, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
34019
+ export { Accordion, Alert, Attachment, index$9 as Avatar, Badge$1 as Badge, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$8 as Carousel, Checkbox, Chip, Collapse, ContentNavigator, DatePicker, Divider, index$7 as Drawer, Empty, Error$1 as Error, index$6 as FAB, HeroDesignProvider, Icon, Image, List, PageControl, PinInput, Portal$1 as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };