@hero-design/rn 7.3.0 → 7.4.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 (320) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +1997 -1123
  4. package/lib/assets/fonts/hero-icons.ttf +0 -0
  5. package/lib/index.js +2001 -1121
  6. package/package.json +11 -9
  7. package/playground/.detoxrc.json +49 -0
  8. package/playground/.prettierrc.json +8 -0
  9. package/playground/app.json +9 -0
  10. package/playground/babel.config.js +63 -0
  11. package/playground/e2e/config.json +9 -0
  12. package/playground/e2e/environment.js +23 -0
  13. package/playground/e2e/firstTest.e2e.js +16 -0
  14. package/{expoEntry.js → playground/expoEntry.js} +1 -1
  15. package/playground/fonts/be-vietnam-pro-light.ttf +0 -0
  16. package/playground/fonts/be-vietnam-pro-regular.ttf +0 -0
  17. package/playground/fonts/be-vietnam-pro-semibold.ttf +0 -0
  18. package/playground/fonts/hero-icons.ttf +0 -0
  19. package/playground/index.js +7 -0
  20. package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +9 -0
  21. package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +75 -0
  22. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  23. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +6 -0
  24. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
  25. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  26. package/playground/ios/MobileHeroDesignPlayground/Info.plist +85 -0
  27. package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +3 -0
  28. package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +8 -0
  29. package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +40 -0
  30. package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +16 -0
  31. package/playground/ios/MobileHeroDesignPlayground/main.m +10 -0
  32. package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +4 -0
  33. package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +515 -0
  34. package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +88 -0
  35. package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +10 -0
  36. package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  37. package/playground/ios/Podfile +49 -0
  38. package/playground/ios/Podfile.lock +478 -0
  39. package/playground/ios/Podfile.properties.json +3 -0
  40. package/{metro.config.js → playground/metro.config.js} +10 -2
  41. package/playground/package.json +63 -0
  42. package/playground/{index.tsx → src/App.tsx} +57 -29
  43. package/playground/{components → src}/Avatar.tsx +1 -1
  44. package/playground/{components → src}/Badge.tsx +1 -1
  45. package/playground/{components → src}/BottomNavigation.tsx +1 -1
  46. package/playground/src/BottomSheet.tsx +43 -0
  47. package/playground/src/Button.tsx +170 -0
  48. package/playground/{components/Button.tsx → src/Button.tsx~origin_master} +0 -0
  49. package/playground/{components → src}/Card.tsx +1 -1
  50. package/playground/{components → src}/Collapse.tsx +1 -1
  51. package/playground/src/ContentNavigator.tsx +65 -0
  52. package/playground/{components → src}/Divider.tsx +1 -1
  53. package/playground/{components → src}/Drawer.tsx +1 -1
  54. package/playground/{components → src}/FAB.tsx +1 -1
  55. package/playground/{components → src}/Icon.tsx +7 -3
  56. package/playground/{components → src}/IconButton.tsx +12 -1
  57. package/playground/{components → src}/Progress.tsx +1 -1
  58. package/playground/src/Radio.tsx +25 -0
  59. package/playground/src/SectionHeading.tsx +68 -0
  60. package/playground/src/Spinner.tsx +19 -0
  61. package/playground/{components → src}/Tabs.tsx +1 -1
  62. package/playground/{components → src}/Tag.tsx +1 -1
  63. package/playground/src/TextInput.tsx +14 -0
  64. package/playground/{components → src}/Typography.tsx +1 -1
  65. package/playground/src/emotion.d.ts +7 -0
  66. package/playground/tsconfig.json +21 -0
  67. package/src/components/BottomSheet/Footer.tsx +19 -0
  68. package/src/components/BottomSheet/Header.tsx +49 -0
  69. package/src/components/BottomSheet/StyledBottomSheet.tsx +75 -0
  70. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +531 -0
  71. package/src/components/BottomSheet/__tests__/index.spec.tsx +107 -0
  72. package/src/components/BottomSheet/index.tsx +171 -0
  73. package/src/components/Button/IconButton.tsx +11 -1
  74. package/src/components/Card/index.tsx +1 -1
  75. package/src/components/Collapse/StyledCollapse.tsx +11 -2
  76. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +36 -31
  77. package/src/components/Collapse/__tests__/index.spec.tsx +1 -13
  78. package/src/components/Collapse/index.tsx +20 -50
  79. package/src/components/ContentNavigator/StyledContentNavigator.tsx +15 -0
  80. package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +19 -0
  81. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +43 -0
  82. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +217 -0
  83. package/src/components/ContentNavigator/__tests__/index.spec.tsx +74 -0
  84. package/src/components/ContentNavigator/index.tsx +65 -0
  85. package/src/components/Icon/HeroIcon/index.tsx +13 -2
  86. package/src/components/Icon/HeroIcon/selection.json +1 -1
  87. package/src/components/Icon/IconList.ts +6 -0
  88. package/src/components/Icon/index.tsx +8 -1
  89. package/src/components/Radio/Radio.tsx +51 -0
  90. package/src/components/Radio/RadioGroup.tsx +50 -0
  91. package/src/components/Radio/StyledRadio.tsx +42 -0
  92. package/src/components/Radio/__tests__/Radio.spec.tsx +38 -0
  93. package/src/components/Radio/__tests__/RadioGroup.spec.tsx +36 -0
  94. package/src/components/Radio/__tests__/StyledRadio.spec.tsx +43 -0
  95. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +160 -0
  96. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +248 -0
  97. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +124 -0
  98. package/src/components/Radio/index.tsx +5 -0
  99. package/src/components/SectionHeading/StyledHeading.tsx +24 -0
  100. package/src/components/SectionHeading/__tests__/StyledHeading.tsx +28 -0
  101. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.tsx.snap +48 -0
  102. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +208 -0
  103. package/src/components/SectionHeading/__tests__/index.spec.tsx +39 -0
  104. package/src/components/SectionHeading/index.tsx +93 -0
  105. package/src/components/Spinner/AnimatedSpinner.tsx +55 -0
  106. package/src/components/Spinner/StyledSpinner.tsx +59 -0
  107. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +11 -0
  108. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +56 -0
  109. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +118 -0
  110. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +235 -0
  111. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +141 -0
  112. package/src/components/Spinner/__tests__/index.spec.tsx +12 -0
  113. package/src/components/Spinner/index.tsx +22 -0
  114. package/src/components/TextInput/StyledTextInput.tsx +34 -0
  115. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +33 -0
  116. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +88 -0
  117. package/src/components/TextInput/__tests__/index.spec.tsx +16 -0
  118. package/src/components/TextInput/index.tsx +61 -0
  119. package/src/index.ts +12 -0
  120. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +95 -0
  121. package/src/theme/components/bottomSheet.ts +34 -0
  122. package/src/theme/components/contentNavigator.ts +11 -0
  123. package/src/theme/components/icon.ts +1 -0
  124. package/src/theme/components/radio.ts +34 -0
  125. package/src/theme/components/spinner.ts +21 -0
  126. package/src/theme/components/textInput.ts +32 -0
  127. package/src/theme/global/borders.ts +6 -0
  128. package/src/theme/global/colors.ts +1 -0
  129. package/src/theme/index.ts +22 -7
  130. package/tsconfig.json +11 -3
  131. package/types/components/Avatar/StyledAvatar.d.ts +45 -0
  132. package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +1 -0
  133. package/types/components/Avatar/__tests__/index.spec.d.ts +1 -0
  134. package/types/components/Avatar/index.d.ts +25 -0
  135. package/types/components/Badge/Status.d.ts +24 -0
  136. package/types/components/Badge/StyledBadge.d.ts +27 -0
  137. package/types/components/Badge/__tests__/Badge.spec.d.ts +1 -0
  138. package/types/components/Badge/__tests__/Status.spec.d.ts +1 -0
  139. package/types/components/Badge/index.d.ts +32 -0
  140. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +51 -0
  141. package/types/components/BottomNavigation/__tests__/index.spec.d.ts +1 -0
  142. package/types/components/BottomNavigation/index.d.ts +45 -0
  143. package/types/components/BottomSheet/Footer.d.ts +6 -0
  144. package/types/components/BottomSheet/Header.d.ts +8 -0
  145. package/types/components/BottomSheet/StyledBottomSheet.d.ts +46 -0
  146. package/types/components/BottomSheet/__tests__/index.spec.d.ts +1 -0
  147. package/types/components/BottomSheet/index.d.ts +51 -0
  148. package/types/components/Button/Button.d.ts +57 -0
  149. package/types/components/Button/IconButton.d.ts +38 -0
  150. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +19 -0
  151. package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +1 -0
  152. package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +1 -0
  153. package/types/components/Button/LoadingIndicator/index.d.ts +26 -0
  154. package/types/components/Button/StyledButton.d.ts +39 -0
  155. package/types/components/Button/__tests__/Button.spec.d.ts +1 -0
  156. package/types/components/Button/__tests__/IconButton.spec.d.ts +1 -0
  157. package/types/components/Button/__tests__/StyledButton.spec.d.ts +1 -0
  158. package/types/components/Button/index.d.ts +8 -0
  159. package/types/components/Card/StyledCard.d.ts +16 -0
  160. package/types/components/Card/__tests__/StyledCard.spec.d.ts +1 -0
  161. package/types/components/Card/__tests__/index.spec.d.ts +1 -0
  162. package/types/components/Card/index.d.ts +22 -0
  163. package/types/components/Collapse/StyledCollapse.d.ts +25 -0
  164. package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +1 -0
  165. package/types/components/Collapse/__tests__/index.spec.d.ts +1 -0
  166. package/types/components/Collapse/index.d.ts +19 -0
  167. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +12 -0
  168. package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +1 -0
  169. package/types/components/ContentNavigator/__tests__/index.spec.d.ts +1 -0
  170. package/types/components/ContentNavigator/index.d.ts +33 -0
  171. package/types/components/Divider/StyledDivider.d.ts +12 -0
  172. package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +1 -0
  173. package/types/components/Divider/index.d.ts +21 -0
  174. package/types/components/Drawer/StyledDrawer.d.ts +24 -0
  175. package/types/components/Drawer/__tests__/index.spec.d.ts +1 -0
  176. package/types/components/Drawer/index.d.ts +25 -0
  177. package/types/components/FAB/ActionGroup/ActionItem.d.ts +12 -0
  178. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +29 -0
  179. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +12 -0
  180. package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +1 -0
  181. package/types/components/FAB/ActionGroup/index.d.ts +34 -0
  182. package/types/components/FAB/AnimatedFABIcon.d.ts +6 -0
  183. package/types/components/FAB/FAB.d.ts +34 -0
  184. package/types/components/FAB/StyledFAB.d.ts +19 -0
  185. package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +1 -0
  186. package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +1 -0
  187. package/types/components/FAB/__tests__/index.spec.d.ts +1 -0
  188. package/types/components/FAB/index.d.ts +4 -0
  189. package/types/components/Icon/HeroIcon/index.d.ts +12 -0
  190. package/types/components/Icon/IconList.d.ts +2 -0
  191. package/types/components/Icon/__tests__/index.spec.d.ts +1 -0
  192. package/types/components/Icon/index.d.ts +27 -0
  193. package/types/components/Icon/utils.d.ts +2 -0
  194. package/types/components/Progress/ProgressBar.d.ts +18 -0
  195. package/types/components/Progress/ProgressCircle.d.ts +18 -0
  196. package/types/components/Progress/StyledProgressBar.d.ts +17 -0
  197. package/types/components/Progress/StyledProgressCircle.d.ts +37 -0
  198. package/types/components/Progress/__tests__/index.spec.d.ts +1 -0
  199. package/types/components/Progress/index.d.ts +5 -0
  200. package/types/components/Progress/types.d.ts +1 -0
  201. package/types/components/Radio/Radio.d.ts +26 -0
  202. package/types/components/Radio/RadioGroup.d.ts +29 -0
  203. package/types/components/Radio/StyledRadio.d.ts +30 -0
  204. package/types/components/Radio/__tests__/Radio.spec.d.ts +1 -0
  205. package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +1 -0
  206. package/types/components/Radio/__tests__/StyledRadio.spec.d.ts +1 -0
  207. package/types/components/Radio/index.d.ts +4 -0
  208. package/types/components/SectionHeading/StyledHeading.d.ts +20 -0
  209. package/types/components/SectionHeading/__tests__/StyledHeading.d.ts +1 -0
  210. package/types/components/SectionHeading/__tests__/index.spec.d.ts +1 -0
  211. package/types/components/SectionHeading/index.d.ts +39 -0
  212. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -0
  213. package/types/components/Spinner/StyledSpinner.d.ts +30 -0
  214. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +1 -0
  215. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +1 -0
  216. package/types/components/Spinner/__tests__/index.spec.d.ts +1 -0
  217. package/types/components/Spinner/index.d.ts +10 -0
  218. package/types/components/Tabs/ActiveTabIndicator.d.ts +8 -0
  219. package/types/components/Tabs/ScrollableTabs.d.ts +3 -0
  220. package/types/components/Tabs/StyledScrollableTabs.d.ts +60 -0
  221. package/types/components/Tabs/StyledTabs.d.ts +54 -0
  222. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
  223. package/types/components/Tabs/__tests__/index.spec.d.ts +1 -0
  224. package/types/components/Tabs/index.d.ts +54 -0
  225. package/types/components/Tabs/utils.d.ts +2 -0
  226. package/types/components/Tag/StyledTag.d.ts +19 -0
  227. package/types/components/Tag/__tests__/Tag.spec.d.ts +1 -0
  228. package/types/components/Tag/index.d.ts +21 -0
  229. package/types/components/TextInput/StyledTextInput.d.ts +22 -0
  230. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +1 -0
  231. package/types/components/TextInput/__tests__/index.spec.d.ts +1 -0
  232. package/types/components/TextInput/index.d.ts +26 -0
  233. package/types/components/Typography/Text/StyledText.d.ts +12 -0
  234. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
  235. package/types/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
  236. package/types/components/Typography/Text/index.d.ts +30 -0
  237. package/types/components/Typography/index.d.ts +6 -0
  238. package/types/index.d.ts +25 -0
  239. package/types/playground/components/Avatar.d.ts +0 -0
  240. package/types/playground/components/Collapse.d.ts +0 -0
  241. package/types/playground/components/Drawer.d.ts +0 -0
  242. package/types/playground/components/IconButton.d.ts +0 -0
  243. package/types/playground/components/Progress.d.ts +0 -0
  244. package/types/playground/components/Tag.d.ts +0 -0
  245. package/types/src/components/Avatar/StyledAvatar.d.ts +0 -0
  246. package/types/src/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
  247. package/types/src/components/Avatar/__tests__/index.spec.d.ts +0 -0
  248. package/types/src/components/Avatar/index.d.ts +0 -0
  249. package/types/src/components/Badge/Status.d.ts +0 -0
  250. package/types/src/components/Badge/__tests__/Status.spec.d.ts +0 -0
  251. package/types/src/components/Button/Button.d.ts +0 -0
  252. package/types/src/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  253. package/types/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
  254. package/types/src/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -0
  255. package/types/src/components/Button/LoadingIndicator/index.d.ts +0 -0
  256. package/types/src/components/Button/StyledButton.d.ts +0 -0
  257. package/types/src/components/Button/__tests__/Button.spec.d.ts +0 -0
  258. package/types/src/components/Button/__tests__/IconButton.spec.d.ts +0 -0
  259. package/types/src/components/Button/__tests__/StyledButton.spec.d.ts +0 -0
  260. package/types/src/components/Collapse/StyledCollapse.d.ts +0 -0
  261. package/types/src/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
  262. package/types/src/components/Collapse/__tests__/index.spec.d.ts +0 -0
  263. package/types/src/components/Collapse/index.d.ts +0 -0
  264. package/types/src/components/Drawer/StyledDrawer.d.ts +0 -0
  265. package/types/src/components/Drawer/__tests__/index.spec.d.ts +0 -0
  266. package/types/src/components/Drawer/index.d.ts +0 -0
  267. package/types/src/components/Progress/ProgressBar.d.ts +0 -0
  268. package/types/src/components/Progress/ProgressCircle.d.ts +0 -0
  269. package/types/src/components/Progress/StyledProgressBar.d.ts +0 -0
  270. package/types/src/components/Progress/StyledProgressCircle.d.ts +0 -0
  271. package/types/src/components/Progress/__tests__/index.spec.d.ts +0 -0
  272. package/types/src/components/Progress/index.d.ts +0 -0
  273. package/types/src/components/Progress/types.d.ts +0 -0
  274. package/types/src/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  275. package/types/src/components/Tabs/ScrollableTabs.d.ts +0 -0
  276. package/types/src/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  277. package/types/src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -0
  278. package/types/src/components/Tabs/utils.d.ts +0 -0
  279. package/types/src/components/Tag/StyledTag.d.ts +0 -0
  280. package/types/src/components/Tag/__tests__/Tag.spec.d.ts +0 -0
  281. package/types/src/components/Tag/index.d.ts +0 -0
  282. package/types/src/theme/components/avatar.d.ts +0 -0
  283. package/types/src/theme/components/button.d.ts +0 -0
  284. package/types/src/theme/components/drawer.d.ts +0 -0
  285. package/types/src/theme/components/progress.d.ts +0 -0
  286. package/types/src/theme/components/tag.d.ts +0 -0
  287. package/types/src/utils/hooks.d.ts +0 -0
  288. package/types/testHelpers/renderWithTheme.d.ts +3 -0
  289. package/types/theme/__tests__/index.spec.d.ts +1 -0
  290. package/types/theme/components/avatar.d.ts +32 -0
  291. package/types/theme/components/badge.d.ts +29 -0
  292. package/types/theme/components/bottomNavigation.d.ts +23 -0
  293. package/types/theme/components/bottomSheet.d.ts +29 -0
  294. package/types/theme/components/button.d.ts +37 -0
  295. package/types/theme/components/card.d.ts +10 -0
  296. package/types/theme/components/contentNavigator.d.ts +7 -0
  297. package/types/theme/components/divider.d.ts +17 -0
  298. package/types/theme/components/drawer.d.ts +21 -0
  299. package/types/theme/components/fab.d.ts +51 -0
  300. package/types/theme/components/icon.d.ts +20 -0
  301. package/types/theme/components/progress.d.ts +21 -0
  302. package/types/theme/components/radio.d.ts +25 -0
  303. package/types/theme/components/spinner.d.ts +15 -0
  304. package/types/theme/components/tabs.d.ts +27 -0
  305. package/types/theme/components/tag.d.ts +30 -0
  306. package/types/theme/components/textInput.d.ts +24 -0
  307. package/types/theme/components/typography.d.ts +26 -0
  308. package/types/theme/global/borders.d.ts +14 -0
  309. package/types/theme/global/colors.d.ts +32 -0
  310. package/types/theme/global/index.d.ts +42 -0
  311. package/types/theme/global/scale.d.ts +9 -0
  312. package/types/theme/global/space.d.ts +13 -0
  313. package/types/theme/global/typography.d.ts +21 -0
  314. package/types/theme/index.d.ts +45 -0
  315. package/types/types.d.ts +5 -0
  316. package/types/utils/__tests__/scale.spec.d.ts +1 -0
  317. package/types/utils/helpers.d.ts +2 -0
  318. package/types/utils/hooks.d.ts +1 -0
  319. package/types/utils/scale.d.ts +3 -0
  320. package/app.json +0 -8
