@hero-design/rn 8.11.3 → 8.12.0-rc.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 (284) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/es/index.js +305 -157
  3. package/lib/index.js +306 -156
  4. package/package.json +5 -5
  5. package/src/components/Collapse/StyledCollapse.tsx +4 -4
  6. package/src/components/DatePicker/DatePickerIOS.tsx +3 -0
  7. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
  8. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
  9. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  10. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
  11. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -2
  12. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1 -1
  13. package/src/components/TimePicker/TimePickerIOS.tsx +3 -0
  14. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
  15. package/src/index.ts +4 -0
  16. package/src/theme/ThemeSwitcher.tsx +14 -1
  17. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -1
  18. package/src/theme/components/fab.ts +2 -2
  19. package/src/theme/components/richTextEditor.ts +1 -0
  20. package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +48 -0
  21. package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +39 -0
  22. package/src/theme/global/colors/__tests__/__snapshots__/globalDark.spec.ts.snap +39 -0
  23. package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +48 -0
  24. package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +48 -0
  25. package/src/theme/global/colors/__tests__/__snapshots__/swagDark.spec.ts.snap +48 -0
  26. package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +48 -0
  27. package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +48 -0
  28. package/src/theme/global/colors/__tests__/eBens.spec.ts +7 -0
  29. package/src/theme/global/colors/__tests__/global.spec.ts +7 -0
  30. package/src/theme/global/colors/__tests__/globalDark.spec.ts +7 -0
  31. package/src/theme/global/colors/__tests__/jobs.spec.ts +7 -0
  32. package/src/theme/global/colors/__tests__/swag.spec.ts +7 -0
  33. package/src/theme/global/colors/__tests__/swagDark.spec.ts +7 -0
  34. package/src/theme/global/colors/__tests__/wallet.spec.ts +7 -0
  35. package/src/theme/global/colors/__tests__/work.spec.ts +7 -0
  36. package/src/theme/global/colors/globalDark.ts +51 -0
  37. package/src/theme/global/colors/swagDark.ts +25 -0
  38. package/src/theme/global/index.ts +2 -0
  39. package/src/theme/index.ts +4 -1
  40. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  41. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  42. package/types/components/Accordion/index.d.ts +0 -0
  43. package/types/components/Alert/StyledAlert.d.ts +0 -0
  44. package/types/components/Alert/index.d.ts +0 -0
  45. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  46. package/types/components/Attachment/index.d.ts +0 -0
  47. package/types/components/Avatar/Avatar.d.ts +0 -0
  48. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  49. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  50. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  51. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  52. package/types/components/Avatar/index.d.ts +0 -0
  53. package/types/components/Badge/Status.d.ts +0 -0
  54. package/types/components/Badge/StyledBadge.d.ts +0 -0
  55. package/types/components/Badge/index.d.ts +0 -0
  56. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  57. package/types/components/BottomNavigation/index.d.ts +0 -0
  58. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  59. package/types/components/BottomSheet/Footer.d.ts +0 -0
  60. package/types/components/BottomSheet/Header.d.ts +0 -0
  61. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  62. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  63. package/types/components/BottomSheet/index.d.ts +0 -0
  64. package/types/components/Box/StyledBox.d.ts +0 -0
  65. package/types/components/Box/config.d.ts +0 -0
  66. package/types/components/Box/index.d.ts +0 -0
  67. package/types/components/Box/types.d.ts +0 -0
  68. package/types/components/Button/Button.d.ts +0 -0
  69. package/types/components/Button/IconButton.d.ts +0 -0
  70. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  71. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  72. package/types/components/Button/StyledButton.d.ts +0 -0
  73. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  74. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  75. package/types/components/Button/index.d.ts +0 -0
  76. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  77. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  78. package/types/components/Calendar/helpers.d.ts +0 -0
  79. package/types/components/Calendar/index.d.ts +0 -0
  80. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  81. package/types/components/Card/DataCard/index.d.ts +0 -0
  82. package/types/components/Card/StyledCard.d.ts +0 -0
  83. package/types/components/Card/index.d.ts +0 -0
  84. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  85. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  86. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  87. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  88. package/types/components/Carousel/contants.d.ts +0 -0
  89. package/types/components/Carousel/index.d.ts +0 -0
  90. package/types/components/Carousel/types.d.ts +0 -0
  91. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
  92. package/types/components/Checkbox/index.d.ts +0 -0
  93. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  94. package/types/components/Collapse/index.d.ts +0 -0
  95. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  96. package/types/components/ContentNavigator/index.d.ts +0 -0
  97. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  98. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  99. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  100. package/types/components/DatePicker/index.d.ts +0 -0
  101. package/types/components/DatePicker/types.d.ts +0 -0
  102. package/types/components/Divider/StyledDivider.d.ts +0 -0
  103. package/types/components/Divider/index.d.ts +0 -0
  104. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  105. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  106. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  107. package/types/components/Drawer/index.d.ts +0 -0
  108. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  109. package/types/components/Empty/index.d.ts +0 -0
  110. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  111. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  112. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
  113. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  114. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  115. package/types/components/FAB/FAB.d.ts +0 -0
  116. package/types/components/FAB/StyledFAB.d.ts +0 -0
  117. package/types/components/FAB/index.d.ts +0 -0
  118. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  119. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  120. package/types/components/Icon/IconList.d.ts +0 -0
  121. package/types/components/Icon/index.d.ts +0 -0
  122. package/types/components/Icon/utils.d.ts +0 -0
  123. package/types/components/Image/index.d.ts +0 -0
  124. package/types/components/List/BasicListItem.d.ts +0 -0
  125. package/types/components/List/ListItem.d.ts +0 -0
  126. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  127. package/types/components/List/StyledListItem.d.ts +0 -0
  128. package/types/components/List/index.d.ts +0 -0
  129. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  130. package/types/components/PageControl/index.d.ts +0 -0
  131. package/types/components/PinInput/PinCell.d.ts +0 -0
  132. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  133. package/types/components/PinInput/index.d.ts +0 -0
  134. package/types/components/Progress/ProgressBar.d.ts +0 -0
  135. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  136. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  137. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  138. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  139. package/types/components/Progress/constants.d.ts +0 -0
  140. package/types/components/Progress/index.d.ts +0 -0
  141. package/types/components/Progress/types.d.ts +0 -0
  142. package/types/components/Radio/Radio.d.ts +0 -0
  143. package/types/components/Radio/RadioGroup.d.ts +0 -0
  144. package/types/components/Radio/StyledRadio.d.ts +0 -0
  145. package/types/components/Radio/index.d.ts +0 -0
  146. package/types/components/Radio/types.d.ts +0 -0
  147. package/types/components/RefreshControl/index.d.ts +0 -0
  148. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  149. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  150. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  151. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  152. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  153. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  154. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  155. package/types/components/RichTextEditor/constants.d.ts +0 -0
  156. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  157. package/types/components/RichTextEditor/index.d.ts +0 -0
  158. package/types/components/RichTextEditor/types.d.ts +0 -0
  159. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  160. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  161. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  162. package/types/components/SectionHeading/index.d.ts +0 -0
  163. package/types/components/Select/BaseOptionList.d.ts +0 -0
  164. package/types/components/Select/Footer.d.ts +0 -0
  165. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  166. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  167. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  168. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  169. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  170. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  171. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  172. package/types/components/Select/StyledSelect.d.ts +0 -0
  173. package/types/components/Select/helpers.d.ts +0 -0
  174. package/types/components/Select/index.d.ts +0 -0
  175. package/types/components/Select/types.d.ts +0 -0
  176. package/types/components/Slider/index.d.ts +0 -0
  177. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  178. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  179. package/types/components/Spinner/index.d.ts +0 -0
  180. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  181. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  182. package/types/components/Swipeable/index.d.ts +0 -0
  183. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  184. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  185. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  186. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  187. package/types/components/Switch/index.d.ts +0 -0
  188. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  189. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  190. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  191. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  192. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  193. package/types/components/Tabs/index.d.ts +0 -0
  194. package/types/components/Tabs/utils.d.ts +0 -0
  195. package/types/components/Tag/StyledTag.d.ts +0 -0
  196. package/types/components/Tag/index.d.ts +0 -0
  197. package/types/components/TextInput/StyledTextInput.d.ts +0 -0
  198. package/types/components/TextInput/index.d.ts +0 -0
  199. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  200. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  201. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  202. package/types/components/TimePicker/index.d.ts +0 -0
  203. package/types/components/TimePicker/types.d.ts +0 -0
  204. package/types/components/Toast/StyledToast.d.ts +0 -0
  205. package/types/components/Toast/Toast.d.ts +0 -0
  206. package/types/components/Toast/ToastContainer.d.ts +0 -0
  207. package/types/components/Toast/ToastContext.d.ts +0 -0
  208. package/types/components/Toast/ToastProvider.d.ts +0 -0
  209. package/types/components/Toast/index.d.ts +0 -0
  210. package/types/components/Toast/types.d.ts +0 -0
  211. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  212. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  213. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  214. package/types/components/Toolbar/index.d.ts +0 -0
  215. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  216. package/types/components/Typography/Text/index.d.ts +0 -0
  217. package/types/components/Typography/index.d.ts +0 -0
  218. package/types/index.d.ts +2 -2
  219. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  220. package/types/theme/ThemeProvider.d.ts +0 -0
  221. package/types/theme/ThemeSwitcher.d.ts +2 -1
  222. package/types/theme/components/accordion.d.ts +0 -0
  223. package/types/theme/components/alert.d.ts +0 -0
  224. package/types/theme/components/attachment.d.ts +0 -0
  225. package/types/theme/components/avatar.d.ts +0 -0
  226. package/types/theme/components/badge.d.ts +0 -0
  227. package/types/theme/components/bottomNavigation.d.ts +0 -0
  228. package/types/theme/components/bottomSheet.d.ts +0 -0
  229. package/types/theme/components/button.d.ts +0 -0
  230. package/types/theme/components/calendar.d.ts +0 -0
  231. package/types/theme/components/card.d.ts +0 -0
  232. package/types/theme/components/cardCarousel.d.ts +0 -0
  233. package/types/theme/components/carousel.d.ts +0 -0
  234. package/types/theme/components/checkbox.d.ts +0 -0
  235. package/types/theme/components/contentNavigator.d.ts +0 -0
  236. package/types/theme/components/datePicker.d.ts +0 -0
  237. package/types/theme/components/divider.d.ts +0 -0
  238. package/types/theme/components/drawer.d.ts +0 -0
  239. package/types/theme/components/empty.d.ts +0 -0
  240. package/types/theme/components/fab.d.ts +0 -0
  241. package/types/theme/components/icon.d.ts +0 -0
  242. package/types/theme/components/image.d.ts +0 -0
  243. package/types/theme/components/list.d.ts +0 -0
  244. package/types/theme/components/pageControl.d.ts +0 -0
  245. package/types/theme/components/pinInput.d.ts +0 -0
  246. package/types/theme/components/progress.d.ts +0 -0
  247. package/types/theme/components/radio.d.ts +0 -0
  248. package/types/theme/components/refreshControl.d.ts +0 -0
  249. package/types/theme/components/richTextEditor.d.ts +1 -0
  250. package/types/theme/components/sectionHeading.d.ts +0 -0
  251. package/types/theme/components/select.d.ts +0 -0
  252. package/types/theme/components/slider.d.ts +0 -0
  253. package/types/theme/components/spinner.d.ts +0 -0
  254. package/types/theme/components/swipeable.d.ts +0 -0
  255. package/types/theme/components/switch.d.ts +0 -0
  256. package/types/theme/components/tabs.d.ts +0 -0
  257. package/types/theme/components/tag.d.ts +0 -0
  258. package/types/theme/components/textInput.d.ts +0 -0
  259. package/types/theme/components/timePicker.d.ts +0 -0
  260. package/types/theme/components/toast.d.ts +0 -0
  261. package/types/theme/components/toolbar.d.ts +0 -0
  262. package/types/theme/components/typography.d.ts +0 -0
  263. package/types/theme/getTheme.d.ts +0 -0
  264. package/types/theme/global/borders.d.ts +0 -0
  265. package/types/theme/global/colors/eBens.d.ts +0 -0
  266. package/types/theme/global/colors/global.d.ts +0 -0
  267. package/types/theme/global/colors/globalDark.d.ts +3 -0
  268. package/types/theme/global/colors/jobs.d.ts +0 -0
  269. package/types/theme/global/colors/swag.d.ts +0 -0
  270. package/types/theme/global/colors/swagDark.d.ts +3 -0
  271. package/types/theme/global/colors/types.d.ts +0 -0
  272. package/types/theme/global/colors/wallet.d.ts +0 -0
  273. package/types/theme/global/colors/work.d.ts +0 -0
  274. package/types/theme/global/index.d.ts +2 -1
  275. package/types/theme/global/scale.d.ts +0 -0
  276. package/types/theme/global/sizes.d.ts +0 -0
  277. package/types/theme/global/space.d.ts +0 -0
  278. package/types/theme/global/typography.d.ts +0 -0
  279. package/types/theme/index.d.ts +3 -3
  280. package/types/types.d.ts +0 -0
  281. package/types/utils/functions.d.ts +0 -0
  282. package/types/utils/helpers.d.ts +0 -0
  283. package/types/utils/hooks.d.ts +0 -0
  284. package/types/utils/scale.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.11.3",
