@hero-design/rn 8.65.1 → 8.67.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es/index.js +225 -170
  3. package/lib/index.js +226 -170
  4. package/package.json +1 -1
  5. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -4
  6. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  7. package/src/components/Alert/StyledAlert.tsx +24 -2
  8. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +150 -30
  9. package/src/components/Alert/index.tsx +15 -10
  10. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +84 -18
  11. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -2
  12. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +1 -1
  13. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  14. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +1 -1
  15. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  16. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +4 -4
  17. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  18. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +21 -21
  19. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +12 -12
  20. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -5
  21. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
  22. package/src/components/Card/StyledCard.tsx +7 -1
  23. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +65 -1
  24. package/src/components/Card/__tests__/index.spec.tsx +1 -0
  25. package/src/components/Card/index.tsx +7 -1
  26. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +4 -4
  27. package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +3 -3
  28. package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +2 -2
  29. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +30 -30
  30. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  31. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -1
  32. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  33. package/src/components/FAB/ActionGroup/ActionItem.tsx +1 -3
  34. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +2 -2
  35. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +160 -87
  36. package/src/components/FAB/FAB.tsx +1 -1
  37. package/src/components/FAB/StyledFAB.tsx +2 -3
  38. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
  39. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +25 -3
  40. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +37 -4
  41. package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  42. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  43. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
  44. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +6 -6
  45. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +2 -2
  46. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  47. package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  48. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
  49. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +10 -10
  50. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +14 -14
  51. package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
  52. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  53. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  54. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -2
  55. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +14 -14
  56. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +14 -14
  57. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
  58. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -8
  59. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  60. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  61. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
  62. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -32
  63. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  64. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  65. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +1 -1
  66. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  67. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +2 -2
  68. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +3 -3
  69. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +5 -5
  70. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  71. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +5 -5
  72. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
  73. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +18 -18
  74. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +7 -7
  75. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +1 -1
  76. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  77. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +1 -1
  78. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  79. package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +1 -1
  80. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  81. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
  82. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +1 -1
  83. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  84. package/src/index.ts +2 -0
  85. package/src/theme/ThemeSwitcher.tsx +12 -2
  86. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +81 -71
  87. package/src/theme/components/alert.ts +14 -5
  88. package/src/theme/components/card.ts +1 -0
  89. package/src/theme/components/fab.ts +5 -5
  90. package/src/theme/getTheme.ts +2 -2
  91. package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +48 -0
  92. package/src/theme/global/colors/__tests__/swagLight.spec.ts +7 -0
  93. package/src/theme/global/colors/swagLight.ts +25 -0
  94. package/src/theme/global/index.ts +2 -0
  95. package/src/theme/index.ts +2 -0
  96. package/stats/8.66.0/rn-stats.html +4842 -0
  97. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  98. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  99. package/types/components/Accordion/index.d.ts +0 -0
  100. package/types/components/Alert/StyledAlert.d.ts +17 -2
  101. package/types/components/Alert/index.d.ts +0 -0
  102. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  103. package/types/components/Attachment/index.d.ts +0 -0
  104. package/types/components/Avatar/Avatar.d.ts +0 -0
  105. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  106. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  107. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  108. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  109. package/types/components/Avatar/index.d.ts +0 -0
  110. package/types/components/Badge/Status.d.ts +0 -0
  111. package/types/components/Badge/StyledBadge.d.ts +0 -0
  112. package/types/components/Badge/index.d.ts +0 -0
  113. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  114. package/types/components/BottomNavigation/index.d.ts +0 -0
  115. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  116. package/types/components/BottomSheet/Footer.d.ts +0 -0
  117. package/types/components/BottomSheet/Header.d.ts +0 -0
  118. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  119. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  120. package/types/components/BottomSheet/index.d.ts +0 -0
  121. package/types/components/Box/StyledBox.d.ts +0 -0
  122. package/types/components/Box/config.d.ts +0 -0
  123. package/types/components/Box/index.d.ts +0 -0
  124. package/types/components/Box/types.d.ts +0 -0
  125. package/types/components/Button/Button.d.ts +0 -0
  126. package/types/components/Button/IconButton.d.ts +0 -0
  127. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  128. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  129. package/types/components/Button/StyledButton.d.ts +0 -0
  130. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  131. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  132. package/types/components/Button/index.d.ts +0 -0
  133. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  134. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  135. package/types/components/Calendar/helpers.d.ts +0 -0
  136. package/types/components/Calendar/index.d.ts +0 -0
  137. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  138. package/types/components/Card/DataCard/index.d.ts +0 -0
  139. package/types/components/Card/StyledCard.d.ts +1 -1
  140. package/types/components/Card/index.d.ts +1 -1
  141. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  142. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  143. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  144. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  145. package/types/components/Carousel/contants.d.ts +0 -0
  146. package/types/components/Carousel/index.d.ts +0 -0
  147. package/types/components/Carousel/types.d.ts +0 -0
  148. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
  149. package/types/components/Checkbox/index.d.ts +0 -0
  150. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  151. package/types/components/Collapse/index.d.ts +0 -0
  152. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  153. package/types/components/ContentNavigator/index.d.ts +0 -0
  154. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  155. package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
  156. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  157. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  158. package/types/components/DatePicker/index.d.ts +0 -0
  159. package/types/components/DatePicker/types.d.ts +0 -0
  160. package/types/components/Divider/StyledDivider.d.ts +0 -0
  161. package/types/components/Divider/index.d.ts +0 -0
  162. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  163. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  164. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  165. package/types/components/Drawer/index.d.ts +0 -0
  166. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  167. package/types/components/Empty/index.d.ts +0 -0
  168. package/types/components/Error/StyledError.d.ts +0 -0
  169. package/types/components/Error/index.d.ts +0 -0
  170. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  171. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  172. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -3
  173. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  174. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  175. package/types/components/FAB/FAB.d.ts +0 -0
  176. package/types/components/FAB/StyledFAB.d.ts +2 -3
  177. package/types/components/FAB/index.d.ts +0 -0
  178. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  179. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  180. package/types/components/Icon/IconList.d.ts +0 -0
  181. package/types/components/Icon/index.d.ts +0 -0
  182. package/types/components/Icon/utils.d.ts +0 -0
  183. package/types/components/Image/index.d.ts +0 -0
  184. package/types/components/List/BasicListItem.d.ts +0 -0
  185. package/types/components/List/ListItem.d.ts +0 -0
  186. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  187. package/types/components/List/StyledListItem.d.ts +0 -0
  188. package/types/components/List/index.d.ts +0 -0
  189. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  190. package/types/components/PageControl/index.d.ts +0 -0
  191. package/types/components/PinInput/PinCell.d.ts +0 -0
  192. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  193. package/types/components/PinInput/index.d.ts +0 -0
  194. package/types/components/Progress/ProgressBar.d.ts +0 -0
  195. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  196. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  197. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  198. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  199. package/types/components/Progress/constants.d.ts +0 -0
  200. package/types/components/Progress/index.d.ts +0 -0
  201. package/types/components/Progress/types.d.ts +0 -0
  202. package/types/components/Radio/Radio.d.ts +0 -0
  203. package/types/components/Radio/RadioGroup.d.ts +0 -0
  204. package/types/components/Radio/StyledRadio.d.ts +0 -0
  205. package/types/components/Radio/index.d.ts +0 -0
  206. package/types/components/Radio/types.d.ts +0 -0
  207. package/types/components/RefreshControl/index.d.ts +0 -0
  208. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  209. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  210. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  211. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  212. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  213. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  214. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  215. package/types/components/RichTextEditor/constants.d.ts +0 -0
  216. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  217. package/types/components/RichTextEditor/index.d.ts +0 -0
  218. package/types/components/RichTextEditor/types.d.ts +0 -0
  219. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  220. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  221. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  222. package/types/components/SectionHeading/index.d.ts +0 -0
  223. package/types/components/Select/BaseOptionList.d.ts +0 -0
  224. package/types/components/Select/Footer.d.ts +0 -0
  225. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  226. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  227. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  228. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  229. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  230. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  231. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  232. package/types/components/Select/StyledSelect.d.ts +0 -0
  233. package/types/components/Select/helpers.d.ts +0 -0
  234. package/types/components/Select/index.d.ts +0 -0
  235. package/types/components/Select/types.d.ts +0 -0
  236. package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
  237. package/types/components/Skeleton/index.d.ts +0 -0
  238. package/types/components/Slider/index.d.ts +0 -0
  239. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  240. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  241. package/types/components/Spinner/index.d.ts +0 -0
  242. package/types/components/Success/StyledSuccess.d.ts +0 -0
  243. package/types/components/Success/index.d.ts +0 -0
  244. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  245. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  246. package/types/components/Swipeable/index.d.ts +0 -0
  247. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  248. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  249. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  250. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  251. package/types/components/Switch/index.d.ts +0 -0
  252. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  253. package/types/components/Tabs/SceneView.d.ts +0 -0
  254. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  255. package/types/components/Tabs/ScrollableTabsHeader.d.ts +35 -0
  256. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  257. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  258. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  259. package/types/components/Tabs/index.d.ts +0 -0
  260. package/types/components/Tabs/useIsFocused.d.ts +0 -0
  261. package/types/components/Tabs/utils.d.ts +0 -0
  262. package/types/components/Tag/StyledTag.d.ts +0 -0
  263. package/types/components/Tag/index.d.ts +0 -0
  264. package/types/components/TextInput/StyledTextInput.d.ts +0 -0
  265. package/types/components/TextInput/index.d.ts +0 -0
  266. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  267. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  268. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  269. package/types/components/TimePicker/index.d.ts +0 -0
  270. package/types/components/TimePicker/types.d.ts +0 -0
  271. package/types/components/Toast/StyledToast.d.ts +0 -0
  272. package/types/components/Toast/Toast.d.ts +0 -0
  273. package/types/components/Toast/ToastContainer.d.ts +0 -0
  274. package/types/components/Toast/ToastContext.d.ts +0 -0
  275. package/types/components/Toast/ToastProvider.d.ts +0 -0
  276. package/types/components/Toast/index.d.ts +0 -0
  277. package/types/components/Toast/types.d.ts +0 -0
  278. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  279. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  280. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  281. package/types/components/Toolbar/index.d.ts +0 -0
  282. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  283. package/types/components/Typography/Text/index.d.ts +0 -0
  284. package/types/components/Typography/index.d.ts +0 -0
  285. package/types/index.d.ts +2 -2
  286. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  287. package/types/theme/ThemeProvider.d.ts +0 -0
  288. package/types/theme/ThemeSwitcher.d.ts +1 -1
  289. package/types/theme/components/accordion.d.ts +0 -0
  290. package/types/theme/components/alert.d.ts +14 -5
  291. package/types/theme/components/attachment.d.ts +0 -0
  292. package/types/theme/components/avatar.d.ts +0 -0
  293. package/types/theme/components/badge.d.ts +0 -0
  294. package/types/theme/components/bottomNavigation.d.ts +0 -0
  295. package/types/theme/components/bottomSheet.d.ts +0 -0
  296. package/types/theme/components/button.d.ts +0 -0
  297. package/types/theme/components/calendar.d.ts +0 -0
  298. package/types/theme/components/card.d.ts +1 -0
  299. package/types/theme/components/cardCarousel.d.ts +0 -0
  300. package/types/theme/components/carousel.d.ts +0 -0
  301. package/types/theme/components/checkbox.d.ts +0 -0
  302. package/types/theme/components/contentNavigator.d.ts +0 -0
  303. package/types/theme/components/datePicker.d.ts +0 -0
  304. package/types/theme/components/divider.d.ts +0 -0
  305. package/types/theme/components/drawer.d.ts +0 -0
  306. package/types/theme/components/empty.d.ts +0 -0
  307. package/types/theme/components/error.d.ts +0 -0
  308. package/types/theme/components/fab.d.ts +0 -0
  309. package/types/theme/components/icon.d.ts +0 -0
  310. package/types/theme/components/image.d.ts +0 -0
  311. package/types/theme/components/list.d.ts +0 -0
  312. package/types/theme/components/pageControl.d.ts +0 -0
  313. package/types/theme/components/pinInput.d.ts +0 -0
  314. package/types/theme/components/progress.d.ts +0 -0
  315. package/types/theme/components/radio.d.ts +0 -0
  316. package/types/theme/components/refreshControl.d.ts +0 -0
  317. package/types/theme/components/richTextEditor.d.ts +0 -0
  318. package/types/theme/components/sectionHeading.d.ts +0 -0
  319. package/types/theme/components/select.d.ts +0 -0
  320. package/types/theme/components/skeleton.d.ts +0 -0
  321. package/types/theme/components/slider.d.ts +0 -0
  322. package/types/theme/components/spinner.d.ts +0 -0
  323. package/types/theme/components/success.d.ts +0 -0
  324. package/types/theme/components/swipeable.d.ts +0 -0
  325. package/types/theme/components/switch.d.ts +0 -0
  326. package/types/theme/components/tabs.d.ts +0 -0
  327. package/types/theme/components/tag.d.ts +0 -0
  328. package/types/theme/components/textInput.d.ts +0 -0
  329. package/types/theme/components/timePicker.d.ts +0 -0
  330. package/types/theme/components/toast.d.ts +0 -0
  331. package/types/theme/components/toolbar.d.ts +0 -0
  332. package/types/theme/components/typography.d.ts +0 -0
  333. package/types/theme/getTheme.d.ts +0 -0
  334. package/types/theme/global/borders.d.ts +0 -0
  335. package/types/theme/global/colors/eBens.d.ts +0 -0
  336. package/types/theme/global/colors/global.d.ts +0 -0
  337. package/types/theme/global/colors/globalDark.d.ts +0 -0
  338. package/types/theme/global/colors/jobs.d.ts +0 -0
  339. package/types/theme/global/colors/swag.d.ts +0 -0
  340. package/types/theme/global/colors/swagDark.d.ts +0 -0
  341. package/types/theme/global/colors/swagLight.d.ts +3 -0
  342. package/types/theme/global/colors/types.d.ts +0 -0
  343. package/types/theme/global/colors/wallet.d.ts +0 -0
  344. package/types/theme/global/colors/work.d.ts +0 -0
  345. package/types/theme/global/index.d.ts +2 -1
  346. package/types/theme/global/scale.d.ts +0 -0
  347. package/types/theme/global/sizes.d.ts +0 -0
  348. package/types/theme/global/space.d.ts +0 -0
  349. package/types/theme/global/typography.d.ts +0 -0
  350. package/types/theme/index.d.ts +2 -2
  351. package/types/types.d.ts +0 -0
  352. package/types/utils/functions.d.ts +0 -0
  353. package/types/utils/helpers.d.ts +0 -0
  354. package/types/utils/hooks.d.ts +0 -0
  355. package/types/utils/scale.d.ts +0 -0
  356. package/.turbo/turbo-build.log +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.65.1",
