@hero-design/rn 7.18.1 → 7.19.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 (311) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +155 -143
  3. package/lib/index.js +155 -143
  4. package/package.json +2 -2
  5. package/src/components/Accordion/AccordionItem.tsx +5 -4
  6. package/src/components/Accordion/__tests__/index.spec.tsx +2 -1
  7. package/src/components/Accordion/index.tsx +3 -2
  8. package/src/components/Alert/StyledAlert.tsx +3 -2
  9. package/src/components/Alert/index.tsx +5 -3
  10. package/src/components/Avatar/index.tsx +2 -2
  11. package/src/components/Badge/Status.tsx +4 -2
  12. package/src/components/Badge/index.tsx +2 -1
  13. package/src/components/BottomNavigation/__tests__/index.spec.tsx +4 -2
  14. package/src/components/BottomNavigation/index.tsx +6 -8
  15. package/src/components/BottomSheet/Footer.tsx +2 -1
  16. package/src/components/BottomSheet/Header.tsx +2 -1
  17. package/src/components/BottomSheet/StyledBottomSheet.tsx +2 -2
  18. package/src/components/BottomSheet/index.tsx +4 -8
  19. package/src/components/Button/Button.tsx +5 -6
  20. package/src/components/Button/IconButton.tsx +4 -7
  21. package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +5 -3
  22. package/src/components/Button/LoadingIndicator/index.tsx +2 -8
  23. package/src/components/Button/StyledButton.tsx +4 -5
  24. package/src/components/Button/UtilityButton/index.tsx +5 -4
  25. package/src/components/Button/index.tsx +3 -2
  26. package/src/components/Calendar/StyledCalendar.tsx +2 -1
  27. package/src/components/Card/DataCard/index.tsx +3 -2
  28. package/src/components/Card/index.tsx +3 -2
  29. package/src/components/Checkbox/StyledCheckbox.tsx +44 -14
  30. package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +28 -3
  31. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +95 -9
  32. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +337 -23
  33. package/src/components/Checkbox/__tests__/index.spec.tsx +38 -7
  34. package/src/components/Checkbox/index.tsx +35 -18
  35. package/src/components/Collapse/index.tsx +4 -8
  36. package/src/components/ContentNavigator/index.tsx +1 -1
  37. package/src/components/DatePicker/DatePickerAndroid.tsx +1 -1
  38. package/src/components/DatePicker/DatePickerIOS.tsx +1 -1
  39. package/src/components/DatePicker/StyledDatePicker.tsx +2 -1
  40. package/src/components/DatePicker/__tests__/DatePickerIOS.spec.tsx +1 -2
  41. package/src/components/DatePicker/index.tsx +1 -1
  42. package/src/components/DatePicker/types.ts +1 -1
  43. package/src/components/Divider/index.tsx +1 -1
  44. package/src/components/Drawer/DragableDrawer/index.tsx +3 -2
  45. package/src/components/Drawer/StyledDrawer.tsx +3 -2
  46. package/src/components/Drawer/index.tsx +2 -1
  47. package/src/components/Empty/index.tsx +1 -2
  48. package/src/components/FAB/ActionGroup/ActionItem.tsx +3 -2
  49. package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +4 -3
  50. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +4 -2
  51. package/src/components/FAB/ActionGroup/index.tsx +5 -3
  52. package/src/components/FAB/AnimatedFABIcon.tsx +1 -1
  53. package/src/components/FAB/FAB.tsx +2 -2
  54. package/src/components/FAB/StyledFAB.tsx +4 -7
  55. package/src/components/Icon/AnimatedIcon.tsx +2 -1
  56. package/src/components/Icon/index.tsx +1 -1
  57. package/src/components/List/BasicListItem.tsx +3 -3
  58. package/src/components/List/ListItem.tsx +6 -3
  59. package/src/components/List/StyledListItem.tsx +2 -1
  60. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +13 -27
  61. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -0
  62. package/src/components/PinInput/PinCell.tsx +1 -1
  63. package/src/components/PinInput/index.tsx +3 -7
  64. package/src/components/Progress/ProgressBar.tsx +2 -1
  65. package/src/components/Progress/ProgressCircle.tsx +3 -9
  66. package/src/components/Progress/StyledProgressBar.tsx +3 -3
  67. package/src/components/Progress/StyledProgressCircle.tsx +3 -3
  68. package/src/components/Radio/Radio.tsx +20 -14
  69. package/src/components/Radio/RadioGroup.tsx +5 -3
  70. package/src/components/Radio/StyledRadio.tsx +12 -29
  71. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +84 -50
  72. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +124 -73
  73. package/src/components/RichTextEditor/EditorToolbar.tsx +4 -8
  74. package/src/components/RichTextEditor/RichTextEditor.tsx +5 -14
  75. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -6
  76. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +2 -6
  77. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +4 -7
  78. package/src/components/RichTextEditor/index.tsx +6 -6
  79. package/src/components/SectionHeading/index.tsx +5 -4
  80. package/src/components/Select/MultiSelect/Option.tsx +2 -1
  81. package/src/components/Select/MultiSelect/OptionList.tsx +3 -3
  82. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +605 -585
  83. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
  84. package/src/components/Select/MultiSelect/index.tsx +20 -16
  85. package/src/components/Select/SingleSelect/Option.tsx +2 -1
  86. package/src/components/Select/SingleSelect/OptionList.tsx +3 -3
  87. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +602 -582
  88. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +1 -1
  89. package/src/components/Select/SingleSelect/index.tsx +20 -16
  90. package/src/components/Select/StyledOptionList.tsx +11 -9
  91. package/src/components/Select/helpers.tsx +1 -1
  92. package/src/components/Select/index.tsx +6 -4
  93. package/src/components/Select/types.ts +3 -3
  94. package/src/components/Spinner/StyledSpinner.tsx +2 -1
  95. package/src/components/Spinner/index.tsx +3 -3
  96. package/src/components/Switch/StyledSwitch.tsx +10 -26
  97. package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +25 -0
  98. package/src/components/Switch/__tests__/__snapshots__/{StyledHeading.spec.tsx.snap → StyledSwitch.spec.tsx.snap} +45 -18
  99. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +26 -52
  100. package/src/components/Switch/index.tsx +23 -20
  101. package/src/components/Tabs/ScrollableTabs.tsx +1 -1
  102. package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +4 -2
  103. package/src/components/Tabs/__tests__/index.spec.tsx +4 -2
  104. package/src/components/Tabs/index.tsx +7 -13
  105. package/src/components/Tag/index.tsx +1 -1
  106. package/src/components/TextInput/index.tsx +5 -5
  107. package/src/components/TimePicker/StyledTimePicker.tsx +2 -1
  108. package/src/components/TimePicker/TimePickerAndroid.tsx +1 -1
  109. package/src/components/TimePicker/TimePickerIOS.tsx +1 -1
  110. package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +1 -2
  111. package/src/components/TimePicker/index.tsx +1 -1
  112. package/src/components/TimePicker/types.ts +1 -1
  113. package/src/components/Toast/StyledToast.tsx +3 -8
  114. package/src/components/Toast/Toast.tsx +3 -2
  115. package/src/components/Toast/ToastContainer.tsx +2 -2
  116. package/src/components/Toast/ToastContext.ts +1 -1
  117. package/src/components/Toast/ToastProvider.tsx +5 -7
  118. package/src/components/Toast/__tests__/ToastContainer.spec.tsx +1 -1
  119. package/src/components/Toast/types.ts +3 -3
  120. package/src/components/Toolbar/StyledToolbar.tsx +2 -1
  121. package/src/components/Toolbar/ToolbarGroup.tsx +2 -1
  122. package/src/components/Toolbar/ToolbarItem.tsx +2 -1
  123. package/src/components/Toolbar/index.tsx +2 -1
  124. package/src/components/Typography/Text/index.tsx +3 -2
  125. package/src/testHelpers/renderWithTheme.tsx +2 -1
  126. package/src/theme/ThemeProvider.ts +1 -1
  127. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +24 -26
  128. package/src/theme/components/accordion.ts +1 -1
  129. package/src/theme/components/alert.ts +1 -1
  130. package/src/theme/components/avatar.ts +1 -1
  131. package/src/theme/components/badge.ts +1 -1
  132. package/src/theme/components/bottomNavigation.ts +1 -1
  133. package/src/theme/components/bottomSheet.ts +1 -1
  134. package/src/theme/components/button.ts +1 -1
  135. package/src/theme/components/calendar.ts +1 -1
  136. package/src/theme/components/card.ts +1 -1
  137. package/src/theme/components/checkbox.ts +12 -8
  138. package/src/theme/components/contentNavigator.ts +1 -1
  139. package/src/theme/components/divider.ts +1 -1
  140. package/src/theme/components/drawer.ts +1 -1
  141. package/src/theme/components/empty.ts +1 -1
  142. package/src/theme/components/fab.ts +1 -1
  143. package/src/theme/components/icon.ts +1 -1
  144. package/src/theme/components/list.ts +5 -4
  145. package/src/theme/components/pinInput.ts +1 -1
  146. package/src/theme/components/progress.ts +1 -1
  147. package/src/theme/components/radio.ts +3 -11
  148. package/src/theme/components/richTextEditor.ts +1 -1
  149. package/src/theme/components/sectionHeading.ts +1 -1
  150. package/src/theme/components/select.ts +1 -1
  151. package/src/theme/components/spinner.ts +1 -1
  152. package/src/theme/components/switch.ts +7 -8
  153. package/src/theme/components/tabs.ts +1 -1
  154. package/src/theme/components/tag.ts +1 -1
  155. package/src/theme/components/textInput.ts +1 -1
  156. package/src/theme/components/toast.ts +1 -1
  157. package/src/theme/components/toolbar.ts +1 -1
  158. package/src/theme/components/typography.ts +1 -1
  159. package/src/theme/getTheme.ts +4 -11
  160. package/src/theme/global/borders.ts +2 -1
  161. package/src/theme/global/colors/swag.ts +2 -3
  162. package/src/theme/global/colors/work.ts +1 -2
  163. package/src/theme/global/index.ts +6 -11
  164. package/src/theme/global/scale.ts +2 -1
  165. package/src/theme/global/space.ts +2 -1
  166. package/src/theme/global/typography.ts +2 -8
  167. package/src/theme/index.ts +5 -2
  168. package/src/types.ts +9 -10
  169. package/testUtils/setup.tsx +2 -0
  170. package/tsconfig.json +4 -9
  171. package/types/components/Accordion/AccordionItem.d.ts +3 -3
  172. package/types/components/Accordion/index.d.ts +3 -2
  173. package/types/components/Alert/StyledAlert.d.ts +2 -1
  174. package/types/components/Alert/index.d.ts +3 -3
  175. package/types/components/Avatar/index.d.ts +1 -1
  176. package/types/components/Badge/Status.d.ts +2 -2
  177. package/types/components/Badge/index.d.ts +2 -1
  178. package/types/components/BottomNavigation/index.d.ts +3 -3
  179. package/types/components/BottomSheet/Footer.d.ts +1 -1
  180. package/types/components/BottomSheet/Header.d.ts +1 -1
  181. package/types/components/BottomSheet/StyledBottomSheet.d.ts +2 -1
  182. package/types/components/BottomSheet/index.d.ts +2 -2
  183. package/types/components/Button/Button.d.ts +4 -4
  184. package/types/components/Button/IconButton.d.ts +2 -2
  185. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +3 -2
  186. package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
  187. package/types/components/Button/StyledButton.d.ts +3 -2
  188. package/types/components/Button/UtilityButton/index.d.ts +3 -3
  189. package/types/components/Button/index.d.ts +2 -2
  190. package/types/components/Calendar/StyledCalendar.d.ts +2 -1
  191. package/types/components/Card/DataCard/index.d.ts +2 -2
  192. package/types/components/Card/index.d.ts +2 -2
  193. package/types/components/Checkbox/StyledCheckbox.d.ts +21 -3
  194. package/types/components/Checkbox/index.d.ts +11 -3
  195. package/types/components/Collapse/index.d.ts +2 -2
  196. package/types/components/ContentNavigator/index.d.ts +1 -1
  197. package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
  198. package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
  199. package/types/components/DatePicker/StyledDatePicker.d.ts +2 -1
  200. package/types/components/DatePicker/index.d.ts +1 -1
  201. package/types/components/DatePicker/types.d.ts +1 -1
  202. package/types/components/Divider/index.d.ts +1 -1
  203. package/types/components/Drawer/DragableDrawer/index.d.ts +1 -1
  204. package/types/components/Drawer/StyledDrawer.d.ts +2 -1
  205. package/types/components/Drawer/index.d.ts +1 -1
  206. package/types/components/Empty/index.d.ts +1 -1
  207. package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -2
  208. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +3 -2
  209. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -2
  210. package/types/components/FAB/ActionGroup/index.d.ts +3 -3
  211. package/types/components/FAB/AnimatedFABIcon.d.ts +1 -1
  212. package/types/components/FAB/FAB.d.ts +2 -2
  213. package/types/components/FAB/StyledFAB.d.ts +3 -2
  214. package/types/components/Icon/AnimatedIcon.d.ts +1 -1
  215. package/types/components/Icon/index.d.ts +1 -1
  216. package/types/components/List/BasicListItem.d.ts +2 -2
  217. package/types/components/List/ListItem.d.ts +4 -3
  218. package/types/components/PinInput/PinCell.d.ts +1 -1
  219. package/types/components/PinInput/index.d.ts +2 -2
  220. package/types/components/Progress/ProgressBar.d.ts +1 -1
  221. package/types/components/Progress/ProgressCircle.d.ts +1 -1
  222. package/types/components/Progress/StyledProgressBar.d.ts +3 -2
  223. package/types/components/Progress/StyledProgressCircle.d.ts +3 -2
  224. package/types/components/Radio/Radio.d.ts +2 -2
  225. package/types/components/Radio/RadioGroup.d.ts +3 -3
  226. package/types/components/Radio/StyledRadio.d.ts +2 -12
  227. package/types/components/RichTextEditor/RichTextEditor.d.ts +3 -2
  228. package/types/components/RichTextEditor/index.d.ts +3 -2
  229. package/types/components/SectionHeading/index.d.ts +3 -3
  230. package/types/components/Select/MultiSelect/Option.d.ts +1 -1
  231. package/types/components/Select/MultiSelect/OptionList.d.ts +2 -2
  232. package/types/components/Select/MultiSelect/index.d.ts +1 -1
  233. package/types/components/Select/SingleSelect/Option.d.ts +1 -1
  234. package/types/components/Select/SingleSelect/OptionList.d.ts +2 -2
  235. package/types/components/Select/SingleSelect/index.d.ts +1 -1
  236. package/types/components/Select/StyledOptionList.d.ts +4 -4
  237. package/types/components/Select/helpers.d.ts +1 -1
  238. package/types/components/Select/index.d.ts +4 -3
  239. package/types/components/Select/types.d.ts +3 -3
  240. package/types/components/Spinner/StyledSpinner.d.ts +2 -1
  241. package/types/components/Spinner/index.d.ts +2 -2
  242. package/types/components/Switch/StyledSwitch.d.ts +3 -18
  243. package/types/components/{Radio/__tests__/StyledRadio.spec.d.ts → Switch/__tests__/StyledSwitch.spec.d.ts} +0 -0
  244. package/types/components/Switch/index.d.ts +3 -2
  245. package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
  246. package/types/components/Tabs/index.d.ts +3 -3
  247. package/types/components/Tag/index.d.ts +1 -1
  248. package/types/components/TextInput/index.d.ts +3 -3
  249. package/types/components/TimePicker/StyledTimePicker.d.ts +2 -1
  250. package/types/components/TimePicker/TimePickerAndroid.d.ts +1 -1
  251. package/types/components/TimePicker/TimePickerIOS.d.ts +1 -1
  252. package/types/components/TimePicker/index.d.ts +1 -1
  253. package/types/components/TimePicker/types.d.ts +1 -1
  254. package/types/components/Toast/StyledToast.d.ts +2 -1
  255. package/types/components/Toast/Toast.d.ts +1 -1
  256. package/types/components/Toast/ToastContainer.d.ts +2 -2
  257. package/types/components/Toast/ToastContext.d.ts +1 -1
  258. package/types/components/Toast/ToastProvider.d.ts +2 -2
  259. package/types/components/Toast/types.d.ts +3 -3
  260. package/types/components/Toolbar/StyledToolbar.d.ts +2 -1
  261. package/types/components/Toolbar/ToolbarGroup.d.ts +1 -1
  262. package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
  263. package/types/components/Toolbar/index.d.ts +1 -1
  264. package/types/components/Typography/Text/index.d.ts +2 -2
  265. package/types/testHelpers/renderWithTheme.d.ts +1 -1
  266. package/types/theme/ThemeProvider.d.ts +1 -1
  267. package/types/theme/components/accordion.d.ts +1 -1
  268. package/types/theme/components/alert.d.ts +1 -1
  269. package/types/theme/components/avatar.d.ts +1 -1
  270. package/types/theme/components/badge.d.ts +1 -1
  271. package/types/theme/components/bottomNavigation.d.ts +1 -1
  272. package/types/theme/components/bottomSheet.d.ts +1 -1
  273. package/types/theme/components/button.d.ts +1 -1
  274. package/types/theme/components/calendar.d.ts +1 -1
  275. package/types/theme/components/card.d.ts +1 -1
  276. package/types/theme/components/checkbox.d.ts +10 -7
  277. package/types/theme/components/contentNavigator.d.ts +1 -1
  278. package/types/theme/components/divider.d.ts +1 -1
  279. package/types/theme/components/drawer.d.ts +1 -1
  280. package/types/theme/components/empty.d.ts +1 -1
  281. package/types/theme/components/fab.d.ts +1 -1
  282. package/types/theme/components/icon.d.ts +1 -1
  283. package/types/theme/components/list.d.ts +8 -7
  284. package/types/theme/components/pinInput.d.ts +1 -1
  285. package/types/theme/components/progress.d.ts +1 -1
  286. package/types/theme/components/radio.d.ts +1 -8
  287. package/types/theme/components/richTextEditor.d.ts +1 -1
  288. package/types/theme/components/sectionHeading.d.ts +1 -1
  289. package/types/theme/components/select.d.ts +1 -1
  290. package/types/theme/components/spinner.d.ts +1 -1
  291. package/types/theme/components/switch.d.ts +7 -6
  292. package/types/theme/components/tabs.d.ts +1 -1
  293. package/types/theme/components/tag.d.ts +1 -1
  294. package/types/theme/components/textInput.d.ts +1 -1
  295. package/types/theme/components/toast.d.ts +1 -1
  296. package/types/theme/components/toolbar.d.ts +1 -1
  297. package/types/theme/components/typography.d.ts +1 -1
  298. package/types/theme/getTheme.d.ts +2 -2
  299. package/types/theme/global/borders.d.ts +2 -1
  300. package/types/theme/global/colors/swag.d.ts +1 -1
  301. package/types/theme/global/colors/work.d.ts +1 -1
  302. package/types/theme/global/index.d.ts +5 -3
  303. package/types/theme/global/scale.d.ts +2 -1
  304. package/types/theme/global/space.d.ts +2 -1
  305. package/types/theme/global/typography.d.ts +2 -1
  306. package/types/theme/index.d.ts +4 -2
  307. package/types/types.d.ts +9 -8
  308. package/src/components/Radio/__tests__/StyledRadio.spec.tsx +0 -43
  309. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +0 -124
  310. package/src/components/Switch/__tests__/StyledHeading.spec.tsx +0 -42
  311. package/types/components/Switch/__tests__/StyledHeading.spec.d.ts +0 -1
