@thecb/components 11.8.0-beta.5 → 11.8.0-beta.6
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
|
@@ -51185,29 +51185,32 @@ var fallbackValues$12 = {
|
|
|
51185
51185
|
};
|
|
51186
51186
|
|
|
51187
51187
|
var Tooltip = function Tooltip(_ref) {
|
|
51188
|
-
var
|
|
51189
|
-
_ref$
|
|
51190
|
-
|
|
51191
|
-
_ref$
|
|
51192
|
-
|
|
51188
|
+
var _ref$tooltipContainer = _ref.tooltipContainerExtraStyles,
|
|
51189
|
+
tooltipContainerExtraStyles = _ref$tooltipContainer === void 0 ? "" : _ref$tooltipContainer,
|
|
51190
|
+
themeValues = _ref.themeValues,
|
|
51191
|
+
_ref$tooltipID = _ref.tooltipID,
|
|
51192
|
+
tooltipID = _ref$tooltipID === void 0 ? "tooltip-content" : _ref$tooltipID,
|
|
51193
51193
|
_ref$hasIconTrigger = _ref.hasIconTrigger,
|
|
51194
51194
|
hasIconTrigger = _ref$hasIconTrigger === void 0 ? false : _ref$hasIconTrigger,
|
|
51195
51195
|
_ref$IconTrigger = _ref.IconTrigger,
|
|
51196
51196
|
IconTrigger = _ref$IconTrigger === void 0 ? WarningIconXS : _ref$IconTrigger,
|
|
51197
51197
|
_ref$iconHelpText = _ref.iconHelpText,
|
|
51198
|
-
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
51199
|
-
_ref$
|
|
51200
|
-
|
|
51201
|
-
_ref$
|
|
51202
|
-
|
|
51203
|
-
_ref$
|
|
51204
|
-
|
|
51205
|
-
_ref$
|
|
51206
|
-
|
|
51207
|
-
_ref$
|
|
51208
|
-
|
|
51209
|
-
|
|
51210
|
-
|
|
51198
|
+
iconHelpText = _ref$iconHelpText === void 0 ? "Open the tooltip" : _ref$iconHelpText,
|
|
51199
|
+
_ref$tooltipContent = _ref.tooltipContent,
|
|
51200
|
+
tooltipContent = _ref$tooltipContent === void 0 ? "" : _ref$tooltipContent,
|
|
51201
|
+
_ref$tooltipTriggerTe = _ref.tooltipTriggerText,
|
|
51202
|
+
tooltipTriggerText = _ref$tooltipTriggerTe === void 0 ? "" : _ref$tooltipTriggerTe,
|
|
51203
|
+
_ref$triggerTextExtra = _ref.triggerTextExtraStyles,
|
|
51204
|
+
triggerTextExtraStyles = _ref$triggerTextExtra === void 0 ? "" : _ref$triggerTextExtra,
|
|
51205
|
+
_ref$contentExtraStyl = _ref.contentExtraStyles,
|
|
51206
|
+
contentExtraStyles = _ref$contentExtraStyl === void 0 ? "" : _ref$contentExtraStyl,
|
|
51207
|
+
_ref$contentPosition = _ref.contentPosition,
|
|
51208
|
+
contentPosition = _ref$contentPosition === void 0 ? {
|
|
51209
|
+
top: "-110px",
|
|
51210
|
+
right: "auto",
|
|
51211
|
+
bottom: "auto",
|
|
51212
|
+
left: "-225px"
|
|
51213
|
+
} : _ref$contentPosition,
|
|
51211
51214
|
_ref$arrowDirection = _ref.arrowDirection,
|
|
51212
51215
|
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
51213
51216
|
_ref$arrowPosition = _ref.arrowPosition,
|
|
@@ -51217,25 +51220,21 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51217
51220
|
arrowBottom: "-8px",
|
|
51218
51221
|
arrowLeft: "auto"
|
|
51219
51222
|
} : _ref$arrowPosition,
|
|
51220
|
-
_ref$
|
|
51221
|
-
|
|
51222
|
-
|
|
51223
|
-
|
|
51224
|
-
|
|
51225
|
-
|
|
51226
|
-
} : _ref$position,
|
|
51227
|
-
_ref$iconColor = _ref.iconColor,
|
|
51228
|
-
iconColor = _ref$iconColor === void 0 ? SELECTIVE_YELLOW : _ref$iconColor,
|
|
51223
|
+
_ref$minWidth = _ref.minWidth,
|
|
51224
|
+
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
51225
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
51226
|
+
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
51227
|
+
_ref$height = _ref.height,
|
|
51228
|
+
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
51229
51229
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
51230
51230
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
51231
51231
|
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
51232
51232
|
_ref$borderColor = _ref.borderColor,
|
|
51233
|
-
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor
|
|
51234
|
-
tooltipContentExtraStyles = _ref.tooltipContentExtraStyles;
|
|
51233
|
+
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor;
|
|
51235
51234
|
var hoverColor = themeValues.hoverColor,
|
|
51236
51235
|
activeColor = themeValues.activeColor,
|
|
51237
51236
|
tooltipTriggerColor = themeValues.tooltipTriggerColor;
|
|
51238
|
-
var _ref2 =
|
|
51237
|
+
var _ref2 = contentPosition !== null && contentPosition !== void 0 ? contentPosition : {},
|
|
51239
51238
|
top = _ref2.top,
|
|
51240
51239
|
right = _ref2.right,
|
|
51241
51240
|
bottom = _ref2.bottom,
|
|
@@ -51255,13 +51254,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51255
51254
|
}
|
|
51256
51255
|
};
|
|
51257
51256
|
var handleKeyboardEvent = function handleKeyboardEvent(e) {
|
|
51258
|
-
if (e.key ===
|
|
51257
|
+
if (e.key === "Escape") {
|
|
51259
51258
|
handleToggleTooltip(false);
|
|
51260
51259
|
}
|
|
51261
51260
|
};
|
|
51262
51261
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
51263
51262
|
padding: "0",
|
|
51264
|
-
extraStyles: "position: relative; ".concat(
|
|
51263
|
+
extraStyles: "position: relative; ".concat(tooltipContainerExtraStyles)
|
|
51265
51264
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
51266
51265
|
action: function action() {
|
|
51267
51266
|
return noop$1;
|
|
@@ -51293,13 +51292,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51293
51292
|
}, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
51294
51293
|
"aria-label": "Open tooltip"
|
|
51295
51294
|
}, /*#__PURE__*/React__default.createElement(IconTrigger, {
|
|
51296
|
-
color:
|
|
51295
|
+
color: tooltipTriggerColor
|
|
51297
51296
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
51298
51297
|
padding: "0",
|
|
51299
51298
|
srOnly: true
|
|
51300
51299
|
}, /*#__PURE__*/React__default.createElement(Text$1, null, iconHelpText))), !hasIconTrigger && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
51301
|
-
extraStyles: "color: ".concat(tooltipTriggerColor, "; &:hover {\n ").concat(hoverColor, "; &:active ").concat(activeColor, "; ").concat(
|
|
51302
|
-
},
|
|
51300
|
+
extraStyles: "color: ".concat(tooltipTriggerColor, "; &:hover {\n ").concat(hoverColor, "; &:active ").concat(activeColor, "; ").concat(triggerTextExtraStyles)
|
|
51301
|
+
}, tooltipTriggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
51303
51302
|
background: backgroundColor,
|
|
51304
51303
|
borderRadius: "4px",
|
|
51305
51304
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
@@ -51308,8 +51307,8 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51308
51307
|
minWidth: minWidth,
|
|
51309
51308
|
maxWidth: maxWidth,
|
|
51310
51309
|
"aria-hidden": !tooltipOpen,
|
|
51311
|
-
extraStyles: "\n display: ".concat(tooltipOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n ").concat(
|
|
51312
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null,
|
|
51310
|
+
extraStyles: "\n display: ".concat(tooltipOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n ").concat(contentExtraStyles, ";\n ")
|
|
51311
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, tooltipContent), /*#__PURE__*/React__default.createElement(Box, {
|
|
51313
51312
|
padding: "0",
|
|
51314
51313
|
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(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 ")
|
|
51315
51314
|
})));
|