@hero-design/rn 8.68.0-alpha.1 → 8.68.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 (370) hide show
  1. package/.turbo/turbo-build.log +8 -0
  2. package/CHANGELOG.md +12 -0
  3. package/es/index.js +514 -155
  4. package/lib/index.js +514 -154
  5. package/package.json +1 -1
  6. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -4
  7. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  8. package/src/components/Alert/StyledAlert.tsx +24 -2
  9. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +150 -30
  10. package/src/components/Alert/index.tsx +15 -10
  11. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +18 -18
  12. package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +2 -2
  13. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +1 -1
  14. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  15. package/src/components/Badge/StyledBadge.tsx +13 -5
  16. package/src/components/Badge/__tests__/Badge.spec.tsx +9 -0
  17. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +129 -13
  18. package/src/components/Badge/index.tsx +8 -2
  19. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  20. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +4 -4
  21. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  22. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +21 -21
  23. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +12 -12
  24. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -5
  25. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
  26. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  27. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +4 -4
  28. package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +3 -3
  29. package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +2 -2
  30. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +30 -30
  31. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  32. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -1
  33. package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  34. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +22 -22
  35. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
  36. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -3
  37. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  38. package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  39. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  40. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
  41. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +6 -6
  42. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +2 -2
  43. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  44. package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  45. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
  46. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +10 -10
  47. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +14 -14
  48. package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
  49. package/src/components/Search/SearchOneLine.tsx +196 -0
  50. package/src/components/Search/SearchSuffixIcon.tsx +37 -0
  51. package/src/components/Search/SearchTwoLine.tsx +64 -0
  52. package/src/components/Search/StyledSearch.tsx +67 -0
  53. package/src/components/Search/__tests__/SearchOneLine.spec.tsx +197 -0
  54. package/src/components/Search/__tests__/SearchSuffixIcon.spec.tsx +12 -0
  55. package/src/components/Search/__tests__/SearchTwoLine.spec.tsx +20 -0
  56. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +707 -0
  57. package/src/components/Search/__tests__/__snapshots__/SearchSuffixIcon.spec.tsx.snap +134 -0
  58. package/src/components/Search/__tests__/__snapshots__/SearchTwoLine.spec.tsx.snap +170 -0
  59. package/src/components/Search/__tests__/__snapshots__/utils.spec.tsx.snap +115 -0
  60. package/src/components/Search/__tests__/utils.spec.tsx +19 -0
  61. package/src/components/Search/index.tsx +17 -0
  62. package/src/components/Search/utils.tsx +31 -0
  63. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  64. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  65. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -2
  66. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +14 -14
  67. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +14 -14
  68. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
  69. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -8
  70. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  71. package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  72. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
  73. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -32
  74. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  75. package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  76. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +1 -1
  77. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  78. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +2 -2
  79. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +24 -9
  80. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +19 -9
  81. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +7 -2
  82. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +24 -9
  83. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +5 -5
  84. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
  85. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +18 -18
  86. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +7 -7
  87. package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +1 -1
  88. package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  89. package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +1 -1
  90. package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  91. package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +1 -1
  92. package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  93. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
  94. package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +1 -1
  95. package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  96. package/src/index.ts +2 -0
  97. package/src/theme/ThemeSwitcher.tsx +2 -12
  98. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +136 -77
  99. package/src/theme/components/alert.ts +14 -5
  100. package/src/theme/components/badge.ts +21 -21
  101. package/src/theme/components/search.ts +56 -0
  102. package/src/theme/getTheme.ts +5 -2
  103. package/src/theme/global/colors/swagLight.ts +1 -1
  104. package/stats/8.67.0/rn-stats.html +4844 -0
  105. package/stats/8.68.0/rn-stats.html +4842 -0
  106. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  107. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  108. package/types/components/Accordion/index.d.ts +0 -0
  109. package/types/components/Alert/StyledAlert.d.ts +17 -2
  110. package/types/components/Alert/index.d.ts +0 -0
  111. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  112. package/types/components/Attachment/index.d.ts +0 -0
  113. package/types/components/Avatar/Avatar.d.ts +0 -0
  114. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  115. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  116. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  117. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  118. package/types/components/Avatar/index.d.ts +0 -0
  119. package/types/components/Badge/Status.d.ts +0 -0
  120. package/types/components/Badge/StyledBadge.d.ts +4 -0
  121. package/types/components/Badge/index.d.ts +6 -2
  122. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  123. package/types/components/BottomNavigation/index.d.ts +0 -0
  124. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  125. package/types/components/BottomSheet/Footer.d.ts +0 -0
  126. package/types/components/BottomSheet/Header.d.ts +0 -0
  127. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  128. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  129. package/types/components/BottomSheet/index.d.ts +0 -0
  130. package/types/components/Box/StyledBox.d.ts +0 -0
  131. package/types/components/Box/config.d.ts +0 -0
  132. package/types/components/Box/index.d.ts +0 -0
  133. package/types/components/Box/types.d.ts +0 -0
  134. package/types/components/Button/Button.d.ts +0 -0
  135. package/types/components/Button/IconButton.d.ts +0 -0
  136. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  137. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  138. package/types/components/Button/StyledButton.d.ts +0 -0
  139. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  140. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  141. package/types/components/Button/index.d.ts +0 -0
  142. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  143. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  144. package/types/components/Calendar/helpers.d.ts +0 -0
  145. package/types/components/Calendar/index.d.ts +0 -0
  146. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  147. package/types/components/Card/DataCard/index.d.ts +0 -0
  148. package/types/components/Card/StyledCard.d.ts +0 -0
  149. package/types/components/Card/index.d.ts +0 -0
  150. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  151. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  152. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  153. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  154. package/types/components/Carousel/contants.d.ts +0 -0
  155. package/types/components/Carousel/index.d.ts +0 -0
  156. package/types/components/Carousel/types.d.ts +0 -0
  157. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
  158. package/types/components/Checkbox/index.d.ts +0 -0
  159. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  160. package/types/components/Collapse/index.d.ts +0 -0
  161. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  162. package/types/components/ContentNavigator/index.d.ts +0 -0
  163. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  164. package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
  165. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  166. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  167. package/types/components/DatePicker/index.d.ts +0 -0
  168. package/types/components/DatePicker/types.d.ts +0 -0
  169. package/types/components/Divider/StyledDivider.d.ts +0 -0
  170. package/types/components/Divider/index.d.ts +0 -0
  171. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  172. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  173. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  174. package/types/components/Drawer/index.d.ts +0 -0
  175. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  176. package/types/components/Empty/index.d.ts +0 -0
  177. package/types/components/Error/StyledError.d.ts +0 -0
  178. package/types/components/Error/index.d.ts +0 -0
  179. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  180. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  181. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
  182. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  183. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  184. package/types/components/FAB/FAB.d.ts +0 -0
  185. package/types/components/FAB/StyledFAB.d.ts +0 -0
  186. package/types/components/FAB/index.d.ts +0 -0
  187. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  188. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  189. package/types/components/Icon/IconList.d.ts +0 -0
  190. package/types/components/Icon/index.d.ts +0 -0
  191. package/types/components/Icon/utils.d.ts +0 -0
  192. package/types/components/Image/index.d.ts +0 -0
  193. package/types/components/List/BasicListItem.d.ts +0 -0
  194. package/types/components/List/ListItem.d.ts +0 -0
  195. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  196. package/types/components/List/StyledListItem.d.ts +0 -0
  197. package/types/components/List/index.d.ts +0 -0
  198. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  199. package/types/components/PageControl/index.d.ts +0 -0
  200. package/types/components/PinInput/PinCell.d.ts +0 -0
  201. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  202. package/types/components/PinInput/index.d.ts +0 -0
  203. package/types/components/Progress/ProgressBar.d.ts +0 -0
  204. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  205. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  206. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  207. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  208. package/types/components/Progress/constants.d.ts +0 -0
  209. package/types/components/Progress/index.d.ts +0 -0
  210. package/types/components/Progress/types.d.ts +0 -0
  211. package/types/components/Radio/Radio.d.ts +0 -0
  212. package/types/components/Radio/RadioGroup.d.ts +0 -0
  213. package/types/components/Radio/StyledRadio.d.ts +0 -0
  214. package/types/components/Radio/index.d.ts +0 -0
  215. package/types/components/Radio/types.d.ts +0 -0
  216. package/types/components/RefreshControl/index.d.ts +0 -0
  217. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  218. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  219. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  220. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  221. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  222. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  223. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  224. package/types/components/RichTextEditor/constants.d.ts +0 -0
  225. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  226. package/types/components/RichTextEditor/index.d.ts +0 -0
  227. package/types/components/RichTextEditor/types.d.ts +0 -0
  228. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  229. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  230. package/types/components/Search/SearchOneLine.d.ts +60 -0
  231. package/types/components/Search/SearchSuffixIcon.d.ts +24 -0
  232. package/types/components/Search/SearchTwoLine.d.ts +31 -0
  233. package/types/components/Search/StyledSearch.d.ts +44 -0
  234. package/types/components/Search/index.d.ts +10 -0
  235. package/types/components/Search/utils.d.ts +8 -0
  236. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  237. package/types/components/SectionHeading/index.d.ts +0 -0
  238. package/types/components/Select/BaseOptionList.d.ts +0 -0
  239. package/types/components/Select/Footer.d.ts +0 -0
  240. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  241. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  242. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  243. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  244. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  245. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  246. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  247. package/types/components/Select/StyledSelect.d.ts +0 -0
  248. package/types/components/Select/helpers.d.ts +0 -0
  249. package/types/components/Select/index.d.ts +0 -0
  250. package/types/components/Select/types.d.ts +0 -0
  251. package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
  252. package/types/components/Skeleton/index.d.ts +0 -0
  253. package/types/components/Slider/index.d.ts +0 -0
  254. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  255. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  256. package/types/components/Spinner/index.d.ts +0 -0
  257. package/types/components/Success/StyledSuccess.d.ts +0 -0
  258. package/types/components/Success/index.d.ts +0 -0
  259. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  260. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  261. package/types/components/Swipeable/index.d.ts +0 -0
  262. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  263. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  264. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  265. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  266. package/types/components/Switch/index.d.ts +0 -0
  267. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  268. package/types/components/Tabs/SceneView.d.ts +0 -0
  269. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  270. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  271. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  272. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  273. package/types/components/Tabs/index.d.ts +0 -0
  274. package/types/components/Tabs/useIsFocused.d.ts +0 -0
  275. package/types/components/Tabs/utils.d.ts +0 -0
  276. package/types/components/Tag/StyledTag.d.ts +0 -0
  277. package/types/components/Tag/index.d.ts +0 -0
  278. package/types/components/TextInput/StyledTextInput.d.ts +0 -0
  279. package/types/components/TextInput/index.d.ts +0 -0
  280. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  281. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  282. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  283. package/types/components/TimePicker/index.d.ts +0 -0
  284. package/types/components/TimePicker/types.d.ts +0 -0
  285. package/types/components/Toast/StyledToast.d.ts +0 -0
  286. package/types/components/Toast/Toast.d.ts +0 -0
  287. package/types/components/Toast/ToastContainer.d.ts +0 -0
  288. package/types/components/Toast/ToastContext.d.ts +0 -0
  289. package/types/components/Toast/ToastProvider.d.ts +0 -0
  290. package/types/components/Toast/index.d.ts +0 -0
  291. package/types/components/Toast/types.d.ts +0 -0
  292. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  293. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  294. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  295. package/types/components/Toolbar/index.d.ts +0 -0
  296. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  297. package/types/components/Typography/Text/index.d.ts +0 -0
  298. package/types/components/Typography/index.d.ts +0 -0
  299. package/types/index.d.ts +2 -1
  300. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  301. package/types/theme/ThemeProvider.d.ts +0 -0
  302. package/types/theme/ThemeSwitcher.d.ts +1 -1
  303. package/types/theme/components/accordion.d.ts +0 -0
  304. package/types/theme/components/alert.d.ts +14 -5
  305. package/types/theme/components/attachment.d.ts +0 -0
  306. package/types/theme/components/avatar.d.ts +0 -0
  307. package/types/theme/components/badge.d.ts +21 -21
  308. package/types/theme/components/bottomNavigation.d.ts +0 -0
  309. package/types/theme/components/bottomSheet.d.ts +0 -0
  310. package/types/theme/components/button.d.ts +0 -0
  311. package/types/theme/components/calendar.d.ts +0 -0
  312. package/types/theme/components/card.d.ts +0 -0
  313. package/types/theme/components/cardCarousel.d.ts +0 -0
  314. package/types/theme/components/carousel.d.ts +0 -0
  315. package/types/theme/components/checkbox.d.ts +0 -0
  316. package/types/theme/components/contentNavigator.d.ts +0 -0
  317. package/types/theme/components/datePicker.d.ts +0 -0
  318. package/types/theme/components/divider.d.ts +0 -0
  319. package/types/theme/components/drawer.d.ts +0 -0
  320. package/types/theme/components/empty.d.ts +0 -0
  321. package/types/theme/components/error.d.ts +0 -0
  322. package/types/theme/components/fab.d.ts +0 -0
  323. package/types/theme/components/icon.d.ts +0 -0
  324. package/types/theme/components/image.d.ts +0 -0
  325. package/types/theme/components/list.d.ts +0 -0
  326. package/types/theme/components/pageControl.d.ts +0 -0
  327. package/types/theme/components/pinInput.d.ts +0 -0
  328. package/types/theme/components/progress.d.ts +0 -0
  329. package/types/theme/components/radio.d.ts +0 -0
  330. package/types/theme/components/refreshControl.d.ts +0 -0
  331. package/types/theme/components/richTextEditor.d.ts +0 -0
  332. package/types/theme/components/search.d.ts +38 -0
  333. package/types/theme/components/sectionHeading.d.ts +0 -0
  334. package/types/theme/components/select.d.ts +0 -0
  335. package/types/theme/components/skeleton.d.ts +0 -0
  336. package/types/theme/components/slider.d.ts +0 -0
  337. package/types/theme/components/spinner.d.ts +0 -0
  338. package/types/theme/components/success.d.ts +0 -0
  339. package/types/theme/components/swipeable.d.ts +0 -0
  340. package/types/theme/components/switch.d.ts +0 -0
  341. package/types/theme/components/tabs.d.ts +0 -0
  342. package/types/theme/components/tag.d.ts +0 -0
  343. package/types/theme/components/textInput.d.ts +0 -0
  344. package/types/theme/components/timePicker.d.ts +0 -0
  345. package/types/theme/components/toast.d.ts +0 -0
  346. package/types/theme/components/toolbar.d.ts +0 -0
  347. package/types/theme/components/typography.d.ts +0 -0
  348. package/types/theme/getTheme.d.ts +2 -0
  349. package/types/theme/global/borders.d.ts +0 -0
  350. package/types/theme/global/colors/eBens.d.ts +0 -0
  351. package/types/theme/global/colors/global.d.ts +0 -0
  352. package/types/theme/global/colors/globalDark.d.ts +0 -0
  353. package/types/theme/global/colors/jobs.d.ts +0 -0
  354. package/types/theme/global/colors/swag.d.ts +0 -0
  355. package/types/theme/global/colors/swagDark.d.ts +0 -0
  356. package/types/theme/global/colors/types.d.ts +0 -0
  357. package/types/theme/global/colors/wallet.d.ts +0 -0
  358. package/types/theme/global/colors/work.d.ts +0 -0
  359. package/types/theme/global/index.d.ts +0 -0
  360. package/types/theme/global/scale.d.ts +0 -0
  361. package/types/theme/global/sizes.d.ts +0 -0
  362. package/types/theme/global/space.d.ts +0 -0
  363. package/types/theme/global/typography.d.ts +0 -0
  364. package/types/theme/index.d.ts +0 -0
  365. package/types/types.d.ts +0 -0
  366. package/types/utils/functions.d.ts +0 -0
  367. package/types/utils/helpers.d.ts +0 -0
  368. package/types/utils/hooks.d.ts +0 -0
  369. package/types/utils/scale.d.ts +0 -0
  370. package/types/components/Tabs/ScrollableTabsHeader.d.ts +0 -35