package/lib/index.js CHANGED
@@ -1789,23 +1789,26 @@ var getCardTheme = function getCardTheme(theme) {
1789
1789
 
1790
1790
  var getCheckboxTheme = function getCheckboxTheme(theme) {
1791
1791
  var colors = {
1792
- borderColor: theme.colors.primary,
1793
- text: theme.colors.invertedText,
1794
- disabled: theme.colors.inactiveBackground
1792
+ "default": theme.colors.globalPrimary,
1793
+ disabledBorder: theme.colors.globalPrimaryLight
1795
1794
  };
1796
1795
  var space = {
1797
1796
  // to remove the empty space above the check icon
1798
1797
  // and also to center the check mark
1799
- iconTop: -theme.space.xsmall
1798
+ iconTop: -scale(3),
1799
+ wrapperPadding: theme.space.medium,
1800
+ iconDescriptionPadding: theme.space.smallMedium
1800
1801
  };
1801
1802
  var sizes = {
1802
- base: theme.space.large
1803
+ icon: scale(20)
1803
1804
  };
1804
1805
  var radii = {
1805
- base: theme.radii.base
1806
+ wrapper: theme.radii.medium,
1807
+ icon: theme.radii.base
1806
1808
  };
1807
1809
  var borderWidths = {
1808
- "default": theme.borderWidths.medium
1810
+ wrapper: theme.borderWidths.base,
1811
+ icon: theme.borderWidths.medium
1809
1812
  };
1810
1813
  return {
1811
1814
  colors: colors,
@@ -2035,11 +2038,12 @@ var getListTheme = function getListTheme(theme) {
2035
2038
  cardShadow: theme.radii.base,
2036
2039
  leadingStatus: theme.radii.rounded
2037
2040
  };
2038
- var offsets = {
2039
- cardShadow: {
2041
+ var shadows = {
2042
+ cardOffset: {
2040
2043
  width: 0,
2041
2044
  height: 2
2042
- }
2045
+ },
2046
+ cardElevation: 10
2043
2047
  };
2044
2048
  var widths = {
2045
2049
  leadingStatus: 8
@@ -2053,9 +2057,9 @@ var getListTheme = function getListTheme(theme) {
2053
2057
  colors: colors,
2054
2058
  space: space,
2055
2059
  radii: radii,
2056
- offsets: offsets,
2057
2060
  widths: widths,
2058
- opacity: opacity
2061
+ opacity: opacity,
2062
+ shadows: shadows
2059
2063
  };
2060
2064
  };
2061
2065
 
@@ -2128,13 +2132,9 @@ var getProgressTheme = function getProgressTheme(theme) {
2128
2132
 
2129
2133
  var getRadioTheme = function getRadioTheme(theme) {
2130
2134
  var colors = {
2131
- circle: theme.colors.black,
2132
- checkedCircle: theme.colors.primary,
2133
- wrapper: theme.colors.platformBackground,
2134
- checkedWrapper: theme.colors.primaryBackground
2135
+ circle: theme.colors.globalPrimary
2135
2136
  };
2136
2137
  var space = {
2137
- wrapperPadding: theme.space.medium,
2138
2138
  circleLeftMargin: theme.space.small,
2139
2139
  groupTopMargin: theme.space.xsmall
2140
2140
  };
@@ -2145,15 +2145,11 @@ var getRadioTheme = function getRadioTheme(theme) {
2145
2145
  var borderWidths = {
2146
2146
  circle: theme.borderWidths.medium
2147
2147
  };
2148
- var radii = {
2149
- wrapper: theme.radii.base
2150
- };
2151
2148
  return {
2152
2149
  sizes: sizes,
2153
2150
  borderWidths: borderWidths,
2154
2151
  space: space,
2155
- colors: colors,
2156
- radii: radii
2152
+ colors: colors
2157
2153
  };
2158
2154
  };
2159
2155
 
@@ -2249,9 +2245,13 @@ var getSpinnerTheme = function getSpinnerTheme(theme) {
2249
2245
 
2250
2246
  var getSwitchTheme = function getSwitchTheme(theme) {
2251
2247
  var colors = {
2252
- thumb: theme.colors.platformBackground,
2253
- active: theme.colors.primary,
2254
- inactive: theme.colors.inactiveBackground
2248
+ backgroundColors: {
2249
+ checked: theme.colors.primary,
2250
+ unchecked: theme.colors.globalPrimaryLight,
2251
+ 'disabled-checked': theme.colors.primaryLight,
2252
+ 'disabled-unchecked': theme.colors.archived
2253
+ },
2254
+ thumb: theme.colors.platformBackground
2255
2255
  };
2256
2256
  var thumbSizes = {
2257
2257
  small: theme.space.medium,
@@ -2273,17 +2273,13 @@ var getSwitchTheme = function getSwitchTheme(theme) {
2273
2273
  var radii = {
2274
2274
  rounded: theme.radii.rounded
2275
2275
  };
2276
- var borderWidths = {
2277
- "default": theme.borderWidths.base
2278
- };
2279
2276
  return {
2280
2277
  colors: colors,
2281
2278
  thumbSizes: thumbSizes,
2282
2279
  widths: widths,
2283
2280
  heights: heights,
2284
2281
  spaces: spaces,
2285
- radii: radii,
2286
- borderWidths: borderWidths
2282
+ radii: radii
2287
2283
  };
2288
2284
  };
2289
2285
 
@@ -14591,7 +14587,7 @@ var AccordionItem = function AccordionItem(_ref) {
14591
14587
  fontSize: "large",
14592
14588
  fontWeight: "semi-bold"
14593
14589
  }, header) : header, /*#__PURE__*/React__default["default"].createElement(Icon, {
14594
- icon: "arrow-".concat(open ? 'up' : 'down'),
14590
+ icon: open ? 'arrow-up' : 'arrow-down',
14595
14591
  intent: "primary",
14596
14592
  size: "small"
14597
14593
  })), /*#__PURE__*/React__default["default"].createElement(StyledCollapse, {
@@ -18337,7 +18333,7 @@ function convertToFP(fn, arity, a) {
18337
18333
  var format = convertToFP(format$1, 2);
18338
18334
  var formatTime = format;
18339
18335
 
18340
- var Wrapper$1 = index$7(reactNative.View)(function () {
18336
+ var Wrapper = index$7(reactNative.View)(function () {
18341
18337
  return {
18342
18338
  flex: 1,
18343
18339
  flexDirection: 'row',
@@ -18364,7 +18360,7 @@ function ContentNavigator(_ref) {
18364
18360
  fontSize = _ref$fontSize === void 0 ? 'medium' : _ref$fontSize,
18365
18361
  testID = _ref.testID,
18366
18362
  style = _ref.style;
18367
- return /*#__PURE__*/React__default["default"].createElement(Wrapper$1, {
18363
+ return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
18368
18364
  testID: testID,
18369
18365
  style: style
18370
18366
  }, /*#__PURE__*/React__default["default"].createElement(CompoundButton.Icon, {
@@ -18711,42 +18707,73 @@ var index$6 = Object.assign(Card, {
18711
18707
 
18712
18708
  var StyledWrapper$5 = index$7(reactNative.TouchableOpacity)(function (_ref) {
18713
18709
  var theme = _ref.theme,
18714
- disabled = _ref.disabled;
18710
+ themeWithBorder = _ref.themeWithBorder,
18711
+ themeDisabled = _ref.themeDisabled;
18712
+ var borderStyle = {
18713
+ borderRadius: theme.__hd__.checkbox.radii.wrapper,
18714
+ borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
18715
+ padding: theme.__hd__.checkbox.space.wrapperPadding,
18716
+ borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
18717
+ };
18718
+ return _objectSpread2({
18719
+ flexDirection: 'row'
18720
+ }, themeWithBorder && borderStyle);
18721
+ });
18722
+ var StyledDescription$1 = index$7(Typography.Text)(function (_ref2) {
18723
+ var theme = _ref2.theme;
18724
+ return {
18725
+ paddingRight: theme.__hd__.checkbox.space.iconDescriptionPadding,
18726
+ flex: 1
18727
+ };
18728
+ });
18729
+ var StyledCheckbox = index$7(reactNative.View)(function (_ref3) {
18730
+ var theme = _ref3.theme,
18731
+ themeDisabled = _ref3.themeDisabled;
18715
18732
  return {
18716
- display: 'flex',
18717
18733
  flexDirection: 'row',
18718
18734
  justifyContent: 'center',
18719
- height: theme.__hd__.checkbox.sizes.base,
18720
- width: theme.__hd__.checkbox.sizes.base,
18721
- borderRadius: theme.__hd__.checkbox.radii.base,
18722
- borderWidth: theme.__hd__.checkbox.borderWidths["default"],
18723
- borderColor: disabled ? theme.__hd__.checkbox.colors.disabled : theme.__hd__.checkbox.colors.borderColor,
18735
+ height: theme.__hd__.checkbox.sizes.icon,
18736
+ width: theme.__hd__.checkbox.sizes.icon,
18737
+ borderRadius: theme.__hd__.checkbox.radii.icon,
18738
+ borderWidth: theme.__hd__.checkbox.borderWidths.icon,
18739
+ borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"],
18724
18740
  overflow: 'hidden'
18725
18741
  };
18726
18742
  });
18743
+ var StyledCheckMark = index$7(Icon)(function (_ref4) {
18744
+ var theme = _ref4.theme;
18745
+ return {
18746
+ position: 'absolute',
18747
+ top: theme.__hd__.checkbox.space.iconTop
18748
+ };
18749
+ });
18727
18750
 
18728
- var CheckBox = function CheckBox(_ref) {
18751
+ var Checkbox = function Checkbox(_ref) {
18729
18752
  var checked = _ref.checked,
18730
- disabled = _ref.disabled,
18753
+ description = _ref.description,
18754
+ _ref$withBorder = _ref.withBorder,
18755
+ withBorder = _ref$withBorder === void 0 ? false : _ref$withBorder,
18756
+ _ref$disabled = _ref.disabled,
18757
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
18731
18758
  onPress = _ref.onPress,
18732
18759
  style = _ref.style,
18733
18760
  testID = _ref.testID;
18734
18761
  return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$5, {
18735
18762
  onPress: onPress,
18736
18763
  disabled: disabled,
18764
+ themeDisabled: disabled,
18765
+ themeWithBorder: withBorder,
18737
18766
  style: style,
18738
18767
  testID: testID
18739
- }, checked && /*#__PURE__*/React__default["default"].createElement(Icon, {
18740
- icon: "circle-ok",
18741
- intent: "primary",
18742
- size: "large",
18743
- style: _objectSpread2({
18744
- position: 'absolute',
18745
- top: defaultTheme.__hd__.checkbox.space.iconTop
18746
- }, disabled ? {
18747
- color: defaultTheme.__hd__.checkbox.colors.disabled
18748
- } : {})
18749
- }));
18768
+ }, !!description && /*#__PURE__*/React__default["default"].createElement(StyledDescription$1, {
18769
+ intent: disabled ? 'subdued' : 'body'
18770
+ }, description), /*#__PURE__*/React__default["default"].createElement(StyledCheckbox, {
18771
+ themeDisabled: disabled
18772
+ }, checked && /*#__PURE__*/React__default["default"].createElement(StyledCheckMark, {
18773
+ icon: "box-check",
18774
+ intent: disabled ? 'disabled-text' : 'text',
18775
+ testID: "check-mark"
18776
+ })));
18750
18777
  };
18751
18778
 
18752
18779
  var StyledContainer$3 = index$7(reactNative.View)(function (_ref) {
@@ -18897,7 +18924,7 @@ var StyledErrorAndMaxLengthContainer = index$7(reactNative.View)(function () {
18897
18924
  });
18898
18925
 
18899
18926
  var _excluded$5 = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "helpText", "value", "defaultValue"];
18900
- var getVariant = function getVariant(_ref) {
18927
+ var getVariant$1 = function getVariant(_ref) {
18901
18928
  var disabled = _ref.disabled,
18902
18929
  error = _ref.error,
18903
18930
  editable = _ref.editable,
@@ -18962,7 +18989,7 @@ var TextInput = function TextInput(_ref2) {
18962
18989
  isFocused = _React$useState2[0],
18963
18990
  setIsFocused = _React$useState2[1];
18964
18991
 
18965
- var variant = getVariant({
18992
+ var variant = getVariant$1({
18966
18993
  disabled: disabled,
18967
18994
  error: error,
18968
18995
  editable: editable,
@@ -19885,8 +19912,9 @@ var StyledListItemContainer$1 = index$7(reactNative.TouchableHighlight)(function
19885
19912
  borderRadius: theme.__hd__.list.radii.card,
19886
19913
  shadowColor: theme.colors.shadow,
19887
19914
  shadowRadius: theme.__hd__.list.radii.cardShadow,
19888
- shadowOffset: theme.__hd__.list.offsets.cardShadow,
19889
- shadowOpacity: theme.__hd__.list.opacity.cardShadow
19915
+ shadowOffset: theme.__hd__.list.shadows.cardOffset,
19916
+ shadowOpacity: theme.__hd__.list.opacity.cardShadow,
19917
+ elevation: theme.__hd__.list.shadows.cardElevation
19890
19918
  });
19891
19919
 
19892
19920
  default:
@@ -20641,70 +20669,60 @@ var Spinner = function Spinner(_ref) {
20641
20669
  }, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, null)));
20642
20670
  };
20643
20671
 
20644
- var Wrapper = index$7(reactNative.TouchableOpacity)(function (_ref) {
20645
- var theme = _ref.theme,
20646
- themeChecked = _ref.themeChecked;
20647
- return {
20648
- flexDirection: 'row',
20649
- justifyContent: 'space-between',
20650
- alignItems: 'center',
20651
- borderRadius: theme.__hd__.radio.radii.wrapper,
20652
- padding: theme.__hd__.radio.space.wrapperPadding,
20653
- backgroundColor: themeChecked ? theme.__hd__.radio.colors.checkedWrapper : theme.__hd__.radio.colors.wrapper
20654
- };
20655
- });
20656
- var Circle = index$7(reactNative.View)(function (_ref2) {
20657
- var theme = _ref2.theme,
20658
- themeChecked = _ref2.themeChecked;
20672
+ var Circle = index$7(reactNative.View)(function (_ref) {
20673
+ var theme = _ref.theme;
20659
20674
  return {
20660
20675
  height: theme.__hd__.radio.sizes.circle,
20661
20676
  width: theme.__hd__.radio.sizes.circle,
20662
20677
  borderRadius: theme.radii.rounded,
20663
20678
  borderWidth: theme.__hd__.radio.borderWidths.circle,
20664
- borderColor: themeChecked ? theme.__hd__.radio.colors.checkedCircle : theme.__hd__.radio.colors.circle,
20679
+ borderColor: theme.__hd__.radio.colors.circle,
20665
20680
  alignItems: 'center',
20666
20681
  justifyContent: 'center'
20667
20682
  };
20668
20683
  });
20669
- var InnerCircle = index$7(reactNative.View)(function (_ref3) {
20670
- var theme = _ref3.theme;
20684
+ var InnerCircle = index$7(reactNative.View)(function (_ref2) {
20685
+ var theme = _ref2.theme;
20671
20686
  return {
20672
20687
  height: theme.__hd__.radio.sizes.innerCircle,
20673
20688
  width: theme.__hd__.radio.sizes.innerCircle,
20674
20689
  borderRadius: theme.radii.rounded,
20675
- backgroundColor: theme.__hd__.radio.colors.checkedCircle
20690
+ backgroundColor: theme.__hd__.radio.colors.circle
20676
20691
  };
20677
20692
  });
20678
- var Spacer = index$7(reactNative.View)(function (_ref4) {
20679
- var theme = _ref4.theme;
20693
+ var Spacer = index$7(reactNative.View)(function (_ref3) {
20694
+ var theme = _ref3.theme;
20680
20695
  return {
20681
20696
  marginTop: theme.__hd__.radio.space.groupTopMargin
20682
20697
  };
20683
20698
  });
20684
20699
 
20685
- var Radio = function Radio(_ref) {
20686
- var text = _ref.text,
20687
- _ref$checked = _ref.checked,
20688
- checked = _ref$checked === void 0 ? false : _ref$checked,
20689
- onPress = _ref.onPress,
20690
- style = _ref.style,
20691
- testID = _ref.testID;
20692
- return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
20700
+ var RadioCircle = function RadioCircle(_ref) {
20701
+ var checked = _ref.checked,
20702
+ text = _ref.text;
20703
+ return /*#__PURE__*/React__default["default"].createElement(Circle, null, checked && /*#__PURE__*/React__default["default"].createElement(InnerCircle, {
20704
+ testID: "".concat(text, "-selected-circle")
20705
+ }));
20706
+ };
20707
+
20708
+ var Radio = function Radio(_ref2) {
20709
+ var text = _ref2.text,
20710
+ _ref2$checked = _ref2.checked,
20711
+ checked = _ref2$checked === void 0 ? false : _ref2$checked,
20712
+ onPress = _ref2.onPress,
20713
+ style = _ref2.style,
20714
+ testID = _ref2.testID;
20715
+ return /*#__PURE__*/React__default["default"].createElement(List.BasicItem, {
20693
20716
  onPress: onPress,
20694
- themeChecked: checked,
20717
+ selected: checked,
20718
+ title: text,
20719
+ suffix: /*#__PURE__*/React__default["default"].createElement(RadioCircle, {
20720
+ checked: checked,
20721
+ text: text
20722
+ }),
20695
20723
  style: style,
20696
20724
  testID: testID
20697
- }, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
20698
- style: {
20699
- flex: 1
20700
- }
20701
- }, /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
20702
- fontSize: "large"
20703
- }, text)), /*#__PURE__*/React__default["default"].createElement(Circle, {
20704
- themeChecked: checked
20705
- }, checked && /*#__PURE__*/React__default["default"].createElement(InnerCircle, {
20706
- testID: "".concat(text, "-selected-circle")
20707
- })));
20725
+ });
20708
20726
  };
20709
20727
 
20710
20728
  function getKey(option, index, keyExtractor) {
@@ -21095,6 +21113,8 @@ function MultiSelect(_ref) {
21095
21113
  onPress: function onPress() {
21096
21114
  return setOpen(true);
21097
21115
  }
21116
+ }, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
21117
+ pointerEvents: "none"
21098
21118
  }, /*#__PURE__*/React__default["default"].createElement(TextInput, {
21099
21119
  label: label,
21100
21120
  value: displayedValue,
@@ -21108,7 +21128,7 @@ function MultiSelect(_ref) {
21108
21128
  pointerEvents: "none",
21109
21129
  style: style,
21110
21130
  testID: testID
21111
- }))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
21131
+ })))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
21112
21132
  open: open,
21113
21133
  onRequestClose: function onRequestClose() {
21114
21134
  return setOpen(false);
@@ -21249,6 +21269,8 @@ var SingleSelect = function SingleSelect(_ref) {
21249
21269
  onPress: function onPress() {
21250
21270
  return setOpen(true);
21251
21271
  }
21272
+ }, /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
21273
+ pointerEvents: "none"
21252
21274
  }, /*#__PURE__*/React__default["default"].createElement(TextInput, {
21253
21275
  label: label,
21254
21276
  value: displayedValue,
@@ -21262,7 +21284,7 @@ var SingleSelect = function SingleSelect(_ref) {
21262
21284
  pointerEvents: "none",
21263
21285
  style: style,
21264
21286
  testID: testID
21265
- }))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
21287
+ })))), /*#__PURE__*/React__default["default"].createElement(BottomSheet, {
21266
21288
  open: open,
21267
21289
  onRequestClose: function onRequestClose() {
21268
21290
  return setOpen(false);
@@ -21298,43 +21320,21 @@ var index$3 = Object.assign(SingleSelect, {
21298
21320
 
21299
21321
  var StyledWrapper = index$7(reactNative.View)(function (_ref) {
21300
21322
  var theme = _ref.theme,
21301
- themeChecked = _ref.themeChecked,
21323
+ themeVariant = _ref.themeVariant,
21302
21324
  themeSize = _ref.themeSize;
21303
21325
  return {
21304
21326
  height: theme.__hd__["switch"].heights[themeSize],
21305
21327
  width: theme.__hd__["switch"].widths[themeSize],
21306
21328
  paddingHorizontal: theme.__hd__["switch"].spaces[themeSize],
21307
21329
  borderRadius: theme.__hd__["switch"].radii.rounded,
21308
- backgroundColor: themeChecked ? theme.__hd__["switch"].colors.active : theme.__hd__["switch"].colors.inactive
21309
- };
21310
- });
21311
- var StyledDisabledWrapper = index$7(reactNative.View)(function (_ref2) {
21312
- var theme = _ref2.theme,
21313
- themeSize = _ref2.themeSize;
21314
- return {
21315
- position: 'absolute',
21316
- height: theme.__hd__["switch"].heights[themeSize],
21317
- width: theme.__hd__["switch"].widths[themeSize],
21318
- borderRadius: theme.__hd__["switch"].radii.rounded,
21319
- backgroundColor: theme.__hd__["switch"].colors.thumb,
21320
- zIndex: 9999,
21321
- opacity: 0.8
21322
- };
21323
- });
21324
- var StyledThumbWrapper = index$7(reactNative.View)(function (_ref3) {
21325
- var theme = _ref3.theme,
21326
- themeSize = _ref3.themeSize;
21327
- return {
21328
- height: theme.__hd__["switch"].heights[themeSize],
21329
- width: theme.__hd__["switch"].widths[themeSize],
21330
- borderRadius: theme.__hd__["switch"].radii.rounded,
21330
+ backgroundColor: theme.__hd__["switch"].colors.backgroundColors[themeVariant],
21331
21331
  display: 'flex',
21332
21332
  justifyContent: 'center'
21333
21333
  };
21334
21334
  });
21335
- var StyledKnot = index$7(reactNative.Animated.View)(function (_ref4) {
21336
- var theme = _ref4.theme,
21337
- themeSize = _ref4.themeSize;
21335
+ var StyledKnot = index$7(reactNative.Animated.View)(function (_ref2) {
21336
+ var theme = _ref2.theme,
21337
+ themeSize = _ref2.themeSize;
21338
21338
  return {
21339
21339
  width: theme.__hd__["switch"].thumbSizes[themeSize],
21340
21340
  height: theme.__hd__["switch"].thumbSizes[themeSize],
@@ -21343,16 +21343,32 @@ var StyledKnot = index$7(reactNative.Animated.View)(function (_ref4) {
21343
21343
  };
21344
21344
  });
21345
21345
 
21346
- var Switch = function Switch(_ref) {
21347
- var _ref$size = _ref.size,
21348
- size = _ref$size === void 0 ? 'medium' : _ref$size,
21349
- _ref$disabled = _ref.disabled,
21350
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21351
- checked = _ref.checked,
21352
- onPress = _ref.onPress,
21353
- style = _ref.style,
21354
- testID = _ref.testID;
21346
+ var getVariant = function getVariant(_ref) {
21347
+ var disabled = _ref.disabled,
21348
+ checked = _ref.checked;
21349
+
21350
+ if (disabled) {
21351
+ return checked ? 'disabled-checked' : 'disabled-unchecked';
21352
+ }
21353
+
21354
+ return checked ? 'checked' : 'unchecked';
21355
+ };
21356
+
21357
+ var Switch = function Switch(_ref2) {
21358
+ var _ref2$size = _ref2.size,
21359
+ size = _ref2$size === void 0 ? 'medium' : _ref2$size,
21360
+ _ref2$disabled = _ref2.disabled,
21361
+ disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
21362
+ _ref2$checked = _ref2.checked,
21363
+ checked = _ref2$checked === void 0 ? false : _ref2$checked,
21364
+ onPress = _ref2.onPress,
21365
+ style = _ref2.style,
21366
+ testID = _ref2.testID;
21355
21367
  var theme = useTheme$1();
21368
+ var variant = getVariant({
21369
+ disabled: disabled,
21370
+ checked: checked
21371
+ });
21356
21372
  var offset = checked ? theme.__hd__["switch"].widths[size] - theme.__hd__["switch"].thumbSizes[size] - theme.__hd__["switch"].spaces[size] * 2 : theme.__hd__["switch"].spaces.inactive;
21357
21373
 
21358
21374
  var _useState = React.useState(function () {
@@ -21373,19 +21389,15 @@ var Switch = function Switch(_ref) {
21373
21389
  onPress: onPress,
21374
21390
  disabled: disabled
21375
21391
  }, /*#__PURE__*/React__default["default"].createElement(StyledWrapper, {
21376
- themeChecked: checked,
21392
+ themeVariant: variant,
21377
21393
  themeSize: size,
21378
21394
  style: style
21379
- }, disabled && /*#__PURE__*/React__default["default"].createElement(StyledDisabledWrapper, {
21380
- themeSize: size
21381
- }), /*#__PURE__*/React__default["default"].createElement(StyledThumbWrapper, {
21382
- themeSize: size
21383
21395
  }, /*#__PURE__*/React__default["default"].createElement(StyledKnot, {
21384
21396
  themeSize: size,
21385
21397
  style: {
21386
21398
  left: animatedOffset
21387
21399
  }
21388
- }))));
21400
+ })));
21389
21401
  };
21390
21402
 
21391
21403
  var AnimatedPagerView = reactNative.Animated.createAnimatedComponent(PagerView__default["default"]);
@@ -40691,7 +40703,7 @@ exports.BottomSheet = BottomSheet;
40691
40703
  exports.Button = CompoundButton;
40692
40704
  exports.Calendar = Calendar;
40693
40705
  exports.Card = index$6;
40694
- exports.Checkbox = CheckBox;
40706
+ exports.Checkbox = Checkbox;
40695
40707
  exports.Collapse = Collapse;
40696
40708
  exports.ContentNavigator = ContentNavigator;
40697
40709
  exports.DatePicker = DatePicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "7.18.1",
3
+ "version": "7.19.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@emotion/native": "^11.9.3",
22
22
  "@emotion/react": "^11.9.3",
23
- "@hero-design/colors": "7.18.1",
23
+ "@hero-design/colors": "7.19.0",
24
24
  "date-fns": "^2.16.1",
25
25
  "events": "^3.2.0",
26
26
  "hero-editor": "^1.9.9"
@@ -1,13 +1,14 @@
1
- import React, { ReactElement } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
1
+ import React from 'react';
2
+ import type { ReactElement } from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
3
4
  import {
4
5
  StyledCollapse,
5
6
  StyledHeaderWrapper,
6
7
  StyledItemWrapper,
7
- Variant,
8
8
  } from './StyledAccordion';
9
9
  import Typography from '../Typography';
10
10
  import Icon from '../Icon';
11
+ import type { Variant } from './StyledAccordion';
11
12
 
12
13
  export type AccordionItemProps = {
13
14
  header: string | ReactElement;
@@ -38,7 +39,7 @@ const AccordionItem = ({
38
39
  header
39
40
  )}
40
41
  <Icon
41
- icon={`arrow-${open ? 'up' : 'down'}`}
42
+ icon={open ? 'arrow-up' : 'arrow-down'}
42
43
  intent="primary"
43
44
  size="small"
44
45
  />
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
3
  import Typography from '../../Typography';
4
- import Accordion, { AccordionProps } from '..';
4
+ import Accordion from '..';
5
+ import type { AccordionProps } from '..';
5
6
 
6
7
  const AccordionExample = (props: Omit<AccordionProps<string>, 'items'>) => (
7
8
  <Accordion
@@ -1,5 +1,6 @@
1
- import React, { Key, ReactElement, useMemo } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
1
+ import React, { useMemo } from 'react';
2
+ import type { Key, ReactElement } from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
3
4
  import AccordionItem from './AccordionItem';
4
5
  import { Spacer, StyledWrapper } from './StyledAccordion';
5
6
  import { usePropsOrInternalState } from './utils';
@@ -1,6 +1,7 @@
1
1
  import styled from '@emotion/native';
2
- import { ComponentProps } from 'react';
3
- import { TouchableOpacity, View, ViewProps } from 'react-native';
2
+ import { TouchableOpacity, View } from 'react-native';
3
+ import type { ComponentProps } from 'react';
4
+ import type { ViewProps } from 'react-native';
4
5
 
5
6
  const Container = styled(View)<{
6
7
  themeVariant: 'default' | 'round';
@@ -1,6 +1,7 @@
1
- import React, { ReactElement } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- import Icon, { IconName } from '../Icon';
1
+ import React from 'react';
2
+ import type { ReactElement } from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
4
+ import Icon from '../Icon';
4
5
  import Typography from '../Typography';
5
6
  import {
6
7
  Container,
@@ -9,6 +10,7 @@ import {
9
10
  IconContainer,
10
11
  TextContainer,
11
12
  } from './StyledAlert';
13
+ import type { IconName } from '../Icon';
12
14
 
13
15
  const getIntentIcon = (
14
16
  intent: 'success' | 'info' | 'warning' | 'error'
@@ -1,10 +1,10 @@
1
- import {
1
+ import React from 'react';
2
+ import type {
2
3
  ImageSourcePropType,
3
4
  StyleProp,
4
5
  ViewProps,
5
6
  ViewStyle,
6
7
  } from 'react-native';
7
- import React from 'react';
8
8
  import {
9
9
  StyledImage,
10
10
  StyledPressable,
@@ -1,5 +1,7 @@
1
- import { View, StyleProp, ViewStyle, ViewProps, Animated } from 'react-native';
2
- import React, { ReactNode } from 'react';
1
+ import { View, Animated } from 'react-native';
2
+ import React from 'react';
3
+ import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
4
+ import type { ReactNode } from 'react';
3
5
  import { StyledStatus } from './StyledBadge';
4
6
 
5
7
  export interface StatusProps extends ViewProps {
@@ -1,5 +1,6 @@
1
- import { Animated, StyleProp, ViewStyle } from 'react-native';
1
+ import { Animated } from 'react-native';
2
2
  import React from 'react';
3
+ import type { StyleProp, ViewStyle } from 'react-native';
3
4
  import { StyledView, StyledText } from './StyledBadge';
4
5
  import BadgeStatus from './Status';
5
6