@@ -0,0 +1,21 @@
1
+ import { GlobalTheme } from '../global';
2
+
3
+ const getSpinnerTheme = (theme: GlobalTheme) => {
4
+ const color = {
5
+ default: theme.colors.primary,
6
+ };
7
+
8
+ const space = {
9
+ spinnerDot: theme.space.medium,
10
+ spinnerDotPadding: theme.space.small,
11
+ spinnerTextPaddingTop: theme.space.small,
12
+ };
13
+
14
+ const radii = {
15
+ default: theme.radii.medium,
16
+ };
17
+
18
+ return { color, space, radii };
19
+ };
20
+
21
+ export default getSpinnerTheme;
@@ -0,0 +1,32 @@
1
+ import { GlobalTheme } from '../global';
2
+
3
+ const getTextInputTheme = (theme: GlobalTheme) => {
4
+ const colors = {
5
+ labelBackground: theme.colors.platformBackground,
6
+ border: theme.colors.text,
7
+ };
8
+
9
+ const space = {
10
+ containerPadding: theme.space.medium,
11
+ labelLeft: theme.space.medium,
12
+ labelTop: theme.lineHeights.small / -2,
13
+ labelHorizontalPadding: theme.space.xsmall,
14
+ prefixMarginRight: theme.space.small,
15
+ };
16
+
17
+ const fontSizes = {
18
+ text: theme.fontSizes.large,
19
+ };
20
+
21
+ const borderWidths = {
22
+ container: theme.borderWidths.base,
23
+ };
24
+
25
+ const radii = {
26
+ container: theme.radii.medium,
27
+ };
28
+
29
+ return { colors, space, fontSizes, borderWidths, radii };
30
+ };
31
+
32
+ export default getTextInputTheme;
@@ -1,21 +1,27 @@
1
1
  interface BorderWidths {
2
2
  base: number;
3
+ medium: number;
3
4
  }
