@hero-design/rn 8.82.1 → 8.82.2-alpha.1

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 (152) hide show
  1. package/es/index.js +40 -0
  2. package/eslint.config.js +2 -4
  3. package/lib/index.js +40 -0
  4. package/package.json +3 -3
  5. package/types/components/Accordion/AccordionItem.d.ts +1 -1
  6. package/types/components/Accordion/StyledAccordion.d.ts +11 -11
  7. package/types/components/Accordion/index.d.ts +1 -1
  8. package/types/components/Alert/StyledAlert.d.ts +16 -16
  9. package/types/components/Alert/index.d.ts +1 -1
  10. package/types/components/Attachment/StyledAttachment.d.ts +8 -8
  11. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +9 -9
  12. package/types/components/Avatar/StyledAvatar.d.ts +10 -10
  13. package/types/components/Badge/StyledBadge.d.ts +12 -12
  14. package/types/components/Badge/index.d.ts +1 -1
  15. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +15 -15
  16. package/types/components/BottomNavigation/index.d.ts +1 -1
  17. package/types/components/BottomSheet/BottomSheetContext.d.ts +1 -1
  18. package/types/components/BottomSheet/Header.d.ts +2 -2
  19. package/types/components/BottomSheet/StyledBottomSheet.d.ts +22 -22
  20. package/types/components/Box/StyledBox.d.ts +2 -2
  21. package/types/components/Box/config.d.ts +2 -2
  22. package/types/components/Box/types.d.ts +3 -3
  23. package/types/components/Button/Button.d.ts +1 -1
  24. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +6 -6
  25. package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
  26. package/types/components/Button/StyledButton.d.ts +22 -22
  27. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +6 -6
  28. package/types/components/Calendar/StyledCalendar.d.ts +22 -22
  29. package/types/components/Card/DataCard/StyledDataCard.d.ts +5 -5
  30. package/types/components/Card/StyledCard.d.ts +4 -4
  31. package/types/components/Carousel/CardCarousel.d.ts +1 -1
  32. package/types/components/Carousel/StyledCardCarousel.d.ts +8 -8
  33. package/types/components/Carousel/StyledCarousel.d.ts +21 -21
  34. package/types/components/Carousel/types.d.ts +2 -2
  35. package/types/components/Checkbox/StyledCheckbox.d.ts +11 -11
  36. package/types/components/Checkbox/index.d.ts +1 -1
  37. package/types/components/Chip/StyledChip.d.ts +5 -5
  38. package/types/components/Collapse/StyledCollapse.d.ts +6 -6
  39. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +2 -2
  40. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  41. package/types/components/DatePicker/DatePickerCalendar.d.ts +1 -1
  42. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  43. package/types/components/DatePicker/StyledDatePicker.d.ts +2 -2
  44. package/types/components/DatePicker/useCalculateDate.d.ts +1 -1
  45. package/types/components/Divider/StyledDivider.d.ts +5 -5
  46. package/types/components/Drawer/DragableDrawer/helpers.d.ts +1 -1
  47. package/types/components/Drawer/StyledDrawer.d.ts +15 -15
  48. package/types/components/Empty/StyledEmpty.d.ts +7 -7
  49. package/types/components/Error/StyledError.d.ts +21 -21
  50. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +10 -10
  51. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +6 -6
  52. package/types/components/FAB/ActionGroup/index.d.ts +1 -1
  53. package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
  54. package/types/components/FAB/FAB.d.ts +1 -1
  55. package/types/components/FAB/Pair/StyledFAB.d.ts +6 -6
  56. package/types/components/FAB/Pair/index.d.ts +1 -1
  57. package/types/components/FAB/StyledFAB.d.ts +9 -9
  58. package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +10 -10
  59. package/types/components/Icon/AnimatedIcon.d.ts +1 -1
  60. package/types/components/Icon/HeroIcon/index.d.ts +4 -4
  61. package/types/components/Icon/index.d.ts +1 -1
  62. package/types/components/Icon/utils.d.ts +2 -1
  63. package/types/components/List/StyledBasicListItem.d.ts +10 -10
  64. package/types/components/List/StyledListItem.d.ts +18 -18
  65. package/types/components/MapPin/StyledMapPin.d.ts +11 -11
  66. package/types/components/MapPin/types.d.ts +1 -1
  67. package/types/components/PageControl/StyledPageControl.d.ts +4 -4
  68. package/types/components/PinInput/StyledPinInput.d.ts +21 -21
  69. package/types/components/Portal/reducer.d.ts +1 -1
  70. package/types/components/Portal/types.d.ts +1 -1
  71. package/types/components/Progress/ProgressStep.d.ts +1 -1
  72. package/types/components/Progress/StyledProgressBar.d.ts +4 -4
  73. package/types/components/Progress/StyledProgressCircle.d.ts +12 -12
  74. package/types/components/Progress/StyledStep.d.ts +10 -10
  75. package/types/components/Progress/types.d.ts +1 -1
  76. package/types/components/Radio/StyledRadio.d.ts +9 -9
  77. package/types/components/Radio/index.d.ts +1 -1
  78. package/types/components/Radio/types.d.ts +1 -1
  79. package/types/components/Rate/StyledRate.d.ts +4 -4
  80. package/types/components/RefreshControl/index.d.ts +1 -1
  81. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -1
  82. package/types/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  83. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +4 -4
  84. package/types/components/RichTextEditor/StyledToolbar.d.ts +6 -6
  85. package/types/components/RichTextEditor/types.d.ts +1 -1
  86. package/types/components/Search/SearchOneLine.d.ts +5 -5
  87. package/types/components/Search/StyledSearch.d.ts +18 -18
  88. package/types/components/Search/index.d.ts +1 -1
  89. package/types/components/Search/utils.d.ts +2 -2
  90. package/types/components/SectionHeading/StyledHeading.d.ts +7 -7
  91. package/types/components/Select/BaseOptionList.d.ts +1 -1
  92. package/types/components/Select/MultiSelect/Option.d.ts +2 -2
  93. package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
  94. package/types/components/Select/SingleSelect/Option.d.ts +2 -2
  95. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  96. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +2 -1
  97. package/types/components/Select/StyledSelect.d.ts +6 -6
  98. package/types/components/Select/helpers.d.ts +2 -2
  99. package/types/components/Select/types.d.ts +6 -6
  100. package/types/components/Skeleton/StyledSkeleton.d.ts +6 -6
  101. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -2
  102. package/types/components/Spinner/StyledSpinner.d.ts +13 -13
  103. package/types/components/Success/StyledSuccess.d.ts +19 -19
  104. package/types/components/Swipeable/StyledSwipeable.d.ts +3 -3
  105. package/types/components/Swipeable/index.d.ts +2 -2
  106. package/types/components/Switch/SelectorSwitch/Option.d.ts +3 -5
  107. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +8 -8
  108. package/types/components/Switch/SelectorSwitch/index.d.ts +3 -3
  109. package/types/components/Switch/StyledSwitch.d.ts +5 -5
  110. package/types/components/Switch/index.d.ts +3 -3
  111. package/types/components/Tabs/SceneView.d.ts +3 -3
  112. package/types/components/Tabs/ScrollableTabsHeader/hooks/useInitHighlightedAnimation.d.ts +2 -2
  113. package/types/components/Tabs/ScrollableTabsHeader/hooks/useInitUnderlinedAnimation.d.ts +2 -2
  114. package/types/components/Tabs/StyledScrollableTabs.d.ts +17 -17
  115. package/types/components/Tabs/StyledTabs.d.ts +14 -14
  116. package/types/components/Tabs/TabWithBadge.d.ts +3 -3
  117. package/types/components/Tabs/index.d.ts +2 -2
  118. package/types/components/Tabs/useHandlePageScroll.d.ts +1 -1
  119. package/types/components/Tag/StyledTag.d.ts +5 -5
  120. package/types/components/TextInput/StyledTextInput.d.ts +28 -28
  121. package/types/components/TextInput/index.d.ts +16 -16
  122. package/types/components/TimePicker/StyledTimePicker.d.ts +2 -2
  123. package/types/components/Toast/StyledToast.d.ts +18 -18
  124. package/types/components/Toast/ToastContext.d.ts +2 -2
  125. package/types/components/Toast/ToastProvider.d.ts +1 -1
  126. package/types/components/Toast/types.d.ts +2 -2
  127. package/types/components/Toolbar/StyledToolbar.d.ts +25 -25
  128. package/types/components/Toolbar/ToolbarMessage.d.ts +4 -4
  129. package/types/components/Typography/Body/StyledBody.d.ts +4 -4
  130. package/types/components/Typography/Caption/StyledCaption.d.ts +3 -3
  131. package/types/components/Typography/Label/StyledLabel.d.ts +2 -2
  132. package/types/components/Typography/Text/StyledText.d.ts +6 -6
  133. package/types/components/Typography/Title/StyledTitle.d.ts +4 -4
  134. package/types/components/Typography/types.d.ts +1 -1
  135. package/types/testHelpers/utils.d.ts +1 -1
  136. package/types/theme/ThemeSwitcher.d.ts +3 -3
  137. package/types/theme/components/badge.d.ts +1 -1
  138. package/types/theme/components/button.d.ts +1 -1
  139. package/types/theme/components/carousel.d.ts +1 -1
  140. package/types/theme/components/empty.d.ts +1 -1
  141. package/types/theme/components/error.d.ts +1 -1
  142. package/types/theme/components/fab.d.ts +1 -1
  143. package/types/theme/components/pinInput.d.ts +1 -1
  144. package/types/theme/components/success.d.ts +1 -1
  145. package/types/theme/components/tag.d.ts +1 -1
  146. package/types/theme/getTheme.d.ts +1 -1
  147. package/types/theme/global/colors/types.d.ts +3 -3
  148. package/types/theme/global/index.d.ts +4 -4
  149. package/types/theme/global/scale.d.ts +1 -1
  150. package/types/theme/global/shadows.d.ts +1 -1
  151. package/types/theme/global/typography.d.ts +1 -1
  152. package/.turbo/turbo-build.log +0 -7
