@hero-design/rn 8.80.1-test.0 → 8.81.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 (323) hide show
  1. package/.turbo/turbo-build.log +3 -15
  2. package/CHANGELOG.md +10 -2
  3. package/assets/fonts/RebondGrotesque-Light.otf +0 -0
  4. package/assets/fonts/RebondGrotesque-SemiBold.otf +0 -0
  5. package/assets/fonts/RebondGrotesque.otf +0 -0
  6. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  7. package/es/index.js +188 -160
  8. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  9. package/lib/index.js +188 -160
  10. package/package.json +1 -1
  11. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +72 -6
  12. package/src/components/Button/Button.tsx +13 -5
  13. package/src/components/Button/StyledButton.tsx +60 -39
  14. package/src/components/Button/__tests__/Button.spec.tsx +21 -16
  15. package/src/components/Button/__tests__/StyledButton.spec.tsx +19 -12
  16. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +670 -0
  17. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +153 -0
  18. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +11 -11
  19. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
  20. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  21. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  22. package/src/components/FAB/ActionGroup/ActionItem.tsx +1 -3
  23. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
  24. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +2 -2
  25. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +148 -75
  26. package/src/components/FAB/FAB.tsx +1 -1
  27. package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +24 -2
  28. package/src/components/FAB/StyledFAB.tsx +2 -3
  29. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +24 -2
  30. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
  31. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  32. package/src/components/Icon/IconList.ts +1 -0
  33. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
  34. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
  35. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  36. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +4 -4
  37. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  38. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
  39. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +6 -6
  40. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  41. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +32 -27
  42. package/src/theme/components/button.ts +5 -0
  43. package/src/theme/components/fab.ts +6 -6
  44. package/src/theme/global/scale.ts +1 -1
  45. package/src/theme/global/typography.ts +2 -2
  46. package/stats/8.80.1/rn-stats.html +4842 -0
  47. package/stats/8.81.0/rn-stats.html +4842 -0
  48. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  49. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  50. package/types/components/Accordion/index.d.ts +0 -0
  51. package/types/components/Alert/StyledAlert.d.ts +0 -0
  52. package/types/components/Alert/index.d.ts +0 -0
  53. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  54. package/types/components/Attachment/index.d.ts +0 -0
  55. package/types/components/Avatar/Avatar.d.ts +0 -0
  56. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  57. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  58. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  59. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  60. package/types/components/Avatar/index.d.ts +0 -0
  61. package/types/components/Badge/Status.d.ts +0 -0
  62. package/types/components/Badge/StyledBadge.d.ts +0 -0
  63. package/types/components/Badge/index.d.ts +0 -0
  64. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  65. package/types/components/BottomNavigation/index.d.ts +0 -0
  66. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  67. package/types/components/BottomSheet/Footer.d.ts +0 -0
  68. package/types/components/BottomSheet/Header.d.ts +0 -0
  69. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  70. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  71. package/types/components/BottomSheet/index.d.ts +0 -0
  72. package/types/components/Box/StyledBox.d.ts +0 -0
  73. package/types/components/Box/config.d.ts +0 -0
  74. package/types/components/Box/index.d.ts +0 -0
  75. package/types/components/Box/types.d.ts +0 -0
  76. package/types/components/Button/Button.d.ts +1 -1
  77. package/types/components/Button/IconButton.d.ts +0 -0
  78. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  79. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  80. package/types/components/Button/StyledButton.d.ts +3 -0
  81. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  82. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  83. package/types/components/Button/index.d.ts +0 -0
  84. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  85. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  86. package/types/components/Calendar/helpers.d.ts +0 -0
  87. package/types/components/Calendar/index.d.ts +0 -0
  88. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  89. package/types/components/Card/DataCard/index.d.ts +0 -0
  90. package/types/components/Card/StyledCard.d.ts +0 -0
  91. package/types/components/Card/index.d.ts +0 -0
  92. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  93. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  94. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  95. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  96. package/types/components/Carousel/contants.d.ts +0 -0
  97. package/types/components/Carousel/index.d.ts +0 -0
  98. package/types/components/Carousel/types.d.ts +0 -0
  99. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
  100. package/types/components/Checkbox/index.d.ts +0 -0
  101. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  102. package/types/components/Collapse/index.d.ts +0 -0
  103. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  104. package/types/components/ContentNavigator/index.d.ts +0 -0
  105. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  106. package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
  107. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  108. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  109. package/types/components/DatePicker/index.d.ts +0 -0
  110. package/types/components/DatePicker/types.d.ts +0 -0
  111. package/types/components/Divider/StyledDivider.d.ts +0 -0
  112. package/types/components/Divider/index.d.ts +0 -0
  113. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  114. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  115. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  116. package/types/components/Drawer/index.d.ts +0 -0
  117. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  118. package/types/components/Empty/index.d.ts +0 -0
  119. package/types/components/Error/StyledError.d.ts +0 -0
  120. package/types/components/Error/index.d.ts +0 -0
  121. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  122. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  123. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -3
  124. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  125. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  126. package/types/components/FAB/FAB.d.ts +0 -0
  127. package/types/components/FAB/StyledFAB.d.ts +2 -3
  128. package/types/components/FAB/index.d.ts +0 -0
  129. package/types/components/FloatingIsland/StyledFloatingIsland.d.ts +2 -2
  130. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  131. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  132. package/types/components/Icon/IconList.d.ts +1 -1
  133. package/types/components/Icon/index.d.ts +1 -1
  134. package/types/components/Icon/utils.d.ts +1 -1
  135. package/types/components/Image/index.d.ts +0 -0
  136. package/types/components/List/BasicListItem.d.ts +0 -0
  137. package/types/components/List/ListItem.d.ts +0 -0
  138. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  139. package/types/components/List/StyledListItem.d.ts +0 -0
  140. package/types/components/List/index.d.ts +0 -0
  141. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  142. package/types/components/PageControl/index.d.ts +0 -0
  143. package/types/components/PinInput/PinCell.d.ts +0 -0
  144. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  145. package/types/components/PinInput/index.d.ts +0 -0
  146. package/types/components/Progress/ProgressBar.d.ts +0 -0
  147. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  148. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  149. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  150. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  151. package/types/components/Progress/constants.d.ts +0 -0
  152. package/types/components/Progress/index.d.ts +0 -0
  153. package/types/components/Progress/types.d.ts +0 -0
  154. package/types/components/Radio/Radio.d.ts +0 -0
  155. package/types/components/Radio/RadioGroup.d.ts +0 -0
  156. package/types/components/Radio/StyledRadio.d.ts +0 -0
  157. package/types/components/Radio/index.d.ts +0 -0
  158. package/types/components/Radio/types.d.ts +0 -0
  159. package/types/components/RefreshControl/index.d.ts +0 -0
  160. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  161. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  162. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  163. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  164. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  165. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  166. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  167. package/types/components/RichTextEditor/constants.d.ts +0 -0
  168. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  169. package/types/components/RichTextEditor/index.d.ts +0 -0
  170. package/types/components/RichTextEditor/types.d.ts +0 -0
  171. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  172. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  173. package/types/components/Search/utils.d.ts +2 -2
  174. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  175. package/types/components/SectionHeading/index.d.ts +0 -0
  176. package/types/components/Select/BaseOptionList.d.ts +0 -0
  177. package/types/components/Select/Footer.d.ts +0 -0
  178. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  179. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  180. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  181. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  182. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  183. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  184. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  185. package/types/components/Select/StyledSelect.d.ts +0 -0
  186. package/types/components/Select/helpers.d.ts +0 -0
  187. package/types/components/Select/index.d.ts +0 -0
  188. package/types/components/Select/types.d.ts +0 -0
  189. package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
  190. package/types/components/Skeleton/index.d.ts +0 -0
  191. package/types/components/Slider/index.d.ts +0 -0
  192. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  193. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  194. package/types/components/Spinner/index.d.ts +0 -0
  195. package/types/components/Success/StyledSuccess.d.ts +0 -0
  196. package/types/components/Success/index.d.ts +0 -0
  197. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  198. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  199. package/types/components/Swipeable/index.d.ts +0 -0
  200. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  201. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  202. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  203. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  204. package/types/components/Switch/index.d.ts +0 -0
  205. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  206. package/types/components/Tabs/SceneView.d.ts +0 -0
  207. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  208. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  209. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  210. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  211. package/types/components/Tabs/index.d.ts +0 -0
  212. package/types/components/Tabs/useIsFocused.d.ts +0 -0
  213. package/types/components/Tabs/utils.d.ts +0 -0
  214. package/types/components/Tag/StyledTag.d.ts +0 -0
  215. package/types/components/Tag/index.d.ts +0 -0
  216. package/types/components/TextInput/StyledTextInput.d.ts +0 -0
  217. package/types/components/TextInput/index.d.ts +3 -3
  218. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  219. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  220. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  221. package/types/components/TimePicker/index.d.ts +0 -0
  222. package/types/components/TimePicker/types.d.ts +0 -0
  223. package/types/components/Toast/StyledToast.d.ts +0 -0
  224. package/types/components/Toast/Toast.d.ts +0 -0
  225. package/types/components/Toast/ToastContainer.d.ts +0 -0
  226. package/types/components/Toast/ToastContext.d.ts +0 -0
  227. package/types/components/Toast/ToastProvider.d.ts +0 -0
  228. package/types/components/Toast/index.d.ts +0 -0
  229. package/types/components/Toast/types.d.ts +0 -0
  230. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  231. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  232. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  233. package/types/components/Toolbar/index.d.ts +0 -0
  234. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  235. package/types/components/Typography/Text/index.d.ts +0 -0
  236. package/types/components/Typography/index.d.ts +0 -0
  237. package/types/index.d.ts +0 -0
  238. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  239. package/types/theme/ThemeProvider.d.ts +0 -0
  240. package/types/theme/ThemeSwitcher.d.ts +0 -0
  241. package/types/theme/components/accordion.d.ts +0 -0
  242. package/types/theme/components/alert.d.ts +0 -0
  243. package/types/theme/components/attachment.d.ts +0 -0
  244. package/types/theme/components/avatar.d.ts +0 -0
  245. package/types/theme/components/badge.d.ts +0 -0
  246. package/types/theme/components/bottomNavigation.d.ts +0 -0
  247. package/types/theme/components/bottomSheet.d.ts +0 -0
  248. package/types/theme/components/button.d.ts +5 -0
  249. package/types/theme/components/calendar.d.ts +0 -0
  250. package/types/theme/components/card.d.ts +0 -0
  251. package/types/theme/components/cardCarousel.d.ts +0 -0
  252. package/types/theme/components/carousel.d.ts +0 -0
  253. package/types/theme/components/checkbox.d.ts +0 -0
  254. package/types/theme/components/contentNavigator.d.ts +0 -0
  255. package/types/theme/components/datePicker.d.ts +0 -0
  256. package/types/theme/components/divider.d.ts +0 -0
  257. package/types/theme/components/drawer.d.ts +0 -0
  258. package/types/theme/components/empty.d.ts +0 -0
  259. package/types/theme/components/error.d.ts +0 -0
  260. package/types/theme/components/fab.d.ts +0 -0
  261. package/types/theme/components/icon.d.ts +0 -0
  262. package/types/theme/components/image.d.ts +0 -0
  263. package/types/theme/components/list.d.ts +0 -0
  264. package/types/theme/components/pageControl.d.ts +0 -0
  265. package/types/theme/components/pinInput.d.ts +0 -0
  266. package/types/theme/components/progress.d.ts +0 -0
  267. package/types/theme/components/radio.d.ts +0 -0
  268. package/types/theme/components/refreshControl.d.ts +0 -0
  269. package/types/theme/components/richTextEditor.d.ts +0 -0
  270. package/types/theme/components/sectionHeading.d.ts +0 -0
  271. package/types/theme/components/select.d.ts +0 -0
  272. package/types/theme/components/skeleton.d.ts +0 -0
  273. package/types/theme/components/slider.d.ts +0 -0
  274. package/types/theme/components/spinner.d.ts +0 -0
  275. package/types/theme/components/success.d.ts +0 -0
  276. package/types/theme/components/swipeable.d.ts +0 -0
  277. package/types/theme/components/switch.d.ts +0 -0
  278. package/types/theme/components/tabs.d.ts +0 -0
  279. package/types/theme/components/tag.d.ts +0 -0
  280. package/types/theme/components/textInput.d.ts +0 -0
  281. package/types/theme/components/timePicker.d.ts +0 -0
  282. package/types/theme/components/toast.d.ts +0 -0
  283. package/types/theme/components/toolbar.d.ts +0 -0
  284. package/types/theme/components/typography.d.ts +0 -0
  285. package/types/theme/getTheme.d.ts +0 -0
  286. package/types/theme/global/borders.d.ts +0 -0
  287. package/types/theme/global/colors/eBens.d.ts +0 -0
  288. package/types/theme/global/colors/global.d.ts +0 -0
  289. package/types/theme/global/colors/globalDark.d.ts +0 -0
  290. package/types/theme/global/colors/jobs.d.ts +0 -0
  291. package/types/theme/global/colors/swag.d.ts +0 -0
  292. package/types/theme/global/colors/swagDark.d.ts +0 -0
  293. package/types/theme/global/colors/types.d.ts +0 -0
  294. package/types/theme/global/colors/wallet.d.ts +0 -0
  295. package/types/theme/global/colors/work.d.ts +0 -0
  296. package/types/theme/global/index.d.ts +0 -0
  297. package/types/theme/global/scale.d.ts +0 -0
  298. package/types/theme/global/sizes.d.ts +0 -0
  299. package/types/theme/global/space.d.ts +0 -0
  300. package/types/theme/global/typography.d.ts +0 -0
  301. package/types/theme/index.d.ts +0 -0
  302. package/types/types.d.ts +0 -0
  303. package/types/utils/functions.d.ts +0 -0
  304. package/types/utils/helpers.d.ts +0 -0
  305. package/types/utils/hooks.d.ts +0 -0
  306. package/types/utils/scale.d.ts +0 -0
  307. package/.turbo/turbo-build$colon$types.log +0 -0
  308. package/.turbo/turbo-lint.log +0 -183
  309. package/.turbo/turbo-publish:npm.log +0 -9
  310. package/.turbo/turbo-test.log +0 -4726
  311. package/.turbo/turbo-type-check.log +0 -0
  312. package/assets/fonts/Saiga-Light.otf +0 -0
  313. package/assets/fonts/Saiga-Medium.otf +0 -0
  314. package/assets/fonts/Saiga-Regular.otf +0 -0
  315. package/types/components/CompoundSearch/CompoundSearchHandler.d.ts +0 -31
  316. package/types/components/CompoundSearch/CompoundSearchTextInput.d.ts +0 -60
  317. package/types/components/CompoundSearch/StyledCompoundSearch.d.ts +0 -40
  318. package/types/components/CompoundSearch/index.d.ts +0 -8
  319. package/types/components/CompoundSearch/utils.d.ts +0 -8
  320. package/types/components/Search/SearchBasic.d.ts +0 -31
  321. package/types/components/Search/SearchCompound.d.ts +0 -60
  322. package/types/components/Tabs/ScrollableTabsHeader.d.ts +0 -35
  323. package/types/theme/components/compoundSearch.d.ts +0 -36