3
+ "version": "8.67.0-alpha.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -82,7 +82,7 @@ exports[`AccordionItem renders correctly when header is an element 1`] = `
82
82
  style={
83
83
  [
84
84
  {
85
- "color": "#795e90",
85
+ "color": "#B382FD",
86
86
  "fontSize": 20,
87
87
  },
88
88
  undefined,
@@ -260,7 +260,7 @@ exports[`AccordionItem renders correctly when header is string 1`] = `
260
260
  style={
261
261
  [
262
262
  {
263
- "color": "#795e90",
263
+ "color": "#B382FD",
264
264
  "fontSize": 20,
265
265
  },
266
266
  undefined,
@@ -438,7 +438,7 @@ exports[`AccordionItem renders correctly when open 1`] = `
438
438
  style={
439
439
  [
440
440
  {
441
- "color": "#795e90",
441
+ "color": "#B382FD",
442
442
  "fontSize": 20,
443
443
  },
444
444
  undefined,
@@ -616,7 +616,7 @@ exports[`AccordionItem renders correctly when variant is card 1`] = `
616
616
  style={
617
617
  [
618
618
  {
619
- "color": "#795e90",
619
+ "color": "#B382FD",
620
620
  "fontSize": 20,
621
621
  },
622
622
  undefined,
@@ -90,7 +90,7 @@ exports[`Accordion allows fully controlled 1`] = `
90
90
  style={
91
91
  [
92
92
  {
93
- "color": "#795e90",
93
+ "color": "#B382FD",
94
94
  "fontSize": 20,
95
95
  },
96
96
  undefined,
@@ -237,7 +237,7 @@ exports[`Accordion allows fully controlled 1`] = `
237
237
  style={
238
238
  [
239
239
  {
240
- "color": "#795e90",
240
+ "color": "#B382FD",
241
241
  "fontSize": 20,
242
242
  },
243
243
  undefined,
@@ -424,7 +424,7 @@ exports[`Accordion renders correctly 1`] = `
424
424
  style={
425
425
  [
426
426
  {
427
- "color": "#795e90",
427
+ "color": "#B382FD",
428
428
  "fontSize": 20,
429
429
  },
430
430
  undefined,
@@ -571,7 +571,7 @@ exports[`Accordion renders correctly 1`] = `
571
571
  style={
572
572
  [
573
573
  {
574
- "color": "#795e90",
574
+ "color": "#B382FD",
575
575
  "fontSize": 20,
576
576
  },
577
577
  undefined,
@@ -758,7 +758,7 @@ exports[`Accordion renders correctly when variant is card 1`] = `
758
758
  style={
759
759
  [
760
760
  {
761
- "color": "#795e90",
761
+ "color": "#B382FD",
762
762
  "fontSize": 20,
763
763
  },
764
764
  undefined,
@@ -916,7 +916,7 @@ exports[`Accordion renders correctly when variant is card 1`] = `
916
916
  style={
917
917
  [
918
918
  {
919
- "color": "#795e90",
919
+ "color": "#B382FD",
920
920
  "fontSize": 20,
921
921
  },
922
922
  undefined,
@@ -2,14 +2,18 @@ import styled from '@emotion/native';
2
2
  import { TouchableOpacity, View } from 'react-native';
3
3
  import type { ComponentProps } from 'react';
4
4
  import type { ViewProps } from 'react-native';
5
+ import Typography from '../Typography';
6
+ import { TextProps } from '../Typography/Text';
7
+ import Icon, { IconProps } from '../Icon';
5
8
 
9
+ type ThemeIntent = 'success' | 'info' | 'warning' | 'error' | 'notification';
6
10
  const Container = styled(View)<{
7
11
  themeVariant: 'rounded' | 'unrounded';
8
- themeIntent: 'success' | 'info' | 'warning' | 'error' | 'notification';
12
+ themeIntent: ThemeIntent;
9
13
  }>(({ theme, themeVariant = 'rounded', themeIntent }) => ({
10
14
  borderRadius:
11
15
  themeVariant === 'rounded' ? theme.__hd__.alert.radii.default : 0,
12
- backgroundColor: theme.__hd__.alert.colors[themeIntent],
16
+ backgroundColor: theme.__hd__.alert.colors.backgrounds[themeIntent],
13
17
  minHeight: theme.__hd__.alert.sizes.height,
14
18
  flexDirection: 'row',
15
19
  }));
@@ -19,11 +23,27 @@ const IconContainer = styled(View)<ViewProps>(({ theme }) => ({
19
23
  paddingLeft: theme.__hd__.alert.space.iconLeftPadding,
20
24
  }));
21
25
 
26
+ const StyledIcon = styled(Icon)<
27
+ IconProps & {
28
+ themeIntent: ThemeIntent;
29
+ }
30
+ >(({ theme, themeIntent }) => ({
31
+ color: theme.__hd__.alert.colors.texts[themeIntent],
32
+ }));
33
+
22
34
  const TextContainer = styled(View)<ViewProps>(({ theme }) => ({
23
35
  paddingHorizontal: theme.__hd__.alert.space.textPaddingHorizontal,
24
36
  flex: 1,
25
37
  }));
26
38
 
39
+ const StyledBody = styled(Typography.Body)<
40
+ TextProps & {
41
+ themeIntent: ThemeIntent;
42
+ }
43
+ >(({ theme, themeIntent }) => ({
44
+ color: theme.__hd__.alert.colors.texts[themeIntent],
45
+ }));
46
+
27
47
  const ContentContainer = styled(View)<{ showDivider: boolean }>(
28
48
  ({ theme, showDivider }) => ({
29
49
  paddingVertical: theme.__hd__.alert.space.contentPaddingHorizontal,
@@ -47,4 +67,6 @@ export {
47
67
  TextContainer,
48
68
  IconContainer,
49
69
  CTAWrapper,
70
+ StyledBody,
71
+ StyledIcon,
50
72
  };
@@ -12,7 +12,7 @@ exports[`Alert Icon render custom icon correctly 1`] = `
12
12
  style={
13
13
  [
14
14
  {
15
- "backgroundColor": "#b5c3fd",
15
+ "backgroundColor": "#ecf0ff",
16
16
  "borderRadius": 16,
17
17
  "flexDirection": "row",
18
18
  "minHeight": 48,
@@ -58,7 +58,12 @@ exports[`Alert Icon render custom icon correctly 1`] = `
58
58
  "color": "#001f23",
59
59
  "fontSize": 20,
60
60
  },
61
- undefined,
61
+ [
62
+ {
63
+ "color": "#355bfb",
64
+ },
65
+ undefined,
66
+ ],
62
67
  ]
63
68
  }
64
69
  themeIntent="text"
@@ -87,7 +92,12 @@ exports[`Alert Icon render custom icon correctly 1`] = `
87
92
  "letterSpacing": 0.48,
88
93
  "lineHeight": 22,
89
94
  },
90
- undefined,
95
+ [
96
+ {
97
+ "color": "#355bfb",
98
+ },
99
+ undefined,
100
+ ],
91
101
  ]
92
102
  }
93
103
  themeIntent="body"
@@ -134,7 +144,7 @@ exports[`Alert renders correctly when intent is error 1`] = `
134
144
  style={
135
145
  [
136
146
  {
137
- "backgroundColor": "#f46363",
147
+ "backgroundColor": "#fcebe7",
138
148
  "borderRadius": 16,
139
149
  "flexDirection": "row",
140
150
  "minHeight": 48,
@@ -180,7 +190,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
180
190
  "color": "#001f23",
181
191
  "fontSize": 20,
182
192
  },
183
- undefined,
193
+ [
194
+ {
195
+ "color": "#cb300a",
196
+ },
197
+ undefined,
198
+ ],
184
199
  ]
185
200
  }
186
201
  themeIntent="text"
@@ -209,7 +224,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
209
224
  "letterSpacing": 0.24,
210
225
  "lineHeight": 22,
211
226
  },
212
- undefined,
227
+ [
228
+ {
229
+ "color": "#cb300a",
230
+ },
231
+ undefined,
232
+ ],
213
233
  ]
214
234
  }
215
235
  themeIntent="body"
@@ -229,7 +249,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
229
249
  "letterSpacing": 0.48,
230
250
  "lineHeight": 22,
231
251
  },
232
- undefined,
252
+ [
253
+ {
254
+ "color": "#cb300a",
255
+ },
256
+ undefined,
257
+ ],
233
258
  ]
234
259
  }
235
260
  themeIntent="body"
@@ -285,7 +310,12 @@ exports[`Alert renders correctly when intent is error 1`] = `
285
310
  "color": "#001f23",
286
311
  "fontSize": 20,
287
312
  },
288
- undefined,
313
+ [
314
+ {
315
+ "color": "#cb300a",
316
+ },
317
+ undefined,
318
+ ],
289
319
  ]
290
320
  }
291
321
  themeIntent="text"
@@ -328,7 +358,7 @@ exports[`Alert renders correctly when intent is info 1`] = `
328
358
  style={
329
359
  [
330
360
  {
331
- "backgroundColor": "#b5c3fd",
361
+ "backgroundColor": "#ecf0ff",
332
362
  "borderRadius": 16,
333
363
  "flexDirection": "row",
334
364
  "minHeight": 48,
@@ -374,7 +404,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
374
404
  "color": "#001f23",
375
405
  "fontSize": 20,
376
406
  },
377
- undefined,
407
+ [
408
+ {
409
+ "color": "#355bfb",
410
+ },
411
+ undefined,
412
+ ],
378
413
  ]
379
414
  }
380
415
  themeIntent="text"
@@ -403,7 +438,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
403
438
  "letterSpacing": 0.24,
404
439
  "lineHeight": 22,
405
440
  },
406
- undefined,
441
+ [
442
+ {
443
+ "color": "#355bfb",
444
+ },
445
+ undefined,
446
+ ],
407
447
  ]
408
448
  }
409
449
  themeIntent="body"
@@ -423,7 +463,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
423
463
  "letterSpacing": 0.48,
424
464
  "lineHeight": 22,
425
465
  },
426
- undefined,
466
+ [
467
+ {
468
+ "color": "#355bfb",
469
+ },
470
+ undefined,
471
+ ],
427
472
  ]
428
473
  }
429
474
  themeIntent="body"
@@ -479,7 +524,12 @@ exports[`Alert renders correctly when intent is info 1`] = `
479
524
  "color": "#001f23",
480
525
  "fontSize": 20,
481
526
  },
482
- undefined,
527
+ [
528
+ {
529
+ "color": "#355bfb",
530
+ },
531
+ undefined,
532
+ ],
483
533
  ]
484
534
  }
485
535
  themeIntent="text"
@@ -570,7 +620,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
570
620
  "letterSpacing": 0.24,
571
621
  "lineHeight": 22,
572
622
  },
573
- undefined,
623
+ [
624
+ {
625
+ "color": "#001f23",
626
+ },
627
+ undefined,
628
+ ],
574
629
  ]
575
630
  }
576
631
  themeIntent="body"
@@ -590,7 +645,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
590
645
  "letterSpacing": 0.48,
591
646
  "lineHeight": 22,
592
647
  },