3
+ "version": "8.12.0-rc.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.11.3",
24
+ "@hero-design/colors": "8.12.0-rc.0",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21"
@@ -44,7 +44,7 @@
44
44
  "@babel/preset-typescript": "^7.17.12",
45
45
  "@babel/runtime": "^7.18.9",
46
46
  "@emotion/jest": "^11.9.3",
47
- "@hero-design/eslint-plugin": "8.11.3",
47
+ "@hero-design/eslint-plugin": "8.12.0-rc.0",
48
48
  "@react-native-community/datetimepicker": "^3.5.2",
49
49
  "@react-native-community/slider": "4.1.12",
50
50
  "@rollup/plugin-babel": "^5.3.1",
@@ -60,9 +60,9 @@
60
60
  "@types/react-native": "^0.67.7",
61
61
  "@types/react-native-vector-icons": "^6.4.10",
62
62
  "babel-plugin-inline-import": "^3.0.0",
63
- "eslint-config-hd": "8.11.3",
63
+ "eslint-config-hd": "8.12.0-rc.0",
64
64
  "jest": "^27.3.1",
65
- "prettier-config-hd": "8.11.3",
65
+ "prettier-config-hd": "8.12.0-rc.0",
66
66
  "react": "18.0.0",
67
67
  "react-native": "0.69.7",
