@thecb/components 6.3.1-beta.5 → 6.3.1-beta.6

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.
package/dist/index.esm.js CHANGED
@@ -35157,18 +35157,21 @@ var fallbackValues$x = _defineProperty({
35157
35157
  }, "titleWeight", titleWeight);
35158
35158
 
35159
35159
  var CardText = function CardText(_ref) {
35160
- var text = _ref.text,
35160
+ var padding = _ref.padding,
35161
+ text = _ref.text,
35161
35162
  titleText = _ref.titleText,
35162
35163
  _ref$titleVariant = _ref.titleVariant,
35163
35164
  titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
35164
35165
  themeValues = _ref.themeValues;
35165
- return /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement(Stack, null, titleText && /*#__PURE__*/React.createElement(Title$1, {
35166
+ return /*#__PURE__*/React.createElement(Box, {
35167
+ padding: padding
35168
+ }, titleText && /*#__PURE__*/React.createElement(Title$1, {
35166
35169
  variant: titleVariant,
35167
35170
  color: themeValues.titleColor,
35168
35171
  weight: themeValues === null || themeValues === void 0 ? void 0 : themeValues.titleWeight
35169
35172
  }, titleText), /*#__PURE__*/React.createElement(Paragraph$1, {
35170
35173
  color: themeValues.textColor
35171
- }, text)));
35174
+ }, text));
35172
35175
  };
35173
35176
  var CardText$1 = themeComponent(withWindowSize(CardText), "CardText", fallbackValues$x);
35174
35177
 
@@ -35211,7 +35214,7 @@ var Card = function Card(_ref) {
35211
35214
  borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
35212
35215
  _ref$padding = _ref.padding,
35213
35216
  padding = _ref$padding === void 0 ? "24px" : _ref$padding;
35214
- var numberOfChildren = children.length + (imgSrc ? 1 : 0) + (text ? 1 : 0) + (headerText ? 1 : 0);
35217
+ var numberOfChildren = (typeof children === "Array" ? children.length : 1) + (text ? 1 : 0) + (imgSrc ? 1 : 0) + (headerText ? 1 : 0);
35215
35218
  return /*#__PURE__*/React.createElement(BoxWithShadow$1, {
35216
35219
  variant: "baseStandard",
35217
35220
  background: themeValues.backgroundColor,
@@ -35238,13 +35241,12 @@ var Card = function Card(_ref) {
35238
35241
  objectFit: imgObjectFit,
35239
35242
  backgroundColor: themeValues.imageBackgroundColor,
35240
35243
  src: imgSrc
35241
- }), /*#__PURE__*/React.createElement(Box, {
35242
- padding: padding
35243
- }, text && /*#__PURE__*/React.createElement(CardText$1, {
35244
+ }), text && /*#__PURE__*/React.createElement(CardText$1, {
35245
+ padding: padding,
35244
35246
  titleText: titleText,
35245
35247
  text: text,
35246
35248
  titleVariant: titleVariant
35247
- }), children))));
35249
+ }), children)));
35248
35250
  };
35249
35251
 
35250
35252
  var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$w);