@hero-design/rn 8.36.0-alpha.0 → 8.36.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 (288) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/.turbo/turbo-publish:npm.log +0 -9
  3. package/es/index.js +65 -54
  4. package/lib/index.js +65 -54
  5. package/package.json +7 -7
  6. package/src/components/Checkbox/StyledCheckbox.tsx +18 -17
  7. package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +28 -15
  8. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +151 -4
  9. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +339 -10
  10. package/src/components/Checkbox/__tests__/index.spec.tsx +28 -8
  11. package/src/components/Checkbox/index.tsx +54 -25
  12. package/src/components/FAB/ActionGroup/index.tsx +1 -1
  13. package/src/components/Portal/PortalHost.tsx +3 -0
  14. package/src/components/Portal/PortalProvider.tsx +6 -0
  15. package/src/components/Portal/index.tsx +11 -0
  16. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +5 -2
  17. package/src/theme/components/checkbox.ts +5 -2
  18. package/types/components/Accordion/AccordionItem.d.ts +0 -0
  19. package/types/components/Accordion/StyledAccordion.d.ts +0 -0
  20. package/types/components/Accordion/index.d.ts +0 -0
  21. package/types/components/Alert/StyledAlert.d.ts +0 -0
  22. package/types/components/Alert/index.d.ts +0 -0
  23. package/types/components/Attachment/StyledAttachment.d.ts +0 -0
  24. package/types/components/Attachment/index.d.ts +0 -0
  25. package/types/components/Avatar/Avatar.d.ts +0 -0
  26. package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
  27. package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
  28. package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
  29. package/types/components/Avatar/StyledAvatar.d.ts +0 -0
  30. package/types/components/Avatar/index.d.ts +0 -0
  31. package/types/components/Badge/Status.d.ts +0 -0
  32. package/types/components/Badge/StyledBadge.d.ts +0 -0
  33. package/types/components/Badge/index.d.ts +0 -0
  34. package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
  35. package/types/components/BottomNavigation/index.d.ts +0 -0
  36. package/types/components/BottomSheet/BottomSheetContext.d.ts +0 -0
  37. package/types/components/BottomSheet/Footer.d.ts +0 -0
  38. package/types/components/BottomSheet/Header.d.ts +0 -0
  39. package/types/components/BottomSheet/ScrollView.d.ts +0 -0
  40. package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
  41. package/types/components/BottomSheet/index.d.ts +0 -0
  42. package/types/components/Box/StyledBox.d.ts +0 -0
  43. package/types/components/Box/config.d.ts +0 -0
  44. package/types/components/Box/index.d.ts +0 -0
  45. package/types/components/Box/types.d.ts +0 -0
  46. package/types/components/Button/Button.d.ts +0 -0
  47. package/types/components/Button/IconButton.d.ts +0 -0
  48. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
  49. package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
  50. package/types/components/Button/StyledButton.d.ts +0 -0
  51. package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
  52. package/types/components/Button/UtilityButton/index.d.ts +0 -0
  53. package/types/components/Button/index.d.ts +0 -0
  54. package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
  55. package/types/components/Calendar/StyledCalendar.d.ts +0 -0
  56. package/types/components/Calendar/helpers.d.ts +0 -0
  57. package/types/components/Calendar/index.d.ts +0 -0
  58. package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
  59. package/types/components/Card/DataCard/index.d.ts +0 -0
  60. package/types/components/Card/StyledCard.d.ts +0 -0
  61. package/types/components/Card/index.d.ts +0 -0
  62. package/types/components/Carousel/CardCarousel.d.ts +0 -0
  63. package/types/components/Carousel/CarouselItem.d.ts +0 -0
  64. package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
  65. package/types/components/Carousel/StyledCarousel.d.ts +0 -0
  66. package/types/components/Carousel/contants.d.ts +0 -0
  67. package/types/components/Carousel/index.d.ts +0 -0
  68. package/types/components/Carousel/types.d.ts +0 -0
  69. package/types/components/Checkbox/StyledCheckbox.d.ts +6 -2
  70. package/types/components/Checkbox/index.d.ts +10 -1
  71. package/types/components/Collapse/StyledCollapse.d.ts +0 -0
  72. package/types/components/Collapse/index.d.ts +0 -0
  73. package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
  74. package/types/components/ContentNavigator/index.d.ts +0 -0
  75. package/types/components/DatePicker/DatePickerAndroid.d.ts +0 -0
  76. package/types/components/DatePicker/DatePickerCalendar.d.ts +0 -0
  77. package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
  78. package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
  79. package/types/components/DatePicker/index.d.ts +0 -0
  80. package/types/components/DatePicker/types.d.ts +0 -0
  81. package/types/components/Divider/StyledDivider.d.ts +0 -0
  82. package/types/components/Divider/index.d.ts +0 -0
  83. package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
  84. package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
  85. package/types/components/Drawer/StyledDrawer.d.ts +0 -0
  86. package/types/components/Drawer/index.d.ts +0 -0
  87. package/types/components/Empty/StyledEmpty.d.ts +0 -0
  88. package/types/components/Empty/index.d.ts +0 -0
  89. package/types/components/Error/StyledError.d.ts +0 -0
  90. package/types/components/Error/index.d.ts +0 -0
  91. package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
  92. package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
  93. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
  94. package/types/components/FAB/ActionGroup/index.d.ts +0 -0
  95. package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
  96. package/types/components/FAB/FAB.d.ts +0 -0
  97. package/types/components/FAB/StyledFAB.d.ts +0 -0
  98. package/types/components/FAB/index.d.ts +0 -0
  99. package/types/components/Icon/AnimatedIcon.d.ts +0 -0
  100. package/types/components/Icon/HeroIcon/index.d.ts +0 -0
  101. package/types/components/Icon/IconList.d.ts +0 -0
  102. package/types/components/Icon/index.d.ts +0 -0
  103. package/types/components/Icon/utils.d.ts +0 -0
  104. package/types/components/Image/index.d.ts +0 -0
  105. package/types/components/List/BasicListItem.d.ts +0 -0
  106. package/types/components/List/ListItem.d.ts +0 -0
  107. package/types/components/List/StyledBasicListItem.d.ts +0 -0
  108. package/types/components/List/StyledListItem.d.ts +0 -0
  109. package/types/components/List/index.d.ts +0 -0
  110. package/types/components/PageControl/StyledPageControl.d.ts +0 -0
  111. package/types/components/PageControl/index.d.ts +0 -0
  112. package/types/components/PinInput/PinCell.d.ts +0 -0
  113. package/types/components/PinInput/StyledPinInput.d.ts +0 -0
  114. package/types/components/PinInput/index.d.ts +0 -0
  115. package/types/components/Progress/ProgressBar.d.ts +0 -0
  116. package/types/components/Progress/ProgressCircle.d.ts +0 -0
  117. package/types/components/Progress/StyledProgressBar.d.ts +0 -0
  118. package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
  119. package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
  120. package/types/components/Progress/constants.d.ts +0 -0
  121. package/types/components/Progress/index.d.ts +0 -0
  122. package/types/components/Progress/types.d.ts +0 -0
  123. package/types/components/Radio/Radio.d.ts +0 -0
  124. package/types/components/Radio/RadioGroup.d.ts +0 -0
  125. package/types/components/Radio/StyledRadio.d.ts +0 -0
  126. package/types/components/Radio/index.d.ts +0 -0
  127. package/types/components/Radio/types.d.ts +0 -0
  128. package/types/components/RefreshControl/index.d.ts +0 -0
  129. package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
  130. package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
  131. package/types/components/RichTextEditor/MentionList.d.ts +0 -0
  132. package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
  133. package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
  134. package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
  135. package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
  136. package/types/components/RichTextEditor/constants.d.ts +0 -0
  137. package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
  138. package/types/components/RichTextEditor/index.d.ts +0 -0
  139. package/types/components/RichTextEditor/types.d.ts +0 -0
  140. package/types/components/RichTextEditor/utils/events.d.ts +0 -0
  141. package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
  142. package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
  143. package/types/components/SectionHeading/index.d.ts +0 -0
  144. package/types/components/Select/BaseOptionList.d.ts +0 -0
  145. package/types/components/Select/Footer.d.ts +0 -0
  146. package/types/components/Select/MultiSelect/Option.d.ts +0 -0
  147. package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
  148. package/types/components/Select/MultiSelect/index.d.ts +0 -0
  149. package/types/components/Select/SingleSelect/Option.d.ts +0 -0
  150. package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
  151. package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
  152. package/types/components/Select/SingleSelect/index.d.ts +0 -0
  153. package/types/components/Select/StyledSelect.d.ts +0 -0
  154. package/types/components/Select/helpers.d.ts +0 -0
  155. package/types/components/Select/index.d.ts +0 -0
  156. package/types/components/Select/types.d.ts +0 -0
  157. package/types/components/Skeleton/StyledSkeleton.d.ts +0 -0
  158. package/types/components/Skeleton/index.d.ts +0 -0
  159. package/types/components/Slider/index.d.ts +0 -0
  160. package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
  161. package/types/components/Spinner/StyledSpinner.d.ts +0 -0
  162. package/types/components/Spinner/index.d.ts +0 -0
  163. package/types/components/Success/StyledSuccess.d.ts +0 -0
  164. package/types/components/Success/index.d.ts +0 -0
  165. package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
  166. package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
  167. package/types/components/Swipeable/index.d.ts +0 -0
  168. package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
  169. package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
  170. package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
  171. package/types/components/Switch/StyledSwitch.d.ts +0 -0
  172. package/types/components/Switch/index.d.ts +0 -0
  173. package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
  174. package/types/components/Tabs/SceneView.d.ts +0 -0
  175. package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
  176. package/types/components/Tabs/ScrollableTabsHeader.d.ts +0 -0
  177. package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
  178. package/types/components/Tabs/StyledTabs.d.ts +0 -0
  179. package/types/components/Tabs/TabWithBadge.d.ts +0 -0
  180. package/types/components/Tabs/index.d.ts +0 -0
  181. package/types/components/Tabs/useIsFocused.d.ts +0 -0
  182. package/types/components/Tabs/utils.d.ts +0 -0
  183. package/types/components/Tag/StyledTag.d.ts +0 -0
  184. package/types/components/Tag/index.d.ts +0 -0
  185. package/types/components/TextInput/StyledTextInput.d.ts +0 -0
  186. package/types/components/TextInput/index.d.ts +0 -0
  187. package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
  188. package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
  189. package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
  190. package/types/components/TimePicker/index.d.ts +0 -0
  191. package/types/components/TimePicker/types.d.ts +0 -0
  192. package/types/components/Toast/StyledToast.d.ts +0 -0
  193. package/types/components/Toast/Toast.d.ts +0 -0
  194. package/types/components/Toast/ToastContainer.d.ts +0 -0
  195. package/types/components/Toast/ToastContext.d.ts +0 -0
  196. package/types/components/Toast/ToastProvider.d.ts +0 -0
  197. package/types/components/Toast/index.d.ts +0 -0
  198. package/types/components/Toast/types.d.ts +0 -0
  199. package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
  200. package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
  201. package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
  202. package/types/components/Toolbar/index.d.ts +0 -0
  203. package/types/components/Typography/Text/StyledText.d.ts +0 -0
  204. package/types/components/Typography/Text/index.d.ts +0 -0
  205. package/types/components/Typography/index.d.ts +0 -0
  206. package/types/index.d.ts +0 -0
  207. package/types/testHelpers/renderWithTheme.d.ts +0 -0
  208. package/types/theme/ThemeProvider.d.ts +0 -0
  209. package/types/theme/ThemeSwitcher.d.ts +0 -0
  210. package/types/theme/components/accordion.d.ts +0 -0
  211. package/types/theme/components/alert.d.ts +0 -0
  212. package/types/theme/components/attachment.d.ts +0 -0
  213. package/types/theme/components/avatar.d.ts +0 -0
  214. package/types/theme/components/badge.d.ts +0 -0
  215. package/types/theme/components/bottomNavigation.d.ts +0 -0
  216. package/types/theme/components/bottomSheet.d.ts +0 -0
  217. package/types/theme/components/button.d.ts +0 -0
  218. package/types/theme/components/calendar.d.ts +0 -0
  219. package/types/theme/components/card.d.ts +0 -0
  220. package/types/theme/components/cardCarousel.d.ts +0 -0
  221. package/types/theme/components/carousel.d.ts +0 -0
  222. package/types/theme/components/checkbox.d.ts +5 -2
  223. package/types/theme/components/contentNavigator.d.ts +0 -0
  224. package/types/theme/components/datePicker.d.ts +0 -0
  225. package/types/theme/components/divider.d.ts +0 -0
  226. package/types/theme/components/drawer.d.ts +0 -0
  227. package/types/theme/components/empty.d.ts +0 -0
  228. package/types/theme/components/error.d.ts +0 -0
  229. package/types/theme/components/fab.d.ts +0 -0
  230. package/types/theme/components/icon.d.ts +0 -0
  231. package/types/theme/components/image.d.ts +0 -0
  232. package/types/theme/components/list.d.ts +0 -0
  233. package/types/theme/components/pageControl.d.ts +0 -0
  234. package/types/theme/components/pinInput.d.ts +0 -0
  235. package/types/theme/components/progress.d.ts +0 -0
  236. package/types/theme/components/radio.d.ts +0 -0
  237. package/types/theme/components/refreshControl.d.ts +0 -0
  238. package/types/theme/components/richTextEditor.d.ts +0 -0
  239. package/types/theme/components/sectionHeading.d.ts +0 -0
  240. package/types/theme/components/select.d.ts +0 -0
  241. package/types/theme/components/skeleton.d.ts +0 -0
  242. package/types/theme/components/slider.d.ts +0 -0
  243. package/types/theme/components/spinner.d.ts +0 -0
  244. package/types/theme/components/success.d.ts +0 -0
  245. package/types/theme/components/swipeable.d.ts +0 -0
  246. package/types/theme/components/switch.d.ts +0 -0
  247. package/types/theme/components/tabs.d.ts +0 -0
  248. package/types/theme/components/tag.d.ts +0 -0
  249. package/types/theme/components/textInput.d.ts +0 -0
  250. package/types/theme/components/timePicker.d.ts +0 -0
  251. package/types/theme/components/toast.d.ts +0 -0
  252. package/types/theme/components/toolbar.d.ts +0 -0
  253. package/types/theme/components/typography.d.ts +0 -0
  254. package/types/theme/getTheme.d.ts +0 -0
  255. package/types/theme/global/borders.d.ts +0 -0
  256. package/types/theme/global/colors/eBens.d.ts +0 -0
  257. package/types/theme/global/colors/global.d.ts +0 -0
  258. package/types/theme/global/colors/globalDark.d.ts +0 -0
  259. package/types/theme/global/colors/jobs.d.ts +0 -0
  260. package/types/theme/global/colors/swag.d.ts +0 -0
  261. package/types/theme/global/colors/swagDark.d.ts +0 -0
  262. package/types/theme/global/colors/types.d.ts +0 -0
  263. package/types/theme/global/colors/wallet.d.ts +0 -0
  264. package/types/theme/global/colors/work.d.ts +0 -0
  265. package/types/theme/global/index.d.ts +0 -0
  266. package/types/theme/global/scale.d.ts +0 -0
  267. package/types/theme/global/sizes.d.ts +0 -0
  268. package/types/theme/global/space.d.ts +0 -0
  269. package/types/theme/global/typography.d.ts +0 -0
  270. package/types/theme/index.d.ts +0 -0
  271. package/types/types.d.ts +0 -0
  272. package/types/utils/functions.d.ts +0 -0
  273. package/types/utils/helpers.d.ts +0 -0
  274. package/types/utils/hooks.d.ts +0 -0
  275. package/types/utils/scale.d.ts +0 -0
  276. package/.tool-versions +0 -1
  277. package/.turbo/turbo-build:types.log +0 -1
  278. package/.turbo/turbo-lint.log +0 -172
  279. package/.turbo/turbo-test.log +0 -1
  280. package/.turbo/turbo-type-check.log +0 -1
  281. package/types/components/FAB/ActionGroup/FABModal.d.ts +0 -21
  282. package/types/components/FAB/ActionGroup/FABModalContentWrapper.d.ts +0 -18
  283. package/types/components/FAB/ActionGroup/FABProvider.d.ts +0 -5
  284. package/types/components/FAB/ActionGroup/ModalPresenter/ModalPresenter.d.ts +0 -34
  285. package/types/components/FAB/ActionGroup/ModalPresenter/index.d.ts +0 -3
  286. package/types/components/Tabs/ScrollableTabsV2/SceneView.d.ts +0 -10
  287. package/types/components/Tabs/ScrollableTabsV2/ScrollableTabsV2.d.ts +0 -9
  288. package/types/components/Tabs/ScrollableTabsV2/index.d.ts +0 -4