593
- undefined,
648
+ [
649
+ {
650
+ "color": "#001f23",
651
+ },
652
+ undefined,
653
+ ],
594
654
  ]
595
655
  }
596
656
  themeIntent="body"
@@ -646,7 +706,12 @@ exports[`Alert renders correctly when intent is notification 1`] = `
646
706
  "color": "#001f23",
647
707
  "fontSize": 20,
648
708
  },
649
- undefined,
709
+ [
710
+ {
711
+ "color": "#001f23",
712
+ },
713
+ undefined,
714
+ ],
650
715
  ]
651
716
  }
652
717
  themeIntent="text"
@@ -689,7 +754,7 @@ exports[`Alert renders correctly when intent is success 1`] = `
689
754
  style={
690
755
  [
691
756
  {
692
- "backgroundColor": "#5ace7d",
757
+ "backgroundColor": "#f0fef4",
693
758
  "borderRadius": 16,
694
759
  "flexDirection": "row",
695
760
  "minHeight": 48,
@@ -735,7 +800,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
735
800
  "color": "#001f23",
736
801
  "fontSize": 20,
737
802
  },
738
- undefined,
803
+ [
804
+ {
805
+ "color": "#017d6d",
806
+ },
807
+ undefined,
808
+ ],
739
809
  ]
740
810
  }
