@thecb/components 11.10.1-beta.0 → 11.10.1-beta.2

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.esm.js CHANGED
@@ -51458,6 +51458,8 @@ var fallbackValues$12 = {
51458
51458
  var Tooltip = function Tooltip(_ref) {
51459
51459
  var tooltipID = _ref.tooltipID,
51460
51460
  children = _ref.children,
51461
+ _ref$hasCustomTrigger = _ref.hasCustomTrigger,
51462
+ hasCustomTrigger = _ref$hasCustomTrigger === void 0 ? false : _ref$hasCustomTrigger,
51461
51463
  _ref$triggerText = _ref.triggerText,
51462
51464
  triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
51463
51465
  _ref$containerExtraSt = _ref.containerExtraStyles,
@@ -51466,7 +51468,6 @@ var Tooltip = function Tooltip(_ref) {
51466
51468
  triggerButtonVariant = _ref$triggerButtonVar === void 0 ? "smallGhost" : _ref$triggerButtonVar,
51467
51469
  _ref$content = _ref.content,
51468
51470
  content = _ref$content === void 0 ? "" : _ref$content,
51469
- _ref$contentBackgroun = _ref.contentBackgroundColor,
51470
51471
  _ref$contentExtraStyl = _ref.contentExtraStyles,
51471
51472
  contentExtraStyles = _ref$contentExtraStyl === void 0 ? "" : _ref$contentExtraStyl,
51472
51473
  _ref$minWidth = _ref.minWidth,
@@ -51490,7 +51491,8 @@ var Tooltip = function Tooltip(_ref) {
51490
51491
  arrowRight: "10px",
51491
51492
  arrowBottom: "-8px",
51492
51493
  arrowLeft: "auto"
51493
- } : _ref$arrowPosition;
51494
+ } : _ref$arrowPosition,
51495
+ arrowColor = _ref.arrowColor;
51494
51496
  var closeTimeoutRef = useRef(null);
51495
51497
  var _useState = useState(false),
51496
51498
  _useState2 = _slicedToArray(_useState, 2),
@@ -51536,7 +51538,7 @@ var Tooltip = function Tooltip(_ref) {
51536
51538
  };
51537
51539
  }, []);
51538
51540
  var renderTrigger = function renderTrigger() {
51539
- if (children) {
51541
+ if (hasCustomTrigger && children) {
51540
51542
  return /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
51541
51543
  "aria-describedby": tooltipID,
51542
51544
  onFocus: function onFocus() {
@@ -51564,7 +51566,7 @@ var Tooltip = function Tooltip(_ref) {
51564
51566
  },
51565
51567
  "data-qa": "tooltip-trigger-".concat(tooltipID),
51566
51568
  text: triggerText,
51567
- extraStyles: "\n color: ".concat(themeValues.linkColor, ";\n &:hover { color: ").concat(themeValues.hoverColor, "; text-decoration: none;}\n &:active, &:focus { color: ").concat(themeValues.activeColor, "; text-decoration: none;}\n button, span, &:hover span { text-decoration: none; }\n ")
51569
+ extraStyles: "\n color: ".concat(themeValues.linkColor, ";\n &:hover { color: ").concat(themeValues.hoverColor, "; text-decoration: none;}\n &:active, &:focus { color: ").concat(themeValues.activeColor, ";text-decoration: none;}\n button, span, &:hover span { text-decoration: none; }\n ")
51568
51570
  });
51569
51571
  };
51570
51572
  return /*#__PURE__*/React__default.createElement(Box, {
@@ -51589,7 +51591,7 @@ var Tooltip = function Tooltip(_ref) {
51589
51591
  color: themeValues.linkColor
51590
51592
  }, content) : content, /*#__PURE__*/React__default.createElement(Box, {
51591
51593
  padding: "0",
51592
- extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(themeValues.borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
51594
+ extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(arrowColor || themeValues.borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
51593
51595
  })));
51594
51596
  };
51595
51597