4
5
 
5
6
  interface Radii {
6
7
  rounded: number;
7
8
  base: number;
8
9
  medium: number;
10
+ large: number;
11
+ xlarge: number;
9
12
  }
10
13
 
11
14
  const getBorderWidths = (baseBorderWidth: number): BorderWidths => ({
12
15
  base: baseBorderWidth,
16
+ medium: baseBorderWidth * 2,
13
17
  });
14
18
 
15
19
  const getRadii = (baseRadius: number): Radii => ({
16
20
  rounded: 999,
17
21
  base: baseRadius,
18
22
  medium: baseRadius * 2,
23
+ large: baseRadius * 3,
24
+ xlarge: baseRadius * 4,
19
25
  });
20
26
 
21
27
  export { BorderWidths, getBorderWidths, Radii, getRadii };
@@ -28,6 +28,7 @@ const systemPalette = {
28
28
  invertedText: palette.white,
29
29
  outline: palette.greyLight60,
30
30
  archived: palette.greyLight45,
31
+ black: palette.black,
31
32
  };
32
33
 
33
34
  type SystemPalette = typeof systemPalette;
@@ -7,35 +7,45 @@ import {
7
7
  defaultSystemPalette,
8
8
  } from './global';
9
9
 
10
+ import getAvatarTheme from './components/avatar';
10
11
  import getBadgeTheme from './components/badge';