@@ -772,6 +772,15 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
772
772
  style={{}}
773
773
  >
774
774
  <View
775
+ accessibilityState={
776
+ {
777
+ "busy": undefined,
778
+ "checked": undefined,
779
+ "disabled": undefined,
780
+ "expanded": undefined,
781
+ "selected": undefined,
782
+ }
783
+ }
775
784
  accessibilityValue={
776
785
  {
777
786
  "max": undefined,
@@ -781,6 +790,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
781
790
  }
782
791
  }
783
792
  accessible={true}
793
+ collapsable={false}
784
794
  focusable={false}
785
795
  onClick={[Function]}
786
796
  onLayout={[Function]}
@@ -794,7 +804,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
794
804
  {
795
805
  "alignItems": "center",
796
806
  "alignSelf": "flex-end",
797
- "backgroundColor": "#401960",
807
+ "backgroundColor": "#000000",
798
808
  "borderRadius": 999,
799
809
  "bottom": undefined,
800
810
  "elevation": 3,
@@ -803,6 +813,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders ActionGr
803
813
  "justifyContent": "center",
804
814
  "marginRight": 24,
805
815
  "marginTop": 24,
816
+ "opacity": 1,
806
817
  "padding": 20,
807
818
  "shadowColor": "#001f23",
808
819
  "shadowOffset": {
@@ -1675,6 +1686,15 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
1675
1686
  </View>
1676
1687
  </RCTScrollView>
1677
1688
  <View
1689
+ accessibilityState={
1690
+ {
1691
+ "busy": undefined,
1692
+ "checked": undefined,
1693
+ "disabled": undefined,
1694
+ "expanded": undefined,
1695
+ "selected": undefined,
1696
+ }
1697
+ }
1678
1698
  accessibilityValue={
1679
1699
  {
1680
1700
  "max": undefined,
@@ -1684,6 +1704,7 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
1684
1704
  }
1685
1705
  }
1686
1706
  accessible={true}
1707
+ collapsable={false}
1687
1708
  focusable={false}
1688
1709
  onClick={[Function]}
1689
1710
  onLayout={[Function]}
@@ -1697,13 +1718,14 @@ exports[`Scrollables With FAB [Function ExampleFlatListWithFAB] renders FAB corr
1697
1718
  {
1698
1719
  "alignItems": "center",
1699
1720
  "alignSelf": "flex-start",
1700
- "backgroundColor": "#401960",
1721
+ "backgroundColor": "#000000",
1701
1722
  "borderRadius": 999,
1702
1723
  "bottom": undefined,
1703
1724
  "elevation": 3,
1704
1725
  "flexDirection": "row",
1705
1726
  "height": 64,
1706
1727
  "justifyContent": "center",
1728
+ "opacity": 1,
1707
1729
  "padding": 20,
1708
1730
  "shadowColor": "#001f23",
1709
1731
  "shadowOffset": {
@@ -1934,6 +1956,15 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
1934
1956
  style={{}}
1935
1957
  >
1936
1958
  <View
1959
+ accessibilityState={
1960
+ {
1961
+ "busy": undefined,
1962
+ "checked": undefined,
1963
+ "disabled": undefined,
1964
+ "expanded": undefined,
1965
+ "selected": undefined,
1966
+ }
1967
+ }
1937
1968
  accessibilityValue={
1938
1969
  {
1939
1970
  "max": undefined,
@@ -1943,6 +1974,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
1943
1974
  }
1944
1975
  }
1945
1976
  accessible={true}
1977
+ collapsable={false}
1946
1978
  focusable={false}
1947
1979
  onClick={[Function]}
1948
1980
  onLayout={[Function]}
@@ -1956,7 +1988,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
1956
1988
  {
1957
1989
  "alignItems": "center",
1958
1990
  "alignSelf": "flex-end",
1959
- "backgroundColor": "#401960",
1991
+ "backgroundColor": "#000000",
1960
1992
  "borderRadius": 999,
1961
1993
  "bottom": undefined,
1962
1994
  "elevation": 3,
@@ -1965,6 +1997,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders Action
1965
1997
  "justifyContent": "center",
1966
1998
  "marginRight": 24,
1967
1999
  "marginTop": 24,
2000
+ "opacity": 1,
1968
2001
  "padding": 20,
1969
2002
  "shadowColor": "#001f23",
1970
2003
  "shadowOffset": {
@@ -2177,6 +2210,15 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
2177
2210
  </View>
2178
2211
  </RCTScrollView>
2179
2212
  <View
2213
+ accessibilityState={
2214
+ {
2215
+ "busy": undefined,
2216
+ "checked": undefined,
2217
+ "disabled": undefined,
2218
+ "expanded": undefined,
2219
+ "selected": undefined,
2220
+ }
2221
+ }
2180
2222
  accessibilityValue={
2181
2223
  {
2182
2224
  "max": undefined,
@@ -2186,6 +2228,7 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
2186
2228
  }
2187
2229
  }
2188
2230
  accessible={true}
2231
+ collapsable={false}
2189
2232
  focusable={false}
2190
2233
  onClick={[Function]}
2191
2234
  onLayout={[Function]}
@@ -2199,13 +2242,14 @@ exports[`Scrollables With FAB [Function ExampleScrollViewWithFAB] renders FAB co
2199
2242
  {
2200
2243
  "alignItems": "center",
2201
2244
  "alignSelf": "flex-start",
2202
- "backgroundColor": "#401960",
2245
+ "backgroundColor": "#000000",
2203
2246
  "borderRadius": 999,
2204
2247
  "bottom": undefined,
2205
2248
  "elevation": 3,
2206
2249
  "flexDirection": "row",
2207
2250
  "height": 64,
2208
2251
  "justifyContent": "center",
2252
+ "opacity": 1,
2209
2253
  "padding": 20,
2210
2254
  "shadowColor": "#001f23",
2211
2255
  "shadowOffset": {
@@ -2743,6 +2787,15 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2743
2787
  style={{}}
2744
2788
  >
2745
2789
  <View
2790
+ accessibilityState={
2791
+ {
2792
+ "busy": undefined,
2793
+ "checked": undefined,
2794
+ "disabled": undefined,
2795
+ "expanded": undefined,
2796
+ "selected": undefined,
2797
+ }
2798
+ }
2746
2799
  accessibilityValue={
2747
2800
  {
2748
2801
  "max": undefined,
@@ -2752,6 +2805,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2752
2805
  }
2753
2806
  }
2754
2807
  accessible={true}
2808
+ collapsable={false}
2755
2809
  focusable={false}
2756
2810
  onClick={[Function]}
2757
2811
  onLayout={[Function]}
@@ -2765,7 +2819,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2765
2819
  {
2766
2820
  "alignItems": "center",
2767
2821
  "alignSelf": "flex-end",
2768
- "backgroundColor": "#401960",
2822
+ "backgroundColor": "#000000",
2769
2823
  "borderRadius": 999,
2770
2824
  "bottom": undefined,
2771
2825
  "elevation": 3,
@@ -2774,6 +2828,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders Actio
2774
2828
  "justifyContent": "center",
2775
2829
  "marginRight": 24,
2776
2830
  "marginTop": 24,
2831
+ "opacity": 1,
2777
2832
  "padding": 20,
2778
2833
  "shadowColor": "#001f23",
2779
2834
  "shadowOffset": {
@@ -3293,6 +3348,15 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
3293
3348
  </View>
3294
3349
  </RCTScrollView>
3295
3350
  <View
3351
+ accessibilityState={
3352
+ {
3353
+ "busy": undefined,
3354
+ "checked": undefined,
3355
+ "disabled": undefined,
3356
+ "expanded": undefined,
3357
+ "selected": undefined,
3358
+ }
3359
+ }
3296
3360
  accessibilityValue={
3297
3361
  {
3298
3362
  "max": undefined,
@@ -3302,6 +3366,7 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
3302
3366
  }
3303
3367
  }
3304
3368
  accessible={true}
3369
+ collapsable={false}
3305
3370
  focusable={false}
3306
3371
  onClick={[Function]}
3307
3372
  onLayout={[Function]}
@@ -3315,13 +3380,14 @@ exports[`Scrollables With FAB [Function ExampleSectionListWithFAB] renders FAB c
3315
3380
  {
3316
3381
  "alignItems": "center",
3317
3382
  "alignSelf": "flex-start",
3318
- "backgroundColor": "#401960",
3383
+ "backgroundColor": "#000000",
3319
3384
  "borderRadius": 999,
3320
3385
  "bottom": undefined,
3321
3386
  "elevation": 3,
3322
3387
  "flexDirection": "row",
3323
3388
  "height": 64,
3324
3389
  "justifyContent": "center",
3390
+ "opacity": 1,
3325
3391
  "padding": 20,
3326
3392
  "shadowColor": "#001f23",
3327
3393
  "shadowOffset": {
@@ -1,4 +1,4 @@
1
- import React, { ReactChild, ReactNode, useMemo } from 'react';
1
+ import React, { ReactChild, ReactNode, useMemo, useState } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import { Theme, useTheme } from '../../theme';
4
4
  import { useDeprecation } from '../../utils/hooks';
@@ -61,7 +61,7 @@ export interface ButtonProps {
61
61
  /**
62
62
  * Button type.
63
63
  */
64
- variant?: 'filled' | 'outlined' | 'text';
64
+ variant?: 'filled' | 'outlined' | 'text' | 'inline-text';
65
65
  }
66
66
 
67
67
  const isIconName = (icon: IconName | ReactNode): icon is IconName => {
@@ -151,11 +151,13 @@ const Button = ({
151
151
  text,
152
152
  variant = 'filled',
153
153
  }: ButtonProps): JSX.Element => {
154
- const themeVariant = getThemeVariant(variant, intent);
154
+ const isInlineText = variant === 'inline-text';
155
+ const themeVariant = getThemeVariant(isInlineText ? 'text' : variant, intent);
155
156
  const theme = useTheme();
156
157
  const underlayColor = useMemo(() => {
157
- return getUnderlayColor(theme, themeVariant);
158
- }, [theme, themeVariant]);
158
+ return isInlineText ? 'transparent' : getUnderlayColor(theme, themeVariant);
159
+ }, [theme, themeVariant, isInlineText]);
160
+ const [isPressed, setIsPressed] = useState(false);
159
161
 
160
162
  useDeprecation(
161
163
  `Button variant ${deprecatedVariants.join(', ')} are deprecated.`,
@@ -173,6 +175,9 @@ const Button = ({
173
175
  themeButtonVariant={themeVariant}
174
176
  style={style}
175
177
  underlayColor={underlayColor}
178
+ themeInlineText={isInlineText}
179
+ onPressIn={() => isInlineText && setIsPressed(true)}
180
+ onPressOut={() => isInlineText && setIsPressed(false)}
176
181
  >
177
182
  {loading === true ? (
178
183
  <LoadingIndicator
@@ -189,6 +194,7 @@ const Button = ({
189
194
  icon={icon}
190
195
  testID={`${testID}-left-icon`}
191
196
  themeButtonVariant={themeVariant}
197
+ themeIsPressed={isPressed}
192
198
  />
193
199
  ) : (
194
200
  icon
@@ -202,6 +208,7 @@ const Button = ({
202
208
  numberOfLines={1}
203
209
  disabled={disabled}
204
210
  themeButtonVariant={themeVariant}
211
+ themeIsPressed={isPressed}
205
212
  >
206
213
  {text}
207
214
  </StyledButtonTitleOfVariantText>
@@ -224,6 +231,7 @@ const Button = ({
224
231
  icon={rightIcon}
225
232
  testID={`${testID}-right-icon`}
226
233
  themeButtonVariant={themeVariant}
234
+ themeIsPressed={isPressed}
227
235
  />
228
236
  ) : (
229
237
  rightIcon
@@ -82,7 +82,8 @@ const genOutlineContainerStyles = (
82
82
  const genTextStyles = (
83
83
  theme: Theme,
84
84
  intent: Intent,
85
- disabled?: boolean
85
+ disabled?: boolean,
86
+ isPressed?: boolean
86
87
  ): ReactNativeStyle => {
87
88
  if (disabled) {
88
89
  return {
@@ -90,6 +91,12 @@ const genTextStyles = (
90
91
  };
91
92
  }
92
93
 
94
+ if (isPressed) {
95
+ return {
96
+ color: theme.__hd__.button.colors.pressedText[intent],
97
+ };
98
+ }
99
+
93
100
  return { color: theme.__hd__.button.colors[intent] };
94
101
  };
95
102
 
@@ -97,37 +104,49 @@ const StyledButtonContainer = styled(TouchableHighlight)<{
97
104
  disabled?: boolean;
98
105
  themeButtonVariant: ThemeVariant;
99
106
  loading?: boolean;
100
- }>(({ disabled = false, loading = false, themeButtonVariant, theme }) => {
101
- switch (themeButtonVariant) {
102
- case 'filled-primary':
103
- return genFilledContainerStyles(theme, 'primary', disabled, loading);
104
- case 'filled-secondary':
105
- return genFilledContainerStyles(theme, 'secondary', disabled, loading);
106
- case 'filled-danger':
107
- return genFilledContainerStyles(theme, 'danger', disabled, loading);
108
- case 'outlined-primary':
109
- return genOutlineContainerStyles(theme, 'primary', disabled, loading);
110
- case 'outlined-secondary':
111
- return genOutlineContainerStyles(theme, 'secondary', disabled, loading);
112
- case 'outlined-danger':
113
- return genOutlineContainerStyles(theme, 'danger', disabled, loading);
114
- case 'text-primary':
115
- case 'text-secondary':
116
- case 'text-danger':
117
- return {
118
- height: scale(60),
119
- borderRadius: theme.__hd__.button.radii.text,
120
- flexDirection: 'row',
121
- justifyContent: 'center',
122
- alignItems: 'center',
123
- padding: theme.__hd__.button.space.textButtonPadding,
124
- borderWidth: 0,
125
- backgroundColor: loading
126
- ? theme.__hd__.button.colors.textLoadingBackground
127
- : 'transparent',
128
- };
107
+ themeInlineText?: boolean;
108
+ }>(
109
+ ({
110
+ disabled = false,
111
+ loading = false,
112
+ themeButtonVariant,
113
+ themeInlineText,
114
+ theme,
115
+ }) => {
116
+ switch (themeButtonVariant) {
117
+ case 'filled-primary':
118
+ return genFilledContainerStyles(theme, 'primary', disabled, loading);
119
+ case 'filled-secondary':
120
+ return genFilledContainerStyles(theme, 'secondary', disabled, loading);
121
+ case 'filled-danger':
122
+ return genFilledContainerStyles(theme, 'danger', disabled, loading);
123
+ case 'outlined-primary':
124
+ return genOutlineContainerStyles(theme, 'primary', disabled, loading);
125
+ case 'outlined-secondary':
126
+ return genOutlineContainerStyles(theme, 'secondary', disabled, loading);
127
+ case 'outlined-danger':
128
+ return genOutlineContainerStyles(theme, 'danger', disabled, loading);
129
+ case 'text-primary':
130
+ case 'text-secondary':
131
+ case 'text-danger':
132
+ return {
133
+ height: themeInlineText ? undefined : scale(60),
134
+ borderRadius: theme.__hd__.button.radii.text,
135
+ flexDirection: 'row',
136
+ justifyContent: 'center',
137
+ alignItems: 'center',
138
+ padding: themeInlineText
139
+ ? 0
140
+ : theme.__hd__.button.space.textButtonPadding,
141
+ borderWidth: 0,
142
+ backgroundColor:
143
+ loading && !themeInlineText
144
+ ? theme.__hd__.button.colors.textLoadingBackground
145
+ : 'transparent',
146
+ };
147
+ }
129
148
  }
130
- });
149
+ );
131
150
 
132
151
  const StyledButtonText = styled(Typography.Title)<{
133
152
  disabled?: boolean;
@@ -165,15 +184,16 @@ const StyledButtonText = styled(Typography.Title)<{
165
184
  const StyledButtonTitleOfVariantText = styled(Typography.Body)<{
166
185
  disabled?: boolean;
167
186
  themeButtonVariant: 'text-primary' | 'text-secondary' | 'text-danger';
168
- }>(({ disabled, themeButtonVariant, theme }) => {
187
+ themeIsPressed?: boolean;
188
+ }>(({ disabled, themeButtonVariant, themeIsPressed, theme }) => {
169
189
  const themeStyling = () => {
170
190
  switch (themeButtonVariant) {
171
191
  case 'text-primary':
172
- return genTextStyles(theme, 'primary', disabled);
192
+ return genTextStyles(theme, 'primary', disabled, themeIsPressed);
173
193
  case 'text-secondary':
174
- return genTextStyles(theme, 'secondary', disabled);
194
+ return genTextStyles(theme, 'secondary', disabled, themeIsPressed);
175
195
  case 'text-danger':
176
- return genTextStyles(theme, 'danger', disabled);
196
+ return genTextStyles(theme, 'danger', disabled, themeIsPressed);
177
197
  }
178
198
  };
179
199
  return {
@@ -198,7 +218,8 @@ const StyledButtonIconWrapper = styled(View)<{
198
218
  const StyledButtonIcon = styled(Icon)<{
199
219
  disabled?: boolean;
200
220
  themeButtonVariant: ThemeVariant;
201
- }>(({ disabled, themeButtonVariant, theme }) => {
221
+ themeIsPressed?: boolean;
222
+ }>(({ disabled, themeButtonVariant, themeIsPressed, theme }) => {
202
223
  const themeStyling = () => {
203
224
  switch (themeButtonVariant) {
204
225
  case 'filled-primary':
@@ -212,11 +233,11 @@ const StyledButtonIcon = styled(Icon)<{
212
233
  case 'outlined-danger':
213
234
  return genTextStyles(theme, 'danger', disabled);
214
235
  case 'text-primary':
215
- return genTextStyles(theme, 'primary', disabled);
236
+ return genTextStyles(theme, 'primary', disabled, themeIsPressed);
216
237
  case 'text-secondary':
217
- return genTextStyles(theme, 'secondary', disabled);
238
+ return genTextStyles(theme, 'secondary', disabled, themeIsPressed);
218
239
  case 'text-danger':
219
- return genTextStyles(theme, 'danger', disabled);
240
+ return genTextStyles(theme, 'danger', disabled, themeIsPressed);
220
241
  }
221
242
  };
222
243
 
@@ -108,22 +108,27 @@ describe('Button', () => {
108
108
  });
109
109
 
110
110
  it.each`
111
- variant | intent | loading | disabled
112
- ${'filled'} | ${'primary'} | ${false} | ${false}
113
- ${'filled'} | ${'primary'} | ${true} | ${false}
114
- ${'filled'} | ${'primary'} | ${false} | ${true}
115
- ${'outlined'} | ${'primary'} | ${false} | ${false}
116
- ${'outlined'} | ${'primary'} | ${true} | ${false}
117
- ${'outlined'} | ${'primary'} | ${false} | ${true}
118
- ${'text'} | ${'primary'} | ${false} | ${false}
119
- ${'text'} | ${'primary'} | ${true} | ${false}
120
- ${'text'} | ${'primary'} | ${false} | ${true}
121
- ${'text'} | ${'secondary'} | ${false} | ${false}
122
- ${'text'} | ${'secondary'} | ${true} | ${false}
123
- ${'text'} | ${'secondary'} | ${false} | ${true}
124
- ${'text'} | ${'danger'} | ${false} | ${false}
125
- ${'text'} | ${'danger'} | ${true} | ${false}
126
- ${'text'} | ${'danger'} | ${false} | ${true}
111
+ variant | intent | loading | disabled
112
+ ${'filled'} | ${'primary'} | ${false} | ${false}
113
+ ${'filled'} | ${'primary'} | ${true} | ${false}
114
+ ${'filled'} | ${'primary'} | ${false} | ${true}
115
+ ${'outlined'} | ${'primary'} | ${false} | ${false}
116
+ ${'outlined'} | ${'primary'} | ${true} | ${false}
117
+ ${'outlined'} | ${'primary'} | ${false} | ${true}
118
+ ${'text'} | ${'primary'} | ${false} | ${false}
119
+ ${'text'} | ${'primary'} | ${true} | ${false}
120
+ ${'text'} | ${'primary'} | ${false} | ${true}
121
+ ${'text'} | ${'secondary'} | ${false} | ${false}
122
+ ${'text'} | ${'secondary'} | ${true} | ${false}
123
+ ${'text'} | ${'secondary'} | ${false} | ${true}
124
+ ${'text'} | ${'danger'} | ${false} | ${false}
125
+ ${'text'} | ${'danger'} | ${true} | ${false}
126
+ ${'text'} | ${'danger'} | ${false} | ${true}
127
+ ${'inline-text'} | ${'primary'} | ${false} | ${false}
128
+ ${'inline-text'} | ${'secondary'} | ${true} | ${false}
129
+ ${'inline-text'} | ${'danger'} | ${false} | ${false}
130
+ ${'inline-text'} | ${'primary'} | ${true} | ${false}
131
+ ${'inline-text'} | ${'primary'} | ${false} | ${true}
127
132
  `('renders correctly', ({ variant, intent, loading, disabled }) => {
128
133
  const { toJSON } = renderWithTheme(
129
134
  <Button
@@ -92,19 +92,26 @@ describe('StyledButtonIconWrapper', () => {
92
92
 
93
93
  describe('StyledButtonIcon', () => {
94
94
  it.each`
95
- themeVariant
96
- ${'filled-primary'}
97
- ${'filled-secondary'}
98
- ${'filled-danger'}
99
- ${'outlined-primary'}
100
- ${'outlined-secondary'}
101
- ${'outlined-danger'}
102
- ${'text-primary'}
103
- ${'text-secondary'}
104
- ${'text-danger'}
105
- `('has $themeVariant style', ({ themeVariant }) => {
95
+ themeVariant | themeIsPressed
96
+ ${'filled-primary'} | ${undefined}
97
+ ${'filled-secondary'} | ${undefined}
98
+ ${'filled-danger'} | ${undefined}
99
+ ${'outlined-primary'} | ${undefined}
100
+ ${'outlined-secondary'} | ${undefined}
101
+ ${'outlined-danger'} | ${undefined}
102
+ ${'text-primary'} | ${false}
103
+ ${'text-secondary'} | ${false}
104
+ ${'text-danger'} | ${false}
105
+ ${'text-primary'} | ${true}
106
+ ${'text-secondary'} | ${true}
107
+ ${'text-danger'} | ${true}
108
+ `('has $themeVariant style', ({ themeVariant, themeIsPressed }) => {
106
109
  const { toJSON } = renderWithTheme(
107
- <StyledButtonIcon icon="bell" themeButtonVariant={themeVariant} />
110
+ <StyledButtonIcon
111
+ icon="bell"
112
+ themeButtonVariant={themeVariant}
113
+ themeIsPressed={themeIsPressed}
114
+ />
108
115
  );
109
116
 
110
117
  expect(toJSON()).toMatchSnapshot();