package/es/index.js CHANGED
@@ -2042,15 +2042,25 @@ var getFontSizes = function getFontSizes(baseFontSize) {
2042
2042
  });
2043
2043
  return {
2044
2044
  '7xlarge': scale(fontSizes[10]),
2045
+ // 42
2045
2046
  '6xlarge': scale(fontSizes[9]),
2047
+ // 36
2046
2048
  xxxxxlarge: scale(fontSizes[8]),
2049
+ // 32
2047
2050
  xxxxlarge: scale(fontSizes[7]),
2051
+ // 28
2048
2052
  xxxlarge: scale(fontSizes[6]),
2053
+ // 24
2049
2054
  xxlarge: scale(fontSizes[5]),
2055
+ // 20
2050
2056
  xlarge: scale(fontSizes[4]),
2057
+ // 18
2051
2058
  large: scale(fontSizes[3]),
2059
+ // 16
2052
2060
  medium: scale(fontSizes[2]),
2061
+ // 14
2053
2062
  small: scale(fontSizes[1]),
2063
+ // 12
2054
2064
  xsmall: scale(fontSizes[0]) // 10
2055
2065
  };
2056
2066
  };
@@ -2075,15 +2085,25 @@ var getLineHeights = function getLineHeights(fontSizes) {
2075
2085
  var getSpace = function getSpace(baseSpace) {
2076
2086
  return {
2077
2087
  xxsmall: scale(baseSpace * 0.25),
2088
+ // 2
2078
2089
  xsmall: scale(baseSpace * 0.5),
2090
+ // 4
2079
2091
  small: scale(baseSpace),
2092
+ // 8
2080
2093
  smallMedium: scale(baseSpace) * 1.5,
2094
+ // 12
2081
2095
  medium: scale(baseSpace * 2),
2096
+ // 16
2082
2097
  large: scale(baseSpace * 3),
2098
+ // 24
2083
2099
  xlarge: scale(baseSpace * 4),
2100
+ // 32
2084
2101
  xxlarge: scale(baseSpace * 5),
2102
+ // 40
2085
2103
  xxxlarge: scale(baseSpace * 6),
2104
+ // 48
2086
2105
  xxxxlarge: scale(baseSpace * 7),
2106
+ // 56
2087
2107
  '5xlarge': scale(baseSpace * 8) // 64
2088
2108
  };
2089
2109
  };
@@ -2091,12 +2111,19 @@ var getSpace = function getSpace(baseSpace) {
2091
2111
  var getSizes = function getSizes(baseSize) {
2092
2112
  return _objectSpread2(_objectSpread2({}, getSpace(baseSize)), {}, {
2093
2113
  xxxxxlarge: scale(baseSize * 8),
2114
+ // 64
2094
2115
  '6xlarge': scale(baseSize * 9),
2116
+ // 72
2095
2117
  '7xlarge': scale(baseSize * 10),
2118
+ // 80
2096
2119
  '9xlarge': scale(baseSize * 12),
2120
+ // 96
2097
2121
  '14xlarge': scale(baseSize * 17),
2122
+ // 136
2098
2123
  '15xlarge': scale(baseSize * 18),
2124
+ // 144
2099
2125
  '18xlarge': scale(baseSize * 21),
2126
+ // 168
2100
2127
  '19xlarge': scale(baseSize * 22) // 176
2101
2128
  });
2102
2129
  };
@@ -2104,6 +2131,7 @@ var getSizes = function getSizes(baseSize) {
2104
2131
  var getBorderWidths = function getBorderWidths(baseBorderWidth) {
2105
2132
  return {
2106
2133
  base: baseBorderWidth,
2134
+ // 1
2107
2135
  medium: baseBorderWidth * 2 // 2
2108
2136
  };
2109
2137
  };
@@ -2112,11 +2140,17 @@ var getRadii = function getRadii(baseRadius) {
2112
2140
  return {
2113
2141
  rounded: 999,
2114
2142
  base: baseRadius,
2143
+ // 4
2115
2144
  medium: baseRadius * 2,
2145
+ // 8
2116
2146
  large: baseRadius * 3,
2147
+ // 12
2117
2148
  xlarge: baseRadius * 4,
2149
+ // 16
2118
2150
  xxlarge: baseRadius * 5,
2151
+ // 20
2119
2152
  xxxlarge: baseRadius * 6,
2153
+ // 24
2120
2154
  '5xlarge': baseRadius * 8 // 32
2121
2155
  };
2122
2156
  };
@@ -3066,6 +3100,7 @@ var getProgressTheme = function getProgressTheme(theme) {
3066
3100
  completeness: {
3067
3101
  primary: theme.colors.primary,
3068
3102
  success: theme.colors.success,
3103
+ // should be emerald dark 15
3069
3104
  warning: theme.colors.warning,
3070
3105
  danger: theme.colors.error,
3071
3106
  info: theme.colors.info,
@@ -8276,6 +8311,7 @@ var StyledText$2 = index$a(Typography.Text)(function (_ref2) {
8276
8311
 
8277
8312
  android: {
8278
8313
  lineHeight: null,
8314
+ // center on android
8279
8315
  marginTop: theme.__hd__.avatar.spaces.titleMarginTopForAndroid[themeSize]
8280
8316
  },
8281
8317
  web: {
@@ -9419,6 +9455,7 @@ var StyledButtonTitleOfVariantText = index$a(Typography.Body)(function (_ref3) {
9419
9455
  return _objectSpread2({
9420
9456
  flexShrink: 1,
9421
9457
  lineHeight: theme.__hd__.button.lineHeights.titleOfTextVariant,
9458
+ // align text on Android
9422
9459
  textAlign: 'center'
9423
9460
  }, themeStyling());
9424
9461
  });
@@ -14261,6 +14298,7 @@ var calculateSnapPointsData = function calculateSnapPointsData(minimumHeight, he
14261
14298
  return {
14262
14299
  list: uniqSnapPointOffsetValues,
14263
14300
  minHeightOffset: Math.max.apply(Math, uniqSnapPointOffsetValues),
14301
+ // Furthest from max height
14264
14302
  maxHeightOffset: 0 // Max height
14265
14303
  };
14266
14304
  };
@@ -16588,6 +16626,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
16588
16626
  });
16589
16627
  var interpolateOpacityRightHalf = progressAnimatedValue.current.interpolate({
16590
16628
  inputRange: [50, 51],
16629
+ // Transition between left and right half
16591
16630
  outputRange: [1, 0],
16592
16631
  extrapolate: 'clamp'
16593
16632
  });
@@ -16712,6 +16751,7 @@ var ProgressBar = function ProgressBar(_ref) {
16712
16751
  });
16713
16752
  var interpolateBorderRadius = progressAnimatedValue.current.interpolate({
16714
16753
  inputRange: [99, 100],
16754
+ // Transition range to remove bother when reached 100%
16715
16755
  outputRange: [999, 0],
16716
16756
  extrapolate: 'clamp'
16717
16757
  });
package/eslint.config.js CHANGED
@@ -15,19 +15,16 @@ module.exports = [
15
15
  includeIgnoreFile(gitignorePath),
16
16
  {
17
17
  files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
18
-
19
18
  plugins: {
20
19
  '@hero-design': heroDesign,
21
20
  import: _import,
22
21
  },
23
-
24
22
  languageOptions: {
25
23
  parserOptions: {
26
24
  tsconfigRootDir: __dirname,
27
25
  project: ['./tsconfig.json'],
28
26
  },
29
27
  },
30
-
31
28
  rules: {
32
29
  'no-underscore-dangle': [
33
30
  'error',
@@ -35,8 +32,9 @@ module.exports = [
35
32
  allow: ['__hd__'],
36
33
  },
37
34
  ],
38
-
39
35
  'import/no-cycle': 'error',
36
+ 'react/no-unused-prop-types': 'warn',
37
+ 'react/no-array-index-key': 'warn',
40
38
  },
41
39
  },
42
40
  ];
package/lib/index.js CHANGED
@@ -2069,15 +2069,25 @@ var getFontSizes = function getFontSizes(baseFontSize) {
2069
2069
  });
2070
2070
  return {
2071
2071
  '7xlarge': scale(fontSizes[10]),
2072
+ // 42
2072
2073
  '6xlarge': scale(fontSizes[9]),
2074
+ // 36
2073
2075
  xxxxxlarge: scale(fontSizes[8]),
2076
+ // 32
2074
2077
  xxxxlarge: scale(fontSizes[7]),
2078
+ // 28
2075
2079
  xxxlarge: scale(fontSizes[6]),
2080
+ // 24
2076
2081
  xxlarge: scale(fontSizes[5]),
2082
+ // 20
2077
2083
  xlarge: scale(fontSizes[4]),
2084
+ // 18
2078
2085
  large: scale(fontSizes[3]),
2086
+ // 16
2079
2087
  medium: scale(fontSizes[2]),
2088
+ // 14
2080
2089
  small: scale(fontSizes[1]),
2090
+ // 12
2081
2091
  xsmall: scale(fontSizes[0]) // 10
2082
2092
  };
2083
2093
  };
@@ -2102,15 +2112,25 @@ var getLineHeights = function getLineHeights(fontSizes) {
2102
2112
  var getSpace = function getSpace(baseSpace) {
2103
2113
  return {
2104
2114
  xxsmall: scale(baseSpace * 0.25),
2115
+ // 2
2105
2116
  xsmall: scale(baseSpace * 0.5),
2117
+ // 4
2106
2118
  small: scale(baseSpace),
2119
+ // 8
2107
2120
  smallMedium: scale(baseSpace) * 1.5,
2121
+ // 12
2108
2122
  medium: scale(baseSpace * 2),
2123
+ // 16
2109
2124
  large: scale(baseSpace * 3),
2125
+ // 24
2110
2126
  xlarge: scale(baseSpace * 4),
2127
+ // 32
2111
2128
  xxlarge: scale(baseSpace * 5),
2129
+ // 40
2112
2130
  xxxlarge: scale(baseSpace * 6),
2131
+ // 48
2113
2132
  xxxxlarge: scale(baseSpace * 7),
2133
+ // 56
2114
2134
  '5xlarge': scale(baseSpace * 8) // 64
2115
2135
  };
2116
2136
  };
@@ -2118,12 +2138,19 @@ var getSpace = function getSpace(baseSpace) {
2118
2138
  var getSizes = function getSizes(baseSize) {
2119
2139
  return _objectSpread2(_objectSpread2({}, getSpace(baseSize)), {}, {
2120
2140
  xxxxxlarge: scale(baseSize * 8),
2141
+ // 64
2121
2142
  '6xlarge': scale(baseSize * 9),
2143
+ // 72
2122
2144
  '7xlarge': scale(baseSize * 10),
2145
+ // 80
2123
2146
  '9xlarge': scale(baseSize * 12),
2147
+ // 96
2124
2148
  '14xlarge': scale(baseSize * 17),
2149
+ // 136
2125
2150
  '15xlarge': scale(baseSize * 18),
2151
+ // 144
2126
2152
  '18xlarge': scale(baseSize * 21),
2153
+ // 168
2127
2154
  '19xlarge': scale(baseSize * 22) // 176
2128
2155
  });
2129
2156
  };
@@ -2131,6 +2158,7 @@ var getSizes = function getSizes(baseSize) {
2131
2158
  var getBorderWidths = function getBorderWidths(baseBorderWidth) {
2132
2159
  return {
2133
2160
  base: baseBorderWidth,
2161
+ // 1
2134
2162
  medium: baseBorderWidth * 2 // 2
2135
2163
  };
2136
2164
  };
@@ -2139,11 +2167,17 @@ var getRadii = function getRadii(baseRadius) {
2139
2167
  return {
2140
2168
  rounded: 999,
2141
2169
  base: baseRadius,
2170
+ // 4
2142
2171
  medium: baseRadius * 2,
2172
+ // 8
2143
2173
  large: baseRadius * 3,
2174
+ // 12
2144
2175
  xlarge: baseRadius * 4,
2176
+ // 16
2145
2177
  xxlarge: baseRadius * 5,
2178
+ // 20
2146
2179
  xxxlarge: baseRadius * 6,
2180
+ // 24
2147
2181
  '5xlarge': baseRadius * 8 // 32
2148
2182
  };
2149
2183
  };
@@ -3093,6 +3127,7 @@ var getProgressTheme = function getProgressTheme(theme) {
3093
3127
  completeness: {
3094
3128
  primary: theme.colors.primary,
3095
3129
  success: theme.colors.success,
3130
+ // should be emerald dark 15
3096
3131
  warning: theme.colors.warning,
3097
3132
  danger: theme.colors.error,
3098
3133
  info: theme.colors.info,
@@ -8303,6 +8338,7 @@ var StyledText$2 = index$a(Typography.Text)(function (_ref2) {
8303
8338
 
8304
8339
  android: {
8305
8340
  lineHeight: null,
8341
+ // center on android
8306
8342
  marginTop: theme.__hd__.avatar.spaces.titleMarginTopForAndroid[themeSize]
8307
8343
  },
8308
8344
  web: {
@@ -9446,6 +9482,7 @@ var StyledButtonTitleOfVariantText = index$a(Typography.Body)(function (_ref3) {
9446
9482
  return _objectSpread2({
9447
9483
  flexShrink: 1,
9448
9484
  lineHeight: theme.__hd__.button.lineHeights.titleOfTextVariant,
9485
+ // align text on Android
9449
9486
  textAlign: 'center'
9450
9487
  }, themeStyling());
9451
9488
  });
@@ -14288,6 +14325,7 @@ var calculateSnapPointsData = function calculateSnapPointsData(minimumHeight, he
14288
14325
  return {
14289
14326
  list: uniqSnapPointOffsetValues,
14290
14327
  minHeightOffset: Math.max.apply(Math, uniqSnapPointOffsetValues),
14328
+ // Furthest from max height
14291
14329
  maxHeightOffset: 0 // Max height
14292
14330
  };
14293
14331
  };
@@ -16615,6 +16653,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
16615
16653
  });
16616
16654
  var interpolateOpacityRightHalf = progressAnimatedValue.current.interpolate({
16617
16655
  inputRange: [50, 51],
16656
+ // Transition between left and right half
16618
16657
  outputRange: [1, 0],
16619
16658
  extrapolate: 'clamp'
16620
16659
  });
@@ -16739,6 +16778,7 @@ var ProgressBar = function ProgressBar(_ref) {
16739
16778
  });
16740
16779
  var interpolateBorderRadius = progressAnimatedValue.current.interpolate({
16741
16780
  inputRange: [99, 100],
16781
+ // Transition range to remove bother when reached 100%
16742
16782
  outputRange: [999, 0],
16743
16783
  extrapolate: 'clamp'
16744
16784
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.82.1",
3
+ "version": "8.82.2-alpha.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -70,7 +70,7 @@
70
70
  "babel-preset-expo": "^11.0.15",
71
71
  "core-js": "^3.33.0",
72
72
  "eslint": "^8.56.0",
73
- "eslint-config-hd": "8.42.4",
73
+ "eslint-config-hd": "8.42.5",
74
74
  "eslint-plugin-import": "^2.27.5",
75
75
  "jest": "^29.2.1",
76
76
  "jest-environment-jsdom": "^29.2.1",
@@ -91,7 +91,7 @@
91
91
  "rollup-plugin-flow": "^1.1.1",
92
92
  "rollup-plugin-visualizer": "^5.12.0",
93
93
  "ts-jest": "^29.1.1",
94
- "typescript": "4.8.4"
94
+ "typescript": "^5.7.3"
95
95
  },
96
96
  "prettier": "prettier-config-hd"
97
97
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { ReactElement } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
4
  import type { Variant } from './StyledAccordion';
5
- export declare type AccordionItemProps = {
5
+ export type AccordionItemProps = {
6
6
  header: string | ReactElement;
7
7
  content: ReactElement;
8
8
  open?: boolean;
@@ -1,32 +1,32 @@
1
1
  import { TouchableOpacity, View } from 'react-native';
2
- export declare type Variant = 'default' | 'card';
2
+ export type Variant = 'default' | 'card';
3
3
  export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
- theme?: import("@emotion/react").Theme | undefined;
5
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
4
+ theme?: import("@emotion/react").Theme;
5
+ as?: React.ElementType;
6
6
  }, {}, {
7
7
  ref?: import("react").Ref<View> | undefined;
8
8
  }>;
9
9
  export declare const StyledItemWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
10
- theme?: import("@emotion/react").Theme | undefined;
11
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
10
+ theme?: import("@emotion/react").Theme;
11
+ as?: React.ElementType;
12
12
  } & {
13
13
  themeVariant: Variant;
14
14
  }, {}, {
15
15
  ref?: import("react").Ref<View> | undefined;
16
16
  }>;
17
17
  export declare const StyledHeaderWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
18
- theme?: import("@emotion/react").Theme | undefined;
19
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
20
20
  }, {}, {
21
21
  ref?: import("react").Ref<TouchableOpacity> | undefined;
22
22
  }>;
23
23
  export declare const StyledCollapse: import("@emotion/native").StyledComponent<import("../Collapse").CollapseProps & {
24
- theme?: import("@emotion/react").Theme | undefined;
25
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
24
+ theme?: import("@emotion/react").Theme;
25
+ as?: React.ElementType;
26
26
  }, {}, {}>;
27
27
  export declare const Spacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
28
- theme?: import("@emotion/react").Theme | undefined;
29
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
+ theme?: import("@emotion/react").Theme;
29
+ as?: React.ElementType;
30
30
  }, {}, {
31
31
  ref?: import("react").Ref<View> | undefined;
32
32
  }>;
@@ -35,5 +35,5 @@ export interface AccordionProps<K extends Key> {
35
35
  */
36
36
  testID?: string;
37
37
  }
38
- declare const Accordion: <K extends React.Key>({ items, activeItemKey, onItemPress, variant, style, testID, }: AccordionProps<K>) => React.JSX.Element;
38
+ declare const Accordion: <K extends Key>({ items, activeItemKey, onItemPress, variant, style, testID, }: AccordionProps<K>) => React.JSX.Element;
39
39
  export default Accordion;
@@ -2,51 +2,51 @@ import { TouchableOpacity, View } from 'react-native';
2
2
  import type { ViewProps } from 'react-native';
3
3
  import { TextProps } from '../Typography/Text';
4
4
  import { IconProps } from '../Icon';
5
- declare type ThemeIntent = 'success' | 'info' | 'warning' | 'error' | 'notification';
5
+ type ThemeIntent = 'success' | 'info' | 'warning' | 'error' | 'notification';
6
6
  declare const Container: import("@emotion/native").StyledComponent<ViewProps & {
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
7
+ theme?: import("@emotion/react").Theme;
8
+ as?: React.ElementType;
9
9
  } & {
10
- themeVariant: 'rounded' | 'unrounded';
10
+ themeVariant: "rounded" | "unrounded";
11
11
  themeIntent: ThemeIntent;
12
12
  }, {}, {
13
13
  ref?: import("react").Ref<View> | undefined;
14
14
  }>;
15
15
  declare const IconContainer: import("@emotion/native").StyledComponent<ViewProps & {
16
- theme?: import("@emotion/react").Theme | undefined;
17
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
16
+ theme?: import("@emotion/react").Theme;
17
+ as?: React.ElementType;
18
18
  }, {}, {
19
19
  ref?: import("react").Ref<View> | undefined;
20
20
  }>;
21
21
  declare const StyledIcon: import("@emotion/native").StyledComponent<IconProps & {
22
- theme?: import("@emotion/react").Theme | undefined;
23
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
22
+ theme?: import("@emotion/react").Theme;
23
+ as?: React.ElementType;
24
24
  } & {
25
25
  themeIntent: ThemeIntent;
26
26
  }, {}, {}>;
27
27
  declare const TextContainer: import("@emotion/native").StyledComponent<ViewProps & {
28
- theme?: import("@emotion/react").Theme | undefined;
29
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
+ theme?: import("@emotion/react").Theme;
29
+ as?: React.ElementType;
30
30
  }, {}, {
31
31
  ref?: import("react").Ref<View> | undefined;
32
32
  }>;
33
33
  declare const StyledBody: import("@emotion/native").StyledComponent<import("../Typography/Body").BodyProps & {
34
- theme?: import("@emotion/react").Theme | undefined;
35
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
34
+ theme?: import("@emotion/react").Theme;
35
+ as?: React.ElementType;
36
36
  } & TextProps & {
37
37
  themeIntent: ThemeIntent;
38
38
  }, {}, {}>;
39
39
  declare const ContentContainer: import("@emotion/native").StyledComponent<ViewProps & {
40
- theme?: import("@emotion/react").Theme | undefined;
41
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
40
+ theme?: import("@emotion/react").Theme;
41
+ as?: React.ElementType;
42
42
  } & {
43
43
  showDivider: boolean;
44
44
  }, {}, {
45
45
  ref?: import("react").Ref<View> | undefined;
46
46
  }>;
47
47
  declare const CTAWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
48
- theme?: import("@emotion/react").Theme | undefined;
49
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
48
+ theme?: import("@emotion/react").Theme;
49
+ as?: React.ElementType;
50
50
  }, {}, {
51
51
  ref?: import("react").Ref<TouchableOpacity> | undefined;
52
52
  }>;
@@ -44,7 +44,7 @@ interface BasicAlertProps {
44
44
  */
45
45
  actionLabel?: string;
46
46
  }
47
- declare type AlertProps = (BasicAlertProps & {
47
+ type AlertProps = (BasicAlertProps & {
48
48
  actionLabel?: undefined;
49
49
  }) | (BasicAlertProps & {
50
50
  onClose: () => void;
@@ -1,27 +1,27 @@
1
1
  import { TouchableOpacity, View } from 'react-native';
2
2
  declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
+ as?: React.ElementType;
5
5
  }, {}, {
6
6
  ref?: import("react").Ref<View> | undefined;
7
7
  }>;
8
8
  declare const StyledContentContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
9
- theme?: import("@emotion/react").Theme | undefined;
10
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
9
+ theme?: import("@emotion/react").Theme;
10
+ as?: React.ElementType;
11
11
  } & {
12
12
  themeHighlighted: boolean;
13
13
  }, {}, {
14
14
  ref?: import("react").Ref<View> | undefined;
15
15
  }>;
16
16
  declare const StyledTextContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
17
- theme?: import("@emotion/react").Theme | undefined;
18
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
17
+ theme?: import("@emotion/react").Theme;
18
+ as?: React.ElementType;
19
19
  }, {}, {
20
20
  ref?: import("react").Ref<View> | undefined;
21
21
  }>;
22
22
  declare const StyledCTAWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
23
- theme?: import("@emotion/react").Theme | undefined;
24
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
23
+ theme?: import("@emotion/react").Theme;
24
+ as?: React.ElementType;
25
25
  }, {}, {
26
26
  ref?: import("react").Ref<TouchableOpacity> | undefined;
27
27
  }>;
@@ -1,11 +1,11 @@
1
1
  import { View } from 'react-native';
2
2
  import { AvatarProps } from '../Avatar';
3
- declare type ThemeVariant = 'horizontal' | 'vertical';
3
+ type ThemeVariant = 'horizontal' | 'vertical';
4
4
  export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
5
- theme?: import("@emotion/react").Theme | undefined;
6
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ theme?: import("@emotion/react").Theme;
6
+ as?: React.ElementType;
7
7
  } & {
8
- themeSize: Required<AvatarProps>['size'];
8
+ themeSize: Required<AvatarProps>["size"];
9
9
  themeAvatarCount: number;
10
10
  themeVariant: ThemeVariant;
11
11
  themeHasSurplus: boolean;
@@ -13,18 +13,18 @@ export declare const StyledWrapper: import("@emotion/native").StyledComponent<im
13
13
  ref?: import("react").Ref<View> | undefined;
14
14
  }>;
15
15
  export declare const StyledAvatar: import("@emotion/native").StyledComponent<AvatarProps & {
16
- theme?: import("@emotion/react").Theme | undefined;
17
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
16
+ theme?: import("@emotion/react").Theme;
17
+ as?: React.ElementType;
18
18
  } & {
19
19
  themeIndex: number;
20
20
  themeVariant: ThemeVariant;
21
21
  }, {}, {}>;
22
22
  export declare const StyledSurplusContainer: import("@emotion/native").StyledComponent<import("../../Box").BoxProps & {
23
- theme?: import("@emotion/react").Theme | undefined;
24
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
23
+ theme?: import("@emotion/react").Theme;
24
+ as?: React.ElementType;
25
25
  } & {
26
26
  themeIndex: number;
27
- themeSize: AvatarProps['size'];
27
+ themeSize: AvatarProps["size"];
28
28
  themeVariant: ThemeVariant;
29
29
  }, {}, {}>;
30
30
  export {};
@@ -1,10 +1,10 @@
1
1
  import { View, Image, TouchableOpacity } from 'react-native';
2
2
  import { TextProps } from '../Typography/Text';
3
- declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge';
4
- declare type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
3
+ type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge';
4
+ type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
5
5
  declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
6
+ theme?: import("@emotion/react").Theme;
7
+ as?: React.ElementType;
8
8
  } & {
9
9
  themeSize: ThemeSize;
10
10
  themeIntent: ThemeIntent;
@@ -12,20 +12,20 @@ declare const StyledWrapper: import("@emotion/native").StyledComponent<import("r
12
12
  ref?: import("react").Ref<TouchableOpacity> | undefined;
13
13
  }>;
14
14
  declare const StyledTextWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
15
- theme?: import("@emotion/react").Theme | undefined;
16
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
15
+ theme?: import("@emotion/react").Theme;
16
+ as?: React.ElementType;
17
17
  }, {}, {
18
18
  ref?: import("react").Ref<View> | undefined;
19
19
  }>;
20
20
  declare const StyledText: import("@emotion/native").StyledComponent<TextProps & {
21
- theme?: import("@emotion/react").Theme | undefined;
22
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
21
+ theme?: import("@emotion/react").Theme;
22
+ as?: React.ElementType;
23
23
  } & {
24
24
  themeSize: ThemeSize;
25
25
  }, {}, {}>;
26
26
  declare const StyledImage: import("@emotion/native").StyledComponent<import("react-native").ImageProps & {
27
- theme?: import("@emotion/react").Theme | undefined;
28
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
27
+ theme?: import("@emotion/react").Theme;
28
+ as?: React.ElementType;
29
29
  } & {
30
30
  themeSize: ThemeSize;
31
31
  }, {}, {
@@ -1,11 +1,11 @@
1
1
  import { Animated } from 'react-native';
2
- declare type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
3
- declare type ThemePadding = 'narrowContent' | 'wideContent';
4
- declare type ThemeSize = 'medium' | 'small';
5
- declare type ThemeVariant = 'filled' | 'outlined';
2
+ type ThemeIntent = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'archived';
3
+ type ThemePadding = 'narrowContent' | 'wideContent';
4
+ type ThemeSize = 'medium' | 'small';
5
+ type ThemeVariant = 'filled' | 'outlined';
6
6
  declare const StyledView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
7
- theme?: import("@emotion/react").Theme | undefined;
8
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
7
+ theme?: import("@emotion/react").Theme;
8
+ as?: React.ElementType;
9
9
  } & {
10
10
  themeIntent: ThemeIntent;
11
11
  themePadding: ThemePadding;
@@ -13,20 +13,20 @@ declare const StyledView: import("@emotion/native").StyledComponent<Animated.Ani
13
13
  themeVariant: ThemeVariant;
14
14
  }, {}, {}>;
15
15
  declare const StyledText: import("@emotion/native").StyledComponent<import("../Typography/Caption").CaptionProps & {
16
- theme?: import("@emotion/react").Theme | undefined;
17
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
16
+ theme?: import("@emotion/react").Theme;
17
+ as?: React.ElementType;
18
18
  } & {
19
19
  themeSize: ThemeSize;
20
20
  }, {}, {}>;
21
21
  declare const StyledStatus: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
22
- theme?: import("@emotion/react").Theme | undefined;
23
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
22
+ theme?: import("@emotion/react").Theme;
23
+ as?: React.ElementType;
24
24
  } & {
25
25
  themeIntent: ThemeIntent;
26
26
  }, {}, {}>;
27
27
  declare const StyledIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
28
- theme?: import("@emotion/react").Theme | undefined;
29
- as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
+ theme?: import("@emotion/react").Theme;
29
+ as?: React.ElementType;
30
30
  } & {
31
31
  themeSize: ThemeSize;
32
32
  }, {}, {}>;
@@ -1,5 +1,5 @@
1
1
  import { BasicBadgeProps, IconBadgeProps } from './types';
2
- export declare type BadgeProps = BasicBadgeProps | IconBadgeProps;
2
+ export type BadgeProps = BasicBadgeProps | IconBadgeProps;
3
3
  declare const _default: (({ content: originalContent, visible, max, intent, style, testID, size, variant, icon, ...nativeProps }: BadgeProps) => JSX.Element) & {
4
4
  Status: ({ children, visible, intent, style, testID, ...nativeProps }: import("./Status").StatusProps) => JSX.Element;
5
5
  };