@hero-design/rn 7.3.1 → 7.5.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 (302) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +5630 -4565
  4. package/lib/assets/fonts/hero-icons.ttf +0 -0
  5. package/lib/index.js +5636 -4564
  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/src/Alert.tsx +80 -0
  43. package/playground/{index.tsx → src/App.tsx} +63 -29
  44. package/playground/{components → src}/Avatar.tsx +1 -1
  45. package/playground/{components → src}/Badge.tsx +1 -1
  46. package/playground/{components → src}/BottomNavigation.tsx +1 -1
  47. package/playground/src/BottomSheet.tsx +43 -0
  48. package/playground/{components → src}/Button.tsx +1 -1
  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/src/MultipleThemes.tsx +34 -0
  58. package/playground/{components → src}/Progress.tsx +1 -1
  59. package/playground/src/Radio.tsx +25 -0
  60. package/playground/src/SectionHeading.tsx +68 -0
  61. package/playground/src/Spinner.tsx +19 -0
  62. package/playground/{components → src}/Tabs.tsx +1 -1
  63. package/playground/{components → src}/Tag.tsx +1 -1
  64. package/playground/src/TextInput.tsx +14 -0
  65. package/playground/{components → src}/Typography.tsx +1 -1
  66. package/playground/src/emotion.d.ts +7 -0
  67. package/playground/tsconfig.json +21 -0
  68. package/src/components/Alert/StyledAlert.tsx +48 -0
  69. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +686 -0
  70. package/src/components/Alert/__tests__/index.spec.tsx +83 -0
  71. package/src/components/Alert/index.tsx +109 -0
  72. package/src/components/BottomSheet/Footer.tsx +19 -0
  73. package/src/components/BottomSheet/Header.tsx +49 -0
  74. package/src/components/BottomSheet/StyledBottomSheet.tsx +75 -0
  75. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +531 -0
  76. package/src/components/BottomSheet/__tests__/index.spec.tsx +107 -0
  77. package/src/components/BottomSheet/index.tsx +171 -0
  78. package/src/components/Button/IconButton.tsx +11 -1
  79. package/src/components/Card/index.tsx +1 -1
  80. package/src/components/Collapse/StyledCollapse.tsx +11 -2
  81. package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +36 -31
  82. package/src/components/Collapse/__tests__/index.spec.tsx +1 -13
  83. package/src/components/Collapse/index.tsx +20 -50
  84. package/src/components/ContentNavigator/StyledContentNavigator.tsx +15 -0
  85. package/src/components/ContentNavigator/__tests__/StyledContentNavigator.spec.tsx +19 -0
  86. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +43 -0
  87. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +217 -0
  88. package/src/components/ContentNavigator/__tests__/index.spec.tsx +74 -0
  89. package/src/components/ContentNavigator/index.tsx +65 -0
  90. package/src/components/Icon/HeroIcon/index.tsx +13 -2
  91. package/src/components/Icon/HeroIcon/selection.json +1 -1
  92. package/src/components/Icon/IconList.ts +8 -0
  93. package/src/components/Icon/index.tsx +8 -1
  94. package/src/components/Radio/Radio.tsx +51 -0
  95. package/src/components/Radio/RadioGroup.tsx +50 -0
  96. package/src/components/Radio/StyledRadio.tsx +42 -0
  97. package/src/components/Radio/__tests__/Radio.spec.tsx +38 -0
  98. package/src/components/Radio/__tests__/RadioGroup.spec.tsx +36 -0
  99. package/src/components/Radio/__tests__/StyledRadio.spec.tsx +43 -0
  100. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +160 -0
  101. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +248 -0
  102. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +124 -0
  103. package/src/components/Radio/index.tsx +5 -0
  104. package/src/components/SectionHeading/StyledHeading.tsx +24 -0
  105. package/src/components/SectionHeading/__tests__/StyledHeading.tsx +28 -0
  106. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.tsx.snap +48 -0
  107. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +208 -0
  108. package/src/components/SectionHeading/__tests__/index.spec.tsx +39 -0
  109. package/src/components/SectionHeading/index.tsx +93 -0
  110. package/src/components/Spinner/AnimatedSpinner.tsx +55 -0
  111. package/src/components/Spinner/StyledSpinner.tsx +59 -0
  112. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +11 -0
  113. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +56 -0
  114. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +118 -0
  115. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +235 -0
  116. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +141 -0
  117. package/src/components/Spinner/__tests__/index.spec.tsx +12 -0
  118. package/src/components/Spinner/index.tsx +22 -0
  119. package/src/components/TextInput/StyledTextInput.tsx +34 -0
  120. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +33 -0
  121. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +88 -0
  122. package/src/components/TextInput/__tests__/index.spec.tsx +16 -0
  123. package/src/components/TextInput/index.tsx +61 -0
  124. package/src/index.ts +14 -0
  125. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +117 -0
  126. package/src/theme/components/alert.ts +32 -0
  127. package/src/theme/components/bottomSheet.ts +34 -0
  128. package/src/theme/components/contentNavigator.ts +11 -0
  129. package/src/theme/components/icon.ts +1 -0
  130. package/src/theme/components/radio.ts +34 -0
  131. package/src/theme/components/spinner.ts +21 -0
  132. package/src/theme/components/textInput.ts +32 -0
  133. package/src/theme/global/borders.ts +6 -0
  134. package/src/theme/global/colors.ts +2 -0
  135. package/src/theme/index.ts +25 -7
  136. package/tsconfig.json +11 -3
  137. package/types/components/Alert/StyledAlert.d.ts +37 -0
  138. package/types/{src/components/Avatar → components/Alert}/__tests__/index.spec.d.ts +0 -0
  139. package/types/components/Alert/index.d.ts +42 -0
  140. package/types/{src/components → components}/Avatar/StyledAvatar.d.ts +0 -1
  141. package/types/{src/components → components}/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -0
  142. package/types/{src/components/BottomNavigation → components/Avatar}/__tests__/index.spec.d.ts +0 -0
  143. package/types/{src/components → components}/Avatar/index.d.ts +0 -0
  144. package/types/{src/components → components}/Badge/Status.d.ts +0 -0
  145. package/types/{src/components → components}/Badge/StyledBadge.d.ts +0 -1
  146. package/types/{src/components → components}/Badge/__tests__/Badge.spec.d.ts +0 -0
  147. package/types/{src/components → components}/Badge/__tests__/Status.spec.d.ts +0 -0
  148. package/types/{src/components → components}/Badge/index.d.ts +0 -0
  149. package/types/{src/components → components}/BottomNavigation/StyledBottomNavigation.d.ts +0 -1
  150. package/types/{src/components/Button/LoadingIndicator → components/BottomNavigation}/__tests__/index.spec.d.ts +0 -0
  151. package/types/{src/components → components}/BottomNavigation/index.d.ts +0 -0
  152. package/types/components/BottomSheet/Footer.d.ts +6 -0
  153. package/types/components/BottomSheet/Header.d.ts +8 -0
  154. package/types/components/BottomSheet/StyledBottomSheet.d.ts +46 -0
  155. package/types/{src/components/Button → components/BottomSheet}/__tests__/index.spec.d.ts +0 -0
  156. package/types/components/BottomSheet/index.d.ts +51 -0
  157. package/types/{src/components → components}/Button/Button.d.ts +0 -0
  158. package/types/{src/components → components}/Button/IconButton.d.ts +5 -1
  159. package/types/{src/components → components}/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -1
  160. package/types/{src/components → components}/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -0
  161. package/types/{src/components/Card → components/Button/LoadingIndicator}/__tests__/index.spec.d.ts +0 -0
  162. package/types/{src/components → components}/Button/LoadingIndicator/index.d.ts +0 -0
  163. package/types/{src/components → components}/Button/StyledButton.d.ts +0 -1
  164. package/types/{src/components → components}/Button/__tests__/Button.spec.d.ts +0 -0
  165. package/types/{src/components → components}/Button/__tests__/IconButton.spec.d.ts +0 -0
  166. package/types/{src/components → components}/Button/__tests__/StyledButton.spec.d.ts +0 -0
  167. package/types/{src/components → components}/Button/index.d.ts +0 -0
  168. package/types/{src/components → components}/Card/StyledCard.d.ts +0 -1
  169. package/types/{src/components → components}/Card/__tests__/StyledCard.spec.d.ts +0 -0
  170. package/types/{src/components/Collapse → components/Card}/__tests__/index.spec.d.ts +0 -0
  171. package/types/{src/components → components}/Card/index.d.ts +0 -0
  172. package/types/{src/components → components}/Collapse/StyledCollapse.d.ts +12 -2
  173. package/types/{src/components → components}/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -0
  174. package/types/{src/components/Drawer → components/Collapse}/__tests__/index.spec.d.ts +0 -0
  175. package/types/{src/components → components}/Collapse/index.d.ts +1 -5
  176. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +12 -0
  177. package/types/{src/components/Divider/__tests__/StyledDivider.spec.d.ts → components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts} +0 -0
  178. package/types/{src/components/FAB → components/ContentNavigator}/__tests__/index.spec.d.ts +0 -0
  179. package/types/components/ContentNavigator/index.d.ts +33 -0
  180. package/types/{src/components → components}/Divider/StyledDivider.d.ts +0 -1
  181. package/types/{src/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts → components/Divider/__tests__/StyledDivider.spec.d.ts} +0 -0
  182. package/types/{src/components → components}/Divider/index.d.ts +0 -0
  183. package/types/{src/components → components}/Drawer/StyledDrawer.d.ts +0 -1
  184. package/types/{src/components/Icon → components/Drawer}/__tests__/index.spec.d.ts +0 -0
  185. package/types/{src/components → components}/Drawer/index.d.ts +0 -0
  186. package/types/{src/components → components}/FAB/ActionGroup/ActionItem.d.ts +0 -0
  187. package/types/{src/components → components}/FAB/ActionGroup/StyledActionGroup.d.ts +0 -1
  188. package/types/{src/components → components}/FAB/ActionGroup/StyledActionItem.d.ts +0 -1
  189. package/types/{src/components → components}/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -0
  190. package/types/{src/components → components}/FAB/ActionGroup/index.d.ts +0 -0
  191. package/types/{src/components → components}/FAB/AnimatedFABIcon.d.ts +0 -0
  192. package/types/{src/components → components}/FAB/FAB.d.ts +0 -0
  193. package/types/{src/components → components}/FAB/StyledFAB.d.ts +0 -1
  194. package/types/{src/components/FAB/__tests__/StyledFAB.spec.d.ts → components/FAB/__tests__/AnimatedFABIcon.spec.d.ts} +0 -0
  195. package/types/{src/components/Progress/__tests__/index.spec.d.ts → components/FAB/__tests__/StyledFAB.spec.d.ts} +0 -0
  196. package/types/{src/components/Tabs → components/FAB}/__tests__/index.spec.d.ts +0 -0
  197. package/types/{src/components → components}/FAB/index.d.ts +0 -0
  198. package/types/{src/components → components}/Icon/HeroIcon/index.d.ts +1 -2
  199. package/types/components/Icon/IconList.d.ts +2 -0
  200. package/types/{src/components/Typography/Text → components/Icon}/__tests__/index.spec.d.ts +0 -0
  201. package/types/{src/components → components}/Icon/index.d.ts +1 -1
  202. package/types/components/Icon/utils.d.ts +2 -0
  203. package/types/{src/components → components}/Progress/ProgressBar.d.ts +0 -0
  204. package/types/{src/components → components}/Progress/ProgressCircle.d.ts +0 -0
  205. package/types/{src/components → components}/Progress/StyledProgressBar.d.ts +0 -1
  206. package/types/{src/components → components}/Progress/StyledProgressCircle.d.ts +0 -1
  207. package/types/{src/theme → components/Progress}/__tests__/index.spec.d.ts +0 -0
  208. package/types/{src/components → components}/Progress/index.d.ts +0 -0
  209. package/types/{src/components → components}/Progress/types.d.ts +0 -0
  210. package/types/components/Radio/Radio.d.ts +26 -0
  211. package/types/components/Radio/RadioGroup.d.ts +29 -0
  212. package/types/components/Radio/StyledRadio.d.ts +30 -0
  213. package/types/{src/components/Tabs/__tests__/ScrollableTabs.spec.d.ts → components/Radio/__tests__/Radio.spec.d.ts} +0 -0
  214. package/types/{src/components/Tag/__tests__/Tag.spec.d.ts → components/Radio/__tests__/RadioGroup.spec.d.ts} +0 -0
  215. package/types/{src/components/Typography/Text/__tests__/StyledText.spec.d.ts → components/Radio/__tests__/StyledRadio.spec.d.ts} +0 -0
  216. package/types/components/Radio/index.d.ts +4 -0
  217. package/types/components/SectionHeading/StyledHeading.d.ts +20 -0
  218. package/types/{src/utils/__tests__/scale.spec.d.ts → components/SectionHeading/__tests__/StyledHeading.d.ts} +0 -0
  219. package/types/components/SectionHeading/__tests__/index.spec.d.ts +1 -0
  220. package/types/components/SectionHeading/index.d.ts +39 -0
  221. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -0
  222. package/types/components/Spinner/StyledSpinner.d.ts +30 -0
  223. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +1 -0
  224. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +1 -0
  225. package/types/components/Spinner/__tests__/index.spec.d.ts +1 -0
  226. package/types/components/Spinner/index.d.ts +10 -0
  227. package/types/{src/components → components}/Tabs/ActiveTabIndicator.d.ts +0 -0
  228. package/types/{src/components → components}/Tabs/ScrollableTabs.d.ts +0 -0
  229. package/types/{src/components → components}/Tabs/StyledScrollableTabs.d.ts +0 -1
  230. package/types/{src/components → components}/Tabs/StyledTabs.d.ts +0 -1
  231. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +1 -0
  232. package/types/components/Tabs/__tests__/index.spec.d.ts +1 -0
  233. package/types/{src/components → components}/Tabs/index.d.ts +0 -0
  234. package/types/{src/components → components}/Tabs/utils.d.ts +0 -0
  235. package/types/{src/components → components}/Tag/StyledTag.d.ts +0 -1
  236. package/types/components/Tag/__tests__/Tag.spec.d.ts +1 -0
  237. package/types/{src/components → components}/Tag/index.d.ts +0 -0
  238. package/types/components/TextInput/StyledTextInput.d.ts +22 -0
  239. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +1 -0
  240. package/types/components/TextInput/__tests__/index.spec.d.ts +1 -0
  241. package/types/components/TextInput/index.d.ts +26 -0
  242. package/types/{src/components → components}/Typography/Text/StyledText.d.ts +0 -1
  243. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +1 -0
  244. package/types/components/Typography/Text/__tests__/index.spec.d.ts +1 -0
  245. package/types/{src/components → components}/Typography/Text/index.d.ts +0 -0
  246. package/types/{src/components → components}/Typography/index.d.ts +0 -0
  247. package/types/{src/index.d.ts → index.d.ts} +8 -1
  248. package/types/{src/testHelpers → testHelpers}/renderWithTheme.d.ts +0 -0
  249. package/types/theme/__tests__/index.spec.d.ts +1 -0
  250. package/types/theme/components/alert.d.ts +23 -0
  251. package/types/{src/theme → theme}/components/avatar.d.ts +0 -0
  252. package/types/{src/theme → theme}/components/badge.d.ts +0 -0
  253. package/types/{src/theme → theme}/components/bottomNavigation.d.ts +0 -0
  254. package/types/theme/components/bottomSheet.d.ts +29 -0
  255. package/types/{src/theme → theme}/components/button.d.ts +0 -0
  256. package/types/{src/theme → theme}/components/card.d.ts +0 -0
  257. package/types/theme/components/contentNavigator.d.ts +7 -0
  258. package/types/{src/theme → theme}/components/divider.d.ts +0 -0
  259. package/types/{src/theme → theme}/components/drawer.d.ts +0 -0
  260. package/types/{src/theme → theme}/components/fab.d.ts +0 -0
  261. package/types/{src/theme → theme}/components/icon.d.ts +1 -0
  262. package/types/{src/theme → theme}/components/progress.d.ts +0 -0
  263. package/types/theme/components/radio.d.ts +25 -0
  264. package/types/theme/components/spinner.d.ts +15 -0
  265. package/types/{src/theme → theme}/components/tabs.d.ts +0 -0
  266. package/types/{src/theme → theme}/components/tag.d.ts +0 -0
  267. package/types/theme/components/textInput.d.ts +24 -0
  268. package/types/{src/theme → theme}/components/typography.d.ts +0 -0
  269. package/types/{src/theme → theme}/global/borders.d.ts +3 -0
  270. package/types/{src/theme → theme}/global/colors.d.ts +2 -0
  271. package/types/{src/theme → theme}/global/index.d.ts +2 -0
  272. package/types/{src/theme → theme}/global/scale.d.ts +0 -0
  273. package/types/{src/theme → theme}/global/space.d.ts +0 -0
  274. package/types/{src/theme → theme}/global/typography.d.ts +0 -0
  275. package/types/{src/theme → theme}/index.d.ts +17 -5
  276. package/types/{src/types.d.ts → types.d.ts} +0 -0
  277. package/types/utils/__tests__/scale.spec.d.ts +1 -0
  278. package/types/{src/utils → utils}/helpers.d.ts +0 -0
  279. package/types/{src/utils → utils}/hooks.d.ts +0 -0
  280. package/types/{src/utils → utils}/scale.d.ts +0 -0
  281. package/.turbo/turbo-build:types.log +0 -2
  282. package/.turbo/turbo-test.log +0 -131
  283. package/.turbo/turbo-type-check.log +0 -7
  284. package/app.json +0 -8
  285. package/types/playground/components/Avatar.d.ts +0 -2
  286. package/types/playground/components/Badge.d.ts +0 -2
  287. package/types/playground/components/BottomNavigation.d.ts +0 -2
  288. package/types/playground/components/Button.d.ts +0 -2
  289. package/types/playground/components/Card.d.ts +0 -2
  290. package/types/playground/components/Collapse.d.ts +0 -2
  291. package/types/playground/components/Divider.d.ts +0 -2
  292. package/types/playground/components/Drawer.d.ts +0 -2
  293. package/types/playground/components/FAB.d.ts +0 -2
  294. package/types/playground/components/Icon.d.ts +0 -2
  295. package/types/playground/components/IconButton.d.ts +0 -2
  296. package/types/playground/components/Progress.d.ts +0 -2
  297. package/types/playground/components/Tabs.d.ts +0 -2
  298. package/types/playground/components/Tag.d.ts +0 -2
  299. package/types/playground/components/Typography.d.ts +0 -2
  300. package/types/playground/index.d.ts +0 -2
  301. package/types/src/components/Icon/IconList.d.ts +0 -2
  302. package/types/src/components/Icon/utils.d.ts +0 -2
