@hero-design/rn 7.3.2 → 7.6.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 (345) hide show
  1. package/.expo/README.md +15 -0
  2. package/.expo/packager-info.json +10 -0
  3. package/.expo/prebuild/cached-packages.json +4 -0
  4. package/.expo/settings.json +10 -0
  5. package/.expo/xcodebuild-error.log +2 -0
  6. package/.expo/xcodebuild.log +11199 -0
  7. package/.turbo/turbo-build.log +2 -2
  8. package/assets/fonts/hero-icons.ttf +0 -0
  9. package/es/index.js +7093 -5663
  10. package/lib/assets/fonts/hero-icons.ttf +0 -0
  11. package/lib/index.js +7101 -5662
  12. package/package.json +11 -9
  13. package/playground/.detoxrc.json +49 -0
  14. package/playground/.prettierrc.json +8 -0
  15. package/playground/.turbo/turbo-type-check.log +7 -0
  16. package/playground/app.json +9 -0
  17. package/playground/babel.config.js +63 -0
  18. package/playground/e2e/config.json +9 -0
  19. package/playground/e2e/environment.js +23 -0
  20. package/playground/e2e/firstTest.e2e.js +16 -0
  21. package/{expoEntry.js → playground/expoEntry.js} +1 -1
  22. package/playground/fonts/be-vietnam-pro-light.ttf +0 -0
  23. package/playground/fonts/be-vietnam-pro-regular.ttf +0 -0
  24. package/playground/fonts/be-vietnam-pro-semibold.ttf +0 -0
  25. package/playground/fonts/hero-icons.ttf +0 -0
  26. package/playground/index.js +7 -0
  27. package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +9 -0
  28. package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +75 -0
  29. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  30. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +6 -0
  31. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
  32. package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  33. package/playground/ios/MobileHeroDesignPlayground/Info.plist +85 -0
  34. package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +3 -0
  35. package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +8 -0
  36. package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +40 -0
  37. package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +16 -0
  38. package/playground/ios/MobileHeroDesignPlayground/main.m +10 -0
  39. package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +4 -0
  40. package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +515 -0
  41. package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +88 -0
  42. package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +10 -0
  43. package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  44. package/playground/ios/Podfile +49 -0
  45. package/playground/ios/Podfile.lock +478 -0
  46. package/playground/ios/Podfile.properties.json +3 -0
  47. package/{metro.config.js → playground/metro.config.js} +10 -2
  48. package/playground/package.json +63 -0
  49. package/playground/src/Alert.tsx +80 -0
  50. package/playground/{index.tsx → src/App.tsx} +69 -29
  51. package/playground/{components → src}/Avatar.tsx +1 -1
  52. package/playground/{components → src}/Badge.tsx +1 -1
  53. package/playground/{components → src}/BottomNavigation.tsx +1 -1
  54. package/playground/src/BottomSheet.tsx +43 -0
  55. package/playground/{components → src}/Button.tsx +1 -1
  56. package/playground/{components → src}/Card.tsx +1 -1
  57. package/playground/{components → src}/Collapse.tsx +1 -1
  58. package/playground/src/ContentNavigator.tsx +58 -0
  59. package/playground/{components → src}/Divider.tsx +1 -1
  60. package/playground/{components → src}/Drawer.tsx +1 -1
  61. package/playground/{components → src}/FAB.tsx +1 -1
  62. package/playground/{components → src}/Icon.tsx +7 -3
  63. package/playground/{components → src}/IconButton.tsx +12 -1
  64. package/playground/src/MultipleThemes.tsx +34 -0
  65. package/playground/{components → src}/Progress.tsx +1 -1
  66. package/playground/src/Radio.tsx +25 -0
  67. package/playground/src/SectionHeading.tsx +68 -0
  68. package/playground/src/Select.tsx +32 -0
  69. package/playground/src/Spinner.tsx +19 -0
  70. package/playground/src/Switch.tsx +80 -0
  71. package/playground/{components → src}/Tabs.tsx +1 -1
  72. package/playground/{components → src}/Tag.tsx +1 -1
  73. package/playground/src/TextInput.tsx +14 -0
  74. package/playground/{components → src}/Typography.tsx +1 -1
  75. package/playground/src/emotion.d.ts +7 -0
  76. package/playground/tsconfig.json +21 -0
  77. package/src/components/Alert/StyledAlert.tsx +48 -0
  78. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +686 -0
  79. package/src/components/Alert/__tests__/index.spec.tsx +83 -0
  80. package/src/components/Alert/index.tsx +109 -0
  81. package/src/components/BottomSheet/Footer.tsx +19 -0
  82. package/src/components/BottomSheet/Header.tsx +49 -0
  83. package/src/components/BottomSheet/StyledBottomSheet.tsx +75 -0
  84. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +531 -0
  85. package/src/components/BottomSheet/__tests__/index.spec.tsx +107 -0
  86. package/src/components/BottomSheet/index.tsx +177 -0
  87. package/src/components/Button/IconButton.tsx +11 -1
  88. package/src/components/Collapse/StyledCollapse.tsx +11 -2
  89. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +36 -31
  90. package/src/components/Collapse/__tests__/index.spec.tsx +1 -13
  91. package/src/components/Collapse/index.tsx +20 -50
  92. package/src/components/ContentNavigator/StyledContentNavigator.tsx +15 -0
  93. package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +19 -0
  94. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +43 -0
  95. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +217 -0
  96. package/src/components/ContentNavigator/__tests__/index.spec.tsx +74 -0
  97. package/src/components/ContentNavigator/index.tsx +65 -0
  98. package/src/components/Icon/HeroIcon/index.tsx +13 -2
  99. package/src/components/Icon/HeroIcon/selection.json +1 -1
  100. package/src/components/Icon/IconList.ts +8 -0
  101. package/src/components/Icon/index.tsx +8 -1
  102. package/src/components/Radio/Radio.tsx +51 -0
  103. package/src/components/Radio/RadioGroup.tsx +74 -0
  104. package/src/components/Radio/StyledRadio.tsx +42 -0
  105. package/src/components/Radio/__tests__/Radio.spec.tsx +38 -0
  106. package/src/components/Radio/__tests__/RadioGroup.spec.tsx +36 -0
  107. package/src/components/Radio/__tests__/StyledRadio.spec.tsx +43 -0
  108. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +160 -0
  109. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +248 -0
  110. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +124 -0
  111. package/src/components/Radio/index.tsx +5 -0
  112. package/src/components/Radio/types.ts +1 -0
  113. package/src/components/SectionHeading/StyledHeading.tsx +24 -0
  114. package/src/components/SectionHeading/__tests__/StyledHeading.spec.tsx +28 -0
  115. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +48 -0
  116. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +208 -0
  117. package/src/components/SectionHeading/__tests__/index.spec.tsx +39 -0
  118. package/src/components/SectionHeading/index.tsx +93 -0
  119. package/src/components/Select/MultiSelect/Footer.tsx +15 -0
  120. package/src/components/Select/MultiSelect/OptionList.tsx +76 -0
  121. package/src/components/Select/MultiSelect/StyledMultiSelect.tsx +30 -0
  122. package/src/components/Select/MultiSelect/__tests__/StyledMultiSelect.spec.tsx +49 -0
  123. package/src/components/Select/MultiSelect/__tests__/__snapshots__/StyledMultiSelect.spec.tsx.snap +108 -0
  124. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +1630 -0
  125. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +94 -0
  126. package/src/components/Select/MultiSelect/index.tsx +103 -0
  127. package/src/components/Select/MultiSelect/types.ts +1 -0
  128. package/src/components/Select/index.tsx +5 -0
  129. package/src/components/Spinner/AnimatedSpinner.tsx +55 -0
  130. package/src/components/Spinner/StyledSpinner.tsx +59 -0
  131. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +11 -0
  132. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +56 -0
  133. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +118 -0
  134. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +235 -0
  135. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +141 -0
  136. package/src/components/Spinner/__tests__/index.spec.tsx +12 -0
  137. package/src/components/Spinner/index.tsx +22 -0
  138. package/src/components/Switch/StyledSwitch.tsx +50 -0
  139. package/src/components/Switch/__tests__/StyledHeading.spec.tsx +42 -0
  140. package/src/components/Switch/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +74 -0
  141. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +129 -0
  142. package/src/components/Switch/__tests__/index.spec.tsx +24 -0
  143. package/src/components/Switch/index.tsx +87 -0
  144. package/src/components/TextInput/StyledTextInput.tsx +30 -0
  145. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +27 -0
  146. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +67 -0
  147. package/src/components/TextInput/__tests__/index.spec.tsx +17 -0
  148. package/src/components/TextInput/index.tsx +74 -0
  149. package/src/index.ts +18 -0
  150. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +174 -0
  151. package/src/theme/components/alert.ts +32 -0
  152. package/src/theme/components/bottomSheet.ts +34 -0
  153. package/src/theme/components/contentNavigator.ts +11 -0
  154. package/src/theme/components/icon.ts +1 -0
  155. package/src/theme/components/radio.ts +34 -0
  156. package/src/theme/components/sectionHeading.ts +18 -0
  157. package/src/theme/components/select.ts +23 -0
  158. package/src/theme/components/spinner.ts +21 -0
  159. package/src/theme/components/switch.ts +50 -0
  160. package/src/theme/components/textInput.ts +32 -0
  161. package/src/theme/global/borders.ts +6 -0
  162. package/src/theme/global/colors.ts +3 -0
  163. package/src/theme/index.ts +34 -7
  164. package/tsconfig.json +11 -3
  165. package/types/components/Alert/StyledAlert.d.ts +37 -0
  166. package/types/{src/components/Avatar → components/Alert}/__tests__/index.spec.d.ts +0 -0
  167. package/types/components/Alert/index.d.ts +42 -0
  168. package/types/{src/components → components}/Avatar/StyledAvatar.d.ts +0 -1
  169. package/types/{src/components → components}/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
  170. package/types/{src/components/BottomNavigation → components/Avatar}/__tests__/index.spec.d.ts +0 -0
  171. package/types/{src/components → components}/Avatar/index.d.ts +0 -0
  172. package/types/{src/components → components}/Badge/Status.d.ts +0 -0
  173. package/types/{src/components → components}/Badge/StyledBadge.d.ts +0 -1
  174. package/types/{src/components → components}/Badge/__tests__/Badge.spec.d.ts +0 -0
  175. package/types/{src/components → components}/Badge/__tests__/Status.spec.d.ts +0 -0
  176. package/types/{src/components → components}/Badge/index.d.ts +0 -0
  177. package/types/{src/components → components}/BottomNavigation/StyledBottomNavigation.d.ts +0 -1
  178. package/types/{src/components/Button/LoadingIndicator → components/BottomNavigation}/__tests__/index.spec.d.ts +0 -0
  179. package/types/{src/components → components}/BottomNavigation/index.d.ts +0 -0
  180. package/types/components/BottomSheet/Footer.d.ts +6 -0
  181. package/types/components/BottomSheet/Header.d.ts +8 -0
  182. package/types/components/BottomSheet/StyledBottomSheet.d.ts +46 -0
  183. package/types/{src/components/Button → components/BottomSheet}/__tests__/index.spec.d.ts +0 -0
  184. package/types/components/BottomSheet/index.d.ts +55 -0
  185. package/types/{src/components → components}/Button/Button.d.ts +0 -0
  186. package/types/{src/components → components}/Button/IconButton.d.ts +5 -1
  187. package/types/{src/components → components}/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -1
  188. package/types/{src/components → components}/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
  189. package/types/{src/components/Card → components/Button/LoadingIndicator}/__tests__/index.spec.d.ts +0 -0
  190. package/types/{src/components → components}/Button/LoadingIndicator/index.d.ts +0 -0
  191. package/types/{src/components → components}/Button/StyledButton.d.ts +0 -1
  192. package/types/{src/components → components}/Button/__tests__/Button.spec.d.ts +0 -0
  193. package/types/{src/components → components}/Button/__tests__/IconButton.spec.d.ts +0 -0
  194. package/types/{src/components → components}/Button/__tests__/StyledButton.spec.d.ts +0 -0
  195. package/types/{src/components → components}/Button/index.d.ts +0 -0
  196. package/types/{src/components → components}/Card/StyledCard.d.ts +0 -1
  197. package/types/{src/components → components}/Card/__tests__/StyledCard.spec.d.ts +0 -0
  198. package/types/{src/components/Collapse → components/Card}/__tests__/index.spec.d.ts +0 -0
  199. package/types/{src/components → components}/Card/index.d.ts +0 -0
  200. package/types/{src/components → components}/Collapse/StyledCollapse.d.ts +12 -2
  201. package/types/{src/components → components}/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
  202. package/types/{src/components/Drawer → components/Collapse}/__tests__/index.spec.d.ts +0 -0
  203. package/types/{src/components → components}/Collapse/index.d.ts +1 -5
  204. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +12 -0
  205. package/types/{src/components/Divider/__tests__/StyledDivider.spec.d.ts → components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts} +0 -0
  206. package/types/{src/components/FAB → components/ContentNavigator}/__tests__/index.spec.d.ts +0 -0
  207. package/types/components/ContentNavigator/index.d.ts +33 -0
  208. package/types/{src/components → components}/Divider/StyledDivider.d.ts +0 -1
  209. package/types/{src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts → components/Divider/__tests__/StyledDivider.spec.d.ts} +0 -0
  210. package/types/{src/components → components}/Divider/index.d.ts +0 -0
  211. package/types/{src/components → components}/Drawer/StyledDrawer.d.ts +0 -1
  212. package/types/{src/components/Icon → components/Drawer}/__tests__/index.spec.d.ts +0 -0
  213. package/types/{src/components → components}/Drawer/index.d.ts +0 -0
  214. package/types/{src/components → components}/FAB/ActionGroup/ActionItem.d.ts +0 -0
  215. package/types/{src/components → components}/FAB/ActionGroup/StyledActionGroup.d.ts +0 -1
  216. package/types/{src/components → components}/FAB/ActionGroup/StyledActionItem.d.ts +0 -1
  217. package/types/{src/components → components}/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
  218. package/types/{src/components → components}/FAB/ActionGroup/index.d.ts +0 -0
  219. package/types/{src/components → components}/FAB/AnimatedFABIcon.d.ts +0 -0
  220. package/types/{src/components → components}/FAB/FAB.d.ts +0 -0
  221. package/types/{src/components → components}/FAB/StyledFAB.d.ts +0 -1
  222. package/types/{src/components/FAB/__tests__/StyledFAB.spec.d.ts → components/FAB/__tests__/AnimatedFABIcon.spec.d.ts} +0 -0
  223. package/types/{src/components/Progress/__tests__/index.spec.d.ts → components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
  224. package/types/{src/components/Tabs → components/FAB}/__tests__/index.spec.d.ts +0 -0
  225. package/types/{src/components → components}/FAB/index.d.ts +0 -0
  226. package/types/{src/components → components}/Icon/HeroIcon/index.d.ts +1 -2
  227. package/types/components/Icon/IconList.d.ts +2 -0
  228. package/types/{src/components/Typography/Text → components/Icon}/__tests__/index.spec.d.ts +0 -0
  229. package/types/{src/components → components}/Icon/index.d.ts +1 -1
  230. package/types/components/Icon/utils.d.ts +2 -0
  231. package/types/{src/components → components}/Progress/ProgressBar.d.ts +0 -0
  232. package/types/{src/components → components}/Progress/ProgressCircle.d.ts +0 -0
  233. package/types/{src/components → components}/Progress/StyledProgressBar.d.ts +0 -1
  234. package/types/{src/components → components}/Progress/StyledProgressCircle.d.ts +0 -1
  235. package/types/{src/theme → components/Progress}/__tests__/index.spec.d.ts +0 -0
  236. package/types/{src/components → components}/Progress/index.d.ts +0 -0
  237. package/types/{src/components → components}/Progress/types.d.ts +0 -0
  238. package/types/components/Radio/Radio.d.ts +26 -0
  239. package/types/components/Radio/RadioGroup.d.ts +32 -0
  240. package/types/components/Radio/StyledRadio.d.ts +30 -0
  241. package/types/{src/components/Tabs/__tests__/ScrollableTab.spec.d.ts → components/Radio/__tests__/Radio.spec.d.ts} +0 -0
  242. package/types/{src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts → components/Radio/__tests__/RadioGroup.spec.d.ts} +0 -0
  243. package/types/{src/components/Tag/__tests__/Tag.spec.d.ts → components/Radio/__tests__/StyledRadio.spec.d.ts} +0 -0
  244. package/types/components/Radio/index.d.ts +4 -0
  245. package/types/components/Radio/types.d.ts +5 -0
  246. package/types/components/SectionHeading/StyledHeading.d.ts +20 -0
  247. package/types/{src/components/Typography/Text/__tests__/StyledText.spec.d.ts → components/SectionHeading/__tests__/StyledHeading.spec.d.ts} +0 -0
  248. package/types/{src/utils/__tests__/scale.spec.d.ts → components/SectionHeading/__tests__/index.spec.d.ts} +0 -0
  249. package/types/components/SectionHeading/index.d.ts +39 -0
  250. package/types/components/Select/MultiSelect/Footer.d.ts +5 -0
  251. package/types/components/Select/MultiSelect/OptionList.d.ts +3 -0
  252. package/types/components/Select/MultiSelect/StyledMultiSelect.d.ts +26 -0
  253. package/types/components/Select/MultiSelect/__tests__/StyledMultiSelect.spec.d.ts +1 -0
  254. package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +1 -0
  255. package/types/components/Select/MultiSelect/index.d.ts +39 -0
  256. package/types/components/Select/MultiSelect/types.d.ts +5 -0
  257. package/types/components/Select/index.d.ts +5 -0
  258. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -0
  259. package/types/components/Spinner/StyledSpinner.d.ts +30 -0
  260. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +1 -0
  261. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +1 -0
  262. package/types/components/Spinner/__tests__/index.spec.d.ts +1 -0
  263. package/types/components/Spinner/index.d.ts +10 -0
  264. package/types/components/Switch/StyledSwitch.d.ts +36 -0
  265. package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +1 -0
  266. package/types/components/Switch/__tests__/index.spec.d.ts +1 -0
  267. package/types/components/Switch/index.d.ts +30 -0
  268. package/types/{src/components → components}/Tabs/ActiveTabIndicator.d.ts +0 -0
  269. package/types/{src/components → components}/Tabs/ScrollableTabs.d.ts +0 -0
  270. package/types/{src/components → components}/Tabs/StyledScrollableTabs.d.ts +0 -1
  271. package/types/{src/components → components}/Tabs/StyledTabs.d.ts +0 -1
  272. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
  273. package/types/components/Tabs/__tests__/index.spec.d.ts +1 -0
  274. package/types/{src/components → components}/Tabs/index.d.ts +0 -0
  275. package/types/{src/components → components}/Tabs/utils.d.ts +0 -0
  276. package/types/{src/components → components}/Tag/StyledTag.d.ts +0 -1
  277. package/types/components/Tag/__tests__/Tag.spec.d.ts +1 -0
  278. package/types/{src/components → components}/Tag/index.d.ts +0 -0
  279. package/types/components/TextInput/StyledTextInput.d.ts +18 -0
  280. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +1 -0
  281. package/types/components/TextInput/__tests__/index.spec.d.ts +1 -0
  282. package/types/components/TextInput/index.d.ts +34 -0
  283. package/types/{src/components → components}/Typography/Text/StyledText.d.ts +0 -1
  284. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
  285. package/types/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
  286. package/types/{src/components → components}/Typography/Text/index.d.ts +0 -0
  287. package/types/{src/components → components}/Typography/index.d.ts +0 -0
  288. package/types/{src/index.d.ts → index.d.ts} +10 -1
  289. package/types/{src/testHelpers → testHelpers}/renderWithTheme.d.ts +0 -0
  290. package/types/theme/__tests__/index.spec.d.ts +1 -0
  291. package/types/theme/components/alert.d.ts +23 -0
  292. package/types/{src/theme → theme}/components/avatar.d.ts +0 -0
  293. package/types/{src/theme → theme}/components/badge.d.ts +0 -0
  294. package/types/{src/theme → theme}/components/bottomNavigation.d.ts +0 -0
  295. package/types/theme/components/bottomSheet.d.ts +29 -0
  296. package/types/{src/theme → theme}/components/button.d.ts +0 -0
  297. package/types/{src/theme → theme}/components/card.d.ts +0 -0
  298. package/types/theme/components/contentNavigator.d.ts +7 -0
  299. package/types/{src/theme → theme}/components/divider.d.ts +0 -0
  300. package/types/{src/theme → theme}/components/drawer.d.ts +0 -0
  301. package/types/{src/theme → theme}/components/fab.d.ts +0 -0
  302. package/types/{src/theme → theme}/components/icon.d.ts +1 -0
  303. package/types/{src/theme → theme}/components/progress.d.ts +0 -0
  304. package/types/theme/components/radio.d.ts +25 -0
  305. package/types/theme/components/sectionHeading.d.ts +13 -0
  306. package/types/theme/components/select.d.ts +17 -0
  307. package/types/theme/components/spinner.d.ts +15 -0
  308. package/types/theme/components/switch.d.ts +32 -0
  309. package/types/{src/theme → theme}/components/tabs.d.ts +0 -0
  310. package/types/{src/theme → theme}/components/tag.d.ts +0 -0
  311. package/types/theme/components/textInput.d.ts +24 -0
  312. package/types/{src/theme → theme}/components/typography.d.ts +0 -0
  313. package/types/{src/theme → theme}/global/borders.d.ts +3 -0
  314. package/types/{src/theme → theme}/global/colors.d.ts +3 -0
  315. package/types/{src/theme → theme}/global/index.d.ts +3 -0
  316. package/types/{src/theme → theme}/global/scale.d.ts +0 -0
  317. package/types/{src/theme → theme}/global/space.d.ts +0 -0
  318. package/types/{src/theme → theme}/global/typography.d.ts +0 -0
  319. package/types/{src/theme → theme}/index.d.ts +23 -5
  320. package/types/{src/types.d.ts → types.d.ts} +0 -0
  321. package/types/utils/__tests__/scale.spec.d.ts +1 -0
  322. package/types/{src/utils → utils}/helpers.d.ts +0 -0
  323. package/types/{src/utils → utils}/hooks.d.ts +0 -0
  324. package/types/{src/utils → utils}/scale.d.ts +0 -0
  325. package/app.json +0 -8
  326. package/types/playground/components/Avatar.d.ts +0 -2
  327. package/types/playground/components/Badge.d.ts +0 -2
  328. package/types/playground/components/BottomNavigation.d.ts +0 -2
  329. package/types/playground/components/Button.d.ts +0 -2
  330. package/types/playground/components/Card.d.ts +0 -2
  331. package/types/playground/components/Collapse.d.ts +0 -2
  332. package/types/playground/components/Divider.d.ts +0 -2
  333. package/types/playground/components/Drawer.d.ts +0 -2
  334. package/types/playground/components/FAB.d.ts +0 -2
  335. package/types/playground/components/Icon.d.ts +0 -2
  336. package/types/playground/components/IconButton.d.ts +0 -2
  337. package/types/playground/components/Progress.d.ts +0 -2
  338. package/types/playground/components/Tabs.d.ts +0 -2
  339. package/types/playground/components/Tag.d.ts +0 -2
  340. package/types/playground/components/Typography.d.ts +0 -2
  341. package/types/playground/index.d.ts +0 -2
  342. package/types/src/components/Icon/IconList.d.ts +0 -2
  343. package/types/src/components/Icon/utils.d.ts +0 -2
  344. package/types/src/components/Tabs/ScrollableTab.d.ts +0 -3
  345. package/types/src/components/Tabs/StyledScrollableTab.d.ts +0 -61
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { fireEvent } from '@testing-library/react-native';
3
+
4
+ import renderWithTheme from '../../../testHelpers/renderWithTheme';
5
+ import Switch from '..';
6
+
7
+ describe('Switch', () => {
8
+ it('renders correctly', () => {
9
+ const wrapper = renderWithTheme(<Switch testID="switch" />);
10
+ expect(wrapper.queryAllByTestId('switch')).toHaveLength(1);
11
+ expect(wrapper.toJSON()).toMatchSnapshot();
12
+ });
13
+
14
+ it('trigger press function correctly', () => {
15
+ const pressFn = jest.fn();
16
+ const wrapper = renderWithTheme(
17
+ <Switch testID="switch" onPress={pressFn} />
18
+ );
19
+ fireEvent.press(wrapper.getByTestId('switch'));
20
+
21
+ expect(wrapper.toJSON()).toMatchSnapshot();
22
+ expect(pressFn).toBeCalled();
23
+ });
24
+ });
@@ -0,0 +1,87 @@
1
+ import { useTheme } from '@emotion/react';
2
+ import React, { ReactElement, useState, useEffect } from 'react';
3
+
4
+ import {
5
+ StyleProp,
6
+ ViewStyle,
7
+ Animated,
8
+ Easing,
9
+ TouchableWithoutFeedback,
10
+ } from 'react-native';
11
+
12
+ import {
13
+ StyledDisabledWrapper,
14
+ StyledKnot,
15
+ StyledThumbWrapper,
16
+ StyledWrapper,
17
+ } from './StyledSwitch';
18
+
19
+ export interface SwitchProps {
20
+ /**
21
+ * Control whether the switch is checked
22
+ */
23
+ checked?: boolean;
24
+ /**
25
+ * Whether the switch is disabled
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Event handler.
30
+ */
31
+ onPress?: () => void;
32
+ /**
33
+ * Size of the switch
34
+ */
35
+ size?: 'small' | 'medium';
36
+ /**
37
+ * Addditional style.
38
+ */
39
+ style?: StyleProp<ViewStyle>;
40
+ /**
41
+ * Testing id of the component.
42
+ */
43
+ testID?: string;
44
+ }
45
+
46
+ const Switch = ({
47
+ size = 'medium',
48
+ disabled = false,
49
+ checked,
50
+ onPress,
51
+ style,
52
+ testID,
53
+ }: SwitchProps): ReactElement => {
54
+ const theme = useTheme();
55
+
56
+ const offset = checked
57
+ ? theme.__hd__.switch.widths[size] -
58
+ theme.__hd__.switch.thumbSizes[size] -
59
+ theme.__hd__.switch.spaces[size] * 2
60
+ : theme.__hd__.switch.spaces.inactive;
61
+
62
+ const [animatedOffset] = useState(() => new Animated.Value(offset));
63
+
64
+ useEffect(() => {
65
+ Animated.timing(animatedOffset, {
66
+ toValue: offset,
67
+ easing: Easing.inOut(Easing.cubic),
68
+ useNativeDriver: false,
69
+ }).start();
70
+ }, [checked]);
71
+ return (
72
+ <TouchableWithoutFeedback
73
+ testID={testID}
74
+ onPress={onPress}
75
+ disabled={disabled}
76
+ >
77
+ <StyledWrapper themeChecked={checked} themeSize={size} style={style}>
78
+ {disabled && <StyledDisabledWrapper themeSize={size} />}
79
+ <StyledThumbWrapper themeSize={size}>
80
+ <StyledKnot themeSize={size} style={{ left: animatedOffset }} />
81
+ </StyledThumbWrapper>
82
+ </StyledWrapper>
83
+ </TouchableWithoutFeedback>
84
+ );
85
+ };
86
+
87
+ export default Switch;
@@ -0,0 +1,30 @@
1
+ import { TextInput, View } from 'react-native';
2
+ import styled from '@emotion/native';
3
+ import Typography from '../Typography';
4
+
5
+ const Container = styled(View)(({ theme }) => ({
6
+ position: 'relative',
7
+ width: '100%',
8
+ borderWidth: theme.__hd__.textInput.borderWidths.container,
9
+ borderRadius: theme.__hd__.textInput.radii.container,
10
+ padding: theme.__hd__.textInput.space.containerPadding,
11
+ flexDirection: 'row',
12
+ alignItems: 'center',
13
+ }));
14
+
15
+ const Label = styled(Typography.Text)(({ theme }) => ({
16
+ position: 'absolute',
17
+ left: theme.__hd__.textInput.space.labelLeft,
18
+ top: theme.__hd__.textInput.space.labelTop,
19
+ backgroundColor: theme.__hd__.textInput.colors.labelBackground,
20
+ zIndex: 1,
21
+ paddingHorizontal: theme.__hd__.textInput.space.labelHorizontalPadding,
22
+ }));
23
+
24
+ const StyledTextInput = styled(TextInput)(({ theme }) => ({
25
+ flex: 1,
26
+ fontSize: theme.__hd__.textInput.fontSizes.text,
27
+ marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
28
+ }));
29
+
30
+ export { Container, Label, StyledTextInput };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
+ import { Container, Label, StyledTextInput } from '../StyledTextInput';
4
+
5
+ describe('Container', () => {
6
+ it('renders correctly', () => {
7
+ const { toJSON } = renderWithTheme(<Container />);
8
+
9
+ expect(toJSON()).toMatchSnapshot();
10
+ });
11
+ });
12
+
13
+ describe('Label', () => {
14
+ it('renders correctly', () => {
15
+ const { toJSON } = renderWithTheme(<Label>Label</Label>);
16
+
17
+ expect(toJSON()).toMatchSnapshot();
18
+ });
19
+ });
20
+
21
+ describe('StyledTextInput', () => {
22
+ it('renders correctly', () => {
23
+ const { toJSON } = renderWithTheme(<StyledTextInput />);
24
+
25
+ expect(toJSON()).toMatchSnapshot();
26
+ });
27
+ });
@@ -0,0 +1,67 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Container renders correctly 1`] = `
4
+ <View
5
+ style={
6
+ Array [
7
+ Object {
8
+ "alignItems": "center",
9
+ "borderRadius": 8,
10
+ "borderWidth": 1,
11
+ "flexDirection": "row",
12
+ "padding": 16,
13
+ "position": "relative",
14
+ "width": "100%",
15
+ },
16
+ undefined,
17
+ ]
18
+ }
19
+ />
20
+ `;
21
+
22
+ exports[`Label renders correctly 1`] = `
23
+ <Text
24
+ style={
25
+ Array [
26
+ Object {
27
+ "color": "#292a2b",
28
+ "fontFamily": "BeVietnamPro-Regular",
29
+ "fontSize": 14,
30
+ "letterSpacing": 0.42,
31
+ "lineHeight": 22,
32
+ },
33
+ Array [
34
+ Object {
35
+ "backgroundColor": "#ffffff",
36
+ "left": 16,
37
+ "paddingHorizontal": 4,
38
+ "position": "absolute",
39
+ "top": -10,
40
+ "zIndex": 1,
41
+ },
42
+ undefined,
43
+ ],
44
+ ]
45
+ }
46
+ themeFontSize="medium"
47
+ themeFontWeight="regular"
48
+ themeIntent="body"
49
+ >
50
+ Label
51
+ </Text>
52
+ `;
53
+
54
+ exports[`StyledTextInput renders correctly 1`] = `
55
+ <TextInput
56
+ style={
57
+ Array [
58
+ Object {
59
+ "flex": 1,
60
+ "fontSize": 16,
61
+ "marginHorizontal": 8,
62
+ },
63
+ undefined,
64
+ ]
65
+ }
66
+ />
67
+ `;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
+ import TextInput from '../index';
4
+
5
+ describe('TextInput', () => {
6
+ it('renders label, prefix and native TextInput', () => {
7
+ const { queryAllByTestId, queryAllByText } = renderWithTheme(
8
+ <TextInput label="Input Label" prefix="user" suffix="arrow-down" />
9
+ );
10
+
11
+ expect(queryAllByText('Input Label')).toHaveLength(1);
12
+ expect(queryAllByTestId('input-label')).toHaveLength(1);
13
+ expect(queryAllByTestId('input-prefix')).toHaveLength(1);
14
+ expect(queryAllByTestId('input-suffix')).toHaveLength(1);
15
+ expect(queryAllByTestId('text-input')).toHaveLength(1);
16
+ });
17
+ });
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import {
3
+ TextInputProps as NativeTextInputProps,
4
+ StyleProp,
5
+ ViewStyle,
6
+ TextStyle,
7
+ } from 'react-native';
8
+ import { Container, Label, StyledTextInput } from './StyledTextInput';
9
+ import Icon, { IconName } from '../Icon';
10
+
11
+ export interface TextInputProps extends NativeTextInputProps {
12
+ /**
13
+ * Field label.
14
+ */
15
+ label?: string;
16
+ /**
17
+ * Name of Icon to render on the left side of the input, before the user's cursor.
18
+ */
19
+ prefix?: IconName;
20
+ /**
21
+ * Name of Icon to render on the right side of the input.
22
+ */
23
+ suffix?: IconName;
24
+ /**
25
+ * Additional wrapper style.
26
+ */
27
+ style?: StyleProp<ViewStyle>;
28
+ /**
29
+ * Input text style.
30
+ */
31
+ textStyle?: StyleProp<TextStyle>;
32
+ /**
33
+ * Testing id of the component.
34
+ */
35
+ testID?: string;
36
+ /**
37
+ * Accessibility label for the input (Android).
38
+ */
39
+ accessibilityLabelledBy?: string;
40
+ }
41
+
42
+ const TextInput = ({
43
+ label,
44
+ prefix,
45
+ suffix,
46
+ style,
47
+ textStyle,
48
+ testID,
49
+ accessibilityLabelledBy,
50
+ ...nativeProps
51
+ }: TextInputProps) => (
52
+ <Container style={style} testID={testID}>
53
+ {label && (
54
+ <Label
55
+ nativeID={accessibilityLabelledBy}
56
+ testID="input-label"
57
+ fontSize="small"
58
+ >
59
+ {label}
60
+ </Label>
61
+ )}
62
+ {prefix && <Icon testID="input-prefix" icon={prefix} size="xsmall" />}
63
+ <StyledTextInput
64
+ style={textStyle}
65
+ testID="text-input"
66
+ // @ts-ignore
67
+ accessibilityLabelledBy={accessibilityLabelledBy}
68
+ {...nativeProps}
69
+ />
70
+ {suffix && <Icon testID="input-suffix" icon={suffix} size="xsmall" />}
71
+ </Container>
72
+ );
73
+
74
+ export default TextInput;
package/src/index.ts CHANGED
@@ -2,19 +2,28 @@ import { ThemeProvider, useTheme } from '@emotion/react';
2
2
  import theme, { getTheme } from './theme';
3
3
  import { scale } from './utils/scale';
4
4
 
5
+ import Alert from './components/Alert';
5
6
  import Avatar from './components/Avatar';
6
7
  import Badge from './components/Badge';
7
8
  import BottomNavigation from './components/BottomNavigation';
9
+ import BottomSheet from './components/BottomSheet';
8
10
  import Button from './components/Button';
9
11
  import Card from './components/Card';
10
12
  import Collapse from './components/Collapse';
13
+ import ContentNavigator from './components/ContentNavigator';
11
14
  import Divider from './components/Divider';
12
15
  import Drawer from './components/Drawer';
13
16
  import FAB from './components/FAB';
14
17
  import Icon from './components/Icon';
15
18
  import Progress from './components/Progress';
19
+ import Spinner from './components/Spinner';
20
+ import Radio from './components/Radio';
21
+ import SectionHeading from './components/SectionHeading';
22
+ import Select from './components/Select';
23
+ import Switch from './components/Switch';
16
24
  import Tabs from './components/Tabs';
17
25
  import Tag from './components/Tag';
26
+ import TextInput from './components/TextInput';
18
27
  import Typography from './components/Typography';
19
28
 
20
29
  export {
@@ -23,19 +32,28 @@ export {
23
32
  useTheme,
24
33
  scale,
25
34
  ThemeProvider,
35
+ Alert,
26
36
  Avatar,
27
37
  Badge,
28
38
  BottomNavigation,
39
+ BottomSheet,
29
40
  Button,
30
41
  Card,
31
42
  Collapse,
43
+ ContentNavigator,
32
44
  Divider,
33
45
  Drawer,
34
46
  FAB,
35
47
  Icon,
36
48
  Progress,
49
+ Spinner,
50
+ Radio,
51
+ SectionHeading,
52
+ Select,
53
+ Switch,
37
54
  Tabs,
38
55
  Tag,
56
+ TextInput,
39
57
  Typography,
40
58
  };
41
59
 
@@ -3,6 +3,27 @@
3
3
  exports[`theme returns correct theme object 1`] = `
4
4
  Object {
5
5
  "__hd__": Object {
6
+ "alert": Object {
7
+ "borderWidths": Object {
8
+ "base": 1,
9
+ },
10
+ "colors": Object {
11
+ "divider": "#fafbfb",
12
+ "error": "#de350b",
13
+ "info": "#1dbeee",
14
+ "success": "#01b39c",
15
+ "warning": "#ffa234",
16
+ },
17
+ "radii": Object {
18
+ "default": 16,
19
+ },
20
+ "sizes": Object {
21
+ "height": 48,
22
+ },
23
+ "space": Object {
24
+ "padding": 16,
25
+ },
26
+ },
6
27
  "avatar": Object {
7
28
  "borderWidths": Object {
8
29
  "default": 1,
@@ -81,6 +102,33 @@ Object {
81
102
  "titleMarginTop": 4,
82
103
  },
83
104
  },
105
+ "bottomSheet": Object {
106
+ "colors": Object {
107
+ "backdrop": "#292a2b",
108
+ "background": "#ffffff",
109
+ "shadow": "#292a2b",
110
+ },
111
+ "radii": Object {
112
+ "default": 16,
113
+ },
114
+ "shadows": Object {
115
+ "elevation": 10,
116
+ "offset": Object {
117
+ "height": 3,
118
+ "width": 0,
119
+ },
120
+ "opacity": 0.27,
121
+ "radius": 4.65,
122
+ },
123
+ "sizes": Object {
124
+ "closeIconWidth": 72,
125
+ "sectionHeight": 64,
126
+ },
127
+ "space": Object {
128
+ "horizontalPadding": 24,
129
+ "verticalPadding": 8,
130
+ },
131
+ },
84
132
  "button": Object {
85
133
  "borderWidth": Object {
86
134
  "default": 2,
@@ -124,6 +172,11 @@ Object {
124
172
  "default": 12,
125
173
  },
126
174
  },
175
+ "contentNavigator": Object {
176
+ "space": Object {
177
+ "valueHorizontalPadding": 8,
178
+ },
179
+ },
127
180
  "divider": Object {
128
181
  "borderWidths": Object {
129
182
  "default": 1,
@@ -210,6 +263,7 @@ Object {
210
263
  "icon": Object {
211
264
  "colors": Object {
212
265
  "danger": "#de350b",
266
+ "disabledText": "#8b8d92",
213
267
  "info": "#4568fb",
214
268
  "primary": "#7622d7",
215
269
  "success": "#01b39c",
@@ -243,6 +297,98 @@ Object {
243
297
  "strokeWidth": 8,
244
298
  },
245
299
  },
300
+ "radio": Object {
301
+ "borderWidths": Object {
302
+ "circle": 2,
303
+ },
304
+ "colors": Object {
305
+ "checkedCircle": "#7622d7",
306
+ "checkedWrapper": "#f1e9fb",
307
+ "circle": "#000000",
308
+ "wrapper": "#ffffff",
309
+ },
310
+ "radii": Object {
311
+ "wrapper": 4,
312
+ },
313
+ "sizes": Object {
314
+ "circle": 20,
315
+ "innerCircle": 10,
316
+ },
317
+ "space": Object {
318
+ "circleLeftMargin": 8,
319
+ "groupTopMargin": 4,
320
+ "wrapperPadding": 16,
321
+ },
322
+ },
323
+ "sectionHeading": Object {
324
+ "colors": Object {
325
+ "background": "#dadbde",
326
+ },
327
+ "space": Object {
328
+ "headingHorizontalPadding": 16,
329
+ "headingMarginBottom": 16,
330
+ "headingVerticalPadding": 8,
331
+ "iconMarginRight": 8,
332
+ },
333
+ },
334
+ "select": Object {
335
+ "colors": Object {
336
+ "checkedOption": "#f1e9fb",
337
+ "footerText": "#7622d7",
338
+ "option": "#ffffff",
339
+ },
340
+ "radii": Object {
341
+ "option": 4,
342
+ },
343
+ "space": Object {
344
+ "optionListPadding": 16,
345
+ "optionListSpacing": 4,
346
+ "optionPadding": 16,
347
+ },
348
+ },
349
+ "spinner": Object {
350
+ "color": Object {
351
+ "default": "#7622d7",
352
+ },
353
+ "radii": Object {
354
+ "default": 8,
355
+ },
356
+ "space": Object {
357
+ "spinnerDot": 16,
358
+ "spinnerDotPadding": 8,
359
+ "spinnerTextPaddingTop": 8,
360
+ },
361
+ },
362
+ "switch": Object {
363
+ "borderWidths": Object {
364
+ "default": 1,
365
+ },
366
+ "colors": Object {
367
+ "active": "#7622d7",
368
+ "inactive": "#727478",
369
+ "thumb": "#ffffff",
370
+ },
371
+ "heights": Object {
372
+ "medium": 28.799999999999997,
373
+ "small": 24,
374
+ },
375
+ "radii": Object {
376
+ "rounded": 999,
377
+ },
378
+ "spaces": Object {
379
+ "inactive": 0,
380
+ "medium": 4,
381
+ "small": 4,
382
+ },
383
+ "thumbSizes": Object {
384
+ "medium": 20.8,
385
+ "small": 16,
386
+ },
387
+ "widths": Object {
388
+ "medium": 56,
389
+ "small": 48,
390
+ },
391
+ },
246
392
  "tabs": Object {
247
393
  "borderWidths": Object {
248
394
  "headerBottom": 1,
@@ -296,6 +442,28 @@ Object {
296
442
  "verticalPadding": 2,
297
443
  },
298
444
  },
445
+ "textInput": Object {
446
+ "borderWidths": Object {
447
+ "container": 1,
448
+ },
449
+ "colors": Object {
450
+ "border": "#292a2b",
451
+ "labelBackground": "#ffffff",
452
+ },
453
+ "fontSizes": Object {
454
+ "text": 16,
455
+ },
456
+ "radii": Object {
457
+ "container": 8,
458
+ },
459
+ "space": Object {
460
+ "containerPadding": 16,
461
+ "inputHorizontalMargin": 8,
462
+ "labelHorizontalPadding": 4,
463
+ "labelLeft": 16,
464
+ "labelTop": -10,
465
+ },
466
+ },
299
467
  "typography": Object {
300
468
  "colors": Object {
301
469
  "body": "#292a2b",
@@ -323,19 +491,23 @@ Object {
323
491
  },
324
492
  "borderWidths": Object {
325
493
  "base": 1,
494
+ "medium": 2,
326
495
  },
327
496
  "colors": Object {
328
497
  "archived": "#ccced1",
329
498
  "backgroundDark": "#292a2b",
330
499
  "backgroundLight": "#fafbfb",
500
+ "black": "#000000",
331
501
  "danger": "#de350b",
332
502
  "dangerBackground": "#fcebe7",
333
503
  "dangerLight": "#f2ae9d",
334
504
  "disabledLightText": "#ccced1",
335
505
  "disabledText": "#8b8d92",
506
+ "inactiveBackground": "#727478",
336
507
  "info": "#4568fb",
337
508
  "infoBackground": "#ecf0ff",
338
509
  "infoLight": "#d1d9fe",
510
+ "infoMediumLight": "#1dbeee",
339
511
  "invertedText": "#ffffff",
340
512
  "outline": "#dadbde",
341
513
  "platformBackground": "#ffffff",
@@ -382,8 +554,10 @@ Object {
382
554
  },
383
555
  "radii": Object {
384
556
  "base": 4,
557
+ "large": 12,
385
558
  "medium": 8,
386
559
  "rounded": 999,
560
+ "xlarge": 16,
387
561
  },
388
562
  "space": Object {
389
563
  "large": 24,
@@ -0,0 +1,32 @@
1
+ import { scale } from '../../utils/scale';
2
+ import { GlobalTheme } from '../global';
3
+
4
+ const getAlertTheme = (theme: GlobalTheme) => {
5
+ const colors = {
6
+ success: theme.colors.success,
7
+ warning: theme.colors.warning,
8
+ error: theme.colors.danger,
9
+ info: theme.colors.infoMediumLight,
10
+ divider: theme.colors.backgroundLight,
11
+ };
12
+
13
+ const sizes = {
14
+ height: scale(48),
15
+ };
16
+
17
+ const space = {
18
+ padding: theme.space.medium,
19
+ };
20
+
21
+ const radii = {
22
+ default: theme.radii.xlarge,
23
+ };
24
+
25
+ const borderWidths = {
26
+ base: theme.borderWidths.base,
27
+ };
28
+
29
+ return { colors, radii, sizes, space, borderWidths };
30
+ };
31
+
32
+ export default getAlertTheme;
@@ -0,0 +1,34 @@
1
+ import { GlobalTheme } from '../global';
2
+
3
+ const getBottomSheetTheme = (theme: GlobalTheme) => {
4
+ const colors = {
5
+ shadow: theme.colors.backgroundDark,
6
+ background: theme.colors.platformBackground,
7
+ backdrop: theme.colors.backgroundDark,
8
+ };
9
+
10
+ const sizes = {
11
+ sectionHeight: 64,
12
+ closeIconWidth: 72,
13
+ };
14
+
15
+ const space = {
16
+ horizontalPadding: theme.space.large,
17
+ verticalPadding: theme.space.small,
18
+ };
19
+
20
+ const shadows = {
21
+ offset: { width: 0, height: 3 },
22
+ opacity: 0.27,
23
+ radius: 4.65,
24
+ elevation: 10,
25
+ };
26
+
27
+ const radii = {
28
+ default: theme.radii.xlarge,
29
+ };
30
+
31
+ return { colors, shadows, radii, sizes, space };
32
+ };
33
+
34
+ export default getBottomSheetTheme;