11
12
  import getBottomNavigationTheme from './components/bottomNavigation';
13
+ import getBottomSheetTheme from './components/bottomSheet';
12
14
  import getButtonTheme from './components/button';
13
15
  import getCardTheme from './components/card';
16
+ import getContentNavigatorTheme from './components/contentNavigator';
14
17
  import getDividerTheme from './components/divider';
15
18
  import getDrawerTheme from './components/drawer';
16
- import getTabsTheme from './components/tabs';
17
- import getTagTheme from './components/tag';
19
+ import getFABTheme from './components/fab';
18
20
  import getIconTheme from './components/icon';
19
21
  import getProgressTheme from './components/progress';
22
+ import getSpinnerTheme from './components/spinner';
23
+ import getRadioTheme from './components/radio';
24
+ import getTabsTheme from './components/tabs';
25
+ import getTagTheme from './components/tag';
26
+ import getTextInputTheme from './components/textInput';
20
27
  import getTypographyTheme from './components/typography';
21
- import getFABTheme from './components/fab';
22
- import getAvatarTheme from './components/avatar';
23
28
 
24
29
  type Theme = GlobalTheme & {
25
30
  __hd__: {
26
31
  avatar: ReturnType<typeof getAvatarTheme>;
27
32
  badge: ReturnType<typeof getBadgeTheme>;
28
33
  bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
34
+ bottomSheet: ReturnType<typeof getBottomSheetTheme>;
29
35
  button: ReturnType<typeof getButtonTheme>;
30
36
  card: ReturnType<typeof getCardTheme>;
37
+ contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
31
38
  divider: ReturnType<typeof getDividerTheme>;
32
39
  drawer: ReturnType<typeof getDrawerTheme>;
40
+ fab: ReturnType<typeof getFABTheme>;
33
41
  icon: ReturnType<typeof getIconTheme>;
34
42
  progress: ReturnType<typeof getProgressTheme>;
43
+ spinner: ReturnType<typeof getSpinnerTheme>;
44
+ radio: ReturnType<typeof getRadioTheme>;
35
45
  tabs: ReturnType<typeof getTabsTheme>;
36
46
  tag: ReturnType<typeof getTagTheme>;
47
+ textInput: ReturnType<typeof getTextInputTheme>;
37
48
  typography: ReturnType<typeof getTypographyTheme>;
38
- fab: ReturnType<typeof getFABTheme>;
39
49
  };
40
50
  };
