@hero-design/rn 8.58.0 → 8.59.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.
@@ -2,4 +2,4 @@
2
2
  src/index.ts → lib/index.js, es/index.js...
3
3
  (!) 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`.
4
4
  (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
5
- created lib/index.js, es/index.js in 58.4s
5
+ created lib/index.js, es/index.js in 57.2s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.59.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#2765](https://github.com/Thinkei/hero-design/pull/2765) [`d2ebbb352`](https://github.com/Thinkei/hero-design/commit/d2ebbb35203162593468cd243602550ab6510dd9) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Carousel] Make item heading optional.
8
+
3
9
  ## 8.58.0
4
10
 
5
11
  ### Minor Changes
package/es/index.js CHANGED
@@ -12333,10 +12333,10 @@ var CarouselItem = function CarouselItem(_ref) {
12333
12333
  }, ImageComponent, /*#__PURE__*/React.createElement(StyledCarouselContentWrapper, {
12334
12334
  paddingHorizontal: "medium",
12335
12335
  width: width
12336
- }, content, /*#__PURE__*/React.createElement(StyledCarouselHeading, {
12336
+ }, content, !!heading && /*#__PURE__*/React.createElement(StyledCarouselHeading, {
12337
12337
  level: "h1",
12338
12338
  typeface: "playful"
12339
- }, heading), body ? /*#__PURE__*/React.createElement(Typography.Body, null, body) : null));
12339
+ }, heading), !!body && /*#__PURE__*/React.createElement(Typography.Body, null, body)));
12340
12340
  };
12341
12341
 
12342
12342
  var _excluded$l = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
package/lib/index.js CHANGED
@@ -12363,10 +12363,10 @@ var CarouselItem = function CarouselItem(_ref) {
12363
12363
  }, ImageComponent, /*#__PURE__*/React__default["default"].createElement(StyledCarouselContentWrapper, {
12364
12364
  paddingHorizontal: "medium",
12365
12365
  width: width
12366
- }, content, /*#__PURE__*/React__default["default"].createElement(StyledCarouselHeading, {
12366
+ }, content, !!heading && /*#__PURE__*/React__default["default"].createElement(StyledCarouselHeading, {
12367
12367
  level: "h1",
12368
12368
  typeface: "playful"
12369
- }, heading), body ? /*#__PURE__*/React__default["default"].createElement(Typography.Body, null, body) : null));
12369
+ }, heading), !!body && /*#__PURE__*/React__default["default"].createElement(Typography.Body, null, body)));
12370
12370
  };
12371
12371
 
12372
12372
  var _excluded$l = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "testID", "pageControlPosition"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.58.0",
3
+ "version": "8.59.0",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,13 +1,13 @@
1
- import React from 'react';
2
1
  import { useTheme } from '@emotion/react';
2
+ import React from 'react';
3
+ import Box from '../Box';
4
+ import Typography from '../Typography';
3
5
  import {
4
6
  StyledCarouselContentWrapper,
5
7
  StyledCarouselHeading,
6
8
  StyledCarouselImage,
7
9
  StyledCustomSizeCarouselImage,
8
10
  } from './StyledCarousel';
9
- import Box from '../Box';
10
- import Typography from '../Typography';
11
11
  import { CarouselData, CarouselImageProps } from './types';
12
12
 
13
13
  interface CarouselItemProps extends Omit<CarouselData, 'background'> {
@@ -60,10 +60,14 @@ const CarouselItem = ({
60
60
 
61
61
  <StyledCarouselContentWrapper paddingHorizontal="medium" width={width}>
62
62
  {content}
63
- <StyledCarouselHeading level="h1" typeface="playful">
64
- {heading}
65
- </StyledCarouselHeading>
66
- {body ? <Typography.Body>{body}</Typography.Body> : null}
63
+
64
+ {!!heading && (
65
+ <StyledCarouselHeading level="h1" typeface="playful">
66
+ {heading}
67
+ </StyledCarouselHeading>
68
+ )}
69
+
70
+ {!!body && <Typography.Body>{body}</Typography.Body>}
67
71
  </StyledCarouselContentWrapper>
68
72
  </Box>
69
73
  );
@@ -10,7 +10,7 @@ export type CarouselImageProps = ImageSourcePropType & {
10
10
  export type CarouselData = {
11
11
  image?: CarouselImageProps | string;
12
12
  content?: ReactNode;
13
- heading: string;
13
+ heading?: string;
14
14
  body?: string;
15
15
  background: string;
16
16
  };
@@ -8,7 +8,7 @@ export declare type CarouselImageProps = ImageSourcePropType & {
8
8
  export declare type CarouselData = {
9
9
  image?: CarouselImageProps | string;
10
10
  content?: ReactNode;
11
- heading: string;
11
+ heading?: string;
12
12
  body?: string;
13
13
  background: string;
14
14
  };