@thecb/components 8.4.1 → 8.4.3-beta.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.d.ts CHANGED
@@ -952,6 +952,7 @@ declare const EditableTable: React.FC<Expand<EditableTableProps> &
952
952
  interface TableListItemProps {
953
953
  title: string | JSX.Element;
954
954
  value: string | JSX.Element;
955
+ onClick?: () => void;
955
956
  canEdit?: boolean;
956
957
  canRemove?: boolean;
957
958
  isMobile?: boolean;
package/dist/index.esm.js CHANGED
@@ -14855,7 +14855,7 @@ var ExternalLinkIcon = function ExternalLinkIcon(_ref) {
14855
14855
  }), /*#__PURE__*/React.createElement("mask", {
14856
14856
  id: "mask0_902_435-".concat(text),
14857
14857
  style: {
14858
- "mask-type": "alpha"
14858
+ maskType: "alpha"
14859
14859
  },
14860
14860
  maskUnits: "userSpaceOnUse",
14861
14861
  x: "1",
@@ -17778,15 +17778,15 @@ var ArrowRightCircleIconSmall = function ArrowRightCircleIconSmall(_ref) {
17778
17778
  var ArrowRightIcon = function ArrowRightIcon(_ref) {
17779
17779
  var _ref$color = _ref.color,
17780
17780
  color = _ref$color === void 0 ? ROYAL_BLUE_VIVID : _ref$color,
17781
- _ref$labeledBy = _ref.labeledBy,
17782
- labeledBy = _ref$labeledBy === void 0 ? "" : _ref$labeledBy;
17781
+ _ref$labelledBy = _ref.labelledBy,
17782
+ labelledBy = _ref$labelledBy === void 0 ? "" : _ref$labelledBy;
17783
17783
  return /*#__PURE__*/React.createElement("svg", {
17784
17784
  xmlns: "http://www.w3.org/2000/svg",
17785
17785
  width: "20",
17786
17786
  height: "20",
17787
17787
  viewBox: "0 0 20 20",
17788
17788
  fill: "none",
17789
- "aria-labeledBy": labeledBy
17789
+ "aria-labelledby": labelledBy
17790
17790
  }, /*#__PURE__*/React.createElement("path", {
17791
17791
  fillRule: "evenodd",
17792
17792
  clipRule: "evenodd",
@@ -18209,15 +18209,15 @@ var ChargebackReversalIconMedium = function ChargebackReversalIconMedium(_ref) {
18209
18209
  var PlusCircleIcon = function PlusCircleIcon(_ref) {
18210
18210
  var _ref$color = _ref.color,
18211
18211
  color = _ref$color === void 0 ? ROYAL_BLUE_VIVID : _ref$color,
18212
- _ref$labeledBy = _ref.labeledBy,
18213
- labeledBy = _ref$labeledBy === void 0 ? "" : _ref$labeledBy;
18212
+ _ref$labelledBy = _ref.labelledBy,
18213
+ labelledBy = _ref$labelledBy === void 0 ? "" : _ref$labelledBy;
18214
18214
  return /*#__PURE__*/React.createElement("svg", {
18215
18215
  xmlns: "http://www.w3.org/2000/svg",
18216
18216
  width: "20",
18217
18217
  height: "20",
18218
18218
  viewBox: "0 0 20 20",
18219
18219
  fill: "none",
18220
- "aria-labelledby": labeledBy
18220
+ "aria-labelledby": labelledBy
18221
18221
  }, /*#__PURE__*/React.createElement("path", {
18222
18222
  fillRule: "evenodd",
18223
18223
  clipRule: "evenodd",
@@ -41242,6 +41242,8 @@ var EditableTable = function EditableTable(_ref) {
41242
41242
  var TableListItem = function TableListItem(_ref) {
41243
41243
  var title = _ref.title,
41244
41244
  value = _ref.value,
41245
+ _ref$onClick = _ref.onClick,
41246
+ onClick = _ref$onClick === void 0 ? noop : _ref$onClick,
41245
41247
  _ref$canEdit = _ref.canEdit,
41246
41248
  canEdit = _ref$canEdit === void 0 ? false : _ref$canEdit,
41247
41249
  _ref$canRemove = _ref.canRemove,
@@ -41252,7 +41254,8 @@ var TableListItem = function TableListItem(_ref) {
41252
41254
  padding: "0px",
41253
41255
  extraStyles: "&:last-child {\n > * {\n border-bottom: none;\n }\n }\n ".concat(isMobile && borderTopItem && "&:first-child {\n > * {\n border-top: 1px solid ".concat(GHOST_GREY, ";\n }\n }"), "\n ")
41254
41256
  }, /*#__PURE__*/React.createElement(ItemWrapper, null, /*#__PURE__*/React.createElement(EditableTableListItem, {
41255
- isMobile: isMobile
41257
+ isMobile: isMobile,
41258
+ onClick: onClick
41256
41259
  }, /*#__PURE__*/React.createElement(TableItemKey, {
41257
41260
  isMobile: isMobile
41258
41261
  }, /*#__PURE__*/React.createElement(Text$1, {
@@ -42992,10 +42995,12 @@ var LinkCard = function LinkCard(_ref) {
42992
42995
  var _useContext = useContext(ThemeContext),
42993
42996
  isMobile = _useContext.isMobile;
42994
42997
 
42998
+ var regex = /\W/g;
42999
+ var locatorSlug = title.toLowerCase().replaceAll(regex, "-");
42995
43000
  return /*#__PURE__*/React.createElement(Container, {
42996
43001
  border: "1px solid ".concat(themeValues.background, ";"),
42997
43002
  borderRadius: "8px",
42998
- dataQa: "link-card-".concat(title),
43003
+ dataQa: "link-card-".concat(locatorSlug),
42999
43004
  width: "100%",
43000
43005
  maxWidth: isMobile ? "100%" : "288px",
43001
43006
  minWidth: isMobile ? "240px" : "288px",