@@ -198,7 +198,7 @@ exports[`StyledListItemContainer renders correctly themeSelected true themeDisab
198
198
  [
199
199
  {
200
200
  "alignItems": "center",
201
- "backgroundColor": "#F1E9FB",
201
+ "backgroundColor": "#ece8ef",
202
202
  "borderRadius": 4,
203
203
  "flexDirection": "row",
204
204
  "opacity": 1,
@@ -282,7 +282,7 @@ exports[`StyledListItemContainer renders correctly themeSelected true themeDisab
282
282
  [
283
283
  {
284
284
  "alignItems": "center",
285
- "backgroundColor": "#F1E9FB",
285
+ "backgroundColor": "#ece8ef",
286
286
  "borderRadius": 4,
287
287
  "flexDirection": "row",
288
288
  "opacity": 0.38,
@@ -428,7 +428,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
428
428
  [
429
429
  {
430
430
  "alignItems": "center",
431
- "backgroundColor": "#F1E9FB",
431
+ "backgroundColor": "#ece8ef",
432
432
  "borderRadius": 8,
433
433
  "elevation": 3,
434
434
  "flexDirection": "row",
@@ -518,7 +518,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant ful
518
518
  style={
519
519
  [
520
520
  {
521
- "backgroundColor": "#F1E9FB",
521
+ "backgroundColor": "#ece8ef",
522
522
  "borderRadius": 8,
523
523
  "flexDirection": "row",
524
524
  "padding": 16,
@@ -28,7 +28,7 @@ exports[`RefreshControl renders correctly 1`] = `
28
28
  collapsable={false}
29
29
  style={
30
30
  {
31
- "backgroundColor": "#7622d7",
31
+ "backgroundColor": "#401960",
32
32
  "borderRadius": 999,
33
33
  "height": 8,
34
34
  "marginHorizontal": 8,
@@ -47,7 +47,7 @@ exports[`RefreshControl renders correctly 1`] = `
47
47
  collapsable={false}
48
48
  style={
49
49
  {
50
- "backgroundColor": "#7622d7",
50
+ "backgroundColor": "#401960",
51
51
  "borderRadius": 999,
52
52
  "height": 8,
53
53
  "marginHorizontal": 8,
@@ -66,7 +66,7 @@ exports[`RefreshControl renders correctly 1`] = `
66
66
  collapsable={false}
67
67
  style={
68
68
  {
69
- "backgroundColor": "#7622d7",
69
+ "backgroundColor": "#401960",
70
70
  "borderRadius": 999,
71
71
  "height": 8,
72
72
  "marginHorizontal": 8,
@@ -30,7 +30,7 @@ exports[`Progress.Bar renders correctly 1`] = `
30
30
  style={
31
31
  {
32
32
  "alignSelf": "stretch",
33
- "backgroundColor": "#7622d7",
33
+ "backgroundColor": "#401960",
34
34
  "borderBottomRightRadius": 999,
35
35
  "borderTopRightRadius": 999,
36
36
  "flex": 1,
@@ -491,7 +491,7 @@ exports[`Progress.Circle renders correctly 1`] = `
491
491
  style={
492
492
  [
493
493
  {
494
- "borderColor": "#7622d7",
494
+ "borderColor": "#401960",
495
495
  "borderRadius": 999,
496
496
  "borderWidth": 8,
497
497
  "height": 72,
@@ -585,7 +585,7 @@ exports[`Progress.Circle renders correctly 1`] = `
585
585
  style={
586
586
  [
587
587
  {
588
- "borderColor": "#7622d7",
588
+ "borderColor": "#401960",
589
589
  "borderRadius": 999,
590
590
  "borderWidth": 8,
591
591
  "height": 72,
@@ -655,7 +655,7 @@ exports[`Progress.Circle renders correctly 1`] = `
655
655
  style={
656
656
  [
657
657
  {
658
- "backgroundColor": "#7622d7",
658
+ "backgroundColor": "#401960",
659
659
  "borderRadius": 999,
660
660
  "height": 8,
661
661
  "left": 32,
@@ -691,7 +691,7 @@ exports[`Progress.Circle renders correctly 1`] = `
691
691
  style={
692
692
  [
693
693
  {
694
- "backgroundColor": "#7622d7",
694
+ "backgroundColor": "#401960",
695
695
  "borderRadius": 999,
696
696
  "height": 8,
697
697
  "left": 32,
@@ -34,14 +34,14 @@ exports[`rendering renders correctly when checked with inactiveIntent=dark 1`] =
34
34
  style={
35
35
  [
36
36
  {
37
- "backgroundColor": "#F1E9FB",
37
+ "backgroundColor": "#ece8ef",
38
38
  "borderRadius": 8,
39
39
  "flexDirection": "row",
40
40
  "padding": 16,
41
41
  },
42
42
  [
43
43
  {
44
- "backgroundColor": "#F1E9FB",
44
+ "backgroundColor": "#ece8ef",
45
45
  },
46
46
  undefined,
47
47
  ],
@@ -114,7 +114,7 @@ exports[`rendering renders correctly when checked with inactiveIntent=dark 1`] =
114
114
  [
115
115
  {
116
116
  "alignItems": "center",
117
- "borderColor": "#7622d7",
117
+ "borderColor": "#401960",
118
118
  "borderRadius": 999,
119
119
  "borderWidth": 2,
120
120
  "height": 20,
@@ -129,7 +129,7 @@ exports[`rendering renders correctly when checked with inactiveIntent=dark 1`] =
129
129
  style={
130
130
  [
131
131
  {
132
- "backgroundColor": "#7622d7",
132
+ "backgroundColor": "#401960",
133
133
  "borderRadius": 999,
134
134
  "height": 10,
135
135
  "width": 10,
@@ -201,14 +201,14 @@ exports[`rendering renders correctly when checked with inactiveIntent=light 1`]
201
201
  style={
202
202
  [
203
203
  {
204
- "backgroundColor": "#F1E9FB",
204
+ "backgroundColor": "#ece8ef",
205
205
  "borderRadius": 8,
206
206
  "flexDirection": "row",
207
207
  "padding": 16,
208
208
  },
209
209
  [
210
210
  {
211
- "backgroundColor": "#F1E9FB",
211
+ "backgroundColor": "#ece8ef",
212
212
  },
213
213
  undefined,
214
214
  ],
@@ -281,7 +281,7 @@ exports[`rendering renders correctly when checked with inactiveIntent=light 1`]
281
281
  [
282
282
  {
283
283
  "alignItems": "center",
284
- "borderColor": "#7622d7",
284
+ "borderColor": "#401960",
285
285
  "borderRadius": 999,
286
286
  "borderWidth": 2,
287
287
  "height": 20,
@@ -296,7 +296,7 @@ exports[`rendering renders correctly when checked with inactiveIntent=light 1`]
296
296
  style={
297
297
  [
298
298
  {
299
- "backgroundColor": "#7622d7",
299
+ "backgroundColor": "#401960",
300
300
  "borderRadius": 999,
301
301
  "height": 10,
302
302
  "width": 10,
@@ -448,7 +448,7 @@ exports[`rendering renders correctly when not checked with inactiveIntent=dark 1
448
448
  [
449
449
  {
450
450
  "alignItems": "center",
451
- "borderColor": "#7622d7",
451
+ "borderColor": "#401960",
452
452
  "borderRadius": 999,
453
453
  "borderWidth": 2,
454
454
  "height": 20,
@@ -600,7 +600,7 @@ exports[`rendering renders correctly when not checked with inactiveIntent=light
600
600
  [
601
601
  {
602
602
  "alignItems": "center",
603
- "borderColor": "#7622d7",
603
+ "borderColor": "#401960",
604
604
  "borderRadius": 999,
605
605
  "borderWidth": 2,
606
606
  "height": 20,
@@ -115,7 +115,7 @@ exports[`rendering renders correctly with inactiveIntent=dark 1`] = `
115
115
  [
116
116
  {
117
117
  "alignItems": "center",
118
- "borderColor": "#7622d7",
118
+ "borderColor": "#401960",
119
119
  "borderRadius": 999,
120
120
  "borderWidth": 2,
121
121
  "height": 20,
@@ -247,7 +247,7 @@ exports[`rendering renders correctly with inactiveIntent=dark 1`] = `
247
247
  [
248
248
  {
249
249
  "alignItems": "center",
250
- "borderColor": "#7622d7",
250
+ "borderColor": "#401960",
251
251
  "borderRadius": 999,
252
252
  "borderWidth": 2,
253
253
  "height": 20,
@@ -299,14 +299,14 @@ exports[`rendering renders correctly with inactiveIntent=dark 1`] = `
299
299
  style={
300
300
  [
301
301
  {
302
- "backgroundColor": "#F1E9FB",
302
+ "backgroundColor": "#ece8ef",
303
303
  "borderRadius": 8,
304
304
  "flexDirection": "row",
305
305
  "padding": 16,
306
306
  },
307
307
  [
308
308
  {
309
- "backgroundColor": "#F1E9FB",
309
+ "backgroundColor": "#ece8ef",
310
310
  },
311
311
  undefined,
312
312
  ],
@@ -379,7 +379,7 @@ exports[`rendering renders correctly with inactiveIntent=dark 1`] = `
379
379
  [
380
380
  {
381
381
  "alignItems": "center",
382
- "borderColor": "#7622d7",
382
+ "borderColor": "#401960",
383
383
  "borderRadius": 999,
384
384
  "borderWidth": 2,
385
385
  "height": 20,
@@ -394,7 +394,7 @@ exports[`rendering renders correctly with inactiveIntent=dark 1`] = `
394
394
  style={
395
395
  [
396
396
  {
397
- "backgroundColor": "#7622d7",
397
+ "backgroundColor": "#401960",
398
398
  "borderRadius": 999,
399
399
  "height": 10,
400
400
  "width": 10,
@@ -548,7 +548,7 @@ exports[`rendering renders correctly with inactiveIntent=light 1`] = `
548
548
  [
549
549
  {
550
550
  "alignItems": "center",
551
- "borderColor": "#7622d7",
551
+ "borderColor": "#401960",
552
552
  "borderRadius": 999,
553
553
  "borderWidth": 2,
554
554
  "height": 20,
@@ -680,7 +680,7 @@ exports[`rendering renders correctly with inactiveIntent=light 1`] = `
680
680
  [
681
681
  {
682
682
  "alignItems": "center",
683
- "borderColor": "#7622d7",
683
+ "borderColor": "#401960",
684
684
  "borderRadius": 999,
685
685
  "borderWidth": 2,
686
686
  "height": 20,
@@ -732,14 +732,14 @@ exports[`rendering renders correctly with inactiveIntent=light 1`] = `
732
732
  style={
733
733
  [
734
734
  {
735
- "backgroundColor": "#F1E9FB",
735
+ "backgroundColor": "#ece8ef",
736
736
  "borderRadius": 8,
737
737
  "flexDirection": "row",
738
738
  "padding": 16,
739
739
  },
740
740
  [
741
741
  {
742
- "backgroundColor": "#F1E9FB",
742
+ "backgroundColor": "#ece8ef",
743
743
  },
744
744
  undefined,
745
745
  ],
@@ -812,7 +812,7 @@ exports[`rendering renders correctly with inactiveIntent=light 1`] = `
812
812
  [
813
813
  {
814
814
  "alignItems": "center",
815
- "borderColor": "#7622d7",
815
+ "borderColor": "#401960",
816
816
  "borderRadius": 999,
817
817
  "borderWidth": 2,
818
818
  "height": 20,
@@ -827,7 +827,7 @@ exports[`rendering renders correctly with inactiveIntent=light 1`] = `
827
827
  style={
828
828
  [
829
829
  {
830
- "backgroundColor": "#7622d7",
830
+ "backgroundColor": "#401960",
831
831
  "borderRadius": 999,
832
832
  "height": 10,
833
833
  "width": 10,
@@ -1000,7 +1000,7 @@ exports[`rendering renders correctly with subtext 1`] = `
1000
1000
  [
1001
1001
  {
1002
1002
  "alignItems": "center",
1003
- "borderColor": "#7622d7",
1003
+ "borderColor": "#401960",
1004
1004
  "borderRadius": 999,
1005
1005
  "borderWidth": 2,
1006
1006
  "height": 20,
@@ -1151,7 +1151,7 @@ exports[`rendering renders correctly with subtext 1`] = `
1151
1151
  [
1152
1152
  {
1153
1153
  "alignItems": "center",
1154
- "borderColor": "#7622d7",
1154
+ "borderColor": "#401960",
1155
1155
  "borderRadius": 999,
1156
1156
  "borderWidth": 2,
1157
1157
  "height": 20,
@@ -67,7 +67,7 @@ exports[`Rate renders correctly 1`] = `
67
67
  style={
68
68
  [
69
69
  {
70
- "color": "#7622d7",
70
+ "color": "#401960",
71
71
  "fontSize": 24,
72
72
  },
73
73
  undefined,
@@ -124,7 +124,7 @@ exports[`Rate renders correctly 1`] = `
124
124
  style={
125
125
  [
126
126
  {
127
- "color": "#7622d7",
127
+ "color": "#401960",
128
128
  "fontSize": 24,
129
129
  },
130
130
  undefined,
@@ -186,7 +186,7 @@ exports[`Rate renders correctly 1`] = `
186
186
  style={
187
187
  [
188
188
  {
189
- "color": "#7622d7",
189
+ "color": "#401960",
190
190
  "fontSize": 24,
191
191
  },
192
192
  undefined,
@@ -243,7 +243,7 @@ exports[`Rate renders correctly 1`] = `
243
243
  style={
244
244
  [
245
245
  {
246
- "color": "#7622d7",
246
+ "color": "#401960",
247
247
  "fontSize": 24,
248
248
  },
249
249
  undefined,
@@ -300,7 +300,7 @@ exports[`Rate renders correctly 1`] = `
300
300
  style={
301
301
  [
302
302
  {
303
- "color": "#7622d7",
303
+ "color": "#401960",
304
304
  "fontSize": 24,
305
305
  },
306
306
  undefined,
@@ -402,7 +402,7 @@ exports[`Rate renders correctly it is readonly 1`] = `
402
402
  style={
403
403
  [
404
404
  {
405
- "color": "#7622d7",
405
+ "color": "#401960",
406
406
  "fontSize": 24,
407
407
  },
408
408
  undefined,
@@ -459,7 +459,7 @@ exports[`Rate renders correctly it is readonly 1`] = `
459
459
  style={
460
460
  [
461
461
  {
462
- "color": "#7622d7",
462
+ "color": "#401960",
463
463
  "fontSize": 24,
464
464
  },
465
465
  undefined,
@@ -521,7 +521,7 @@ exports[`Rate renders correctly it is readonly 1`] = `
521
521
  style={
522
522
  [
523
523
  {
524
- "color": "#7622d7",
524
+ "color": "#401960",
525
525
  "fontSize": 24,
526
526
  },
527
527
  undefined,
@@ -578,7 +578,7 @@ exports[`Rate renders correctly it is readonly 1`] = `
578
578
  style={
579
579
  [
580
580
  {
581
- "color": "#7622d7",
581
+ "color": "#401960",
582
582
  "fontSize": 24,
583
583
  },
584
584
  undefined,
@@ -635,7 +635,7 @@ exports[`Rate renders correctly it is readonly 1`] = `
635
635
  style={
636
636
  [
637
637
  {
638
- "color": "#7622d7",
638
+ "color": "#401960",
639
639
  "fontSize": 24,
640
640
  },
641
641
  undefined,
@@ -0,0 +1,196 @@
1
+ import React, { forwardRef } from 'react';
2
+ import type {
3
+ TextInputProps as NativeTextInputProps,
4
+ TextInput as RNTextInput,
5
+ StyleProp,
6
+ ViewStyle,
7
+ TextStyle,
8
+ } from 'react-native';
9
+ import {
10
+ State,
11
+ StyledContainer,
12
+ StyledInput,
13
+ StyledInputContainer,
14
+ } from './StyledSearch';
15
+ import { IconName } from '../Icon';
16
+ import { renderPrefix, renderSuffix } from './utils';
17
+
18
+ export type SearchOneLineHandles = Pick<
19
+ RNTextInput,
20
+ 'focus' | 'clear' | 'blur' | 'isFocused' | 'setNativeProps'
21
+ >;
22
+
23
+ interface SearchOneLineProps extends NativeTextInputProps {
24
+ /**
25
+ * Name of Icon or ReactElement to render on the left side of the input, before the user's cursor.
26
+ */
27
+ prefix?: IconName | React.ReactElement;
28
+ /**
29
+ * Name of Icon or ReactElement to render on the right side of the input.
30
+ */
31
+ suffix?: IconName | React.ReactElement;
32
+ /**
33
+ * Additional wrapper style.
34
+ */
35
+ style?: StyleProp<ViewStyle>;
36
+ /**
37
+ * Input text style.
38
+ */
39
+ textStyle?: StyleProp<TextStyle>;
40
+ /**
41
+ * Testing id of the component.
42
+ */
43
+ testID?: string;
44
+ /**
45
+ * Accessibility label for the input (Android).
46
+ */
47
+ accessibilityLabelledBy?: string;
48
+ /**
49
+ * Placeholder text to display.
50
+ * */
51
+ placeholder?: string;
52
+ /**
53
+ * Whether the input is editable.
54
+ * */
55
+ editable?: boolean;
56
+ /**
57
+ * Whether the input is disabled.
58
+ */
59
+ disabled?: boolean;
60
+ /**
61
+ * The max length of the input.
62
+ * If the max length is set, the input will display the current length and the max length.
63
+ * */
64
+ maxLength?: number;
65
+ /**
66
+ * Whether to hide the character count.
67
+ * */
68
+ renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
69
+ }
70
+
71
+ export const getState = ({
72
+ disabled,
73
+ editable,
74
+ isEmptyValue,
75
+ }: {
76
+ disabled?: boolean;
77
+ editable?: boolean;
78
+ isFocused?: boolean;
79
+ isEmptyValue?: boolean;
80
+ }): State => {
81
+ if (disabled) {
82
+ return 'disabled';
83
+ }
84
+ if (!editable) {
85
+ return 'readonly';
86
+ }
87
+ if (!isEmptyValue) {
88
+ return 'filled';
89
+ }
90
+ return 'default';
91
+ };
92
+
93
+ const renderInput = ({
94
+ nativeInputProps,
95
+ ref,
96
+ }: {
97
+ nativeInputProps: NativeTextInputProps;
98
+ ref?: React.Ref<RNTextInput>;
99
+ }) => {
100
+ return <StyledInput {...nativeInputProps} ref={ref} />;
101
+ };
102
+
103
+ const SearchOneLine = forwardRef<SearchOneLineHandles, SearchOneLineProps>(
104
+ (props, ref) => {
105
+ const {
106
+ prefix = 'search-outlined',
107
+ suffix,
108
+ style,
109
+ allowFontScaling,
110
+ accessibilityLabelledBy,
111
+ editable = true,
112
+ maxLength,
113
+ value,
114
+ defaultValue,
115
+ placeholder,
116
+ disabled = false,
117
+ testID,
118
+ ...nativeProps
119
+ } = props;
120
+
121
+ const [isFocused, setIsFocused] = React.useState(false);
122
+
123
+ const displayText = (value !== undefined ? value : defaultValue) ?? '';
124
+ const isEmptyValue = displayText.length === 0;
125
+
126
+ const state = getState({
127
+ disabled,
128
+ editable,
129
+ isFocused,
130
+ isEmptyValue,
131
+ });
132
+
133
+ const innerTextInput = React.useRef<RNTextInput | undefined | null>();
134
+
135
+ React.useImperativeHandle(
136
+ ref,
137
+ () => ({
138
+ // we don't expose this method, it's for testing https://medium.com/developer-rants/how-to-test-useref-without-mocking-useref-699165f4994e
139
+ getNativeTextInputRef: () => innerTextInput.current,
140
+ setNativeProps: (args: NativeTextInputProps) =>
141
+ innerTextInput.current?.setNativeProps(args),
142
+ focus: () => {
143
+ innerTextInput.current?.focus();
144
+ },
145
+ blur: () => innerTextInput.current?.blur(),
146
+ clear: () => innerTextInput.current?.clear(),
147
+ isFocused: () => innerTextInput.current?.isFocused() || false,
148
+ }),
149
+ [innerTextInput]
150
+ );
151
+
152
+ return (
153
+ <StyledContainer
154
+ pointerEvents={
155
+ state === 'disabled' || state === 'readonly' ? 'none' : 'auto'
156
+ }
157
+ testID={testID}
158
+ style={style}
159
+ >
160
+ <StyledInputContainer themeFocused={isFocused}>
161
+ {renderPrefix({ prefix })}
162
+ {renderInput({
163
+ nativeInputProps: {
164
+ testID: 'text-input',
165
+ accessibilityState: {
166
+ disabled: state === 'disabled' || state === 'readonly',
167
+ },
168
+ accessibilityLabelledBy,
169
+ allowFontScaling,
170
+ ...nativeProps,
171
+ onFocus: (event) => {
172
+ setIsFocused(true);
173
+ nativeProps.onFocus?.(event);
174
+ },
175
+ onBlur: (event) => {
176
+ setIsFocused(false);
177
+ nativeProps.onBlur?.(event);
178
+ },
179
+ editable,
180
+ maxLength,
181
+ value,
182
+ defaultValue,
183
+ placeholder,
184
+ },
185
+ ref: (rnTextInputRef) => {
186
+ innerTextInput.current = rnTextInputRef;
187
+ },
188
+ })}
189
+ {!!suffix && renderSuffix({ suffix })}
190
+ </StyledInputContainer>
191
+ </StyledContainer>
192
+ );
193
+ }
194
+ );
195
+
196
+ export default SearchOneLine;
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { IconName } from '../Icon';
4
+ import { renderSuffix } from './utils';
5
+ import { StyledBadge, StyledSuffixContainer } from './StyledSearch';
6
+ import { BadgeProps } from '../Badge';
7
+
8
+ interface SearchSuffixIconProps {
9
+ /**
10
+ * Name of Icon or ReactElement to render on the right side of the input.
11
+ */
12
+ suffix?: IconName | React.ReactElement;
13
+ /**
14
+ * Additional wrapper style.
15
+ */
16
+ style?: StyleProp<ViewStyle>;
17
+ /**
18
+ * Testing id of the component.
19
+ */
20
+ testID?: string;
21
+ /**
22
+ * Badge props to be render on the suffix.
23
+ */
24
+ badge?: Omit<BadgeProps, 'size'>;
25
+ }
26
+
27
+ const SearchSuffixIcon = (props: SearchSuffixIconProps) => {
28
+ const { suffix, testID, style, badge } = props;
29
+ return (
30
+ <StyledSuffixContainer testID={testID} style={style}>
31
+ {!!badge && <StyledBadge intent="primary" {...badge} size="small" />}
32
+ {renderSuffix({ suffix })}
33
+ </StyledSuffixContainer>
34
+ );
35
+ };
36
+
37
+ export default SearchSuffixIcon;