@thecb/components 7.13.3 → 7.13.4-beta.1
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 +80 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +80 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/cardAlt/CardAlt.js +113 -0
- package/src/components/atoms/cardAlt/index.js +3 -0
- package/src/components/atoms/index.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -38028,6 +38028,85 @@ var Card = function Card(_ref) {
|
|
|
38028
38028
|
|
|
38029
38029
|
var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$x);
|
|
38030
38030
|
|
|
38031
|
+
var CardAlt = function CardAlt(_ref) {
|
|
38032
|
+
var _ref$borderRadius = _ref.borderRadius,
|
|
38033
|
+
borderRadius = _ref$borderRadius === void 0 ? "4px" : _ref$borderRadius,
|
|
38034
|
+
extraStyles = _ref.extraStyles,
|
|
38035
|
+
_ref$headerAs = _ref.headerAs,
|
|
38036
|
+
headerAs = _ref$headerAs === void 0 ? "h2" : _ref$headerAs,
|
|
38037
|
+
headerText = _ref.headerText,
|
|
38038
|
+
_ref$headerVariant = _ref.headerVariant,
|
|
38039
|
+
headerVariant = _ref$headerVariant === void 0 ? "small" : _ref$headerVariant,
|
|
38040
|
+
imgSrc = _ref.imgSrc,
|
|
38041
|
+
Image = _ref.Image,
|
|
38042
|
+
_ref$imgHeight = _ref.imgHeight,
|
|
38043
|
+
imgHeight = _ref$imgHeight === void 0 ? "150px" : _ref$imgHeight,
|
|
38044
|
+
_ref$imgObjectFit = _ref.imgObjectFit,
|
|
38045
|
+
imgObjectFit = _ref$imgObjectFit === void 0 ? "none" : _ref$imgObjectFit,
|
|
38046
|
+
imgAltText = _ref.imgAltText,
|
|
38047
|
+
_ref$padding = _ref.padding,
|
|
38048
|
+
padding = _ref$padding === void 0 ? "24px" : _ref$padding,
|
|
38049
|
+
text = _ref.text,
|
|
38050
|
+
titleText = _ref.titleText,
|
|
38051
|
+
_ref$titleVariant = _ref.titleVariant,
|
|
38052
|
+
titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
|
|
38053
|
+
themeValues = _ref.themeValues,
|
|
38054
|
+
_ref$width = _ref.width,
|
|
38055
|
+
width = _ref$width === void 0 ? "276px" : _ref$width,
|
|
38056
|
+
children = _ref.children;
|
|
38057
|
+
var hasImage = Image || imgSrc;
|
|
38058
|
+
var numberOfChildren = (Array.isArray(children) ? children.length : 1) + (text ? 1 : 0) + (hasImage ? 1 : 0) + (headerText ? 1 : 0);
|
|
38059
|
+
return /*#__PURE__*/React__default.createElement(BoxWithShadow$1, {
|
|
38060
|
+
variant: "baseStandard",
|
|
38061
|
+
background: themeValues.backgroundColor,
|
|
38062
|
+
borderRadius: borderRadius,
|
|
38063
|
+
padding: "0",
|
|
38064
|
+
margin: "0",
|
|
38065
|
+
minWidth: width,
|
|
38066
|
+
extraStyles: extraStyles
|
|
38067
|
+
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
38068
|
+
singleChild: true,
|
|
38069
|
+
fillCenter: true
|
|
38070
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
38071
|
+
fullHeight: true,
|
|
38072
|
+
childGap: "0",
|
|
38073
|
+
bottomItem: numberOfChildren,
|
|
38074
|
+
direction: "row"
|
|
38075
|
+
}, headerText && /*#__PURE__*/React__default.createElement(CardHeader, {
|
|
38076
|
+
headerText: headerText,
|
|
38077
|
+
headerColor: themeValues.headerColor,
|
|
38078
|
+
headerVariant: headerVariant,
|
|
38079
|
+
backgroundColor: themeValues.headerBackgroundColor,
|
|
38080
|
+
borderRadius: borderRadius,
|
|
38081
|
+
padding: padding,
|
|
38082
|
+
as: headerAs
|
|
38083
|
+
}), Image && !imgSrc && /*#__PURE__*/React__default.createElement(Box, {
|
|
38084
|
+
minHeight: imgHeight,
|
|
38085
|
+
padding: "0",
|
|
38086
|
+
background: themeValues.imageBackgroundColor
|
|
38087
|
+
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
38088
|
+
minHeight: imgHeight,
|
|
38089
|
+
singleChild: true
|
|
38090
|
+
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
38091
|
+
intrinsic: true
|
|
38092
|
+
}, /*#__PURE__*/React__default.createElement(Image, {
|
|
38093
|
+
alt: imgAltText
|
|
38094
|
+
})))), imgSrc && /*#__PURE__*/React__default.createElement(CardImage, {
|
|
38095
|
+
height: imgHeight,
|
|
38096
|
+
objectFit: imgObjectFit,
|
|
38097
|
+
backgroundColor: themeValues.imageBackgroundColor,
|
|
38098
|
+
src: imgSrc,
|
|
38099
|
+
alt: imgAltText
|
|
38100
|
+
}), text && /*#__PURE__*/React__default.createElement(CardText$1, {
|
|
38101
|
+
padding: padding,
|
|
38102
|
+
titleText: titleText,
|
|
38103
|
+
text: text,
|
|
38104
|
+
titleVariant: titleVariant
|
|
38105
|
+
}), children)));
|
|
38106
|
+
};
|
|
38107
|
+
|
|
38108
|
+
var CardAlt$1 = themeComponent(withWindowSize(CardAlt), "CardAlt", fallbackValues$x);
|
|
38109
|
+
|
|
38031
38110
|
var fontFamily$6 = "Public Sans, sans-serif";
|
|
38032
38111
|
var activeColor$6 = MATISSE_BLUE;
|
|
38033
38112
|
var linkColor$3 = CHARADE_GREY;
|
|
@@ -50055,6 +50134,7 @@ exports.ButtonWithAction = ButtonWithAction;
|
|
|
50055
50134
|
exports.ButtonWithLink = ButtonWithLink;
|
|
50056
50135
|
exports.CalendarIcon = CalendarIcon;
|
|
50057
50136
|
exports.Card = Card$1;
|
|
50137
|
+
exports.CardAlt = CardAlt$1;
|
|
50058
50138
|
exports.CarrotIcon = CarrotIcon$1;
|
|
50059
50139
|
exports.CashIcon = CashIcon;
|
|
50060
50140
|
exports.Center = Center;
|