@@ -3,6 +3,6 @@ $ rollup -c
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
5
5
  (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
6
- (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/Volumes/Data/Projects/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
7
- created lib/index.js, es/index.js in 35.5s
6
+ (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
7
+ created lib/index.js, es/index.js in 32.5s
8
8
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
@@ -1,9 +0,0 @@
1
- @hero-design/rn:publish:npm: cache hit, replaying output 507c34f3e0a508f6
2
- @hero-design/rn:publish:npm: $ yarn publish --access public
3
- @hero-design/rn:publish:npm: [1/4] Bumping version...
4
- @hero-design/rn:publish:npm: info Current version: 8.12.0-rc.0
5
- @hero-design/rn:publish:npm: [2/4] Logging in...
6
- @hero-design/rn:publish:npm: [3/4] Publishing...
7
- @hero-design/rn:publish:npm: success Published.
8
- @hero-design/rn:publish:npm: [4/4] Revoking token...
9
- @hero-design/rn:publish:npm: info Not revoking login token, specified via config file.
package/es/index.js CHANGED
@@ -2103,8 +2103,11 @@ var getCardCarouselTheme = function getCardCarouselTheme(theme) {
2103
2103
 
2104
2104
  var getCheckboxTheme = function getCheckboxTheme(theme) {
2105
2105
  var colors = {
2106
- "default": theme.colors.primaryOutline,
2107
- disabledBorder: theme.colors.disabledOutline
2106
+ borders: {
2107
+ "default": theme.colors.primaryOutline,
2108
+ disabled: theme.colors.disabledOutline,
2109
+ readonly: theme.colors.inactiveOutline
2110
+ }
2108
2111
  };
2109
2112
  var space = {
2110
2113
  iconTop: 0,
@@ -11990,12 +11993,12 @@ var index$a = Object.assign(Carousel, {
11990
11993
  var StyledWrapper$7 = index$c(TouchableOpacity)(function (_ref) {
11991
11994
  var theme = _ref.theme,
11992
11995
  themeWithBorder = _ref.themeWithBorder,
11993
- themeDisabled = _ref.themeDisabled;
11996
+ themeState = _ref.themeState;
11994
11997
  var borderStyle = {
11995
11998
  borderRadius: theme.__hd__.checkbox.radii.wrapper,
11996
11999
  borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
11997
12000
  padding: theme.__hd__.checkbox.space.wrapperPadding,
11998
- borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
12001
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState]
11999
12002
  };
12000
12003
  return _objectSpread2({
12001
12004
  flexDirection: 'row'
@@ -12018,37 +12021,56 @@ var StyledCheckboxContainer = index$c(View)(function (_ref3) {
12018
12021
  });
12019
12022
  var StyledCheckbox = index$c(View)(function (_ref4) {
12020
12023
  var theme = _ref4.theme,
12021
- themeDisabled = _ref4.themeDisabled;
12024
+ themeState = _ref4.themeState;
12022
12025
  return {
12023
12026
  flex: 1,
12024
12027
  borderRadius: theme.__hd__.checkbox.radii.icon,
12025
12028
  borderWidth: theme.__hd__.checkbox.borderWidths.icon,
12026
- borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
12029
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState]
12027
12030
  };
12028
12031
  });
12029
12032
  var StyledCheckMark = index$c(Icon)(function (_ref5) {
12030
- var theme = _ref5.theme;
12033
+ var theme = _ref5.theme,
12034
+ themeState = _ref5.themeState;
12031
12035
  return {
12032
12036
  position: 'absolute',
12033
- top: theme.__hd__.checkbox.space.iconTop
12037
+ top: theme.__hd__.checkbox.space.iconTop,
12038
+ color: theme.__hd__.checkbox.colors.borders[themeState]
12034
12039
  };
12035
12040
  });
12036
12041
 
12037
- var Checkbox = function Checkbox(_ref) {
12038
- var checked = _ref.checked,
12039
- description = _ref.description,
12040
- _ref$withBorder = _ref.withBorder,
12041
- withBorder = _ref$withBorder === void 0 ? false : _ref$withBorder,
12042
- _ref$disabled = _ref.disabled,
12043
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12044
- onPress = _ref.onPress,
12045
- style = _ref.style,
12046
- testID = _ref.testID;
12042
+ var getThemeState = function getThemeState(_ref) {
12043
+ var disabled = _ref.disabled,
12044
+ readonly = _ref.readonly;
12045
+ if (disabled) {
12046
+ return 'disabled';
12047
+ }
12048
+ if (readonly) {
12049
+ return 'readonly';
12050
+ }
12051
+ return 'default';
12052
+ };
12053
+ var Checkbox = function Checkbox(_ref2) {
12054
+ var checked = _ref2.checked,
12055
+ description = _ref2.description,
12056
+ _ref2$withBorder = _ref2.withBorder,
12057
+ withBorder = _ref2$withBorder === void 0 ? false : _ref2$withBorder,
12058
+ _ref2$disabled = _ref2.disabled,
12059
+ disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
12060
+ onPress = _ref2.onPress,
12061
+ style = _ref2.style,
12062
+ testID = _ref2.testID,
12063
+ _ref2$readonly = _ref2.readonly,
12064
+ readonly = _ref2$readonly === void 0 ? false : _ref2$readonly;
12065
+ var themeState = getThemeState({
12066
+ disabled: disabled,
12067
+ readonly: readonly
12068
+ });
12047
12069
  return /*#__PURE__*/React.createElement(StyledWrapper$7, {
12048
12070
  onPress: onPress,
12049
- disabled: disabled,
12050
- themeDisabled: disabled,
12071
+ disabled: disabled || readonly,
12051
12072
  themeWithBorder: withBorder,
12073
+ themeState: themeState,
12052
12074
  style: style,
12053
12075
  testID: testID
12054
12076
  }, !!description && /*#__PURE__*/React.createElement(StyledDescription$1, {
@@ -12056,10 +12078,10 @@ var Checkbox = function Checkbox(_ref) {
12056
12078
  variant: "small"
12057
12079
  }, description), /*#__PURE__*/React.createElement(StyledCheckboxContainer, null, checked && /*#__PURE__*/React.createElement(StyledCheckMark, {
12058
12080
  icon: "box-check",
12059
- intent: disabled ? 'disabled-text' : 'text',
12060
- testID: "check-mark"
12081
+ testID: "check-mark",
12082
+ themeState: themeState
12061
12083
  }), /*#__PURE__*/React.createElement(StyledCheckbox, {
12062
- themeDisabled: disabled
12084
+ themeState: themeState
12063
12085
  })));
12064
12086
  };
12065
12087
 
@@ -13596,6 +13618,7 @@ var StyledBackdrop = index$c(Animated.View)(function (_ref2) {
13596
13618
  right: 0,
13597
13619
  top: 0,
13598
13620
  bottom: 0,
13621
+ opacity: 0.25,
13599
13622
  backgroundColor: theme.__hd__.fab.colors.backdropBackground
13600
13623
  };
13601
13624
  });
@@ -13651,10 +13674,6 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13651
13674
  useNativeDriver: Platform.OS !== 'web'
13652
13675
  })]).start();
13653
13676
  }, [active]);
13654
- var interpolatedBackdropOpacityAnimation = tranlateXAnimation.current.interpolate({
13655
- inputRange: [0, 1],
13656
- outputRange: [0, 0.25]
13657
- });
13658
13677
  var interpolatedActionGroupOpacityAnimation = tranlateXAnimation.current.interpolate({
13659
13678
  inputRange: [0, 1],
13660
13679
  outputRange: [0, 1]
@@ -13667,21 +13686,30 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13667
13686
  testID: testID,
13668
13687
  pointerEvents: "box-none",
13669
13688
  style: style
13670
- }, /*#__PURE__*/React.createElement(Modal$1, {
13689
+ }, /*#__PURE__*/React.createElement(Animated.View, {
13690
+ style: {
13691
+ opacity: interpolatedFABOpacityAnimation
13692
+ }
13693
+ }, /*#__PURE__*/React.createElement(StyledFAB, {
13694
+ key: "fab",
13695
+ testID: "fab",
13696
+ icon: fabIcon,
13697
+ onPress: onPress,
13698
+ animated: true,
13699
+ active: active,
13700
+ title: fabTitle,
13701
+ ref: fabRef
13702
+ })), /*#__PURE__*/React.createElement(Modal$1, {
13671
13703
  visible: active,
13672
13704
  animationType: "fade",
13673
- transparent: true
13705
+ transparent: true,
13706
+ statusBarTranslucent: true
13674
13707
  }, /*#__PURE__*/React.createElement(StyledContainerInModal, {
13675
13708
  testID: testID,
13676
13709
  style: [style]
13677
13710
  }, /*#__PURE__*/React.createElement(StyledBackdrop, {
13678
- pointerEvents: active ? 'auto' : 'box-none',
13679
- testID: "back-drop",
13680
- style: {
13681
- opacity: interpolatedBackdropOpacityAnimation
13682
- }
13711
+ testID: "back-drop"
13683
13712
  }), /*#__PURE__*/React.createElement(StyledActionGroupContainer, {
13684
- pointerEvents: active ? 'auto' : 'none',
13685
13713
  testID: "action-group",
13686
13714
  style: {
13687
13715
  opacity: interpolatedActionGroupOpacityAnimation
@@ -13706,11 +13734,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13706
13734
  index: active ? index : items.length - index,
13707
13735
  active: active
13708
13736
  }));
13709
- }))), /*#__PURE__*/React.createElement(Animated.View, {
13710
- style: {
13711
- opacity: interpolatedActionGroupOpacityAnimation
13712
- }
13713
- }, /*#__PURE__*/React.createElement(StyledFAB, {
13737
+ }))), /*#__PURE__*/React.createElement(StyledFAB, {
13714
13738
  key: "fab-in-portal",
13715
13739
  testID: "fab-in-portal",
13716
13740
  icon: fabIcon,
@@ -13718,20 +13742,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13718
13742
  animated: true,
13719
13743
  active: active,
13720
13744
  title: fabTitle
13721
- })))), /*#__PURE__*/React.createElement(Animated.View, {
13722
- style: {
13723
- opacity: interpolatedFABOpacityAnimation
13724
- }
13725
- }, /*#__PURE__*/React.createElement(StyledFAB, {
13726
- key: "fab",
13727
- testID: "fab",
13728
- icon: fabIcon,
13729
- onPress: onPress,
13730
- animated: true,
13731
- active: active,
13732
- title: fabTitle,
13733
- ref: fabRef
13734
- })));
13745
+ }))));
13735
13746
  });
13736
13747
  ActionGroup.displayName = 'FAB.ActionGroup';
13737
13748
 
package/lib/index.js CHANGED
@@ -2134,8 +2134,11 @@ var getCardCarouselTheme = function getCardCarouselTheme(theme) {
2134
2134
 
2135
2135
  var getCheckboxTheme = function getCheckboxTheme(theme) {
2136
2136
  var colors = {
2137
- "default": theme.colors.primaryOutline,
2138
- disabledBorder: theme.colors.disabledOutline
2137
+ borders: {
2138
+ "default": theme.colors.primaryOutline,
2139
+ disabled: theme.colors.disabledOutline,
2140
+ readonly: theme.colors.inactiveOutline
2141
+ }
2139
2142
  };
2140
2143
  var space = {
2141
2144
  iconTop: 0,
@@ -12021,12 +12024,12 @@ var index$a = Object.assign(Carousel, {
12021
12024
  var StyledWrapper$7 = index$c(reactNative.TouchableOpacity)(function (_ref) {
12022
12025
  var theme = _ref.theme,
12023
12026
  themeWithBorder = _ref.themeWithBorder,
12024
- themeDisabled = _ref.themeDisabled;
12027
+ themeState = _ref.themeState;
12025
12028
  var borderStyle = {
12026
12029
  borderRadius: theme.__hd__.checkbox.radii.wrapper,
12027
12030
  borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
12028
12031
  padding: theme.__hd__.checkbox.space.wrapperPadding,
12029
- borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
12032
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState]
12030
12033
  };
12031
12034
  return _objectSpread2({
12032
12035
  flexDirection: 'row'
@@ -12049,37 +12052,56 @@ var StyledCheckboxContainer = index$c(reactNative.View)(function (_ref3) {
12049
12052
  });
12050
12053
  var StyledCheckbox = index$c(reactNative.View)(function (_ref4) {
12051
12054
  var theme = _ref4.theme,
12052
- themeDisabled = _ref4.themeDisabled;
12055
+ themeState = _ref4.themeState;
12053
12056
  return {
12054
12057
  flex: 1,
12055
12058
  borderRadius: theme.__hd__.checkbox.radii.icon,
12056
12059
  borderWidth: theme.__hd__.checkbox.borderWidths.icon,
12057
- borderColor: themeDisabled ? theme.__hd__.checkbox.colors.disabledBorder : theme.__hd__.checkbox.colors["default"]
12060
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState]
12058
12061
  };
12059
12062
  });
12060
12063
  var StyledCheckMark = index$c(Icon)(function (_ref5) {
12061
- var theme = _ref5.theme;
12064
+ var theme = _ref5.theme,
12065
+ themeState = _ref5.themeState;
12062
12066
  return {
12063
12067
  position: 'absolute',
12064
- top: theme.__hd__.checkbox.space.iconTop
12068
+ top: theme.__hd__.checkbox.space.iconTop,
12069
+ color: theme.__hd__.checkbox.colors.borders[themeState]
12065
12070
  };
12066
12071
  });
12067
12072
 
12068
- var Checkbox = function Checkbox(_ref) {
12069
- var checked = _ref.checked,
12070
- description = _ref.description,
12071
- _ref$withBorder = _ref.withBorder,
12072
- withBorder = _ref$withBorder === void 0 ? false : _ref$withBorder,
12073
- _ref$disabled = _ref.disabled,
12074
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12075
- onPress = _ref.onPress,
12076
- style = _ref.style,
12077
- testID = _ref.testID;
12073
+ var getThemeState = function getThemeState(_ref) {
12074
+ var disabled = _ref.disabled,
12075
+ readonly = _ref.readonly;
12076
+ if (disabled) {
12077
+ return 'disabled';
12078
+ }
12079
+ if (readonly) {
12080
+ return 'readonly';
12081
+ }
12082
+ return 'default';
12083
+ };
12084
+ var Checkbox = function Checkbox(_ref2) {
12085
+ var checked = _ref2.checked,
12086
+ description = _ref2.description,
12087
+ _ref2$withBorder = _ref2.withBorder,
12088
+ withBorder = _ref2$withBorder === void 0 ? false : _ref2$withBorder,
12089
+ _ref2$disabled = _ref2.disabled,
12090
+ disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
12091
+ onPress = _ref2.onPress,
12092
+ style = _ref2.style,
12093
+ testID = _ref2.testID,
12094
+ _ref2$readonly = _ref2.readonly,
12095
+ readonly = _ref2$readonly === void 0 ? false : _ref2$readonly;
12096
+ var themeState = getThemeState({
12097
+ disabled: disabled,
12098
+ readonly: readonly
12099
+ });
12078
12100
  return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$7, {
12079
12101
  onPress: onPress,
12080
- disabled: disabled,
12081
- themeDisabled: disabled,
12102
+ disabled: disabled || readonly,
12082
12103
  themeWithBorder: withBorder,
12104
+ themeState: themeState,
12083
12105
  style: style,
12084
12106
  testID: testID
12085
12107
  }, !!description && /*#__PURE__*/React__default["default"].createElement(StyledDescription$1, {
@@ -12087,10 +12109,10 @@ var Checkbox = function Checkbox(_ref) {
12087
12109
  variant: "small"
12088
12110
  }, description), /*#__PURE__*/React__default["default"].createElement(StyledCheckboxContainer, null, checked && /*#__PURE__*/React__default["default"].createElement(StyledCheckMark, {
12089
12111
  icon: "box-check",
12090
- intent: disabled ? 'disabled-text' : 'text',
12091
- testID: "check-mark"
12112
+ testID: "check-mark",
12113
+ themeState: themeState
12092
12114
  }), /*#__PURE__*/React__default["default"].createElement(StyledCheckbox, {
12093
- themeDisabled: disabled
12115
+ themeState: themeState
12094
12116
  })));
12095
12117
  };
12096
12118
 
@@ -13627,6 +13649,7 @@ var StyledBackdrop = index$c(reactNative.Animated.View)(function (_ref2) {
13627
13649
  right: 0,
13628
13650
  top: 0,
13629
13651
  bottom: 0,
13652
+ opacity: 0.25,
13630
13653
  backgroundColor: theme.__hd__.fab.colors.backdropBackground
13631
13654
  };
13632
13655
  });
@@ -13682,10 +13705,6 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13682
13705
  useNativeDriver: reactNative.Platform.OS !== 'web'
13683
13706
  })]).start();
13684
13707
  }, [active]);
13685
- var interpolatedBackdropOpacityAnimation = tranlateXAnimation.current.interpolate({
13686
- inputRange: [0, 1],
13687
- outputRange: [0, 0.25]
13688
- });
13689
13708
  var interpolatedActionGroupOpacityAnimation = tranlateXAnimation.current.interpolate({
13690
13709
  inputRange: [0, 1],
13691
13710
  outputRange: [0, 1]
@@ -13698,21 +13717,30 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13698
13717
  testID: testID,
13699
13718
  pointerEvents: "box-none",
13700
13719
  style: style
13701
- }, /*#__PURE__*/React__default["default"].createElement(reactNative.Modal, {
13720
+ }, /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
13721
+ style: {
13722
+ opacity: interpolatedFABOpacityAnimation
13723
+ }
13724
+ }, /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13725
+ key: "fab",
13726
+ testID: "fab",
13727
+ icon: fabIcon,
13728
+ onPress: onPress,
13729
+ animated: true,
13730
+ active: active,
13731
+ title: fabTitle,
13732
+ ref: fabRef
13733
+ })), /*#__PURE__*/React__default["default"].createElement(reactNative.Modal, {
13702
13734
  visible: active,
13703
13735
  animationType: "fade",
13704
- transparent: true
13736
+ transparent: true,
13737
+ statusBarTranslucent: true
13705
13738
  }, /*#__PURE__*/React__default["default"].createElement(StyledContainerInModal, {
13706
13739
  testID: testID,
13707
13740
  style: [style]
13708
13741
  }, /*#__PURE__*/React__default["default"].createElement(StyledBackdrop, {
13709
- pointerEvents: active ? 'auto' : 'box-none',
13710
- testID: "back-drop",
13711
- style: {
13712
- opacity: interpolatedBackdropOpacityAnimation
13713
- }
13742
+ testID: "back-drop"
13714
13743
  }), /*#__PURE__*/React__default["default"].createElement(StyledActionGroupContainer, {
13715
- pointerEvents: active ? 'auto' : 'none',
13716
13744
  testID: "action-group",
13717
13745
  style: {
13718
13746
  opacity: interpolatedActionGroupOpacityAnimation
@@ -13737,11 +13765,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13737
13765
  index: active ? index : items.length - index,
13738
13766
  active: active
13739
13767
  }));
13740
- }))), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
13741
- style: {
13742
- opacity: interpolatedActionGroupOpacityAnimation
13743
- }
13744
- }, /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13768
+ }))), /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13745
13769
  key: "fab-in-portal",