@@ -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;
@@ -0,0 +1,11 @@
1
+ import { GlobalTheme } from '../global';
2
+
3
+ const getContentNavigatorTheme = (theme: GlobalTheme) => {
4
+ const space = {
5
+ valueHorizontalPadding: theme.space.small,
6
+ };
7
+
8
+ return { space };
9
+ };
10
+
11
+ export default getContentNavigatorTheme;
@@ -8,6 +8,7 @@ const getIconTheme = (theme: GlobalTheme) => {
8
8
  danger: theme.colors.danger,
9
9
  success: theme.colors.success,
10
10
  warning: theme.colors.warning,
11
+ disabledText: theme.colors.disabledText,
11
12
  };
12
13
 
13
14
  const sizes = {
@@ -0,0 +1,34 @@
1
+ import { scale } from '../../utils/scale';
2
+ import { GlobalTheme } from '../global';
3
+
4
+ const getRadioTheme = (theme: GlobalTheme) => {
5
+ const colors = {
6
+ circle: theme.colors.black,
7
+ checkedCircle: theme.colors.primary,
8
+ wrapper: theme.colors.platformBackground,
9
+ checkedWrapper: theme.colors.primaryBackground,
10
+ };
11
+
12
+ const space = {
13
+ wrapperPadding: theme.space.medium, // left padding should be 12 according to the design
14
+ circleLeftMargin: theme.space.small,
15
+ groupTopMargin: theme.space.xsmall,
16
+ };
17
+
18
+ const sizes = {
19
+ circle: scale(20),
20
+ innerCircle: scale(10),
21
+ };
22
+
23
+ const borderWidths = {
24
+ circle: theme.borderWidths.medium,
25
+ };
26
+
27
+ const radii = {
28
+ wrapper: theme.radii.base,
29
+ };
30
+
31
+ return { sizes, borderWidths, space, colors, radii };
32
+ };
33
+
34
+ export default getRadioTheme;
@@ -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 };
@@ -8,6 +8,7 @@ const systemPalette = {
8
8
  secondary: palette.dodgerBlue,
9
9
  secondaryLight: palette.dodgerBlueLight75,
10
10
  info: palette.dodgerBlue,
11
+ infoMediumLight: palette.blue,
11
12
  infoLight: palette.dodgerBlueLight75,
12
13
  infoBackground: palette.dodgerBlueLight90,
13
14
  success: palette.green,
@@ -28,6 +29,7 @@ const systemPalette = {
28
29
  invertedText: palette.white,
29
30
  outline: palette.greyLight60,
30
31
  archived: palette.greyLight45,
32
+ black: palette.black,
31
33
  };
32
34
 
33
35
  type SystemPalette = typeof systemPalette;
@@ -7,35 +7,47 @@ import {
7
7
  defaultSystemPalette,
8
8
  } from './global';
9
9
 
10
+ import getAlertTheme from './components/alert';
11
+ import getAvatarTheme from './components/avatar';
10
12
  import getBadgeTheme from './components/badge';
11
13
  import getBottomNavigationTheme from './components/bottomNavigation';
14
+ import getBottomSheetTheme from './components/bottomSheet';
12
15
  import getButtonTheme from './components/button';
13
16
  import getCardTheme from './components/card';
17
+ import getContentNavigatorTheme from './components/contentNavigator';
14
18
  import getDividerTheme from './components/divider';
15
19
  import getDrawerTheme from './components/drawer';
16
- import getTabsTheme from './components/tabs';
17
- import getTagTheme from './components/tag';
20
+ import getFABTheme from './components/fab';
18
21
  import getIconTheme from './components/icon';
19
22
  import getProgressTheme from './components/progress';
23
+ import getSpinnerTheme from './components/spinner';
24
+ import getRadioTheme from './components/radio';
25
+ import getTabsTheme from './components/tabs';
26
+ import getTagTheme from './components/tag';
27
+ import getTextInputTheme from './components/textInput';
20
28
  import getTypographyTheme from './components/typography';
21
- import getFABTheme from './components/fab';
22
- import getAvatarTheme from './components/avatar';
23
29
 
24
30
  type Theme = GlobalTheme & {
25
31
  __hd__: {
32
+ alert: ReturnType<typeof getAlertTheme>;
26
33
  avatar: ReturnType<typeof getAvatarTheme>;
27
34
  badge: ReturnType<typeof getBadgeTheme>;
28
35
  bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
36
+ bottomSheet: ReturnType<typeof getBottomSheetTheme>;
29
37
  button: ReturnType<typeof getButtonTheme>;
30
38
  card: ReturnType<typeof getCardTheme>;
39
+ contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
31
40
  divider: ReturnType<typeof getDividerTheme>;
32
41
  drawer: ReturnType<typeof getDrawerTheme>;
42
+ fab: ReturnType<typeof getFABTheme>;
33
43
  icon: ReturnType<typeof getIconTheme>;
34
44
  progress: ReturnType<typeof getProgressTheme>;
45
+ spinner: ReturnType<typeof getSpinnerTheme>;
46
+ radio: ReturnType<typeof getRadioTheme>;
35
47
  tabs: ReturnType<typeof getTabsTheme>;
36
48
  tag: ReturnType<typeof getTagTheme>;
49
+ textInput: ReturnType<typeof getTextInputTheme>;
37
50
  typography: ReturnType<typeof getTypographyTheme>;
38
- fab: ReturnType<typeof getFABTheme>;
39
51
  };
40
52
  };
41
53
 
@@ -48,18 +60,24 @@ const getTheme = (
48
60
  ...globalTheme,
49
61
  __hd__: {
50
62
  avatar: getAvatarTheme(globalTheme),
63
+ alert: getAlertTheme(globalTheme),
51
64
  badge: getBadgeTheme(globalTheme),
52
65
  bottomNavigation: getBottomNavigationTheme(globalTheme),
66
+ bottomSheet: getBottomSheetTheme(globalTheme),
53
67
  button: getButtonTheme(globalTheme),
54
68
  card: getCardTheme(globalTheme),
69
+ contentNavigator: getContentNavigatorTheme(globalTheme),
55
70
  divider: getDividerTheme(globalTheme),
56
71
  drawer: getDrawerTheme(globalTheme),
57
- progress: getProgressTheme(globalTheme),
72
+ fab: getFABTheme(globalTheme),
58
73
  icon: getIconTheme(globalTheme),
74
+ spinner: getSpinnerTheme(globalTheme),
75
+ progress: getProgressTheme(globalTheme),
76
+ radio: getRadioTheme(globalTheme),
59
77
  tabs: getTabsTheme(globalTheme),
60
78
  tag: getTagTheme(globalTheme),
79
+ textInput: getTextInputTheme(globalTheme),
61
80
  typography: getTypographyTheme(globalTheme),
62
- fab: getFABTheme(globalTheme),
63
81
  },
64
82
  };
65
83
  };
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,37 @@
1
+ import { TouchableOpacity, View, ViewProps } from 'react-native';
2
+ declare const Container: import("@emotion/native").StyledComponent<ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ themeVariant: 'default' | 'round';
7
+ themeIntent: 'success' | 'info' | 'warning' | 'error';
8
+ }, {}, {
9
+ ref?: import("react").Ref<View> | undefined;
10
+ }>;
11
+ declare const IconContainer: import("@emotion/native").StyledComponent<ViewProps & {
12
+ theme?: import("@emotion/react").Theme | undefined;
13
+ as?: import("react").ElementType<any> | undefined;
14
+ }, {}, {
15
+ ref?: import("react").Ref<View> | undefined;
16
+ }>;
17
+ declare const TextContainer: import("@emotion/native").StyledComponent<ViewProps & {
18
+ theme?: import("@emotion/react").Theme | undefined;
19
+ as?: import("react").ElementType<any> | undefined;
20
+ }, {}, {
21
+ ref?: import("react").Ref<View> | undefined;
22
+ }>;
23
+ declare const ContentContainer: import("@emotion/native").StyledComponent<ViewProps & {
24
+ theme?: import("@emotion/react").Theme | undefined;
25
+ as?: import("react").ElementType<any> | undefined;
26
+ } & {
27
+ showDivider: boolean;
28
+ }, {}, {
29
+ ref?: import("react").Ref<View> | undefined;
30
+ }>;
31
+ declare const CTAWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
32
+ theme?: import("@emotion/react").Theme | undefined;
33
+ as?: import("react").ElementType<any> | undefined;
34
+ }, {}, {
35
+ ref?: import("react").Ref<TouchableOpacity> | undefined;
36
+ }>;
37
+ export { Container, ContentContainer, TextContainer, IconContainer, CTAWrapper, };
@@ -0,0 +1,42 @@
1
+ import { ReactElement } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { IconName } from '../Icon';
4
+ interface AlertProps {
5
+ /**
6
+ * Alert title.
7
+ */
8
+ title?: string | ReactElement;
9
+ /**
10
+ * Alert content.
11
+ */
12
+ content: string | ReactElement;
13
+ /**
14
+ * Icon name of the alert.
15
+ * - undefined: use default icon according to Alert intent.
16
+ * - null: no icon at all.
17
+ * - IconName: an icon identifier from hero-design icon list.
18
+ */
19
+ icon?: null | IconName;
20
+ /**
21
+ * Visual intent color to apply to alert.
22
+ */
23
+ intent?: 'success' | 'info' | 'warning' | 'error';
24
+ /**
25
+ * Closing callback. When onClose is available, an X button will be rendered on the right side of alert. The callback will be called when user clicks on X button.
26
+ */
27
+ onClose?: () => void;
28
+ /**
29
+ * Use rounded variant.
30
+ */
31
+ variant?: 'default' | 'round';
32
+ /**
33
+ * Addtional style.
34
+ */
35
+ style?: StyleProp<ViewStyle>;
36
+ /**
37
+ * Testing id of the component.
38
+ */
39
+ testID?: string;
40
+ }
41
+ declare const Alert: ({ content, icon, title, intent, onClose, variant, style, testID, }: AlertProps) => JSX.Element;
42
+ export default Alert;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View, Image, TouchableOpacity, Text } from 'react-native';
3
2
  declare type ThemeSize = 'small' | 'medium' | 'large' | 'xlarge';
