@hero-design/rn 7.18.1 → 7.20.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 (399) hide show
  1. package/.eslintrc.json +6 -1
  2. package/.turbo/turbo-build.log +2 -2
  3. package/es/index.js +726 -336
  4. package/lib/index.js +727 -336
  5. package/package.json +4 -4
  6. package/src/components/Accordion/AccordionItem.tsx +5 -4
  7. package/src/components/Accordion/__tests__/index.spec.tsx +2 -1
  8. package/src/components/Accordion/index.tsx +3 -2
  9. package/src/components/Alert/StyledAlert.tsx +8 -7
  10. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +140 -19
  11. package/src/components/Alert/__tests__/index.spec.tsx +21 -0
  12. package/src/components/Alert/index.tsx +18 -9
  13. package/src/components/Avatar/StyledAvatar.tsx +2 -1
  14. package/src/components/Avatar/index.tsx +4 -3
  15. package/src/components/Badge/Status.tsx +4 -2
  16. package/src/components/Badge/index.tsx +2 -1
  17. package/src/components/BottomNavigation/__tests__/index.spec.tsx +4 -2
  18. package/src/components/BottomNavigation/index.tsx +6 -8
  19. package/src/components/BottomSheet/Footer.tsx +2 -1
  20. package/src/components/BottomSheet/Header.tsx +2 -1
  21. package/src/components/BottomSheet/StyledBottomSheet.tsx +2 -2
  22. package/src/components/BottomSheet/index.tsx +4 -8
  23. package/src/components/Box/StyledBox.tsx +54 -0
  24. package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +605 -0
  25. package/src/components/Box/__tests__/helpers.spec.ts +14 -0
  26. package/src/components/Box/__tests__/index.spec.tsx +155 -0
  27. package/src/components/Box/config.ts +201 -0
  28. package/src/components/Box/helpers.ts +10 -0
  29. package/src/components/Box/index.tsx +13 -0
  30. package/src/components/Box/types.ts +38 -0
  31. package/src/components/Button/Button.tsx +5 -6
  32. package/src/components/Button/IconButton.tsx +4 -7
  33. package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +5 -3
  34. package/src/components/Button/LoadingIndicator/index.tsx +2 -8
  35. package/src/components/Button/StyledButton.tsx +4 -5
  36. package/src/components/Button/UtilityButton/index.tsx +5 -4
  37. package/src/components/Button/index.tsx +3 -2
  38. package/src/components/Calendar/StyledCalendar.tsx +2 -1
  39. package/src/components/Calendar/__tests__/index.spec.tsx +13 -17
  40. package/src/components/Card/DataCard/StyledDataCard.tsx +8 -2
  41. package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +1 -0
  42. package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +16 -0
  43. package/src/components/Card/DataCard/index.tsx +4 -3
  44. package/src/components/Card/StyledCard.tsx +12 -19
  45. package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +147 -0
  46. package/src/components/Card/__tests__/index.spec.tsx +18 -0
  47. package/src/components/Card/index.tsx +9 -3
  48. package/src/components/Checkbox/StyledCheckbox.tsx +44 -14
  49. package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +28 -3
  50. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +95 -9
  51. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +337 -23
  52. package/src/components/Checkbox/__tests__/index.spec.tsx +38 -7
  53. package/src/components/Checkbox/index.tsx +35 -18
  54. package/src/components/Collapse/index.tsx +4 -8
  55. package/src/components/ContentNavigator/index.tsx +1 -1
  56. package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
  57. package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
  58. package/src/components/DatePicker/StyledDatePicker.tsx +2 -1
  59. package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +1 -2
  60. package/src/components/DatePicker/index.tsx +1 -1
  61. package/src/components/DatePicker/types.ts +1 -1
  62. package/src/components/Divider/index.tsx +1 -1
  63. package/src/components/Drawer/DragableDrawer/helpers.ts +3 -4
  64. package/src/components/Drawer/DragableDrawer/index.tsx +3 -2
  65. package/src/components/Drawer/StyledDrawer.tsx +3 -2
  66. package/src/components/Drawer/index.tsx +2 -1
  67. package/src/components/Empty/index.tsx +1 -2
  68. package/src/components/FAB/ActionGroup/ActionItem.tsx +3 -2
  69. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +4 -3
  70. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +4 -2
  71. package/src/components/FAB/ActionGroup/index.tsx +11 -11
  72. package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
  73. package/src/components/FAB/FAB.tsx +2 -2
  74. package/src/components/FAB/StyledFAB.tsx +4 -7
  75. package/src/components/Icon/AnimatedIcon.tsx +2 -1
  76. package/src/components/Icon/index.tsx +1 -1
  77. package/src/components/List/BasicListItem.tsx +3 -3
  78. package/src/components/List/ListItem.tsx +6 -3
  79. package/src/components/List/StyledListItem.tsx +2 -1
  80. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +13 -27
  81. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -0
  82. package/src/components/PinInput/PinCell.tsx +1 -1
  83. package/src/components/PinInput/index.tsx +3 -7
  84. package/src/components/Progress/ProgressBar.tsx +2 -1
  85. package/src/components/Progress/ProgressCircle.tsx +3 -9
  86. package/src/components/Progress/StyledProgressBar.tsx +3 -3
  87. package/src/components/Progress/StyledProgressCircle.tsx +3 -3
  88. package/src/components/Radio/Radio.tsx +20 -14
  89. package/src/components/Radio/RadioGroup.tsx +5 -3
  90. package/src/components/Radio/StyledRadio.tsx +12 -29
  91. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +84 -50
  92. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +124 -73
  93. package/src/components/RichTextEditor/EditorToolbar.tsx +4 -8
  94. package/src/components/RichTextEditor/RichTextEditor.tsx +5 -14
  95. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -6
  96. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +2 -6
  97. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +8 -15
  98. package/src/components/RichTextEditor/index.tsx +6 -6
  99. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  100. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  101. package/src/components/SectionHeading/index.tsx +5 -4
  102. package/src/components/Select/MultiSelect/Option.tsx +2 -1
  103. package/src/components/Select/MultiSelect/OptionList.tsx +3 -3
  104. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
  105. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +609 -589
  106. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
  107. package/src/components/Select/MultiSelect/index.tsx +20 -16
  108. package/src/components/Select/SingleSelect/Option.tsx +2 -1
  109. package/src/components/Select/SingleSelect/OptionList.tsx +3 -3
  110. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
  111. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +606 -586
  112. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +1 -1
  113. package/src/components/Select/SingleSelect/index.tsx +20 -16
  114. package/src/components/Select/StyledOptionList.tsx +11 -9
  115. package/src/components/Select/helpers.tsx +1 -1
  116. package/src/components/Select/index.tsx +6 -4
  117. package/src/components/Select/types.ts +3 -3
  118. package/src/components/Spinner/AnimatedSpinner.tsx +7 -7
  119. package/src/components/Spinner/StyledSpinner.tsx +26 -20
  120. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +1 -1
  121. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +32 -16
  122. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +14 -12
  123. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +273 -31
  124. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +14 -12
  125. package/src/components/Spinner/index.tsx +13 -5
  126. package/src/components/Switch/StyledSwitch.tsx +10 -26
  127. package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +25 -0
  128. package/src/components/Switch/__tests__/__snapshots__/{StyledHeading.spec.tsx.snap → StyledSwitch.spec.tsx.snap} +45 -18
  129. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +26 -52
  130. package/src/components/Switch/index.tsx +23 -20
  131. package/src/components/Tabs/ScrollableTabs.tsx +10 -5
  132. package/src/components/Tabs/StyledScrollableTabs.tsx +6 -5
  133. package/src/components/Tabs/StyledTabs.tsx +6 -0
  134. package/src/components/Tabs/TabWithBadge.tsx +68 -0
  135. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +17 -2
  136. package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +48 -0
  137. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +205 -43
  138. package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +165 -0
  139. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +135 -34
  140. package/src/components/Tabs/__tests__/index.spec.tsx +16 -2
  141. package/src/components/Tabs/index.tsx +17 -16
  142. package/src/components/Tag/StyledTag.tsx +1 -11
  143. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +4 -4
  144. package/src/components/Tag/index.tsx +3 -3
  145. package/src/components/TextInput/__tests__/index.spec.tsx +10 -14
  146. package/src/components/TextInput/index.tsx +5 -5
  147. package/src/components/TimePicker/StyledTimePicker.tsx +2 -1
  148. package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
  149. package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
  150. package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +1 -2
  151. package/src/components/TimePicker/index.tsx +1 -1
  152. package/src/components/TimePicker/types.ts +1 -1
  153. package/src/components/Toast/StyledToast.tsx +16 -15
  154. package/src/components/Toast/Toast.tsx +36 -10
  155. package/src/components/Toast/ToastContainer.tsx +2 -2
  156. package/src/components/Toast/ToastContext.ts +1 -1
  157. package/src/components/Toast/ToastProvider.tsx +20 -19
  158. package/src/components/Toast/__tests__/Toast.spec.tsx +17 -0
  159. package/src/components/Toast/__tests__/ToastContainer.spec.tsx +1 -1
  160. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +299 -19
  161. package/src/components/Toast/types.ts +18 -4
  162. package/src/components/Toolbar/StyledToolbar.tsx +2 -1
  163. package/src/components/Toolbar/ToolbarGroup.tsx +2 -1
  164. package/src/components/Toolbar/ToolbarItem.tsx +2 -1
  165. package/src/components/Toolbar/index.tsx +2 -1
  166. package/src/components/Typography/Text/StyledText.tsx +7 -1
  167. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  168. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
  169. package/src/components/Typography/Text/index.tsx +10 -3
  170. package/src/index.ts +2 -0
  171. package/src/testHelpers/renderWithTheme.tsx +2 -1
  172. package/src/theme/ThemeProvider.ts +1 -1
  173. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +100 -49
  174. package/src/theme/components/.eslintrc.json +10 -0
  175. package/src/theme/components/accordion.ts +1 -1
  176. package/src/theme/components/alert.ts +6 -2
  177. package/src/theme/components/avatar.ts +3 -1
  178. package/src/theme/components/badge.ts +1 -1
  179. package/src/theme/components/bottomNavigation.ts +1 -1
  180. package/src/theme/components/bottomSheet.ts +1 -1
  181. package/src/theme/components/button.ts +1 -1
  182. package/src/theme/components/calendar.ts +1 -1
  183. package/src/theme/components/card.ts +7 -8
  184. package/src/theme/components/checkbox.ts +12 -8
  185. package/src/theme/components/contentNavigator.ts +1 -1
  186. package/src/theme/components/divider.ts +1 -1
  187. package/src/theme/components/drawer.ts +1 -1
  188. package/src/theme/components/empty.ts +1 -1
  189. package/src/theme/components/fab.ts +1 -1
  190. package/src/theme/components/icon.ts +1 -1
  191. package/src/theme/components/list.ts +5 -4
  192. package/src/theme/components/pinInput.ts +1 -1
  193. package/src/theme/components/progress.ts +1 -1
  194. package/src/theme/components/radio.ts +3 -11
  195. package/src/theme/components/richTextEditor.ts +1 -1
  196. package/src/theme/components/sectionHeading.ts +2 -2
  197. package/src/theme/components/select.ts +1 -1
  198. package/src/theme/components/spinner.ts +20 -8
  199. package/src/theme/components/switch.ts +7 -8
  200. package/src/theme/components/tabs.ts +4 -3
  201. package/src/theme/components/tag.ts +14 -14
  202. package/src/theme/components/textInput.ts +1 -1
  203. package/src/theme/components/toast.ts +18 -4
  204. package/src/theme/components/toolbar.ts +1 -1
  205. package/src/theme/components/typography.ts +3 -1
  206. package/src/theme/getTheme.ts +4 -11
  207. package/src/theme/global/borders.ts +2 -1
  208. package/src/theme/global/colors/swag.ts +25 -3
  209. package/src/theme/global/colors/types.ts +23 -0
  210. package/src/theme/global/colors/work.ts +6 -2
  211. package/src/theme/global/index.ts +6 -11
  212. package/src/theme/global/scale.ts +2 -1
  213. package/src/theme/global/space.ts +2 -1
  214. package/src/theme/global/typography.ts +2 -8
  215. package/src/theme/index.ts +5 -2
  216. package/src/types.ts +9 -10
  217. package/testUtils/setup.tsx +2 -0
  218. package/tsconfig.json +5 -21
  219. package/types/components/Accordion/AccordionItem.d.ts +3 -3
  220. package/types/components/Accordion/StyledAccordion.d.ts +14 -14
  221. package/types/components/Accordion/index.d.ts +3 -2
  222. package/types/components/Alert/StyledAlert.d.ts +18 -17
  223. package/types/components/Alert/index.d.ts +4 -4
  224. package/types/components/Avatar/StyledAvatar.d.ts +16 -16
  225. package/types/components/Avatar/index.d.ts +3 -3
  226. package/types/components/Badge/Status.d.ts +2 -2
  227. package/types/components/Badge/StyledBadge.d.ts +7 -7
  228. package/types/components/Badge/index.d.ts +2 -1
  229. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
  230. package/types/components/BottomNavigation/index.d.ts +3 -3
  231. package/types/components/BottomSheet/Footer.d.ts +1 -1
  232. package/types/components/BottomSheet/Header.d.ts +2 -2
  233. package/types/components/BottomSheet/StyledBottomSheet.d.ts +21 -20
  234. package/types/components/BottomSheet/index.d.ts +2 -2
  235. package/types/components/Box/StyledBox.d.ts +15 -0
  236. package/types/components/{Radio/__tests__/StyledRadio.spec.d.ts → Box/__tests__/helpers.spec.d.ts} +0 -0
  237. package/types/components/{Switch/__tests__/StyledHeading.spec.d.ts → Box/__tests__/index.spec.d.ts} +0 -0
  238. package/types/components/Box/config.d.ts +170 -0
  239. package/types/components/Box/helpers.d.ts +1 -0
  240. package/types/components/Box/index.d.ts +5 -0
  241. package/types/components/Box/types.d.ts +31 -0
  242. package/types/components/Button/Button.d.ts +4 -4
  243. package/types/components/Button/IconButton.d.ts +2 -2
  244. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +10 -9
  245. package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
  246. package/types/components/Button/StyledButton.d.ts +19 -18
  247. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
  248. package/types/components/Button/UtilityButton/index.d.ts +3 -3
  249. package/types/components/Button/index.d.ts +2 -2
  250. package/types/components/Calendar/StyledCalendar.d.ts +27 -26
  251. package/types/components/Calendar/helpers.d.ts +2 -2
  252. package/types/components/Card/DataCard/StyledDataCard.d.ts +7 -7
  253. package/types/components/Card/DataCard/index.d.ts +3 -3
  254. package/types/components/Card/StyledCard.d.ts +7 -6
  255. package/types/components/Card/index.d.ts +7 -3
  256. package/types/components/Checkbox/StyledCheckbox.d.ts +24 -6
  257. package/types/components/Checkbox/index.d.ts +11 -3
  258. package/types/components/Collapse/StyledCollapse.d.ts +8 -8
  259. package/types/components/Collapse/index.d.ts +2 -2
  260. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
  261. package/types/components/ContentNavigator/index.d.ts +1 -1
  262. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  263. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  264. package/types/components/DatePicker/StyledDatePicker.d.ts +5 -4
  265. package/types/components/DatePicker/index.d.ts +1 -1
  266. package/types/components/DatePicker/types.d.ts +1 -1
  267. package/types/components/Divider/StyledDivider.d.ts +5 -5
  268. package/types/components/Divider/index.d.ts +1 -1
  269. package/types/components/Drawer/DragableDrawer/index.d.ts +1 -1
  270. package/types/components/Drawer/StyledDrawer.d.ts +21 -20
  271. package/types/components/Drawer/index.d.ts +1 -1
  272. package/types/components/Empty/StyledEmpty.d.ts +12 -12
  273. package/types/components/Empty/index.d.ts +1 -1
  274. package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -2
  275. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +14 -13
  276. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +10 -9
  277. package/types/components/FAB/ActionGroup/index.d.ts +3 -3
  278. package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
  279. package/types/components/FAB/FAB.d.ts +2 -2
  280. package/types/components/FAB/StyledFAB.d.ts +11 -10
  281. package/types/components/Icon/AnimatedIcon.d.ts +1 -1
  282. package/types/components/Icon/HeroIcon/index.d.ts +3 -3
  283. package/types/components/Icon/index.d.ts +1 -1
  284. package/types/components/List/BasicListItem.d.ts +2 -2
  285. package/types/components/List/ListItem.d.ts +4 -3
  286. package/types/components/List/StyledBasicListItem.d.ts +14 -14
  287. package/types/components/List/StyledListItem.d.ts +23 -23
  288. package/types/components/PinInput/PinCell.d.ts +1 -1
  289. package/types/components/PinInput/StyledPinInput.d.ts +30 -30
  290. package/types/components/PinInput/index.d.ts +2 -2
  291. package/types/components/Progress/ProgressBar.d.ts +1 -1
  292. package/types/components/Progress/ProgressCircle.d.ts +1 -1
  293. package/types/components/Progress/StyledProgressBar.d.ts +8 -7
  294. package/types/components/Progress/StyledProgressCircle.d.ts +21 -20
  295. package/types/components/Radio/Radio.d.ts +2 -2
  296. package/types/components/Radio/RadioGroup.d.ts +3 -3
  297. package/types/components/Radio/StyledRadio.d.ts +11 -21
  298. package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
  299. package/types/components/RichTextEditor/MentionList.d.ts +1 -1
  300. package/types/components/RichTextEditor/RichTextEditor.d.ts +3 -2
  301. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
  302. package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
  303. package/types/components/RichTextEditor/index.d.ts +5 -4
  304. package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
  305. package/types/components/SectionHeading/index.d.ts +3 -3
  306. package/types/components/Select/MultiSelect/Option.d.ts +2 -2
  307. package/types/components/Select/MultiSelect/OptionList.d.ts +2 -2
  308. package/types/components/Select/MultiSelect/index.d.ts +1 -1
  309. package/types/components/Select/SingleSelect/Option.d.ts +2 -2
  310. package/types/components/Select/SingleSelect/OptionList.d.ts +2 -2
  311. package/types/components/Select/SingleSelect/index.d.ts +1 -1
  312. package/types/components/Select/StyledOptionList.d.ts +4 -4
  313. package/types/components/Select/StyledSelect.d.ts +11 -11
  314. package/types/components/Select/helpers.d.ts +2 -2
  315. package/types/components/Select/index.d.ts +4 -3
  316. package/types/components/Select/types.d.ts +3 -3
  317. package/types/components/Spinner/AnimatedSpinner.d.ts +3 -1
  318. package/types/components/Spinner/StyledSpinner.d.ts +16 -13
  319. package/types/components/Spinner/index.d.ts +7 -3
  320. package/types/components/Switch/StyledSwitch.d.ts +8 -23
  321. package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +1 -0
  322. package/types/components/Switch/index.d.ts +3 -2
  323. package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
  324. package/types/components/Tabs/StyledScrollableTabs.d.ts +24 -22
  325. package/types/components/Tabs/StyledTabs.d.ts +26 -20
  326. package/types/components/Tabs/TabWithBadge.d.ts +17 -0
  327. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +1 -0
  328. package/types/components/Tabs/index.d.ts +4 -2
  329. package/types/components/Tag/StyledTag.d.ts +6 -6
  330. package/types/components/Tag/index.d.ts +2 -2
  331. package/types/components/TextInput/StyledTextInput.d.ts +44 -44
  332. package/types/components/TextInput/index.d.ts +8 -8
  333. package/types/components/TimePicker/StyledTimePicker.d.ts +5 -4
  334. package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
  335. package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
  336. package/types/components/TimePicker/index.d.ts +1 -1
  337. package/types/components/TimePicker/types.d.ts +1 -1
  338. package/types/components/Toast/StyledToast.d.ts +21 -19
  339. package/types/components/Toast/Toast.d.ts +1 -1
  340. package/types/components/Toast/ToastContainer.d.ts +2 -2
  341. package/types/components/Toast/ToastContext.d.ts +1 -1
  342. package/types/components/Toast/ToastProvider.d.ts +2 -2
  343. package/types/components/Toast/types.d.ts +5 -4
  344. package/types/components/Toolbar/StyledToolbar.d.ts +11 -10
  345. package/types/components/Toolbar/ToolbarGroup.d.ts +1 -1
  346. package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
  347. package/types/components/Toolbar/index.d.ts +1 -1
  348. package/types/components/Typography/Text/StyledText.d.ts +4 -4
  349. package/types/components/Typography/Text/index.d.ts +3 -3
  350. package/types/index.d.ts +2 -1
  351. package/types/testHelpers/renderWithTheme.d.ts +2 -2
  352. package/types/theme/ThemeProvider.d.ts +1 -1
  353. package/types/theme/ThemeSwitcher.d.ts +1 -1
  354. package/types/theme/components/accordion.d.ts +1 -1
  355. package/types/theme/components/alert.d.ts +6 -2
  356. package/types/theme/components/avatar.d.ts +3 -1
  357. package/types/theme/components/badge.d.ts +1 -1
  358. package/types/theme/components/bottomNavigation.d.ts +1 -1
  359. package/types/theme/components/bottomSheet.d.ts +1 -1
  360. package/types/theme/components/button.d.ts +1 -1
  361. package/types/theme/components/calendar.d.ts +1 -1
  362. package/types/theme/components/card.d.ts +7 -8
  363. package/types/theme/components/checkbox.d.ts +10 -7
  364. package/types/theme/components/contentNavigator.d.ts +1 -1
  365. package/types/theme/components/divider.d.ts +1 -1
  366. package/types/theme/components/drawer.d.ts +1 -1
  367. package/types/theme/components/empty.d.ts +1 -1
  368. package/types/theme/components/fab.d.ts +1 -1
  369. package/types/theme/components/icon.d.ts +1 -1
  370. package/types/theme/components/list.d.ts +8 -7
  371. package/types/theme/components/pinInput.d.ts +1 -1
  372. package/types/theme/components/progress.d.ts +1 -1
  373. package/types/theme/components/radio.d.ts +1 -8
  374. package/types/theme/components/richTextEditor.d.ts +1 -1
  375. package/types/theme/components/sectionHeading.d.ts +1 -1
  376. package/types/theme/components/select.d.ts +1 -1
  377. package/types/theme/components/spinner.d.ts +18 -6
  378. package/types/theme/components/switch.d.ts +7 -6
  379. package/types/theme/components/tabs.d.ts +2 -1
  380. package/types/theme/components/tag.d.ts +3 -3
  381. package/types/theme/components/textInput.d.ts +1 -1
  382. package/types/theme/components/toast.d.ts +19 -3
  383. package/types/theme/components/toolbar.d.ts +1 -1
  384. package/types/theme/components/typography.d.ts +3 -1
  385. package/types/theme/getTheme.d.ts +2 -2
  386. package/types/theme/global/borders.d.ts +2 -1
  387. package/types/theme/global/colors/swag.d.ts +1 -1
  388. package/types/theme/global/colors/types.d.ts +17 -0
  389. package/types/theme/global/colors/work.d.ts +1 -1
  390. package/types/theme/global/index.d.ts +22 -3
  391. package/types/theme/global/scale.d.ts +2 -1
  392. package/types/theme/global/space.d.ts +2 -1
  393. package/types/theme/global/typography.d.ts +2 -1
  394. package/types/theme/index.d.ts +4 -2
  395. package/types/types.d.ts +9 -8
  396. package/types/utils/hooks.d.ts +1 -1
  397. package/src/components/Radio/__tests__/StyledRadio.spec.tsx +0 -43
  398. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +0 -124
  399. package/src/components/Switch/__tests__/StyledHeading.spec.tsx +0 -42
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getContentNavigatorTheme = (theme: GlobalTheme) => {
4
4
  const space = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getDividerTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,5 +1,5 @@
1
- import { GlobalTheme } from '../global';
2
1
  import { scale } from '../../utils/scale';
2
+ import type { GlobalTheme } from '../global';
3
3
 
4
4
  const getDrawerTheme = (theme: GlobalTheme) => {
5
5
  const colors = {
@@ -1,5 +1,5 @@
1
1
  import { scale } from '../../utils/scale';
2
- import { GlobalTheme } from '../global';
2
+ import type { GlobalTheme } from '../global';
3
3
 
4
4
  const getEmptyTheme = (theme: GlobalTheme) => {
5
5
  const space = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getFABTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getIconTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getListTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -27,8 +27,9 @@ const getListTheme = (theme: GlobalTheme) => {
27
27
  leadingStatus: theme.radii.rounded,
28
28
  };
29
29
 
30
- const offsets = {
31
- cardShadow: { width: 0, height: 2 },
30
+ const shadows = {
31
+ cardOffset: { width: 0, height: 2 },
32
+ cardElevation: 10,
32
33
  };
33
34
 
34
35
  const widths = {
@@ -41,7 +42,7 @@ const getListTheme = (theme: GlobalTheme) => {
41
42
  cardShadow: 1,
42
43
  };
43
44
 
44
- return { colors, space, radii, offsets, widths, opacity };
45
+ return { colors, space, radii, widths, opacity, shadows };
45
46
  };
46
47
 
47
48
  export default getListTheme;
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getPinInputTheme = (theme: GlobalTheme) => {
4
4
  const borderWidths = {
@@ -1,5 +1,5 @@
1
1
  import { scale } from '../../utils/scale';
2
- import { GlobalTheme } from '../global';
2
+ import type { GlobalTheme } from '../global';
3
3
 
4
4
  const getProgressTheme = (theme: GlobalTheme) => {
5
5
  const colors = {
@@ -1,16 +1,12 @@
1
1
  import { scale } from '../../utils/scale';
2
- import { GlobalTheme } from '../global';
2
+ import type { GlobalTheme } from '../global';
3
3
 
4
4
  const getRadioTheme = (theme: GlobalTheme) => {
5
5
  const colors = {
6
- circle: theme.colors.black,
7
- checkedCircle: theme.colors.primary,
8
- wrapper: theme.colors.platformBackground,
9
- checkedWrapper: theme.colors.primaryBackground,
6
+ circle: theme.colors.globalPrimary,
10
7
  };
11
8
 
12
9
  const space = {
13
- wrapperPadding: theme.space.medium, // left padding should be 12 according to the design
14
10
  circleLeftMargin: theme.space.small,
15
11
  groupTopMargin: theme.space.xsmall,
16
12
  };
@@ -24,11 +20,7 @@ const getRadioTheme = (theme: GlobalTheme) => {
24
20
  circle: theme.borderWidths.medium,
25
21
  };
26
22
 
27
- const radii = {
28
- wrapper: theme.radii.base,
29
- };
30
-
31
- return { sizes, borderWidths, space, colors, radii };
23
+ return { sizes, borderWidths, space, colors };
32
24
  };
33
25
 
34
26
  export default getRadioTheme;
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getRichTextEditorTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,8 +1,8 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getSectionHeadingTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
- background: theme.colors.outline,
5
+ background: theme.colors.__alpha__globalNeutral3,
6
6
  };
7
7
 
8
8
  const space = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getSelectTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,21 +1,33 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getSpinnerTheme = (theme: GlobalTheme) => {
4
- const color = {
5
- default: theme.colors.primary,
4
+ const colors = {
5
+ dot1: theme.colors.__alpha__secondary1,
6
+ dot2: theme.colors.__alpha__secondary2,
7
+ dot3: theme.colors.__alpha__secondary3,
8
+ dot4: theme.colors.__alpha__secondary4,
6
9
  };
7
10
 
8
11
  const space = {
9
- spinnerDot: theme.space.medium,
10
- spinnerDotPadding: theme.space.small,
11
- spinnerTextPaddingTop: theme.space.small,
12
+ spinnerDot: {
13
+ small: theme.space.small,
14
+ medium: theme.space.medium,
15
+ },
16
+ spinnerDotPadding: {
17
+ small: theme.space.xsmall,
18
+ medium: theme.space.small,
19
+ },
20
+ spinnerTextPaddingTop: {
21
+ small: theme.space.xsmall,
22
+ medium: theme.space.small,
23
+ },
12
24
  };
13
25
 
14
26
  const radii = {
15
- default: theme.radii.medium,
27
+ default: theme.radii.rounded,
16
28
  };
17
29
 
18
- return { color, space, radii };
30
+ return { colors, space, radii };
19
31
  };
20
32
 
21
33
  export default getSpinnerTheme;
@@ -1,10 +1,14 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getSwitchTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
+ backgroundColors: {
6
+ checked: theme.colors.primary,
7
+ unchecked: theme.colors.globalPrimaryLight,
8
+ 'disabled-checked': theme.colors.primaryLight,
9
+ 'disabled-unchecked': theme.colors.archived,
10
+ },
5
11
  thumb: theme.colors.platformBackground,
6
- active: theme.colors.primary,
7
- inactive: theme.colors.inactiveBackground,
8
12
  };
9
13
 
10
14
  const thumbSizes = {
@@ -32,10 +36,6 @@ const getSwitchTheme = (theme: GlobalTheme) => {
32
36
  rounded: theme.radii.rounded,
33
37
  };
34
38
 
35
- const borderWidths = {
36
- default: theme.borderWidths.base,
37
- };
38
-
39
39
  return {
40
40
  colors,
41
41
  thumbSizes,
@@ -43,7 +43,6 @@ const getSwitchTheme = (theme: GlobalTheme) => {
43
43
  heights,
44
44
  spaces,
45
45
  radii,
46
- borderWidths,
47
46
  };
48
47
  };
49
48
 
@@ -1,10 +1,10 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getTabsTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
- active: theme.colors.primary,
5
+ active: theme.colors.text,
6
6
  inactive: theme.colors.text,
7
- activeBackground: theme.colors.primaryBackground,
7
+ activeBackground: theme.colors.__alpha__secondary4,
8
8
  headerBottom: theme.colors.outline,
9
9
  text: theme.colors.text,
10
10
  };
@@ -13,6 +13,7 @@ const getTabsTheme = (theme: GlobalTheme) => {
13
13
  flatListHorizontalPadding: theme.space.small,
14
14
  itemHorizontalPadding: theme.space.small,
15
15
  itemVerticalPadding: theme.space.small,
16
+ itemMargin: theme.space.smallMedium,
16
17
  outlineHorizontalPadding: theme.space.small,
17
18
  outlineVerticalPadding: theme.space.xsmall,
18
19
  };
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getTagTheme = (theme: GlobalTheme) => {
4
4
  const borderWidths = {
@@ -6,20 +6,20 @@ const getTagTheme = (theme: GlobalTheme) => {
6
6
  };
7
7
 
8
8
  const colors = {
9
- default: theme.colors.text,
9
+ default: theme.colors.__alpha__globalPrimary,
10
10
  defaultBackground: undefined,
11
- primary: theme.colors.primary,
12
- primaryBackground: theme.colors.primaryBackground,
13
- info: theme.colors.info,
14
- infoBackground: theme.colors.infoBackground,
15
- success: theme.colors.successDark,
16
- successBackground: theme.colors.successBackground,
17
- warning: theme.colors.warningDark,
18
- warningBackground: theme.colors.warningBackground,
19
- danger: theme.colors.danger,
20
- dangerBackground: theme.colors.dangerBackground,
21
- archived: theme.colors.archivedDark,
22
- archivedBackground: theme.colors.archivedBackground,
11
+ primary: theme.colors.__alpha__globalPrimary,
12
+ primaryBackground: undefined,
13
+ info: theme.colors.__alpha__globalLabel4,
14
+ infoBackground: theme.colors.__alpha__globalLabel9,
15
+ success: theme.colors.__alpha__globalLabel3,
16
+ successBackground: theme.colors.__alpha__globalLabel8,
17
+ warning: theme.colors.__alpha__globalLabel2,
18
+ warningBackground: theme.colors.__alpha__globalLabel7,
19
+ danger: theme.colors.__alpha__globalLabel1,
20
+ dangerBackground: theme.colors.__alpha__globalLabel6,
21
+ archived: theme.colors.__alpha__globalLabel5,
22
+ archivedBackground: theme.colors.__alpha__globalNeutral3,
23
23
  };
24
24
 
25
25
  const fonts = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getTextInputTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,5 +1,5 @@
1
1
  import { scale } from '../../utils/scale';
2
- import { GlobalTheme } from '../global';
2
+ import type { GlobalTheme } from '../global';
3
3
 
4
4
  const getToastTheme = (theme: GlobalTheme) => {
5
5
  const colors = {
@@ -7,7 +7,10 @@ const getToastTheme = (theme: GlobalTheme) => {
7
7
  warning: theme.colors.warning,
8
8
  error: theme.colors.dangerLight,
9
9
  info: theme.colors.infoLight,
10
+ notification: theme.colors.platformBackground,
11
+ snackbar: theme.colors.backgroundDark,
10
12
  divider: theme.colors.outline,
13
+ shadow: theme.colors.backgroundDark,
11
14
  };
12
15
 
13
16
  const sizes = {
@@ -15,8 +18,12 @@ const getToastTheme = (theme: GlobalTheme) => {
15
18
  };
16
19
 
17
20
  const space = {
18
- mediumPadding: theme.space.medium,
19
- largePadding: theme.space.large,
21
+ wrapperVerticalPadding: theme.space.large,
22
+ wrapperHorizontalPadding: theme.space.medium,
23
+ contentVerticalPadding: theme.space.smallMedium,
24
+ textHorizontalPadding: theme.space.smallMedium,
25
+ iconLeftPadding: theme.space.smallMedium,
26
+ ctaPadding: theme.space.smallMedium,
20
27
  };
21
28
 
22
29
  const radii = {
@@ -27,7 +34,14 @@ const getToastTheme = (theme: GlobalTheme) => {
27
34
  base: theme.borderWidths.base,
28
35
  };
29
36
 
30
- return { colors, radii, sizes, space, borderWidths };
37
+ const shadows = {
38
+ offset: { width: 0, height: 2 },
39
+ opacity: 0.12,
40
+ radius: 4,
41
+ elevation: 4,
42
+ };
43
+
44
+ return { colors, radii, sizes, space, borderWidths, shadows };
31
45
  };
32
46
 
33
47
  export default getToastTheme;
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getToolbarTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -1,4 +1,4 @@
1
- import { GlobalTheme } from '../global';
1
+ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getTypographyTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
@@ -23,6 +23,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
23
23
  medium: theme.fontSizes.medium,
24
24
  large: theme.fontSizes.large,
25
25
  xlarge: theme.fontSizes.xlarge,
26
+ xxxlarge: theme.fontSizes.xxxlarge,
26
27
  xxxxxlarge: theme.fontSizes.xxxxxlarge,
27
28
  };
28
29
 
@@ -31,6 +32,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
31
32
  medium: theme.lineHeights.medium,
32
33
  large: theme.lineHeights.large,
33
34
  xlarge: theme.lineHeights.xlarge,
35
+ xxxlarge: theme.lineHeights.xxxlarge,
34
36
  xxxxxlarge: theme.lineHeights.xxxxxlarge,
35
37
  };
36
38
 
@@ -1,11 +1,4 @@
1
- import {
2
- GlobalTheme,
3
- Scale,
4
- SystemPalette,
5
- getGlobalTheme,
6
- defaultScale,
7
- swagSystemPalette,
8
- } from './global';
1
+ import { getGlobalTheme, defaultScale, swagSystemPalette } from './global';
9
2
 
10
3
  import getAccordionTheme from './components/accordion';
11
4
  import getAlertTheme from './components/alert';
@@ -40,6 +33,7 @@ import getTimePickerTheme from './components/timePicker';
40
33
  import getToastTheme from './components/toast';
41
34
  import getToolbarTheme from './components/toolbar';
42
35
  import getTypographyTheme from './components/typography';
36
+ import type { GlobalTheme, Scale, SystemPalette } from './global';
43
37
 
44
38
  type Theme = GlobalTheme & {
45
39
  __hd__: {
@@ -123,7 +117,6 @@ const getTheme = (
123
117
  },
124
118
  };
125
119
  };
126
-
127
- export { Theme };
128
-
129
120
  export default getTheme;
121
+
122
+ export type { Theme };
@@ -24,4 +24,5 @@ const getRadii = (baseRadius: number): Radii => ({
24
24
  xlarge: baseRadius * 4, // 16
25
25
  });
26
26
 
27
- export { BorderWidths, getBorderWidths, Radii, getRadii };
27
+ export { getBorderWidths, getRadii };
28
+ export type { BorderWidths, Radii };
@@ -2,15 +2,14 @@ import {
2
2
  defaultMobilePalette as palette,
3
3
  swagPalette,
4
4
  } from '@hero-design/colors';
5
-
6
- import { SystemPalette } from './types';
5
+ import type { SystemPalette } from './types';
7
6
 
8
7
  const swagSystemPalette: SystemPalette = {
9
8
  globalPrimary: palette.maasstrichtBlue,
10
9
  globalPrimaryLight: palette.maasstrichtBlueLight50,
11
10
  globalPrimaryBackground: palette.maasstrichtBlueLight90,
12
11
  primary: swagPalette.violet,
13
- primaryLight: swagPalette.violetLight50, // no longer needed after revising Button
12
+ primaryLight: swagPalette.violetLight50,
14
13
  primaryDark: swagPalette.scarletGumLight30, // DEPRECATED
15
14
  primaryBackground: swagPalette.violetLight90,
16
15
  primaryBackgroundDark: palette.maasstrichtBlueLight30,
@@ -49,6 +48,29 @@ const swagSystemPalette: SystemPalette = {
49
48
  black: palette.black,
50
49
  inactiveBackground: palette.maasstrichtBlueLight50,
51
50
  shadow: palette.greyLight45, // waiting for new color
51
+
52
+ __alpha__globalPrimary: palette.maasstrichtBlue,
53
+
54
+ __alpha__globalSecondary1: palette.maasstrichtBlueLight30,
55
+
56
+ __alpha__globalNeutral3: palette.greyLight90,
57
+
58
+ __alpha__globalLabel1: palette.vermilion,
59
+ __alpha__globalLabel2: palette.deepSaffron,
60
+ __alpha__globalLabel3: palette.pineGreen,
61
+ __alpha__globalLabel4: palette.ultramarineBlue,
62
+ __alpha__globalLabel5: palette.sonicSilver,
63
+ __alpha__globalLabel6: palette.linen,
64
+ __alpha__globalLabel7: palette.seashell,
65
+ __alpha__globalLabel8: palette.honeydew,
66
+ __alpha__globalLabel9: palette.aliceBlue,
67
+
68
+ __alpha__primary2: swagPalette.mauve,
69
+
70
+ __alpha__secondary1: swagPalette.scarletGumLight30,
71
+ __alpha__secondary2: swagPalette.scarletGumLight50,
72
+ __alpha__secondary3: swagPalette.scarletGumLight80,
73
+ __alpha__secondary4: swagPalette.scarletGumLight90,
52
74
  };
53
75
 
54
76
  export default swagSystemPalette;
@@ -42,4 +42,27 @@ export type SystemPalette = {
42
42
  black: string;
43
43
  inactiveBackground: string;
44
44
  shadow: string;
45
+
46
+ __alpha__globalPrimary: string;
47
+
48
+ __alpha__globalSecondary1: string;
49
+
50
+ __alpha__globalNeutral3: string;
51
+
52
+ __alpha__globalLabel1: string;
53
+ __alpha__globalLabel2: string;
54
+ __alpha__globalLabel3: string;
55
+ __alpha__globalLabel4: string;
56
+ __alpha__globalLabel5: string;
57
+ __alpha__globalLabel6: string;
58
+ __alpha__globalLabel7: string;
59
+ __alpha__globalLabel8: string;
60
+ __alpha__globalLabel9: string;
61
+
62
+ __alpha__primary2: string;
63
+
64
+ __alpha__secondary1: string;
65
+ __alpha__secondary2: string;
66
+ __alpha__secondary3: string;
67
+ __alpha__secondary4: string;
45
68
  };
@@ -1,7 +1,6 @@
1
1
  import { workPalette } from '@hero-design/colors';
2
-
3
- import { SystemPalette } from './types';
4
2
  import swag from './swag';
3
+ import type { SystemPalette } from './types';
5
4
 
6
5
  const workSystemPalette: SystemPalette = {
7
6
  ...swag,
@@ -9,6 +8,11 @@ const workSystemPalette: SystemPalette = {
9
8
  primaryLight: workPalette.goldLight50,
10
9
  primaryDark: workPalette.goldLight20,
11
10
  primaryBackground: workPalette.goldLight90,
11
+
12
+ __alpha__secondary1: workPalette.goldLight20,
13
+ __alpha__secondary2: workPalette.goldLight50,
14
+ __alpha__secondary3: workPalette.goldLight70,
15
+ __alpha__secondary4: workPalette.goldLight90,
12
16
  };
13
17
 
14
18
  export default workSystemPalette;
@@ -1,11 +1,12 @@
1
- import { scale as defaultScale, Scale } from './scale';
2
- import { SystemPalette } from './colors/types';
1
+ import { scale as defaultScale } from './scale';
3
2
  import swagSystemPalette from './colors/swag';
4
3
  import workSystemPalette from './colors/work';
5
4
 
6
5
  import { getFonts, getFontSizes, getLineHeights } from './typography';
7
6
  import { getSpace } from './space';
8
7
  import { getBorderWidths, getRadii } from './borders';
8
+ import type { Scale } from './scale';
9
+ import type { SystemPalette } from './colors/types';
9
10
 
10
11
  const getGlobalTheme = (scale: Scale, systemPalette: SystemPalette) => {
11
12
  const fonts = getFonts(scale.font);
@@ -30,12 +31,6 @@ const getGlobalTheme = (scale: Scale, systemPalette: SystemPalette) => {
30
31
 
31
32
  type GlobalTheme = ReturnType<typeof getGlobalTheme>;
32
33
 
33
- export {
34
- GlobalTheme,
35
- Scale,
36
- SystemPalette,
37
- getGlobalTheme,
38
- defaultScale,
39
- swagSystemPalette,
40
- workSystemPalette,
41
- };
34
+ export type { GlobalTheme, Scale, SystemPalette };
35
+
36
+ export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette };
@@ -18,4 +18,5 @@ const scale = {
18
18
 
19
19
  type Scale = typeof scale;
20
20
 
21
- export { scale, Scale };
21
+ export { scale };
22
+ export type { Scale };
@@ -26,4 +26,5 @@ const getSpace = (baseSpace: number): Space => ({
26
26
  xxxxlarge: scale(baseSpace * 7), // 56
27
27
  });
28
28
 
29
- export { Space, getSpace };
29
+ export { getSpace };
30
+ export type { Space };
@@ -69,11 +69,5 @@ const getLineHeights = (fontSizes: FontSizes): LineHeights => {
69
69
  };
70
70
  };
71
71
 
72
- export {
73
- Fonts,
74
- FontSizes,
75
- LineHeights,
76
- getFonts,
77
- getFontSizes,
78
- getLineHeights,
79
- };
72
+ export { getFonts, getFontSizes, getLineHeights };
73
+ export type { Fonts, FontSizes, LineHeights };
@@ -1,12 +1,15 @@
1
- import getTheme, { Theme } from './getTheme';
1
+ import getTheme from './getTheme';
2
2
  import ThemeProvider, { useTheme } from './ThemeProvider';
3
3
  import ThemeSwitcher from './ThemeSwitcher';
4
4
  import { swagSystemPalette, workSystemPalette } from './global';
5
5
 
6
+ import type { Theme } from './getTheme';
7
+
6
8
  const defaultTheme = getTheme();
7
9
 
10
+ export type { Theme };
11
+
8
12
  export {
9
- Theme,
10
13
  getTheme,
11
14
  ThemeProvider,
12
15
  ThemeSwitcher,
package/src/types.ts CHANGED
@@ -1,16 +1,15 @@
1
- import { BottomNavigationTabType } from './components/BottomNavigation';
2
- import { IconName } from './components/Icon';
3
- import { SingleSelectProps, MultiSelectProps } from './components/Select';
4
- import { TabType } from './components/Tabs';
5
- import { TextInputProps } from './components/TextInput';
6
- import {
1
+ import { ToolbarButtonName } from './components/RichTextEditor';
2
+ import type { BottomNavigationTabType } from './components/BottomNavigation';
3
+ import type { IconName } from './components/Icon';
4
+ import type { SingleSelectProps, MultiSelectProps } from './components/Select';
5
+ import type { TabType } from './components/Tabs';
6
+ import type { TextInputProps } from './components/TextInput';
7
+ import type {
7
8
  RichTextEditorRef,
8
9
  RichTextEditorProps,
9
- ToolbarButtonName,
10
10
  } from './components/RichTextEditor';
11
-
12
- import { Theme } from './theme';
13
- import {
11
+ import type { Theme } from './theme';
12
+ import type {
14
13
  ListRenderOptionInfo,
15
14
  SectionListRenderOptionInfo,
16
15
  } from './components/Select/types';
@@ -68,3 +68,5 @@ jest.mock('react-native-webview', () => {
68
68
  });
69
69
 
70
70
  jest.mock('hero-editor/dist/app.js', () => ({ default: '' }));
71
+
72
+ export {};
package/tsconfig.json CHANGED
@@ -1,27 +1,11 @@
1
1
  {
2
+ "extends": "expo/tsconfig.base",
2
3
  "compilerOptions": {
3
4
  "target": "esnext",
4
- "declaration": true,
5
5
  "outDir": "types",
6
- "moduleResolution": "node",
7
- "esModuleInterop": true,
8
- "resolveJsonModule": true,
6
+ "declaration": true,
9
7
  "jsx": "react-native",
10
- "strict": true,
11
- "allowUnreachableCode": false,
12
- "noImplicitReturns": true,
13
- "noImplicitThis": true,
14
- "noUnusedLocals": true,
15
- "skipLibCheck": true,
16
- "types": [
17
- "jest"
18
- ]
8
+ "types": ["jest"]
19
9
  },
20
- "include": [
21
- "src"
22
- ],
23
- "exclude": [
24
- "node_modules"
25
- ],
26
- "extends": "expo/tsconfig.base"
27
- }
10
+ "include": ["src"]
11
+ }