13746
13770
  testID: "fab-in-portal",
13747
13771
  icon: fabIcon,
@@ -13749,20 +13773,7 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13749
13773
  animated: true,
13750
13774
  active: active,
13751
13775
  title: fabTitle
13752
- })))), /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, {
13753
- style: {
13754
- opacity: interpolatedFABOpacityAnimation
13755
- }
13756
- }, /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13757
- key: "fab",
13758
- testID: "fab",
13759
- icon: fabIcon,
13760
- onPress: onPress,
13761
- animated: true,
13762
- active: active,
13763
- title: fabTitle,
13764
- ref: fabRef
13765
- })));
13776
+ }))));
13766
13777
  });
13767
13778
  ActionGroup.displayName = 'FAB.ActionGroup';
13768
13779
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.36.0-alpha.0",
3
+ "version": "8.36.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.35.0",
24
+ "@hero-design/colors": "8.36.0",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21",
28
28
  "nanoid": "^4.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@hero-design/react-native-month-year-picker": "^8.35.0",
31
+ "@hero-design/react-native-month-year-picker": "^8.36.0",
32
32
  "@react-native-community/datetimepicker": "^3.5.2",
33
33
  "@react-native-community/slider": "4.1.12",
34
34
  "react": "18.0.0",
@@ -48,8 +48,8 @@
48
48
  "@babel/preset-typescript": "^7.17.12",
