@thecb/components 10.11.2 → 10.12.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.
- package/dist/index.cjs.js +36 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.esm.js +36 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/card/Card.js +9 -0
- package/src/components/atoms/card/CardText.js +34 -11
- package/src/components/atoms/card/index.d.ts +7 -1
package/dist/index.cjs.js
CHANGED
|
@@ -39865,20 +39865,40 @@ var fallbackValues$E = {
|
|
|
39865
39865
|
};
|
|
39866
39866
|
|
|
39867
39867
|
var CardText = function CardText(_ref) {
|
|
39868
|
-
var
|
|
39868
|
+
var showQuitLink = _ref.showQuitLink,
|
|
39869
|
+
onQuitClick = _ref.onQuitClick,
|
|
39870
|
+
titleAs = _ref.titleAs,
|
|
39871
|
+
padding = _ref.padding,
|
|
39869
39872
|
text = _ref.text,
|
|
39873
|
+
_ref$textAs = _ref.textAs,
|
|
39874
|
+
textAs = _ref$textAs === void 0 ? "p" : _ref$textAs,
|
|
39870
39875
|
titleText = _ref.titleText,
|
|
39871
39876
|
_ref$titleVariant = _ref.titleVariant,
|
|
39872
39877
|
titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
|
|
39873
39878
|
themeValues = _ref.themeValues;
|
|
39874
39879
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
39875
39880
|
padding: padding
|
|
39876
|
-
}, /*#__PURE__*/React__default.createElement(Cover, null, /*#__PURE__*/React__default.createElement(Stack, null,
|
|
39877
|
-
|
|
39881
|
+
}, /*#__PURE__*/React__default.createElement(Cover, null, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39882
|
+
justify: "space-between",
|
|
39883
|
+
align: "center",
|
|
39884
|
+
overflow: true
|
|
39885
|
+
}, titleText && /*#__PURE__*/React__default.createElement(Title$1, {
|
|
39886
|
+
as: titleAs,
|
|
39878
39887
|
variant: titleVariant,
|
|
39879
39888
|
color: themeValues.titleColor,
|
|
39880
39889
|
weight: themeValues.titleWeight
|
|
39881
|
-
}, titleText), /*#__PURE__*/React__default.createElement(
|
|
39890
|
+
}, titleText), showQuitLink && /*#__PURE__*/React__default.createElement(Box, {
|
|
39891
|
+
padding: "0",
|
|
39892
|
+
onClick: onQuitClick,
|
|
39893
|
+
onKeyDown: function onKeyDown(e) {
|
|
39894
|
+
return e.key === "Enter" && onQuitClick();
|
|
39895
|
+
},
|
|
39896
|
+
role: "button",
|
|
39897
|
+
tabIndex: 0,
|
|
39898
|
+
"aria-label": "Close Card: ".concat(titleText),
|
|
39899
|
+
extraStyles: "cursor: pointer;"
|
|
39900
|
+
}, /*#__PURE__*/React__default.createElement(IconQuitLarge, null))), /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
39901
|
+
as: textAs,
|
|
39882
39902
|
color: themeValues.textColor
|
|
39883
39903
|
}, text))));
|
|
39884
39904
|
};
|
|
@@ -39919,9 +39939,17 @@ var Card = function Card(_ref) {
|
|
|
39919
39939
|
_ref$imgObjectFit = _ref.imgObjectFit,
|
|
39920
39940
|
imgObjectFit = _ref$imgObjectFit === void 0 ? "none" : _ref$imgObjectFit,
|
|
39921
39941
|
imgAltText = _ref.imgAltText,
|
|
39942
|
+
_ref$onQuitClick = _ref.onQuitClick,
|
|
39943
|
+
onQuitClick = _ref$onQuitClick === void 0 ? noop : _ref$onQuitClick,
|
|
39922
39944
|
_ref$padding = _ref.padding,
|
|
39923
39945
|
padding = _ref$padding === void 0 ? "24px" : _ref$padding,
|
|
39946
|
+
_ref$showQuitLink = _ref.showQuitLink,
|
|
39947
|
+
showQuitLink = _ref$showQuitLink === void 0 ? false : _ref$showQuitLink,
|
|
39924
39948
|
text = _ref.text,
|
|
39949
|
+
_ref$textAs = _ref.textAs,
|
|
39950
|
+
textAs = _ref$textAs === void 0 ? "p" : _ref$textAs,
|
|
39951
|
+
_ref$titleAs = _ref.titleAs,
|
|
39952
|
+
titleAs = _ref$titleAs === void 0 ? "h2" : _ref$titleAs,
|
|
39925
39953
|
titleText = _ref.titleText,
|
|
39926
39954
|
_ref$titleVariant = _ref.titleVariant,
|
|
39927
39955
|
titleVariant = _ref$titleVariant === void 0 ? "small" : _ref$titleVariant,
|
|
@@ -39978,9 +40006,13 @@ var Card = function Card(_ref) {
|
|
|
39978
40006
|
width: "100%",
|
|
39979
40007
|
extraStyles: "flex-basis: 100%;"
|
|
39980
40008
|
}, text && /*#__PURE__*/React__default.createElement(CardText$1, {
|
|
40009
|
+
onQuitClick: onQuitClick,
|
|
39981
40010
|
padding: padding,
|
|
40011
|
+
showQuitLink: showQuitLink,
|
|
40012
|
+
titleAs: titleAs,
|
|
39982
40013
|
titleText: titleText,
|
|
39983
40014
|
text: text,
|
|
40015
|
+
textAs: textAs,
|
|
39984
40016
|
titleVariant: titleVariant
|
|
39985
40017
|
}), children)))));
|
|
39986
40018
|
};
|