41
51
 
@@ -50,16 +60,21 @@ const getTheme = (
50
60
  avatar: getAvatarTheme(globalTheme),
51
61
  badge: getBadgeTheme(globalTheme),
52
62
  bottomNavigation: getBottomNavigationTheme(globalTheme),
63
+ bottomSheet: getBottomSheetTheme(globalTheme),
53
64
  button: getButtonTheme(globalTheme),
54
65
  card: getCardTheme(globalTheme),
66
+ contentNavigator: getContentNavigatorTheme(globalTheme),
55
67
  divider: getDividerTheme(globalTheme),
56
68
  drawer: getDrawerTheme(globalTheme),
57
- progress: getProgressTheme(globalTheme),
69
+ fab: getFABTheme(globalTheme),
58
70
  icon: getIconTheme(globalTheme),
71
+ spinner: getSpinnerTheme(globalTheme),
72
+ progress: getProgressTheme(globalTheme),
73
+ radio: getRadioTheme(globalTheme),
59
74
  tabs: getTabsTheme(globalTheme),
60
75
  tag: getTagTheme(globalTheme),
76
+ textInput: getTextInputTheme(globalTheme),
61
77
  typography: getTypographyTheme(globalTheme),
62
- fab: getFABTheme(globalTheme),
63
78
  },
64
79
  };
65
80
  };
package/tsconfig.json CHANGED
@@ -5,6 +5,7 @@
5
5
  "outDir": "types",
6
6
  "moduleResolution": "node",
7
7
  "esModuleInterop": true,
8
+ "resolveJsonModule": true,
8
9
  "jsx": "react-native",
9
10
  "strict": true,
10
11
  "allowUnreachableCode": false,
@@ -12,9 +13,16 @@
12
13
  "noImplicitThis": true,
13
14
  "noUnusedLocals": true,