741
811
  themeIntent="text"
@@ -764,7 +834,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
764
834
  "letterSpacing": 0.24,
765
835
  "lineHeight": 22,
766
836
  },
767
- undefined,
837
+ [
838
+ {
839
+ "color": "#017d6d",
840
+ },
841
+ undefined,
842
+ ],
768
843
  ]
769
844
  }
770
845
  themeIntent="body"
@@ -784,7 +859,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
784
859
  "letterSpacing": 0.48,
785
860
  "lineHeight": 22,
786
861
  },
787
- undefined,
862
+ [
863
+ {
864
+ "color": "#017d6d",
865
+ },
866
+ undefined,
867
+ ],
788
868
  ]
789
869
  }
790
870
  themeIntent="body"
@@ -840,7 +920,12 @@ exports[`Alert renders correctly when intent is success 1`] = `
840
920
  "color": "#001f23",
841
921
  "fontSize": 20,
842
922
  },
843
- undefined,
923
+ [
924
+ {
925
+ "color": "#017d6d",
926
+ },
927
+ undefined,
928
+ ],
844
929
  ]
845
930
  }
846
931
  themeIntent="text"
@@ -883,7 +968,7 @@ exports[`Alert renders correctly when intent is warning 1`] = `
883
968
  style={
884
969
  [
885
970
  {
886
- "backgroundColor": "#ffbe71",
971
+ "backgroundColor": "#fff6eb",
887
972
  "borderRadius": 16,
888
973
  "flexDirection": "row",
889
974
  "minHeight": 48,
@@ -929,7 +1014,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
929
1014
  "color": "#001f23",
930
1015
  "fontSize": 20,
931
1016
  },
932
- undefined,
1017
+ [
1018
+ {
1019
+ "color": "#ac5d00",
1020
+ },
1021
+ undefined,
1022
+ ],
933
1023
  ]
934
1024
  }
