@hero-design/rn 8.36.2 → 8.36.3

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 (34) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/es/index.js +40 -49
  3. package/lib/index.js +40 -49
  4. package/package.json +7 -7
  5. package/src/components/Carousel/StyledCardCarousel.tsx +1 -1
  6. package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +8 -8
  7. package/src/components/Checkbox/StyledCheckbox.tsx +7 -14
  8. package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +8 -12
  9. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -88
  10. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +12 -324
  11. package/src/components/Checkbox/__tests__/index.spec.tsx +7 -12
  12. package/src/components/Checkbox/index.tsx +7 -1
  13. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  14. package/src/components/Drawer/index.tsx +3 -3
  15. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  16. package/src/components/FAB/StyledFAB.tsx +1 -1
  17. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +4 -4
  18. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  19. package/src/components/List/StyledListItem.tsx +5 -5
  20. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +6 -6
  21. package/src/components/Toast/StyledToast.tsx +1 -1
  22. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
  23. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -17
  24. package/src/theme/components/cardCarousel.ts +5 -5
  25. package/src/theme/components/fab.ts +5 -5
  26. package/src/theme/components/list.ts +7 -4
  27. package/src/theme/components/toast.ts +5 -5
  28. package/src/theme/global/shadows.ts +3 -3
  29. package/types/components/Checkbox/StyledCheckbox.d.ts +0 -1
  30. package/types/components/Checkbox/index.d.ts +1 -0
  31. package/types/theme/components/cardCarousel.d.ts +1 -1
  32. package/types/theme/components/fab.d.ts +1 -1
  33. package/types/theme/components/list.d.ts +9 -6
  34. package/types/theme/components/toast.d.ts +1 -1
@@ -4,5 +4,5 @@ $ rollup -c
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
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 26.5s
7
+ created lib/index.js, es/index.js in 28s
8
8
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/es/index.js CHANGED
@@ -1669,10 +1669,10 @@ var getShadows = function getShadows(systemPalette) {
1669
1669
  width: 0,
1670
1670
  height: 2
1671
1671
  },
1672
- shadowColor: systemPalette.secondaryOutline,
1673
- shadowOpacity: 1,
1672
+ shadowColor: systemPalette.primaryOutline,
1673
+ shadowOpacity: 0.12,
1674
1674
  shadowRadius: 4,
1675
- elevation: 10
1675
+ elevation: 3
1676
1676
  }
1677
1677
  };
1678
1678
  };
@@ -2095,17 +2095,14 @@ var getCardCarouselTheme = function getCardCarouselTheme(theme) {
2095
2095
  contentContainerPaddingHorizontal: theme.space.large
2096
2096
  };
2097
2097
  var colors = {
2098
- shadow: theme.colors.primaryOutline,
2099
2098
  carouselItemBackground: theme.colors.defaultSurface
2100
2099
  };
2101
2100
  var shadows = {
2102
- offset: {
2103
- width: 0,
2104
- height: 2
2105
- },
2106
- opacity: 0.12,
2107
- radius: theme.radii.medium,
2108
- elevation: 4
2101
+ color: theme.shadows["default"].shadowColor,
2102
+ offset: theme.shadows["default"].shadowOffset,
2103
+ opacity: theme.shadows["default"].shadowOpacity,
2104
+ radius: theme.shadows["default"].shadowRadius,
2105
+ elevation: theme.shadows["default"].elevation
2109
2106
  };