68
68
  "react-native-gesture-handler": "~2.1.0",
@@ -1,11 +1,11 @@
1
1
  import { Animated, Dimensions, View } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
 
4
- const StyledWrapper = styled(Animated.View)(() => ({
4
+ const StyledWrapper = styled(Animated.View)({
5
5
  margin: 0,
6
6
  padding: 0,
7
7
  overflow: 'hidden',
8
- }));
8
+ });
9
9
 
10
10
  /**
11
11
  * Height need to be high enough to cover most scenario
@@ -16,9 +16,9 @@ const StyledHiddenWrapper = styled(View)(() => ({
16
16
  height: Dimensions.get('window').height,
17
17
  }));
18
18
 
19
- const StyledChildWrapper = styled(View)(() => ({
19
+ const StyledChildWrapper = styled(View)({
20
20
  margin: 0,
21
21
  padding: 0,
22
- }));
22
+ });
23
23
 
24
24
  export { StyledWrapper, StyledHiddenWrapper, StyledChildWrapper };
@@ -8,6 +8,7 @@ import TextInput from '../TextInput';
8
8
  import Button from '../Button';
9
9
  import { StyledPickerWrapper } from './StyledDatePicker';
10
10
  import type { DatePickerProps } from './types';
11
+ import { useTheme } from '../../theme';
11
12
 
12
13
  const DatePickerIOS = ({
13
14
  value,
@@ -30,6 +31,7 @@ const DatePickerIOS = ({
30
31
 
31
32
  const displayValue = value ? formatDate(displayFormat, value) : '';
32
33
 
34
+ const theme = useTheme();
33
35
  return (
34
36
  <TouchableOpacity onPress={() => setOpen(true)} disabled={disabled}>
35
37
  <View pointerEvents="none" testID="datePickerInputIOS">
@@ -77,6 +79,7 @@ const DatePickerIOS = ({
77
79
  }}
78
80
  display="spinner"
79
81
  style={{ flex: 1 }}
82
+ textColor={theme.colors.onDefaultGlobalSurface}
80
83
  />
81
84
  </StyledPickerWrapper>
82
85
  </BottomSheet>
@@ -448,6 +448,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
448
448
  }
449
449
  }
450
450
  testID="datePickerIOS"
451
+ textColor="#001f23"
451
452
  value={1995-12-21T00:00:00.000Z}
452
453
  />
453
454
  </View>
@@ -44,7 +44,7 @@ const StyledBackdrop = styled(Animated.View)<
44
44
  const StyledHeaderText = styled(Typography.Text)<TextProps>(({ theme }) => ({
45
45
  fontSize: theme.__hd__.fab.fontSizes.header,
46
46
  lineHeight: theme.__hd__.fab.lineHeights.header,
47
- color: theme.__hd__.fab.colors.titleText,
47
+ color: theme.__hd__.fab.colors.headerText,
48
48
  fontFamily: theme.__hd__.fab.fonts.header,
49
49
  marginRight: theme.__hd__.fab.space.headerTextMarginRight,
50
50
  marginBottom: theme.__hd__.fab.space.headerTextMarginBottom,
@@ -64,7 +64,7 @@ exports[`ActionGroup has active false 1`] = `
64
64
  },
65
65
  Array [
66
66
  Object {
67
- "color": "#ffffff",
67
+ "color": "#001f23",
68
68
  "fontFamily": "BeVietnamPro-SemiBold",
69
69
  "fontSize": 24,
70
70
  "lineHeight": 32,
@@ -626,7 +626,7 @@ exports[`ActionGroup has active true 1`] = `
626
626
  },
627
627
  Array [
628
628
  Object {
629
- "color": "#ffffff",
629
+ "color": "#001f23",
630
630
  "fontFamily": "BeVietnamPro-SemiBold",
631
631
  "fontSize": 24,
632
632
  "lineHeight": 32,
@@ -195,7 +195,8 @@ const RichTextEditor: ComponentType<RichTextEditorProps> = ({
195
195
  autoFocus: ${autoFocus},
196
196
  style: {
197
197
  padding: '0 !important',
198
- fontSize: ${theme.__hd__.richTextEditor.fontSizes.editor}
198
+ fontSize: ${theme.__hd__.richTextEditor.fontSizes.editor},
199
+ color: '${theme.__hd__.richTextEditor.colors.text}'
199
200
  }
200
201
  };
201
202
  ${heroEditorApp}
@@ -151,7 +151,8 @@ exports[`RichTextEditor onMessage recevied event editor-layout should update hei
151
151
  autoFocus: true,
152
152
  style: {
153
153
  padding: '0 !important',
154
- fontSize: 14
154
+ fontSize: 14,
155
+ color: '#001f23'
155
156
  }
156
157
  };
157
158
  mockHeroEditApp
@@ -415,7 +416,8 @@ exports[`RichTextEditor should render correctly 1`] = `
415
416
  autoFocus: true,
416
417
  style: {
417
418
  padding: '0 !important',
418
- fontSize: 14
419
+ fontSize: 14,
420
+ color: '#001f23'
419
421
  }
420
422
  };
421
423
  mockHeroEditApp
@@ -671,7 +671,7 @@ exports[`StyledHelperText renders correctly 1`] = `
671
671
  },
672
672
  Array [
673
673
  Object {
674
- "color": "#ffffff",
674
+ "color": "#001f23",
675
675
  "fontFamily": "BeVietnamPro-SemiBold",
676
676
  "fontSize": 24,
677
677
  "lineHeight": 32,
@@ -8,6 +8,7 @@ import TextInput from '../TextInput';
8
8
  import Button from '../Button';
9
9
  import { StyledPickerWrapper } from './StyledTimePicker';
10
10
  import type { TimePickerProps } from './types';
11
+ import { useTheme } from '../../theme';
11
12
 
12
13
  const TimePickerIOS = ({
13
14
  value,
@@ -29,6 +30,7 @@ const TimePickerIOS = ({
29
30
 
30
31
  const is12Hour = displayFormat.includes('hh');
31
32
  const displayValue = value ? formatTime(displayFormat, value) : '';
33
+ const theme = useTheme();
32
34
 
33
35
  return (
34
36
  <TouchableOpacity onPress={() => setOpen(true)} disabled={disabled}>
@@ -78,6 +80,7 @@ const TimePickerIOS = ({
78
80
  }}
79
81
  display="spinner"
80
82
  style={{ flex: 1 }}
83
+ textColor={theme.colors.onDefaultGlobalSurface}
81
84
  />
82
85
  </StyledPickerWrapper>
83
86
  </BottomSheet>
@@ -662,6 +662,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
662
662
  }
663
663
  }
664
664
  testID="timePickerIOS"
665
+ textColor="#001f23"
665
666
  value={1995-12-17T03:24:00.000Z}
666
667
  />
667
668
  </View>
package/src/index.ts CHANGED
@@ -3,11 +3,13 @@ import theme, {
3
3
  ThemeProvider,
4
4
  useTheme,
5
5
  swagSystemPalette,
6
+ swagDarkSystemPalette,
6
7
  workSystemPalette,
7
8
  jobsSystemPalette,
8
9
  walletSystemPalette,
9
10
  eBensSystemPalette,
10
11
  ThemeSwitcher,
12
+ withTheme,
11
13
  } from './theme';
12
14
  import { scale } from './utils/scale';
13
15
 
@@ -61,7 +63,9 @@ export {
61
63
  scale,
62
64
  ThemeProvider,
63
65
  ThemeSwitcher,
66
+ withTheme,
64
67
  swagSystemPalette,
68
+ swagDarkSystemPalette,
65
69
  workSystemPalette,
66
70
  jobsSystemPalette,
67
71
  walletSystemPalette,
@@ -8,10 +8,11 @@ import {
8
8
  jobsSystemPalette,
9
9
  walletSystemPalette,
10
10
  eBensSystemPalette,
11
+ swagDarkSystemPalette,
11
12
  } from './global';
12
13
  import ThemeProvider from './ThemeProvider';
13
14
 
14
- type ThemeName = 'swag' | 'work' | 'jobs' | 'wallet' | 'eBens';
15
+ type ThemeName = 'swag' | 'swagDark' | 'work' | 'jobs' | 'wallet' | 'eBens';
15
16
 
16
17
  const ThemeSwitcher = ({
17
18
  name = 'swag',
@@ -32,9 +33,21 @@ const ThemeSwitcher = ({
32
33
  return getTheme(defaultScale, walletSystemPalette);
33
34
  case 'eBens':
34
35
  return getTheme(defaultScale, eBensSystemPalette);
36
+ case 'swagDark':
37
+ return getTheme(defaultScale, swagDarkSystemPalette);
35
38
  }
36
39
  }, [name]);
37
40
  return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
38
41
  };
39
42
 
43
+ export const withTheme =
44
+ <P extends {}>(C: React.ComponentType<P>, themeName: ThemeName) =>
45
+ (props: P) => {
46
+ return (
47
+ <ThemeSwitcher name={themeName}>
48
+ <C {...props} />
49
+ </ThemeSwitcher>
50
+ );
51
+ };
52
+
40
53
  export default ThemeSwitcher;
@@ -399,7 +399,7 @@ Object {
399
399
  "actionItemText": "#ffffff",
400
400
  "backdropBackground": "#000000",
401
401
  "buttonBackground": "#401960",
402
- "headerText": "#ffffff",
402
+ "headerText": "#001f23",
403
403
  "icon": "#ffffff",
404
404
  "titleText": "#ffffff",
405
405
  },
@@ -621,6 +621,7 @@ Object {
621
621
  },
622
622
  "richTextEditor": Object {
623
623
  "colors": Object {
624
+ "text": "#001f23",
624
625
  "toolbarBackgroundColor": "#f6f6f7",
625
626
  "toolbarBorderColor": "#e8e9ea",
626
627
  "toolbarButtonSelectedBackground": "#ece8ef",
@@ -4,10 +4,10 @@ const getFABTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
5
  buttonBackground: theme.colors.primary,
6
6
  icon: theme.colors.onPrimary,
7
- headerText: theme.colors.onDarkGlobalSurface,
7
+ headerText: theme.colors.onDefaultGlobalSurface,
8
8
  actionItemBackground: theme.colors.primary,
9
9
  backdropBackground: theme.colors.overlayGlobalSurface,
10
- titleText: theme.colors.onDarkGlobalSurface,
10
+ titleText: theme.colors.onPrimary,
11
11
  actionItemText: theme.colors.onPrimary,
12
12
  };
13
13
 
@@ -5,6 +5,7 @@ const getRichTextEditorTheme = (theme: GlobalTheme) => {
5
5
  toolbarBorderColor: theme.colors.secondaryOutline,
6
6
  toolbarBackgroundColor: theme.colors.neutralGlobalSurface,
7
7
  toolbarButtonSelectedBackground: theme.colors.highlightedSurface,
8
+ text: theme.colors.onDefaultGlobalSurface,
8
9
  };
9
10
 
10
11
  const sizes = {
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`eBens returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#001f23",
8
+ "decorativePrimary": "#c38cee",
9
+ "decorativePrimarySurface": "#f3e8fc",
10
+ "defaultGlobalSurface": "#ffffff",
11
+ "defaultSurface": "#f6f6f7",
12
+ "disabledOnDefaultGlobalSurface": "#bfc1c5",
13
+ "disabledOutline": "#bfc1c5",
14
+ "error": "#f46363",
15
+ "errorSurface": "#fcebe7",
16
+ "highlightedSurface": "#f1e9fb",
17
+ "inactiveOnDefaultGlobalSurface": "#808f91",
18
+ "inactiveOutline": "#808f91",
19
+ "info": "#b5c3fd",
20
+ "infoSurface": "#ecf0ff",
21
+ "mutedArchived": "#bcbdbf",
22
+ "mutedError": "#f68282",
23
+ "mutedInfo": "#c4cffd",
24
+ "mutedOnDefaultGlobalSurface": "#4d6265",
25
+ "mutedSuccess": "#7bd897",
26
+ "mutedWarning": "#ffcb8d",
27
+ "neutralGlobalSurface": "#f6f6f7",
28
+ "onArchivedSurface": "#737479",
29
+ "onDarkGlobalSurface": "#ffffff",
30
+ "onDefaultGlobalSurface": "#001f23",
31
+ "onErrorSurface": "#de350b",
32
+ "onInfoSurface": "#4568fb",
33
+ "onPrimary": "#ffffff",
34
+ "onSecondary": "#ffffff",
35
+ "onSuccessSurface": "#017d6d",
36
+ "onWarningSurface": "#ffa234",
37
+ "overlayGlobalSurface": "#000000",
38
+ "pressedSurface": "#914edf",
39
+ "primary": "#7622d7",
40
+ "primaryOutline": "#001f23",
41
+ "secondary": "#9f64e3",
42
+ "secondaryOutline": "#e8e9ea",
43
+ "success": "#5ace7d",
44
+ "successSurface": "#f0fef4",
45
+ "warning": "#ffbe71",
46
+ "warningSurface": "#fff6eb",
47
+ }
48
+ `;
@@ -0,0 +1,39 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`global returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#001f23",
8
+ "defaultGlobalSurface": "#ffffff",
9
+ "disabledOnDefaultGlobalSurface": "#bfc1c5",
10
+ "disabledOutline": "#bfc1c5",
11
+ "error": "#f46363",
12
+ "errorSurface": "#fcebe7",
13
+ "inactiveOnDefaultGlobalSurface": "#808f91",
14
+ "inactiveOutline": "#808f91",
15
+ "info": "#b5c3fd",
16
+ "infoSurface": "#ecf0ff",
17
+ "mutedArchived": "#bcbdbf",
18
+ "mutedError": "#f68282",
19
+ "mutedInfo": "#c4cffd",
20
+ "mutedOnDefaultGlobalSurface": "#4d6265",
21
+ "mutedSuccess": "#7bd897",
22
+ "mutedWarning": "#ffcb8d",
23
+ "neutralGlobalSurface": "#f6f6f7",
24
+ "onArchivedSurface": "#737479",
25
+ "onDarkGlobalSurface": "#ffffff",
26
+ "onDefaultGlobalSurface": "#001f23",
27
+ "onErrorSurface": "#de350b",
28
+ "onInfoSurface": "#4568fb",
29
+ "onSuccessSurface": "#017d6d",
30
+ "onWarningSurface": "#ffa234",
31
+ "overlayGlobalSurface": "#000000",
32
+ "primaryOutline": "#001f23",
33
+ "secondaryOutline": "#e8e9ea",
34
+ "success": "#5ace7d",
35
+ "successSurface": "#f0fef4",
36
+ "warning": "#ffbe71",
37
+ "warningSurface": "#fff6eb",
38
+ }
39
+ `;
@@ -0,0 +1,39 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`globalDark returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#ffffff",
8
+ "defaultGlobalSurface": "#001f23",
9
+ "disabledOnDefaultGlobalSurface": "#82858a",
10
+ "disabledOutline": "#82858a",
11
+ "error": "#f46363",
12
+ "errorSurface": "#fcebe7",
13
+ "inactiveOnDefaultGlobalSurface": "#99a5a7",
14
+ "inactiveOutline": "#99a5a7",
15
+ "info": "#b5c3fd",
16
+ "infoSurface": "#ecf0ff",
17
+ "mutedArchived": "#bcbdbf",
18
+ "mutedError": "#f68282",
19
+ "mutedInfo": "#c4cffd",
20
+ "mutedOnDefaultGlobalSurface": "#b3bcbd",
21
+ "mutedSuccess": "#7bd897",
22
+ "mutedWarning": "#ffcb8d",
23
+ "neutralGlobalSurface": "#264144",
24
+ "onArchivedSurface": "#737479",
25
+ "onDarkGlobalSurface": "#001f23",
26
+ "onDefaultGlobalSurface": "#ffffff",
27
+ "onErrorSurface": "#de350b",
28
+ "onInfoSurface": "#4568fb",
29
+ "onSuccessSurface": "#017d6d",
30
+ "onWarningSurface": "#ffa234",
31
+ "overlayGlobalSurface": "#727478",
32
+ "primaryOutline": "#ffffff",
33
+ "secondaryOutline": "#193539",
34
+ "success": "#5ace7d",
35
+ "successSurface": "#f0fef4",
36
+ "warning": "#ffbe71",
37
+ "warningSurface": "#fff6eb",
38
+ }
39
+ `;
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`jobs returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#001f23",
8
+ "decorativePrimary": "#ffad79",
9
+ "decorativePrimarySurface": "#ffefe4",
10
+ "defaultGlobalSurface": "#ffffff",
11
+ "defaultSurface": "#ffffff",
12
+ "disabledOnDefaultGlobalSurface": "#bfc1c5",
13
+ "disabledOutline": "#bfc1c5",
14
+ "error": "#f46363",
15
+ "errorSurface": "#fcebe7",
16
+ "highlightedSurface": "#fff7f2",
17
+ "inactiveOnDefaultGlobalSurface": "#808f91",
18
+ "inactiveOutline": "#808f91",
19
+ "info": "#b5c3fd",
20
+ "infoSurface": "#ecf0ff",
21
+ "mutedArchived": "#bcbdbf",
22
+ "mutedError": "#f68282",
23
+ "mutedInfo": "#c4cffd",
24
+ "mutedOnDefaultGlobalSurface": "#4d6265",
25
+ "mutedSuccess": "#7bd897",
26
+ "mutedWarning": "#ffcb8d",
27
+ "neutralGlobalSurface": "#f6f6f7",
28
+ "onArchivedSurface": "#737479",
29
+ "onDarkGlobalSurface": "#ffffff",
30
+ "onDefaultGlobalSurface": "#001f23",
31
+ "onErrorSurface": "#de350b",
32
+ "onInfoSurface": "#4568fb",
33
+ "onPrimary": "#ffffff",
34
+ "onSecondary": "#ffffff",
35
+ "onSuccessSurface": "#017d6d",
36
+ "onWarningSurface": "#ffa234",
37
+ "overlayGlobalSurface": "#000000",
38
+ "pressedSurface": "#e6703f",
39
+ "primary": "#e3602a",
40
+ "primaryOutline": "#001f23",
41
+ "secondary": "#4d6265",
42
+ "secondaryOutline": "#e8e9ea",
43
+ "success": "#5ace7d",
44
+ "successSurface": "#f0fef4",
45
+ "warning": "#ffbe71",
46
+ "warningSurface": "#fff6eb",
47
+ }
48
+ `;
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`swag returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#001f23",
8
+ "decorativePrimary": "#ffffff",
9
+ "decorativePrimarySurface": "#ccd2d3",
10
+ "defaultGlobalSurface": "#ffffff",
11
+ "defaultSurface": "#f6f6f7",
12
+ "disabledOnDefaultGlobalSurface": "#bfc1c5",
13
+ "disabledOutline": "#bfc1c5",
14
+ "error": "#f46363",
15
+ "errorSurface": "#fcebe7",
16
+ "highlightedSurface": "#ece8ef",
17
+ "inactiveOnDefaultGlobalSurface": "#808f91",
18
+ "inactiveOutline": "#808f91",
19
+ "info": "#b5c3fd",
20
+ "infoSurface": "#ecf0ff",
21
+ "mutedArchived": "#bcbdbf",
22
+ "mutedError": "#f68282",
23
+ "mutedInfo": "#c4cffd",
24
+ "mutedOnDefaultGlobalSurface": "#4d6265",
25
+ "mutedSuccess": "#7bd897",
26
+ "mutedWarning": "#ffcb8d",
27
+ "neutralGlobalSurface": "#f6f6f7",
28
+ "onArchivedSurface": "#737479",
29
+ "onDarkGlobalSurface": "#ffffff",
30
+ "onDefaultGlobalSurface": "#001f23",
31
+ "onErrorSurface": "#de350b",
32
+ "onInfoSurface": "#4568fb",
33
+ "onPrimary": "#ffffff",
34
+ "onSecondary": "#ffffff",
35
+ "onSuccessSurface": "#017d6d",
36
+ "onWarningSurface": "#ffa234",
37
+ "overlayGlobalSurface": "#000000",
38
+ "pressedSurface": "#664780",
39
+ "primary": "#401960",
40
+ "primaryOutline": "#001f23",
41
+ "secondary": "#795e90",
42
+ "secondaryOutline": "#e8e9ea",
43
+ "success": "#5ace7d",
44
+ "successSurface": "#f0fef4",
45
+ "warning": "#ffbe71",
46
+ "warningSurface": "#fff6eb",
47
+ }
48
+ `;
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`swagDark returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#ffffff",
8
+ "decorativePrimary": "#001f23",
9
+ "decorativePrimarySurface": "#193539",
10
+ "defaultGlobalSurface": "#001f23",
11
+ "defaultSurface": "#001f23",
12
+ "disabledOnDefaultGlobalSurface": "#82858a",
13
+ "disabledOutline": "#82858a",
14
+ "error": "#f46363",
15
+ "errorSurface": "#fcebe7",
16
+ "highlightedSurface": "#160922",
17
+ "inactiveOnDefaultGlobalSurface": "#99a5a7",
18
+ "inactiveOutline": "#99a5a7",
19
+ "info": "#b5c3fd",
20
+ "infoSurface": "#ecf0ff",
21
+ "mutedArchived": "#bcbdbf",
22
+ "mutedError": "#f68282",
23
+ "mutedInfo": "#c4cffd",
24
+ "mutedOnDefaultGlobalSurface": "#b3bcbd",
25
+ "mutedSuccess": "#7bd897",
26
+ "mutedWarning": "#ffcb8d",
27
+ "neutralGlobalSurface": "#264144",
28
+ "onArchivedSurface": "#737479",
29
+ "onDarkGlobalSurface": "#001f23",
30
+ "onDefaultGlobalSurface": "#ffffff",
31
+ "onErrorSurface": "#de350b",
32
+ "onInfoSurface": "#4568fb",
33
+ "onPrimary": "#001f23",
34
+ "onSecondary": "#001f23",
35
+ "onSuccessSurface": "#017d6d",
36
+ "onWarningSurface": "#ffa234",
37
+ "overlayGlobalSurface": "#727478",
38
+ "pressedSurface": "#664780",
39
+ "primary": "#c38cee",
40
+ "primaryOutline": "#ffffff",
41
+ "secondary": "#d5aff3",
42
+ "secondaryOutline": "#193539",
43
+ "success": "#5ace7d",
44
+ "successSurface": "#f0fef4",
45
+ "warning": "#ffbe71",
46
+ "warningSurface": "#fff6eb",
47
+ }
48
+ `;
@@ -0,0 +1,48 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`wallet returns correct theme object 1`] = `
4
+ Object {
5
+ "archived": "#abacaf",
6
+ "archivedSurface": "#f1f2f3",
7
+ "darkGlobalSurface": "#001f23",
8
+ "decorativePrimary": "#8999ff",
9
+ "decorativePrimarySurface": "#e7ebff",
10
+ "defaultGlobalSurface": "#ffffff",
11
+ "defaultSurface": "#dce0ff",
12
+ "disabledOnDefaultGlobalSurface": "#bfc1c5",
13
+ "disabledOutline": "#bfc1c5",
14
+ "error": "#f46363",
15
+ "errorSurface": "#fcebe7",
16
+ "highlightedSurface": "#eff0fc",
17
+ "inactiveOnDefaultGlobalSurface": "#808f91",
18
+ "inactiveOutline": "#808f91",
19
+ "info": "#b5c3fd",
20
+ "infoSurface": "#ecf0ff",
21
+ "mutedArchived": "#bcbdbf",
22
+ "mutedError": "#f68282",
23
+ "mutedInfo": "#c4cffd",
24
+ "mutedOnDefaultGlobalSurface": "#4d6265",
25
+ "mutedSuccess": "#7bd897",
26
+ "mutedWarning": "#ffcb8d",
27
+ "neutralGlobalSurface": "#f6f6f7",
28
+ "onArchivedSurface": "#737479",
29
+ "onDarkGlobalSurface": "#ffffff",
30
+ "onDefaultGlobalSurface": "#001f23",
31
+ "onErrorSurface": "#de350b",
32
+ "onInfoSurface": "#4568fb",
33
+ "onPrimary": "#ffffff",
34
+ "onSecondary": "#ffffff",
35
+ "onSuccessSurface": "#017d6d",
36
+ "onWarningSurface": "#ffa234",
37
+ "overlayGlobalSurface": "#000000",
38
+ "pressedSurface": "#6b77e5",
39
+ "primary": "#5a68e2",
40
+ "primaryOutline": "#001f23",
41
+ "secondary": "#3f499e",
42
+ "secondaryOutline": "#e8e9ea",
43
+ "success": "#5ace7d",
44
+ "successSurface": "#f0fef4",
45
+ "warning": "#ffbe71",
46
+ "warningSurface": "#fff6eb",
47
+ }
48
+ `;