49
49
  "@babel/runtime": "^7.18.9",
50
50
  "@emotion/jest": "^11.9.3",
51
- "@hero-design/eslint-plugin": "8.35.0",
52
- "@hero-design/react-native-month-year-picker": "^8.35.0",
51
+ "@hero-design/eslint-plugin": "8.36.0",
52
+ "@hero-design/react-native-month-year-picker": "^8.36.0",
53
53
  "@react-native-community/datetimepicker": "^3.5.2",
54
54
  "@react-native-community/slider": "4.1.12",
55
55
  "@rollup/plugin-babel": "^5.3.1",
@@ -65,10 +65,10 @@
65
65
  "@types/react-native": "^0.67.7",
66
66
  "@types/react-native-vector-icons": "^6.4.10",
67
67
  "babel-plugin-inline-import": "^3.0.0",
68
- "eslint-config-hd": "8.35.0",
68
+ "eslint-config-hd": "8.36.0",
69
69
  "eslint-plugin-import": "^2.27.5",
70
70
  "jest": "^27.3.1",
71
- "prettier-config-hd": "8.35.0",
71
+ "prettier-config-hd": "8.36.0",
72
72
  "react": "18.0.0",
73
73
  "react-native": "0.69.7",
74
74
  "react-native-gesture-handler": "~2.5.0",