14
15
  "skipLibCheck": true,
15
- "types": ["jest"],
16
+ "types": [
17
+ "jest"
18
+ ]
16
19
  },
17
- "include": ["src", "playground"],
18
- "exclude": ["node_modules"],
20
+ "include": [
21
+ "src"
22
+ ],
23
+ "exclude": [
24
+ "node_modules",
25
+ "playground"
26
+ ],
19
27
  "extends": "expo/tsconfig.base"
20
28
  }
@@ -0,0 +1,45 @@
1
+ import { View, Image, TouchableOpacity, Text } from 'react-native';
2
+ declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge';
3
+ declare type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
4
+ declare const StyledPressable: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
5
+ theme?: import("@emotion/react").Theme | undefined;
6
+ as?: import("react").ElementType<any> | undefined;
7
+ } & {
8
+ themeSize: ThemeSize;
9
+ themeIntent: ThemeIntent;
10
+ }, {}, {
11
+ ref?: import("react").Ref<TouchableOpacity> | undefined;
12
+ }>;
13
+ declare const StyledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ } & {
17
+ themeSize: ThemeSize;
18
+ themeIntent: ThemeIntent;
19
+ }, {}, {
20
+ ref?: import("react").Ref<View> | undefined;
21
+ }>;
22
+ declare const StyledTextWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any> | undefined;
25
+ }, {}, {
26
+ ref?: import("react").Ref<View> | undefined;
27
+ }>;
28
+ declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
29
+ theme?: import("@emotion/react").Theme | undefined;
30
+ as?: import("react").ElementType<any> | undefined;
31
+ } & {
32
+ themeSize: ThemeSize;
33
+ themeIntent: ThemeIntent;
34
+ }, {}, {
35
+ ref?: import("react").Ref<Text> | undefined;
36
+ }>;
37
+ declare const StyledImage: import("@emotion/native").StyledComponent<import("react-native").ImageProps & {
38
+ theme?: import("@emotion/react").Theme | undefined;
39
+ as?: import("react").ElementType<any> | undefined;
40
+ } & {
41
+ themeSize: ThemeSize;
42
+ }, {}, {
43
+ ref?: import("react").Ref<Image> | undefined;
44
+ }>;
45
+ export { StyledPressable, StyledView, StyledImage, StyledTextWrapper, StyledText, };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ImageSourcePropType, StyleProp, ViewProps, ViewStyle } from 'react-native';
2
+ interface AvatarProps extends ViewProps {
3
+ /** Callback function when pressing component. */
4
+ onPress?: () => void;
5
+ /** Image source to be displayed on avatar. */
6
+ source?: ImageSourcePropType;
7
+ /** Renders title in the placeholder. */
8
+ title?: string;
9
+ /**
10
+ * Intent of the Icon.
11
+ */
12
+ intent?: 'primary' | 'info' | 'danger' | 'success' | 'warning';
13
+ /** Size of the avatar. */
14
+ size?: 'small' | 'medium' | 'large' | 'xlarge';
15
+ /**
16
+ * Addditional style.
17
+ */
18
+ style?: StyleProp<ViewStyle>;
19
+ /**
20
+ * Testing id of the component.
21
+ */
22
+ testID?: string;
23
+ }
24
+ declare const Avatar: ({ onPress, source, testID, style, title, size, intent, }: AvatarProps) => JSX.Element | null;
25
+ export default Avatar;
@@ -0,0 +1,24 @@
1
+ import { StyleProp, ViewStyle, ViewProps } from 'react-native';
2
+ import { ReactNode } from 'react';
3
+ export interface StatusProps extends ViewProps {
4
+ children: ReactNode;
5
+ /**
6
+ * Whether the Status Badge is visible.
7
+ */
8
+ visible?: boolean;
9
+ /**
10
+ /**
11
+ * Visual intent color to apply to Status Badge.
12
+ */
13
+ intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived';
14
+ /**
15
+ * Additional style.
16
+ */
17
+ style?: StyleProp<ViewStyle>;
18
+ /**
19
+ * Testing id of the component.
20
+ */
21
+ testID?: string;
22
+ }
23
+ declare const Status: ({ children, visible, intent, style, testID, ...nativeProps }: StatusProps) => JSX.Element;
24
+ export default Status;
@@ -0,0 +1,27 @@
1
+ import { Animated, Text } from 'react-native';
2
+ declare type ThemeIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
3
+ declare type ThemePadding = 'narrowContent' | 'wideContent';
4
+ declare const StyledView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
5
+ children?: import("react").ReactNode;
6
+ } & {
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any> | undefined;
9
+ } & {
10
+ themeIntent: ThemeIntent;
11
+ themePadding: ThemePadding;
12
+ }, {}, {}>;
13
+ declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ }, {}, {
17
+ ref?: import("react").Ref<Text> | undefined;
18
+ }>;
19
+ declare const StyledStatus: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
20
+ children?: import("react").ReactNode;
21
+ } & {
22
+ theme?: import("@emotion/react").Theme | undefined;
23
+ as?: import("react").ElementType<any> | undefined;
24
+ } & {
25
+ themeIntent: ThemeIntent;
26
+ }, {}, {}>;
27
+ export { StyledView, StyledText, StyledStatus };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import { Animated, StyleProp, ViewStyle } from 'react-native';
2
+ import React from 'react';
3
+ interface BadgeProps extends React.ComponentProps<typeof Animated.View> {
4
+ /**
5
+ * Content of the Badge.
6
+ */
7
+ content: string | number;
8
+ /**
9
+ * Whether the Badge is visible.
10
+ */
11
+ visible?: boolean;
12
+ /**
13
+ * The maximum number displayed on the badge. If number exceeds this value, `${max}+` are displayed instead. (Only applied when content is number.)
14
+ */
15
+ max?: number;
16
+ /**
17
+ * Visual intent color to apply to Badge.
18
+ */
19
+ intent?: 'success' | 'warning' | 'danger' | 'info' | 'archived';
20
+ /**
21
+ * Additional style.
22
+ */
23
+ style?: StyleProp<ViewStyle>;
24
+ /**
25
+ * Testing id of the component.
26
+ */
27
+ testID?: string;
28
+ }
29
+ declare const _default: (({ content: originalContent, visible, max, intent, style, testID, ...nativeProps }: BadgeProps) => JSX.Element) & {
30
+ Status: ({ children, visible, intent, style, testID, ...nativeProps }: import("./Status").StatusProps) => JSX.Element;
31
+ };
32
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import { View } from 'react-native';
2
+ declare const BottomNavigationTab: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ themeVisibility?: boolean | undefined;
7
+ }, {}, {
8
+ ref?: import("react").Ref<View> | undefined;
9
+ }>;
10
+ declare const BottomNavigationContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ }, {}, {
14
+ ref?: import("react").Ref<View> | undefined;
15
+ }>;
16
+ declare const ContentWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ }, {}, {
20
+ ref?: import("react").Ref<View> | undefined;
21
+ }>;
22
+ declare const BottomBarWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
23
+ theme?: import("@emotion/react").Theme | undefined;
24
+ as?: import("react").ElementType<any> | undefined;
25
+ } & {
26
+ themeInsets: {
27
+ top: number;
28
+ right: number;
29
+ bottom: number;
30
+ left: number;
31
+ };
32
+ }, {}, {
33
+ ref?: import("react").Ref<View> | undefined;
34
+ }>;
35
+ declare const BottomBar: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
36
+ theme?: import("@emotion/react").Theme | undefined;
37
+ as?: import("react").ElementType<any> | undefined;
38
+ }, {}, {
39
+ ref?: import("react").Ref<View> | undefined;
40
+ }>;
41
+ declare const BottomBarItem: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
42
+ theme?: import("@emotion/react").Theme | undefined;
43
+ as?: import("react").ElementType<any> | undefined;
44
+ }, {}, {
45
+ ref?: import("react").Ref<View> | undefined;
46
+ }>;
47
+ declare const StyledBottomBarText: import("@emotion/native").StyledComponent<import("../Typography/Text").TextProps & {
48
+ theme?: import("@emotion/react").Theme | undefined;
49
+ as?: import("react").ElementType<any> | undefined;
50
+ }, {}, {}>;
51
+ export { BottomBar, BottomBarItem, BottomNavigationTab, BottomNavigationContainer, BottomBarWrapper, ContentWrapper, StyledBottomBarText, };
@@ -0,0 +1,45 @@
1
+ import { ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle, ViewProps } from 'react-native';
3
+ import { IconName } from '../Icon';
4
+ export declare type BottomNavigationTabType = {
5
+ key: string;
6
+ title?: string;
7
+ icon: IconName;
8
+ component: ReactNode;
9
+ testID?: string;
10
+ };
11
+ interface BottomNavigationProps extends ViewProps {
12
+ /**
13
+ * Callback which is called on tab press, receiving key of upcoming active Tab.
14
+ */
15
+ onTabPress: (key: string) => void;
16
+ /**
17
+ * Whether inactive tabs should be removed and unmounted in React.
18
+ * Defaults to `false`.
19
+ */
20
+ renderActiveTabOnly?: boolean;
21
+ /**
22
+ * Current selected tab key.
23
+ */
24
+ selectedTabKey: string;
25
+ /**
26
+ * List of Tabs to be rendered. Each Tab must have an unique key.
27
+ */
28
+ tabs: {
29
+ key: string;
30
+ title?: string;
31
+ icon: IconName;
32
+ component: ReactNode;
33
+ testID?: string;
34
+ }[];
35
+ /**
36
+ * Additional style.
37
+ */
38
+ style?: StyleProp<ViewStyle>;
39
+ /**
40
+ * Testing id of the component.
41
+ */
42
+ testID?: string;
43
+ }
44
+ declare const BottomNavigation: ({ onTabPress, renderActiveTabOnly, selectedTabKey, tabs, ...nativeProps }: BottomNavigationProps) => JSX.Element;
45
+ export default BottomNavigation;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ declare const Footer: ({ children, showDivider, }: {
3
+ children: ReactNode;
4
+ showDivider: boolean;
5
+ }) => JSX.Element;
6
+ export default Footer;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ declare const Header: ({ content, showDivider, onRequestClose, showCloseButton, }: {
3
+ content: string | ReactElement;
4
+ showDivider: boolean;
5
+ onRequestClose?: (() => void) | undefined;
6
+ showCloseButton: boolean;
7
+ }) => JSX.Element;
8
+ export default Header;
@@ -0,0 +1,46 @@
1
+ import { Animated, View, ViewProps } from 'react-native';
2
+ declare const StyledWrapper: import("@emotion/native").StyledComponent<ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, {}, {
6
+ ref?: import("react").Ref<View> | undefined;
7
+ }>;
8
+ declare const StyledBottomSheet: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<View>> & {
9
+ children?: import("react").ReactNode;
10
+ } & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ }, {}, {}>;
14
+ declare const StyledBackdrop: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").PressableProps & import("react").RefAttributes<View>> & {
15
+ children?: import("react").ReactNode;
16
+ } & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ }, {}, {}>;
20
+ declare const StyledHeaderWrapper: import("@emotion/native").StyledComponent<ViewProps & {
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any> | undefined;
23
+ }, {}, {
24
+ ref?: import("react").Ref<View> | undefined;
25
+ }>;
26
+ declare const StyledHeader: import("@emotion/native").StyledComponent<ViewProps & {
27
+ theme?: import("@emotion/react").Theme | undefined;
28
+ as?: import("react").ElementType<any> | undefined;
29
+ } & {
30
+ adjacentIcon: boolean;
31
+ }, {}, {
32
+ ref?: import("react").Ref<View> | undefined;
33
+ }>;
34
+ declare const StyledFooter: import("@emotion/native").StyledComponent<ViewProps & {
35
+ theme?: import("@emotion/react").Theme | undefined;
36
+ as?: import("react").ElementType<any> | undefined;
37
+ }, {}, {
38
+ ref?: import("react").Ref<View> | undefined;
39
+ }>;
40
+ declare const StyledIconWrapper: import("@emotion/native").StyledComponent<ViewProps & {
41
+ theme?: import("@emotion/react").Theme | undefined;
42
+ as?: import("react").ElementType<any> | undefined;
43
+ }, {}, {
44
+ ref?: import("react").Ref<View> | undefined;
45
+ }>;
46
+ export { StyledWrapper, StyledHeaderWrapper, StyledHeader, StyledFooter, StyledIconWrapper, StyledBottomSheet, StyledBackdrop, };
@@ -0,0 +1,51 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ interface BottomSheetProps {
4
+ /**
5
+ * Bottom sheet open state.
6
+ */
7
+ open: boolean;
8
+ /**
9
+ * Bottom sheet's header.
10
+ */
11
+ header?: string | ReactElement;
12
+ /**
13
+ * Bottom sheet's footer.
14
+ */
15
+ footer?: ReactNode;
16
+ /**
17
+ * Bottom sheet's content.
18
+ */
19
+ children?: ReactNode;
20
+ /**
21
+ * Callback is called when the Bottom Sheet is opened.
22
+ */
23
+ onOpen?: () => void;
24
+ /**
25
+ * Callback is called when the user taps the back button on Android or when the bottom sheet
26
+ * is being dismiss by interacting outside of the bottom sheet.
27
+ */
28
+ onRequestClose?: () => void;
29
+ /**
30
+ * Displays an X button on bottom sheet header that will invoke onRequestClose callback on press.
31
+ */
32
+ showCloseButton?: boolean;
33
+ /**
34
+ * Enable the bottom sheet's backdrop.
35
+ */
36
+ hasBackdrop?: boolean;
37
+ /**
38
+ * Displays dividers between header, footer and body.
39
+ */
40
+ showDivider?: boolean;
41
+ /**
42
+ * Additional style.
43
+ */
44
+ style?: StyleProp<ViewStyle>;
45
+ /**
46
+ * Testing id of the component.
47
+ */
48
+ testID?: string;
49
+ }
50
+ declare const BottomSheet: ({ open, header, footer, children, onOpen, onRequestClose, showCloseButton, hasBackdrop, showDivider, style, testID, }: BottomSheetProps) => JSX.Element;
51
+ export default BottomSheet;
@@ -0,0 +1,57 @@
1
+ import { ReactChild } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { IconName } from '../Icon';
4
+ import { Intent, ThemeVariant } from './StyledButton';
5
+ export interface ButtonProps {
6
+ /**
7
+ * Helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label.
8
+ */
9
+ accessibilityHint?: string;
10
+ /**
11
+ * A succinct label in a localized string that identifies the accessibility element
12
+ */
13
+ accessibilityLabel?: string;
14
+ /**
15
+ * Disable state of button.
16
+ */
17
+ disabled?: boolean;
18
+ /**
19
+ * Places an icon within the button, before the button's text
20
+ */
21
+ icon?: IconName;
22
+ /**
23
+ * Visual intent color to apply to button. It is required for `filled`, `outlined` and `text` variants.
24
+ */
25
+ intent?: 'primary' | 'secondary';
26
+ /**
27
+ * Loading state of button.
28
+ */
29
+ loading?: boolean;
30
+ /**
31
+ * Set the handler to handle press event.
32
+ */
33
+ onPress: () => void;
34
+ /**
35
+ * Places an icon within the button, after the button's text
36
+ */
37
+ rightIcon?: IconName;
38
+ /**
39
+ * Addditional style.
40
+ */
41
+ style?: StyleProp<ViewStyle>;
42
+ /**
43
+ * Testing id of the component.
44
+ */
45
+ testID?: string;
46
+ /**
47
+ * Button label.
48
+ */
49
+ text: ReactChild;
50
+ /**
51
+ * Button type.
52
+ */
53
+ variant?: 'basic-transparent' | 'filled' | 'outlined';
54
+ }
55
+ export declare const getThemeVariant: (variant: 'basic-transparent' | 'filled' | 'outlined', intent: Intent) => ThemeVariant;
56
+ declare const Button: ({ accessibilityHint, accessibilityLabel, disabled, icon, intent, loading, onPress, rightIcon, style, testID, text, variant, }: ButtonProps) => JSX.Element;
57
+ export default Button;