carbon-react 87.4.0 → 87.5.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.
@@ -56,6 +56,7 @@ const TileSelect = ({
56
56
  actionButtonAdornment,
57
57
  footer,
58
58
  prefixAdornment,
59
+ additionalInformation,
59
60
  ...rest
60
61
  }) => {
61
62
  const l = (0, _useLocale.default)();
@@ -125,7 +126,9 @@ const TileSelect = ({
125
126
  mr: 3
126
127
  }, prefixAdornment), /*#__PURE__*/_react.default.createElement(_box.default, {
127
128
  flexGrow: "1"
128
- }, /*#__PURE__*/_react.default.createElement(_tileSelect.StyledTitleContainer, null, title && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledTitle, checkPropTypeIsNode(title), title), subtitle && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledSubtitle, checkPropTypeIsNode(subtitle), subtitle), titleAdornment && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledAdornment, null, titleAdornment)), /*#__PURE__*/_react.default.createElement(_tileSelect.StyledDescription, checkPropTypeIsNode(description), description), footer && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledFooterWrapper, null, footer)), (customActionButton || checked) && renderActionButton()))));
129
+ }, /*#__PURE__*/_react.default.createElement(_tileSelect.StyledTitleContainer, null, title && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledTitle, checkPropTypeIsNode(title), title), subtitle && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledSubtitle, checkPropTypeIsNode(subtitle), subtitle), titleAdornment && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledAdornment, {
130
+ hasAdditionalInformation: !!additionalInformation
131
+ }, titleAdornment)), additionalInformation && /*#__PURE__*/_react.default.createElement("div", null, additionalInformation), /*#__PURE__*/_react.default.createElement(_tileSelect.StyledDescription, checkPropTypeIsNode(description), description), footer && /*#__PURE__*/_react.default.createElement(_tileSelect.StyledFooterWrapper, null, footer)), (customActionButton || checked) && renderActionButton()))));
129
132
  };
130
133
 
131
134
  TileSelect.defaultProps = {
@@ -186,7 +189,10 @@ TileSelect.propTypes = { ...marginPropTypes,
186
189
  footer: _propTypes.default.node,
187
190
 
188
191
  /** Component to render in the top left corner of TileSelect */
189
- prefixAdornment: _propTypes.default.node
192
+ prefixAdornment: _propTypes.default.node,
193
+
194
+ /** Component to render additional information row between title and description */
195
+ additionalInformation: _propTypes.default.node
190
196
  };
191
197
  TileSelect.displayName = "TileSelect";
192
198
  var _default = TileSelect;
@@ -36,6 +36,8 @@ export interface TileSelectProps extends MarginProps {
36
36
  footer?: React.ReactNode;
37
37
  /** Component to render in the top left corner of TileSelect */
38
38
  prefixAdornment?: React.ReactNode;
39
+ /** Component to render additional information row between title and description */
40
+ additionalInformation?: React.ReactNode;
39
41
  }
40
42
 
41
43
  declare function TileSelect(props: TileSelectProps): JSX.Element;
@@ -45,7 +45,9 @@ const StyledSubtitle = _styledComponents.default.h4`
45
45
  exports.StyledSubtitle = StyledSubtitle;
46
46
  const StyledAdornment = _styledComponents.default.div`
47
47
  z-index: 500;
48
- margin-bottom: 8px;
48
+ margin-bottom: ${({
49
+ hasAdditionalInformation
50
+ }) => hasAdditionalInformation ? "4" : "8"}px;
49
51
  `;
50
52
  exports.StyledAdornment = StyledAdornment;
51
53
  const StyledDescription = _styledComponents.default.p`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "87.4.0",
3
+ "version": "87.5.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {