@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.cjs.js
CHANGED
|
@@ -51466,6 +51466,8 @@ var fallbackValues$12 = {
|
|
|
51466
51466
|
var Tooltip = function Tooltip(_ref) {
|
|
51467
51467
|
var tooltipID = _ref.tooltipID,
|
|
51468
51468
|
children = _ref.children,
|
|
51469
|
+
_ref$hasCustomTrigger = _ref.hasCustomTrigger,
|
|
51470
|
+
hasCustomTrigger = _ref$hasCustomTrigger === void 0 ? false : _ref$hasCustomTrigger,
|
|
51469
51471
|
_ref$triggerText = _ref.triggerText,
|
|
51470
51472
|
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
51471
51473
|
_ref$containerExtraSt = _ref.containerExtraStyles,
|
|
@@ -51474,7 +51476,6 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51474
51476
|
triggerButtonVariant = _ref$triggerButtonVar === void 0 ? "smallGhost" : _ref$triggerButtonVar,
|
|
51475
51477
|
_ref$content = _ref.content,
|
|
51476
51478
|
content = _ref$content === void 0 ? "" : _ref$content,
|
|
51477
|
-
_ref$contentBackgroun = _ref.contentBackgroundColor,
|
|
51478
51479
|
_ref$contentExtraStyl = _ref.contentExtraStyles,
|
|
51479
51480
|
contentExtraStyles = _ref$contentExtraStyl === void 0 ? "" : _ref$contentExtraStyl,
|
|
51480
51481
|
_ref$minWidth = _ref.minWidth,
|
|
@@ -51498,7 +51499,8 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51498
51499
|
arrowRight: "10px",
|
|
51499
51500
|
arrowBottom: "-8px",
|
|
51500
51501
|
arrowLeft: "auto"
|
|
51501
|
-
} : _ref$arrowPosition
|
|
51502
|
+
} : _ref$arrowPosition,
|
|
51503
|
+
arrowColor = _ref.arrowColor;
|
|
51502
51504
|
var closeTimeoutRef = React.useRef(null);
|
|
51503
51505
|
var _useState = React.useState(false),
|
|
51504
51506
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -51544,7 +51546,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51544
51546
|
};
|
|
51545
51547
|
}, []);
|
|
51546
51548
|
var renderTrigger = function renderTrigger() {
|
|
51547
|
-
if (children) {
|
|
51549
|
+
if (hasCustomTrigger && children) {
|
|
51548
51550
|
return /*#__PURE__*/React__default.cloneElement(React__default.Children.only(children), {
|
|
51549
51551
|
"aria-describedby": tooltipID,
|
|
51550
51552
|
onFocus: function onFocus() {
|
|
@@ -51572,7 +51574,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51572
51574
|
},
|
|
51573
51575
|
"data-qa": "tooltip-trigger-".concat(tooltipID),
|
|
51574
51576
|
text: triggerText,
|
|
51575
|
-
extraStyles: "\n color: ".concat(themeValues.linkColor, ";\n &:hover { color: ").concat(themeValues.hoverColor, "; text-decoration: none;}\n &:active, &:focus { color: ").concat(themeValues.activeColor, ";
|
|
51577
|
+
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 ")
|
|
51576
51578
|
});
|
|
51577
51579
|
};
|
|
51578
51580
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -51597,7 +51599,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51597
51599
|
color: themeValues.linkColor
|
|
51598
51600
|
}, content) : content, /*#__PURE__*/React__default.createElement(Box, {
|
|
51599
51601
|
padding: "0",
|
|
51600
|
-
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 ")
|
|
51602
|
+
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 ")
|
|
51601
51603
|
})));
|
|
51602
51604
|
};
|
|
51603
51605
|
|