@thecb/components 10.2.4-beta.2 → 10.2.4-beta.4

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 CHANGED
@@ -6504,7 +6504,7 @@ var BoxWrapper = styled__default(function (_ref) {
6504
6504
  });
6505
6505
  /* eslint-enable no-unused-vars */
6506
6506
 
6507
- var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
6507
+ var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "disabled", "children"];
6508
6508
 
6509
6509
  /*
6510
6510
  Box component to create generic boxes
@@ -6552,6 +6552,7 @@ var Box = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6552
6552
  _ref$srOnly = _ref.srOnly,
6553
6553
  srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
6554
6554
  dataQa = _ref.dataQa,
6555
+ _ref$disabled = _ref.disabled,
6555
6556
  children = _ref.children,
6556
6557
  rest = _objectWithoutProperties(_ref, _excluded$3);
6557
6558
  return /*#__PURE__*/React__default.createElement(BoxWrapper, _extends({
@@ -27585,18 +27586,18 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
27585
27586
  return isLink ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
27586
27587
  to: destination,
27587
27588
  "data-qa": dataQa,
27588
- disabled: disabled
27589
+ "aria-disabled": disabled
27589
27590
  }, /*#__PURE__*/React__default.createElement(Box, {
27590
27591
  padding: "0",
27591
27592
  minHeight: "100%",
27592
- extraStyles: "cursor: pointer;"
27593
+ extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27593
27594
  }, children)) : /*#__PURE__*/React__default.createElement(Box, {
27594
27595
  onClick: disabled ? noop : action,
27595
27596
  padding: "0",
27596
27597
  minHeight: "100%",
27597
27598
  dataQa: dataQa,
27598
27599
  "aria-disabled": disabled,
27599
- extraStyles: disabled ? "cursor: default; opacity: 0.7;" : "cursor: pointer; opacity: 1;"
27600
+ extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
27600
27601
  }, children);
27601
27602
  };
27602
27603
  var Placeholder = function Placeholder(_ref2) {
@@ -27613,6 +27614,7 @@ var Placeholder = function Placeholder(_ref2) {
27613
27614
  dataQa = _ref2.dataQa,
27614
27615
  _ref2$disabled = _ref2.disabled,
27615
27616
  disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
27617
+ var tintedColor = "".concat(curriedTint$1(0.9, themeValues.color));
27616
27618
  return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
27617
27619
  isLink: isLink,
27618
27620
  action: action,
@@ -27626,7 +27628,7 @@ var Placeholder = function Placeholder(_ref2) {
27626
27628
  minHeight: themeValues.height,
27627
27629
  hiddenStyles: !visible,
27628
27630
  extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
27629
- hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : curriedTint$1(0.9, themeValues.color), ";")
27631
+ hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : tintedColor, ";")
27630
27632
  }, /*#__PURE__*/React__default.createElement(Center, {
27631
27633
  maxWidth: "300px"
27632
27634
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -42524,7 +42526,9 @@ var LinkCard = function LinkCard(_ref) {
42524
42526
  extraActiveStyles = _ref$extraActiveStyle === void 0 ? "" : _ref$extraActiveStyle,
42525
42527
  themeValues = _ref.themeValues,
42526
42528
  _ref$titleVariant = _ref.titleVariant,
42527
- titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant;
42529
+ titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant,
42530
+ _ref$disabled = _ref.disabled,
42531
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled;
42528
42532
  var _useContext = React.useContext(styled.ThemeContext),
42529
42533
  isMobile = _useContext.isMobile;
42530
42534
  var regex = /\W/g;
@@ -42538,10 +42542,11 @@ var LinkCard = function LinkCard(_ref) {
42538
42542
  minHeight: "141px",
42539
42543
  padding: "24px",
42540
42544
  theme: themeValues,
42541
- extraStyles: extraStyles,
42542
- hoverStyles: extraHoverStyles,
42543
- activeStyles: extraActiveStyles,
42544
- onClick: onClick
42545
+ extraStyles: disabled ? extraStyles + "background-color: ".concat(ATHENS_GREY, " !important; cursor: default;") : extraStyles,
42546
+ hoverStyles: disabled ? "" : extraHoverStyles,
42547
+ activeStyles: disabled ? "" : extraActiveStyles,
42548
+ onClick: disabled ? noop : onClick,
42549
+ "aria-disabled": disabled
42545
42550
  }, /*#__PURE__*/React__default.createElement(Stack, {
42546
42551
  childGap: 0,
42547
42552
  bottomItem: 3,
@@ -42552,14 +42557,16 @@ var LinkCard = function LinkCard(_ref) {
42552
42557
  fullHeight: true
42553
42558
  }, /*#__PURE__*/React__default.createElement(Box, {
42554
42559
  padding: 0,
42555
- width: "100%"
42560
+ width: "100%",
42561
+ extraStyles: disabled ? "opacity: 0.5;" : ""
42556
42562
  }, /*#__PURE__*/React__default.createElement(Title$2, {
42557
42563
  variant: titleVariant,
42558
42564
  theme: themeValues,
42559
42565
  margin: 0
42560
42566
  }, title)), /*#__PURE__*/React__default.createElement(Box, {
42561
42567
  padding: "0 0 40px",
42562
- width: "100%"
42568
+ width: "100%",
42569
+ extraStyles: disabled ? "opacity: 0.5;" : ""
42563
42570
  }, /*#__PURE__*/React__default.createElement(Subtitle, {
42564
42571
  variant: "pS",
42565
42572
  theme: themeValues
@@ -42567,7 +42574,8 @@ var LinkCard = function LinkCard(_ref) {
42567
42574
  background: "transparent",
42568
42575
  borderWidthOverride: "0 0 0 0",
42569
42576
  padding: "0",
42570
- width: "100%"
42577
+ width: "100%",
42578
+ extraStyles: disabled ? "opacity: 0.5;" : ""
42571
42579
  }, /*#__PURE__*/React__default.createElement(Footer, {
42572
42580
  direction: "row",
42573
42581
  childGap: "6px",