@@ -1,19 +1,19 @@
1
1
  import styled from '@emotion/native';
2
2
  import { TouchableOpacity, View } from 'react-native';
3
- import Icon from '../Icon';
3
+ import HeroIcon from '../Icon';
4
4
  import Typography from '../Typography';
5
5
 
6
+ type CheckboxThemeState = 'default' | 'disabled' | 'readonly';
7
+
6
8
  export const StyledWrapper = styled(TouchableOpacity)<{
7
9
  themeWithBorder: boolean;
8
- themeDisabled: boolean;
9
- }>(({ theme, themeWithBorder, themeDisabled }) => {
10
+ themeState: CheckboxThemeState;
11
+ }>(({ theme, themeWithBorder, themeState }) => {
10
12
  const borderStyle = {
11
13
  borderRadius: theme.__hd__.checkbox.radii.wrapper,
12
14
  borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
13
15
  padding: theme.__hd__.checkbox.space.wrapperPadding,
14
- borderColor: themeDisabled
15
- ? theme.__hd__.checkbox.colors.disabledBorder
16
- : theme.__hd__.checkbox.colors.default,
16
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState],
17
17
  };
18
18
 
19
19
  return {
@@ -33,18 +33,19 @@ export const StyledCheckboxContainer = styled(View)(({ theme }) => ({
33
33
  overflow: 'hidden',
34
34
  }));
35
35
 
36
- export const StyledCheckbox = styled(View)<{ themeDisabled: boolean }>(
37
- ({ theme, themeDisabled }) => ({
38
- flex: 1,
39
- borderRadius: theme.__hd__.checkbox.radii.icon,
40
- borderWidth: theme.__hd__.checkbox.borderWidths.icon,
41
- borderColor: themeDisabled
42
- ? theme.__hd__.checkbox.colors.disabledBorder
43
- : theme.__hd__.checkbox.colors.default,
44
- })
45
- );
36
+ export const StyledCheckbox = styled(View)<{
37
+ themeState: CheckboxThemeState;
38
+ }>(({ theme, themeState }) => ({
39
+ flex: 1,
40
+ borderRadius: theme.__hd__.checkbox.radii.icon,
41
+ borderWidth: theme.__hd__.checkbox.borderWidths.icon,
42
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState],
43
+ }));
46
44
 
47
- export const StyledCheckMark = styled(Icon)(({ theme }) => ({
45
+ export const StyledCheckMark = styled(HeroIcon)<{
46
+ themeState: CheckboxThemeState;
47
+ }>(({ theme, themeState }) => ({
48
48
  position: 'absolute',
49
49
  top: theme.__hd__.checkbox.space.iconTop,
50
+ color: theme.__hd__.checkbox.colors.borders[themeState],
50
51
  }));
@@ -1,18 +1,25 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
3
  import { StyledWrapper, StyledCheckbox } from '../StyledCheckbox';
4
+ import { getThemeState } from '..';
4
5
 
5
6
  describe('StyledWrapper', () => {
6
7
  it.each`
7
- withBorder | disabled
8
- ${false} | ${false}
9
- ${true} | ${false}
10
- ${true} | ${true}
8
+ withBorder | disabled | readonly
9
+ ${false} | ${false} | ${false}
10
+ ${true} | ${false} | ${false}
11
+ ${false} | ${true} | ${false}
12
+ ${true} | ${true} | ${false}
13
+ ${false} | ${false} | ${true}
14
+ ${true} | ${false} | ${true}
15
+ ${false} | ${true} | ${true}
16
+ ${true} | ${true} | ${true}
11
17
  `(
12
18
  'renders correctly when disabled is $disabled, withBorder is $withBorder',
13
- ({ disabled, withBorder }) => {
19
+ ({ disabled, withBorder, readonly }) => {
20
+ const themeState = getThemeState({ disabled, readonly });
14
21
  const { toJSON } = renderWithTheme(
15
- <StyledWrapper themeDisabled={disabled} themeWithBorder={withBorder} />
22
+ <StyledWrapper themeState={themeState} themeWithBorder={withBorder} />
16
23
  );
17
24
 
18
25
  expect(toJSON()).toMatchSnapshot();
@@ -22,14 +29,20 @@ describe('StyledWrapper', () => {
22
29
 
23
30
  describe('StyledCheckbox', () => {
24
31
  it.each`
25
- disabled
26
- ${true}
27
- ${false}
28
- `('renders correctly when disabled is $disabled', ({ disabled }) => {
29
- const { toJSON } = renderWithTheme(
30
- <StyledCheckbox themeDisabled={disabled} />
31
- );
32
+ disabled | readonly
33
+ ${true} | ${false}
34
+ ${true} | ${true}
35
+ ${false} | ${false}
36
+ ${false} | ${true}
37
+ `(
38
+ 'renders correctly when disabled is $disabled and readonly is $readonly',
39
+ ({ disabled, readonly }) => {
40
+ const themeState = getThemeState({ disabled, readonly });
41
+ const { toJSON } = renderWithTheme(
42
+ <StyledCheckbox themeState={themeState} />
43
+ );
32
44
 
33
- expect(toJSON()).toMatchSnapshot();
34
- });
45
+ expect(toJSON()).toMatchSnapshot();
46
+ }
47
+ );
35
48
  });