4
3
  declare type ThemeIntent = 'primary' | 'info' | 'danger' | 'success' | 'warning';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Animated, Text } from 'react-native';
3
2
  declare type ThemeIntent = 'success' | 'warning' | 'danger' | 'info' | 'archived';
4
3
  declare type ThemePadding = 'narrowContent' | 'wideContent';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View } from 'react-native';
3
2
  declare const BottomNavigationTab: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
3
  theme?: import("@emotion/react").Theme | undefined;
@@ -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;
@@ -9,6 +9,10 @@ export interface IconButtonProps {
9
9
  * Name of the Icon.
10
10
  */
11
11
  icon: IconName;
12
+ /**
13
+ * Disable state of button.
14
+ */
15
+ disabled?: boolean;
12
16
  /**
13
17
  * Intent of the Icon.
14
18
  */
@@ -30,5 +34,5 @@ export interface IconButtonProps {
30
34
  */
31
35
  testID?: string;
32
36
  }
33
- declare const IconButton: ({ hitSlop, onPress, icon, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
37
+ declare const IconButton: ({ hitSlop, onPress, icon, disabled, testID, style, size, intent, }: IconButtonProps) => JSX.Element;
34
38
  export default IconButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View, ViewProps } from 'react-native';
3
2
  import { Theme } from '@emotion/react';
4
3
  declare type ThemeVariant = 'basic-transparent' | 'filled-primary' | 'filled-secondary' | 'outlined-primary' | 'outlined-secondary';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View } from 'react-native';
3
2
  import { Theme } from '@emotion/react';
4
3
  declare type Intent = 'primary' | 'secondary';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { View } from 'react-native';
3
2
  declare const StyledCard: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
3
  theme?: import("@emotion/react").Theme | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Animated, View } from 'react-native';
3
2
  declare const StyledWrapper: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
4
3
  children?: import("react").ReactNode;
@@ -6,10 +5,21 @@ declare const StyledWrapper: import("@emotion/native").StyledComponent<Animated.
6
5
  theme?: import("@emotion/react").Theme | undefined;
7
6
  as?: import("react").ElementType<any> | undefined;
8
7
  }, {}, {}>;
8
+ /**
9
+ * Height need to be high enough to cover most scenario
10
+ * This container's purpose is only to help get correct children height and returns it
11
+ * to use with Animated.timing
12
+ */
13
+ declare const StyledHiddenWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ as?: import("react").ElementType<any> | undefined;
16
+ }, {}, {
17
+ ref?: import("react").Ref<View> | undefined;
18
+ }>;
9
19
  declare const StyledChildWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
10
20
  theme?: import("@emotion/react").Theme | undefined;
11
21
  as?: import("react").ElementType<any> | undefined;
12
22
  }, {}, {
13
23
  ref?: import("react").Ref<View> | undefined;
14
24
  }>;
15
- export { StyledWrapper, StyledChildWrapper };
25
+ export { StyledWrapper, StyledHiddenWrapper, StyledChildWrapper };