@thecb/components 6.3.1-beta.4 → 6.3.1-beta.7
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.cjs.js +12 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card/Card.js +15 -12
- package/src/components/atoms/card/CardText.js +18 -14
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
|
|
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(
|
|
35166
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
35167
|
+
padding: padding
|
|
35168
|
+
}, /*#__PURE__*/React.createElement(Cover, null, /*#__PURE__*/React.createElement(Stack, null, 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) + (
|
|
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,
|
|
@@ -35221,7 +35224,8 @@ var Card = function Card(_ref) {
|
|
|
35221
35224
|
minWidth: width,
|
|
35222
35225
|
extraStyles: extraStyles
|
|
35223
35226
|
}, /*#__PURE__*/React.createElement(Cover, {
|
|
35224
|
-
singleChild: true
|
|
35227
|
+
singleChild: true,
|
|
35228
|
+
fillCenter: true
|
|
35225
35229
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
35226
35230
|
fullHeight: true,
|
|
35227
35231
|
childGap: "0",
|
|
@@ -35238,13 +35242,12 @@ var Card = function Card(_ref) {
|
|
|
35238
35242
|
objectFit: imgObjectFit,
|
|
35239
35243
|
backgroundColor: themeValues.imageBackgroundColor,
|
|
35240
35244
|
src: imgSrc
|
|
35241
|
-
}), /*#__PURE__*/React.createElement(
|
|
35242
|
-
padding: padding
|
|
35243
|
-
}, text && /*#__PURE__*/React.createElement(CardText$1, {
|
|
35245
|
+
}), text && /*#__PURE__*/React.createElement(CardText$1, {
|
|
35246
|
+
padding: padding,
|
|
35244
35247
|
titleText: titleText,
|
|
35245
35248
|
text: text,
|
|
35246
35249
|
titleVariant: titleVariant
|
|
35247
|
-
}), children)))
|
|
35250
|
+
}), children)));
|
|
35248
35251
|
};
|
|
35249
35252
|
|
|
35250
35253
|
var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$w);
|