935
1025
  themeIntent="text"
@@ -958,7 +1048,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
958
1048
  "letterSpacing": 0.24,
959
1049
  "lineHeight": 22,
960
1050
  },
961
- undefined,
1051
+ [
1052
+ {
1053
+ "color": "#ac5d00",
1054
+ },
1055
+ undefined,
1056
+ ],
962
1057
  ]
963
1058
  }
964
1059
  themeIntent="body"
@@ -978,7 +1073,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
978
1073
  "letterSpacing": 0.48,
979
1074
  "lineHeight": 22,
980
1075
  },
981
- undefined,
1076
+ [
1077
+ {
1078
+ "color": "#ac5d00",
1079
+ },
1080
+ undefined,
1081
+ ],
982
1082
  ]
983
1083
  }
984
1084
  themeIntent="body"
@@ -1034,7 +1134,12 @@ exports[`Alert renders correctly when intent is warning 1`] = `
1034
1134
  "color": "#001f23",
1035
1135
  "fontSize": 20,
1036
1136
  },
1037
- undefined,
1137
+ [
1138
+ {
1139
+ "color": "#ac5d00",
1140
+ },
1141
+ undefined,
1142
+ ],
1038
1143
  ]
1039
1144
  }
1040
1145
  themeIntent="text"
@@ -1077,7 +1182,7 @@ exports[`Alert renders correctly without rounded 1`] = `
1077
1182
  style={
1078
1183
  [
1079
1184
  {
1080
- "backgroundColor": "#b5c3fd",
1185
+ "backgroundColor": "#ecf0ff",
1081
1186
  "borderRadius": 0,
1082
1187
  "flexDirection": "row",
1083
1188
  "minHeight": 48,
@@ -1123,7 +1228,12 @@ exports[`Alert renders correctly without rounded 1`] = `
1123
1228
  "color": "#001f23",
1124
1229
  "fontSize": 20,
1125
1230
  },
1126
- undefined,
1231
+ [
1232
+ {
1233
+ "color": "#355bfb",
1234
+ },
1235
+ undefined,
1236
+ ],
1127
1237
  ]
1128
1238
  }
1129
1239
  themeIntent="text"
@@ -1152,7 +1262,12 @@ exports[`Alert renders correctly without rounded 1`] = `
1152
1262
  "letterSpacing": 0.24,
1153
1263
  "lineHeight": 22,
1154
1264
  },
1155
- undefined,
1265
+ [
1266
+ {
1267
+ "color": "#355bfb",
1268
+ },
1269
+ undefined,
1270
+ ],
1156
1271
  ]
1157
1272
  }
1158
1273
  themeIntent="body"
@@ -1172,7 +1287,12 @@ exports[`Alert renders correctly without rounded 1`] = `
1172
1287
  "letterSpacing": 0.48,
1173
1288
  "lineHeight": 22,
1174
1289
  },
1175
- undefined,
1290
+ [
1291
+ {
1292
+ "color": "#355bfb",
1293
+ },
1294
+ undefined,
1295
+ ],
1176
1296
  ]
1177
1297
  }
1178
1298
  themeIntent="body"
@@ -1,18 +1,19 @@
1
1
  import React from 'react';
2
2
  import type { ReactElement } from 'react';
3
3
  import type { StyleProp, ViewStyle } from 'react-native';
4
- import Icon from '../Icon';
5
- import Typography from '../Typography';
6
4
  import {
7
5
  Container,
8
6
  ContentContainer,
9
7
  CTAWrapper,
10
8
  IconContainer,
9
+ StyledBody,
10
+ StyledIcon,
11
11
  TextContainer,
12
12
  } from './StyledAlert';
13
13
  import type { IconName } from '../Icon';
14
14
  import { useDeprecation } from '../../utils/hooks';
15
15
 
16
+ type Intent = 'success' | 'info' | 'warning' | 'error' | 'notification';
16
17
  const getIntentIcon = (
17
18
  intent: 'success' | 'info' | 'warning' | 'error' | 'notification'
18
19
  ) => {
@@ -30,10 +31,10 @@ const getIntentIcon = (
30
31
  }
31
32
  };
32
33
 
33
- const AlertIcon = ({ icon }: { icon?: IconName }) =>
34
+ const AlertIcon = ({ icon, intent }: { icon?: IconName; intent: Intent }) =>
34
35
  icon ? (
35
36
  <IconContainer testID="alert-left-icon">
36
- <Icon icon={icon} size="small" />
37
+ <StyledIcon icon={icon} size="small" themeIntent={intent} />
37
38
  </IconContainer>
38
39
  ) : null;
39
40
 
@@ -119,16 +120,20 @@ const Alert = ({
119
120
  >
120
121
  <ContentContainer showDivider={!!onClose}>
121
122
  {icon !== null ? (
122
- <AlertIcon icon={icon || getIntentIcon(intent)} />
123
+ <AlertIcon icon={icon || getIntentIcon(intent)} intent={intent} />
123
124
  ) : null}
124
125
  <TextContainer>
125
126
  {typeof title === 'string' ? (
126
- <Typography.Body variant="small-bold">{title}</Typography.Body>
127
+ <StyledBody variant="small-bold" themeIntent={intent}>
128
+ {title}
129
+ </StyledBody>
127
130
  ) : (
128
131
  title
129
132
  )}
130
133
  {typeof content === 'string' ? (
131
- <Typography.Body variant="small">{content}</Typography.Body>
134
+ <StyledBody variant="small" themeIntent={intent}>
135
+ {content}
136
+ </StyledBody>
132
137
  ) : (
133
138
  content
134
139
  )}
@@ -137,11 +142,11 @@ const Alert = ({
137
142
  {onClose ? (
138
143
  <CTAWrapper onPress={onClose} testID="alert-close-icon">
139
144
  {typeof actionLabel === 'string' ? (
140
- <Typography.Body variant="small-bold">
145
+ <StyledBody variant="small-bold" themeIntent={intent}>
141
146
  {actionLabel}
142
- </Typography.Body>
147
+ </StyledBody>
143
148
  ) : (
144
- <Icon icon="cancel" size="small" />
149
+ <StyledIcon icon="cancel" size="small" themeIntent={intent} />
145
150
  )}
146
151
  </CTAWrapper>
147
152
  ) : null}