2110
2107
  var radii = {
2111
2108
  card: theme.radii.medium
@@ -2312,8 +2309,7 @@ var getFABTheme = function getFABTheme(theme) {
2312
2309
  actionItemPressedBackground: theme.colors.pressedSurface,
2313
2310
  backdropBackground: theme.colors.overlayGlobalSurface,
2314
2311
  titleText: theme.colors.onPrimary,
2315
- actionItemText: theme.colors.onPrimary,
2316
- shadow: theme.colors.primaryOutline
2312
+ actionItemText: theme.colors.onPrimary
2317
2313
  };
2318
2314
  var sizes = {
2319
2315
  width: theme.sizes.xxxxxlarge,
@@ -2338,13 +2334,11 @@ var getFABTheme = function getFABTheme(theme) {
2338
2334
  icon: theme.lineHeights.large
2339
2335
  };
2340
2336
  var shadows = {
2341
- offset: {
2342
- width: 0,
2343
- height: 2
2344
- },
2345
- opacity: 0.12,
2346
- radius: theme.radii.medium,
2347
- elevation: 2
2337
+ offset: theme.shadows["default"].shadowOffset,
2338
+ opacity: theme.shadows["default"].shadowOpacity,
2339
+ radius: theme.shadows["default"].shadowRadius,
2340
+ elevation: theme.shadows["default"].elevation,
2341
+ color: theme.shadows["default"].shadowColor
2348
2342
  };
2349
2343
  var space = {
2350
2344
  actionItemPadding: theme.space.smallMedium,
@@ -2429,20 +2423,23 @@ var getListTheme = function getListTheme(theme) {
2429
2423
  var radii = {
2430
2424
  item: theme.radii.medium,
2431
2425
  basicItem: theme.radii.base,
2432
- cardShadow: theme.radii.base,
2433
2426
  leadingStatus: theme.radii.rounded
2434
2427
  };
2435
2428
  var shadows = {
2436
- cardOffset: theme.shadows["default"].shadowOffset,
2437
- cardElevation: theme.shadows["default"].elevation
2429
+ card: {
2430
+ offset: theme.shadows["default"].shadowOffset,
2431
+ elevation: theme.shadows["default"].elevation,
2432
+ color: theme.shadows["default"].shadowColor,
2433
+ radius: theme.shadows["default"].shadowRadius,
2434
+ opacity: theme.shadows["default"].shadowOpacity
2435
+ }
2438
2436
  };
2439
2437
  var widths = {
2440
2438
  leadingStatus: 8
2441
2439
  };
2442
2440
  var opacity = {
2443
2441
  disabled: 0.38,
2444
- enabled: 1,
2445
- cardShadow: theme.shadows["default"].shadowOpacity
2442
+ enabled: 1
2446
2443
  };
2447
2444
  return {
2448
2445
  colors: colors,
@@ -3046,8 +3043,7 @@ var getToastTheme = function getToastTheme(theme) {
3046
3043
  info: theme.colors.info,
3047
3044
  notification: theme.colors.defaultGlobalSurface,
3048
3045
  snackbar: theme.colors.darkGlobalSurface,
3049
- divider: theme.colors.secondaryOutline,
3050
- shadow: theme.colors.primaryOutline
3046
+ divider: theme.colors.secondaryOutline
3051
3047
  };
3052
3048
  var sizes = {
3053
3049
  height: theme.sizes.xxxlarge
@@ -3067,13 +3063,11 @@ var getToastTheme = function getToastTheme(theme) {
3067
3063
  base: theme.borderWidths.base
3068
3064
  };
3069
3065
  var shadows = {
3070
- offset: {
3071
- width: 0,
3072
- height: 2
3073
- },
3074
- opacity: 0.12,
3075
- radius: 4,
3076
- elevation: 4
3066
+ offset: theme.shadows["default"].shadowOffset,
3067
+ opacity: theme.shadows["default"].shadowOpacity,
3068
+ radius: theme.shadows["default"].shadowRadius,
3069
+ elevation: theme.shadows["default"].elevation,
3070
+ color: theme.shadows["default"].shadowColor
3077
3071
  };
3078
3072
  return {
3079
3073
  colors: colors,
@@ -11705,7 +11699,7 @@ var StyledShadow = index$c(View)(function (_ref3) {
11705
11699
  var theme = _ref3.theme;
11706
11700
  return {
11707
11701
  borderRadius: theme.__hd__.cardCarousel.radii.card,
11708
- shadowColor: theme.__hd__.cardCarousel.colors.shadow,
11702
+ shadowColor: theme.__hd__.cardCarousel.shadows.color,
11709
11703
  shadowOffset: theme.__hd__.cardCarousel.shadows.offset,
11710
11704
  shadowRadius: theme.__hd__.cardCarousel.shadows.radius,
11711
11705
  shadowOpacity: theme.__hd__.cardCarousel.shadows.opacity,
@@ -12006,17 +12000,14 @@ var index$a = Object.assign(Carousel, {
12006
12000
 
12007
12001
  var StyledWrapper$7 = index$c(TouchableOpacity)(function (_ref) {
12008
12002
  var theme = _ref.theme,
12009
- themeWithBorder = _ref.themeWithBorder,
12010
12003
  themeState = _ref.themeState;
12011
- var borderStyle = {
12004
+ return {
12005
+ flexDirection: 'row',
12012
12006
  borderRadius: theme.__hd__.checkbox.radii.wrapper,
12013
12007
  borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
12014
12008
  padding: theme.__hd__.checkbox.space.wrapperPadding,
12015
12009
  borderColor: theme.__hd__.checkbox.colors.borders[themeState]
12016
12010
  };
12017
- return _objectSpread2({
12018
- flexDirection: 'row'
12019
- }, themeWithBorder && borderStyle);
12020
12011
  });
12021
12012
  var StyledDescription$1 = index$c(Typography.Body)(function (_ref2) {
12022
12013
  var theme = _ref2.theme;
@@ -12076,6 +12067,7 @@ var Checkbox = function Checkbox(_ref2) {
12076
12067
  testID = _ref2.testID,
12077
12068
  _ref2$readonly = _ref2.readonly,
12078
12069
  readonly = _ref2$readonly === void 0 ? false : _ref2$readonly;
12070
+ useDeprecation("Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.", withBorder === true);
12079
12071
  var themeState = getThemeState({
12080
12072
  disabled: disabled,
12081
12073
  readonly: readonly
@@ -12083,7 +12075,6 @@ var Checkbox = function Checkbox(_ref2) {
12083
12075
  return /*#__PURE__*/React.createElement(StyledWrapper$7, {
12084
12076
  onPress: onPress,
12085
12077
  disabled: disabled || readonly,
12086
- themeWithBorder: withBorder,
12087
12078
  themeState: themeState,
12088
12079
  style: style,
12089
12080
  testID: testID
@@ -13006,7 +12997,7 @@ var Drawer = function Drawer(_ref) {
13006
12997
  onDismiss = _ref.onDismiss,
13007
12998
  testID = _ref.testID;
13008
12999
  var animatedValue = useRef(new Animated.Value(visible ? 1 : 0)).current;
13009
- var _useState = useState(0),
13000
+ var _useState = useState(Dimensions.get('window').height),
13010
13001
  _useState2 = _slicedToArray(_useState, 2),
13011
13002
  height = _useState2[0],
13012
13003
  setHeight = _useState2[1];
@@ -13345,7 +13336,7 @@ var StyledFAB$1 = index$c(TouchableHighlight)(function (_ref) {
13345
13336
  padding: theme.__hd__.fab.space.containerPadding,
13346
13337
  flexDirection: 'row',
13347
13338
  elevation: theme.__hd__.fab.shadows.elevation,
13348
- shadowColor: theme.__hd__.fab.colors.shadow,
13339
+ shadowColor: theme.__hd__.fab.shadows.color,
13349
13340
  shadowOffset: theme.__hd__.fab.shadows.offset,
13350
13341
  shadowRadius: theme.__hd__.fab.shadows.radius,
13351
13342
  shadowOpacity: theme.__hd__.fab.shadows.opacity
@@ -13782,11 +13773,11 @@ var StyledListItemContainer$1 = index$c(TouchableHighlight)(function (_ref) {
13782
13773
  case 'card':
13783
13774
  return _objectSpread2(_objectSpread2({}, sharedStyles), {}, {
13784
13775
  alignItems: 'center',
13785
- shadowColor: theme.colors.secondaryOutline,
13786
- shadowRadius: theme.__hd__.list.radii.cardShadow,
13787
- shadowOffset: theme.__hd__.list.shadows.cardOffset,
13788
- shadowOpacity: theme.__hd__.list.opacity.cardShadow,
13789
- elevation: theme.__hd__.list.shadows.cardElevation
13776
+ shadowColor: theme.__hd__.list.shadows.card.color,
13777
+ shadowRadius: theme.__hd__.list.shadows.card.radius,
13778
+ shadowOffset: theme.__hd__.list.shadows.card.offset,
13779
+ shadowOpacity: theme.__hd__.list.shadows.card.opacity,
13780
+ elevation: theme.__hd__.list.shadows.card.elevation
13790
13781
  });
13791
13782
  default:
13792
13783
  return sharedStyles;
@@ -16886,7 +16877,7 @@ var Container = index$c(Animated.View)(function (_ref2) {
16886
16877
  backgroundColor: theme.__hd__.toast.colors[themeIntent],
16887
16878
  minHeight: theme.__hd__.toast.sizes.height,
16888
16879
  flexDirection: 'row',
16889
- shadowColor: theme.__hd__.toast.colors.shadow,
16880
+ shadowColor: theme.__hd__.toast.shadows.color,
16890
16881
  shadowOffset: theme.__hd__.toast.shadows.offset,
16891
16882
  shadowRadius: theme.__hd__.toast.shadows.radius,
16892
16883
  shadowOpacity: theme.__hd__.toast.shadows.opacity,
package/lib/index.js CHANGED
@@ -1700,10 +1700,10 @@ var getShadows = function getShadows(systemPalette) {
1700
1700
  width: 0,
1701
1701
  height: 2
1702
1702
  },
1703
- shadowColor: systemPalette.secondaryOutline,
1704
- shadowOpacity: 1,
1703
+ shadowColor: systemPalette.primaryOutline,
1704
+ shadowOpacity: 0.12,
1705
1705
  shadowRadius: 4,
1706
- elevation: 10
1706
+ elevation: 3
1707
1707
  }
1708
1708
  };
1709
1709
  };
@@ -2126,17 +2126,14 @@ var getCardCarouselTheme = function getCardCarouselTheme(theme) {
2126
2126
  contentContainerPaddingHorizontal: theme.space.large
2127
2127
  };
2128
2128
  var colors = {
2129
- shadow: theme.colors.primaryOutline,
2130
2129
  carouselItemBackground: theme.colors.defaultSurface
2131
2130
  };
2132
2131
  var shadows = {
2133
- offset: {
2134
- width: 0,
2135
- height: 2
2136
- },
2137
- opacity: 0.12,
2138
- radius: theme.radii.medium,
2139
- elevation: 4
2132
+ color: theme.shadows["default"].shadowColor,
2133
+ offset: theme.shadows["default"].shadowOffset,
2134
+ opacity: theme.shadows["default"].shadowOpacity,
2135
+ radius: theme.shadows["default"].shadowRadius,
2136
+ elevation: theme.shadows["default"].elevation
2140
2137
  };
2141
2138
  var radii = {
2142
2139
  card: theme.radii.medium
@@ -2343,8 +2340,7 @@ var getFABTheme = function getFABTheme(theme) {
2343
2340
  actionItemPressedBackground: theme.colors.pressedSurface,
2344
2341
  backdropBackground: theme.colors.overlayGlobalSurface,
2345
2342
  titleText: theme.colors.onPrimary,
2346
- actionItemText: theme.colors.onPrimary,
2347
- shadow: theme.colors.primaryOutline
2343
+ actionItemText: theme.colors.onPrimary
2348
2344
  };
2349
2345
  var sizes = {
2350
2346
  width: theme.sizes.xxxxxlarge,
@@ -2369,13 +2365,11 @@ var getFABTheme = function getFABTheme(theme) {
2369
2365
  icon: theme.lineHeights.large
2370
2366
  };
2371
2367
  var shadows = {
2372
- offset: {
2373
- width: 0,
2374
- height: 2
2375
- },
2376
- opacity: 0.12,
2377
- radius: theme.radii.medium,
2378
- elevation: 2
2368
+ offset: theme.shadows["default"].shadowOffset,
2369
+ opacity: theme.shadows["default"].shadowOpacity,
2370
+ radius: theme.shadows["default"].shadowRadius,
2371
+ elevation: theme.shadows["default"].elevation,
2372
+ color: theme.shadows["default"].shadowColor
2379
2373
  };
2380
2374
  var space = {
2381
2375
  actionItemPadding: theme.space.smallMedium,
@@ -2460,20 +2454,23 @@ var getListTheme = function getListTheme(theme) {
2460
2454
  var radii = {
2461
2455
  item: theme.radii.medium,
2462
2456
  basicItem: theme.radii.base,
2463
- cardShadow: theme.radii.base,
2464
2457
  leadingStatus: theme.radii.rounded
2465
2458
  };
2466
2459
  var shadows = {
2467
- cardOffset: theme.shadows["default"].shadowOffset,
2468
- cardElevation: theme.shadows["default"].elevation
2460
+ card: {
2461
+ offset: theme.shadows["default"].shadowOffset,
2462
+ elevation: theme.shadows["default"].elevation,
2463
+ color: theme.shadows["default"].shadowColor,
2464
+ radius: theme.shadows["default"].shadowRadius,
2465
+ opacity: theme.shadows["default"].shadowOpacity
2466
+ }
2469
2467
  };
2470
2468
  var widths = {
2471
2469
  leadingStatus: 8
2472
2470
  };
2473
2471
  var opacity = {
2474
2472
  disabled: 0.38,
2475
- enabled: 1,
2476
- cardShadow: theme.shadows["default"].shadowOpacity
2473
+ enabled: 1
2477
2474
  };
2478
2475
  return {
2479
2476
  colors: colors,
@@ -3077,8 +3074,7 @@ var getToastTheme = function getToastTheme(theme) {
3077
3074
  info: theme.colors.info,
3078
3075
  notification: theme.colors.defaultGlobalSurface,
3079
3076
  snackbar: theme.colors.darkGlobalSurface,
3080
- divider: theme.colors.secondaryOutline,
3081
- shadow: theme.colors.primaryOutline
3077
+ divider: theme.colors.secondaryOutline
3082
3078
  };
3083
3079
  var sizes = {
3084
3080
  height: theme.sizes.xxxlarge
@@ -3098,13 +3094,11 @@ var getToastTheme = function getToastTheme(theme) {
3098
3094
  base: theme.borderWidths.base
3099
3095
  };
3100
3096
  var shadows = {
3101
- offset: {
3102
- width: 0,
3103
- height: 2
3104
- },
3105
- opacity: 0.12,
3106
- radius: 4,
3107
- elevation: 4
3097
+ offset: theme.shadows["default"].shadowOffset,
3098
+ opacity: theme.shadows["default"].shadowOpacity,
3099
+ radius: theme.shadows["default"].shadowRadius,
3100
+ elevation: theme.shadows["default"].elevation,
3101
+ color: theme.shadows["default"].shadowColor
3108
3102
  };
3109
3103
  return {
3110
3104
  colors: colors,
@@ -11736,7 +11730,7 @@ var StyledShadow = index$c(reactNative.View)(function (_ref3) {
11736
11730
  var theme = _ref3.theme;
11737
11731
  return {
11738
11732
  borderRadius: theme.__hd__.cardCarousel.radii.card,
11739
- shadowColor: theme.__hd__.cardCarousel.colors.shadow,
11733
+ shadowColor: theme.__hd__.cardCarousel.shadows.color,
11740
11734
  shadowOffset: theme.__hd__.cardCarousel.shadows.offset,
11741
11735
  shadowRadius: theme.__hd__.cardCarousel.shadows.radius,
11742
11736
  shadowOpacity: theme.__hd__.cardCarousel.shadows.opacity,
@@ -12037,17 +12031,14 @@ var index$a = Object.assign(Carousel, {
12037
12031
 
12038
12032
  var StyledWrapper$7 = index$c(reactNative.TouchableOpacity)(function (_ref) {
12039
12033
  var theme = _ref.theme,
12040
- themeWithBorder = _ref.themeWithBorder,
12041
12034
  themeState = _ref.themeState;
12042
- var borderStyle = {
12035
+ return {
12036
+ flexDirection: 'row',
12043
12037
  borderRadius: theme.__hd__.checkbox.radii.wrapper,
12044
12038
  borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
12045
12039
  padding: theme.__hd__.checkbox.space.wrapperPadding,
12046
12040
  borderColor: theme.__hd__.checkbox.colors.borders[themeState]
12047
12041
  };
12048
- return _objectSpread2({
12049
- flexDirection: 'row'
12050
- }, themeWithBorder && borderStyle);
12051
12042
  });
12052
12043
  var StyledDescription$1 = index$c(Typography.Body)(function (_ref2) {
12053
12044
  var theme = _ref2.theme;
@@ -12107,6 +12098,7 @@ var Checkbox = function Checkbox(_ref2) {
12107
12098
  testID = _ref2.testID,
12108
12099
  _ref2$readonly = _ref2.readonly,
12109
12100
  readonly = _ref2$readonly === void 0 ? false : _ref2$readonly;
12101
+ useDeprecation("Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.", withBorder === true);
12110
12102
  var themeState = getThemeState({
12111
12103
  disabled: disabled,
12112
12104
  readonly: readonly
@@ -12114,7 +12106,6 @@ var Checkbox = function Checkbox(_ref2) {
12114
12106
  return /*#__PURE__*/React__default["default"].createElement(StyledWrapper$7, {
12115
12107
  onPress: onPress,
12116
12108
  disabled: disabled || readonly,
12117
- themeWithBorder: withBorder,
12118
12109
  themeState: themeState,
12119
12110
  style: style,
12120
12111
  testID: testID
@@ -13037,7 +13028,7 @@ var Drawer = function Drawer(_ref) {
13037
13028
  onDismiss = _ref.onDismiss,
13038
13029
  testID = _ref.testID;
13039
13030
  var animatedValue = React.useRef(new reactNative.Animated.Value(visible ? 1 : 0)).current;
13040
- var _useState = React.useState(0),
13031
+ var _useState = React.useState(reactNative.Dimensions.get('window').height),
13041
13032
  _useState2 = _slicedToArray(_useState, 2),
13042
13033
  height = _useState2[0],
13043
13034
  setHeight = _useState2[1];
@@ -13376,7 +13367,7 @@ var StyledFAB$1 = index$c(reactNative.TouchableHighlight)(function (_ref) {
13376
13367
  padding: theme.__hd__.fab.space.containerPadding,
13377
13368
  flexDirection: 'row',
13378
13369
  elevation: theme.__hd__.fab.shadows.elevation,
13379
- shadowColor: theme.__hd__.fab.colors.shadow,
13370
+ shadowColor: theme.__hd__.fab.shadows.color,
13380
13371
  shadowOffset: theme.__hd__.fab.shadows.offset,
13381
13372
  shadowRadius: theme.__hd__.fab.shadows.radius,
13382
13373
  shadowOpacity: theme.__hd__.fab.shadows.opacity
@@ -13813,11 +13804,11 @@ var StyledListItemContainer$1 = index$c(reactNative.TouchableHighlight)(function
13813
13804
  case 'card':
13814
13805
  return _objectSpread2(_objectSpread2({}, sharedStyles), {}, {
13815
13806
  alignItems: 'center',
13816
- shadowColor: theme.colors.secondaryOutline,
13817
- shadowRadius: theme.__hd__.list.radii.cardShadow,
13818
- shadowOffset: theme.__hd__.list.shadows.cardOffset,
13819
- shadowOpacity: theme.__hd__.list.opacity.cardShadow,
13820
- elevation: theme.__hd__.list.shadows.cardElevation
13807
+ shadowColor: theme.__hd__.list.shadows.card.color,
13808
+ shadowRadius: theme.__hd__.list.shadows.card.radius,
13809
+ shadowOffset: theme.__hd__.list.shadows.card.offset,
13810
+ shadowOpacity: theme.__hd__.list.shadows.card.opacity,
13811
+ elevation: theme.__hd__.list.shadows.card.elevation
13821
13812
  });
13822
13813
  default:
13823
13814
  return sharedStyles;
@@ -16917,7 +16908,7 @@ var Container = index$c(reactNative.Animated.View)(function (_ref2) {
16917
16908
  backgroundColor: theme.__hd__.toast.colors[themeIntent],
16918
16909
  minHeight: theme.__hd__.toast.sizes.height,
16919
16910
  flexDirection: 'row',
16920
- shadowColor: theme.__hd__.toast.colors.shadow,
16911
+ shadowColor: theme.__hd__.toast.shadows.color,
16921
16912
  shadowOffset: theme.__hd__.toast.shadows.offset,
16922
16913
  shadowRadius: theme.__hd__.toast.shadows.radius,
16923
16914
  shadowOpacity: theme.__hd__.toast.shadows.opacity,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.36.2",
3
+ "version": "8.36.3",
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.36.2",
24
+ "@hero-design/colors": "8.36.3",
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.36.2",
31
+ "@hero-design/react-native-month-year-picker": "^8.36.3",
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.36.2",
52
- "@hero-design/react-native-month-year-picker": "^8.36.2",
51
+ "@hero-design/eslint-plugin": "8.36.3",
52
+ "@hero-design/react-native-month-year-picker": "^8.36.3",
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.36.2",
68
+ "eslint-config-hd": "8.36.3",
69
69
  "eslint-plugin-import": "^2.27.5",
70
70
  "jest": "^27.3.1",
71
- "prettier-config-hd": "8.36.2",
71
+ "prettier-config-hd": "8.36.3",
72
72
  "react": "18.0.0",
73
73
  "react-native": "0.69.7",
74
74
  "react-native-gesture-handler": "~2.5.0",
@@ -19,7 +19,7 @@ const StyledCard = styled(Card)<CardProps>(({ theme }) => ({
19
19
  }));
20
20
  const StyledShadow = styled(View)<ViewProps>(({ theme }) => ({
21
21
  borderRadius: theme.__hd__.cardCarousel.radii.card,
22
- shadowColor: theme.__hd__.cardCarousel.colors.shadow,
22
+ shadowColor: theme.__hd__.cardCarousel.shadows.color,
23
23
  shadowOffset: theme.__hd__.cardCarousel.shadows.offset,
24
24
  shadowRadius: theme.__hd__.cardCarousel.shadows.radius,
25
25
  shadowOpacity: theme.__hd__.cardCarousel.shadows.opacity,
@@ -104,7 +104,7 @@ exports[`CardCarousel android should render correctly on iOS 1`] = `
104
104
  Array [
105
105
  Object {
106
106
  "borderRadius": 8,
107
- "elevation": 4,
107
+ "elevation": 3,
108
108
  "flex": 1,
109
109
  "shadowColor": "#001f23",
110
110
  "shadowOffset": Object {
@@ -112,7 +112,7 @@ exports[`CardCarousel android should render correctly on iOS 1`] = `
112
112
  "width": 0,
113
113
  },
114
114
  "shadowOpacity": 0.12,
115
- "shadowRadius": 8,
115
+ "shadowRadius": 4,
116
116
  },
117
117
  undefined,
118
118
  ]
@@ -187,7 +187,7 @@ exports[`CardCarousel android should render correctly on iOS 1`] = `
187
187
  Array [
188
188
  Object {
189
189
  "borderRadius": 8,
190
- "elevation": 4,
190
+ "elevation": 3,
191
191
  "flex": 1,
192
192
  "shadowColor": "#001f23",
193
193
  "shadowOffset": Object {
@@ -195,7 +195,7 @@ exports[`CardCarousel android should render correctly on iOS 1`] = `
195
195
  "width": 0,
196
196
  },
197
197
  "shadowOpacity": 0.12,
198
- "shadowRadius": 8,
198
+ "shadowRadius": 4,
199
199
  },
200
200
  undefined,
201
201
  ]
@@ -399,7 +399,7 @@ exports[`CardCarousel ios should render correctly on iOS 1`] = `
399
399
  Array [
400
400
  Object {
401
401
  "borderRadius": 8,
402
- "elevation": 4,
402
+ "elevation": 3,
403
403
  "flex": 1,
404
404
  "shadowColor": "#001f23",
405
405
  "shadowOffset": Object {
@@ -407,7 +407,7 @@ exports[`CardCarousel ios should render correctly on iOS 1`] = `
407
407
  "width": 0,
408
408
  },
409
409
  "shadowOpacity": 0.12,
410
- "shadowRadius": 8,
410
+ "shadowRadius": 4,
411
411
  },
412
412
  undefined,
413
413
  ]
@@ -482,7 +482,7 @@ exports[`CardCarousel ios should render correctly on iOS 1`] = `
482
482
  Array [
483
483
  Object {
484
484
  "borderRadius": 8,
485
- "elevation": 4,
485
+ "elevation": 3,
486
486
  "flex": 1,
487
487
  "shadowColor": "#001f23",
488
488
  "shadowOffset": Object {
@@ -490,7 +490,7 @@ exports[`CardCarousel ios should render correctly on iOS 1`] = `
490
490
  "width": 0,
491
491
  },
492
492
  "shadowOpacity": 0.12,
493
- "shadowRadius": 8,
493
+ "shadowRadius": 4,
494
494
  },
495
495
  undefined,
496
496
  ]
@@ -6,21 +6,14 @@ import Typography from '../Typography';
6
6
  type CheckboxThemeState = 'default' | 'disabled' | 'readonly';
7
7
 
8
8
  export const StyledWrapper = styled(TouchableOpacity)<{
9
- themeWithBorder: boolean;
10
9
  themeState: CheckboxThemeState;
11
- }>(({ theme, themeWithBorder, themeState }) => {
12
- const borderStyle = {
13
- borderRadius: theme.__hd__.checkbox.radii.wrapper,
14
- borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
15
- padding: theme.__hd__.checkbox.space.wrapperPadding,
16
- borderColor: theme.__hd__.checkbox.colors.borders[themeState],
17
- };
18
-
19
- return {
20
- flexDirection: 'row',
21
- ...(themeWithBorder && borderStyle),
22
- };
23
- });
10
+ }>(({ theme, themeState }) => ({
11
+ flexDirection: 'row',
12
+ borderRadius: theme.__hd__.checkbox.radii.wrapper,
13
+ borderWidth: theme.__hd__.checkbox.borderWidths.wrapper,
14
+ padding: theme.__hd__.checkbox.space.wrapperPadding,
15
+ borderColor: theme.__hd__.checkbox.colors.borders[themeState],
16
+ }));
24
17
 
25
18
  export const StyledDescription = styled(Typography.Body)(({ theme }) => ({
26
19
  paddingRight: theme.__hd__.checkbox.space.iconDescriptionPadding,
@@ -5,21 +5,17 @@ import { getThemeState } from '..';
5
5
 
6
6
  describe('StyledWrapper', () => {
7
7
  it.each`
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}
8
+ disabled | readonly
9
+ ${false} | ${false}
10
+ ${true} | ${false}
11
+ ${false} | ${true}
12
+ ${true} | ${true}
17
13
  `(
18
- 'renders correctly when disabled is $disabled, withBorder is $withBorder',
19
- ({ disabled, withBorder, readonly }) => {
14
+ 'renders correctly when disabled is $disabled, readonly is $readonly',
15
+ ({ disabled, readonly }) => {
20
16
  const themeState = getThemeState({ disabled, readonly });
21
17
  const { toJSON } = renderWithTheme(
22
- <StyledWrapper themeState={themeState} themeWithBorder={withBorder} />
18
+ <StyledWrapper themeState={themeState} />
23
19
  );
24
20
 
25
21
  expect(toJSON()).toMatchSnapshot();