@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.esm.js
CHANGED
|
@@ -51177,29 +51177,32 @@ var fallbackValues$12 = {
|
|
|
51177
51177
|
};
|
|
51178
51178
|
|
|
51179
51179
|
var Tooltip = function Tooltip(_ref) {
|
|
51180
|
-
var
|
|
51181
|
-
_ref$
|
|
51182
|
-
|
|
51183
|
-
_ref$
|
|
51184
|
-
|
|
51180
|
+
var _ref$tooltipContainer = _ref.tooltipContainerExtraStyles,
|
|
51181
|
+
tooltipContainerExtraStyles = _ref$tooltipContainer === void 0 ? "" : _ref$tooltipContainer,
|
|
51182
|
+
themeValues = _ref.themeValues,
|
|
51183
|
+
_ref$tooltipID = _ref.tooltipID,
|
|
51184
|
+
tooltipID = _ref$tooltipID === void 0 ? "tooltip-content" : _ref$tooltipID,
|
|
51185
51185
|
_ref$hasIconTrigger = _ref.hasIconTrigger,
|
|
51186
51186
|
hasIconTrigger = _ref$hasIconTrigger === void 0 ? false : _ref$hasIconTrigger,
|
|
51187
51187
|
_ref$IconTrigger = _ref.IconTrigger,
|
|
51188
51188
|
IconTrigger = _ref$IconTrigger === void 0 ? WarningIconXS : _ref$IconTrigger,
|
|
51189
51189
|
_ref$iconHelpText = _ref.iconHelpText,
|
|
51190
|
-
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
51191
|
-
_ref$
|
|
51192
|
-
|
|
51193
|
-
_ref$
|
|
51194
|
-
|
|
51195
|
-
_ref$
|
|
51196
|
-
|
|
51197
|
-
_ref$
|
|
51198
|
-
|
|
51199
|
-
_ref$
|
|
51200
|
-
|
|
51201
|
-
|
|
51202
|
-
|
|
51190
|
+
iconHelpText = _ref$iconHelpText === void 0 ? "Open the tooltip" : _ref$iconHelpText,
|
|
51191
|
+
_ref$tooltipContent = _ref.tooltipContent,
|
|
51192
|
+
tooltipContent = _ref$tooltipContent === void 0 ? "" : _ref$tooltipContent,
|
|
51193
|
+
_ref$tooltipTriggerTe = _ref.tooltipTriggerText,
|
|
51194
|
+
tooltipTriggerText = _ref$tooltipTriggerTe === void 0 ? "" : _ref$tooltipTriggerTe,
|
|
51195
|
+
_ref$triggerTextExtra = _ref.triggerTextExtraStyles,
|
|
51196
|
+
triggerTextExtraStyles = _ref$triggerTextExtra === void 0 ? "" : _ref$triggerTextExtra,
|
|
51197
|
+
_ref$contentExtraStyl = _ref.contentExtraStyles,
|
|
51198
|
+
contentExtraStyles = _ref$contentExtraStyl === void 0 ? "" : _ref$contentExtraStyl,
|
|
51199
|
+
_ref$contentPosition = _ref.contentPosition,
|
|
51200
|
+
contentPosition = _ref$contentPosition === void 0 ? {
|
|
51201
|
+
top: "-110px",
|
|
51202
|
+
right: "auto",
|
|
51203
|
+
bottom: "auto",
|
|
51204
|
+
left: "-225px"
|
|
51205
|
+
} : _ref$contentPosition,
|
|
51203
51206
|
_ref$arrowDirection = _ref.arrowDirection,
|
|
51204
51207
|
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
51205
51208
|
_ref$arrowPosition = _ref.arrowPosition,
|
|
@@ -51209,25 +51212,21 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51209
51212
|
arrowBottom: "-8px",
|
|
51210
51213
|
arrowLeft: "auto"
|
|
51211
51214
|
} : _ref$arrowPosition,
|
|
51212
|
-
_ref$
|
|
51213
|
-
|
|
51214
|
-
|
|
51215
|
-
|
|
51216
|
-
|
|
51217
|
-
|
|
51218
|
-
} : _ref$position,
|
|
51219
|
-
_ref$iconColor = _ref.iconColor,
|
|
51220
|
-
iconColor = _ref$iconColor === void 0 ? SELECTIVE_YELLOW : _ref$iconColor,
|
|
51215
|
+
_ref$minWidth = _ref.minWidth,
|
|
51216
|
+
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
51217
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
51218
|
+
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
51219
|
+
_ref$height = _ref.height,
|
|
51220
|
+
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
51221
51221
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
51222
51222
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
51223
51223
|
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
51224
51224
|
_ref$borderColor = _ref.borderColor,
|
|
51225
|
-
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor
|
|
51226
|
-
tooltipContentExtraStyles = _ref.tooltipContentExtraStyles;
|
|
51225
|
+
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor;
|
|
51227
51226
|
var hoverColor = themeValues.hoverColor,
|
|
51228
51227
|
activeColor = themeValues.activeColor,
|
|
51229
51228
|
tooltipTriggerColor = themeValues.tooltipTriggerColor;
|
|
51230
|
-
var _ref2 =
|
|
51229
|
+
var _ref2 = contentPosition !== null && contentPosition !== void 0 ? contentPosition : {},
|
|
51231
51230
|
top = _ref2.top,
|
|
51232
51231
|
right = _ref2.right,
|
|
51233
51232
|
bottom = _ref2.bottom,
|
|
@@ -51247,13 +51246,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51247
51246
|
}
|
|
51248
51247
|
};
|
|
51249
51248
|
var handleKeyboardEvent = function handleKeyboardEvent(e) {
|
|
51250
|
-
if (e.key ===
|
|
51249
|
+
if (e.key === "Escape") {
|
|
51251
51250
|
handleToggleTooltip(false);
|
|
51252
51251
|
}
|
|
51253
51252
|
};
|
|
51254
51253
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
51255
51254
|
padding: "0",
|
|
51256
|
-
extraStyles: "position: relative; ".concat(
|
|
51255
|
+
extraStyles: "position: relative; ".concat(tooltipContainerExtraStyles)
|
|
51257
51256
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
51258
51257
|
action: function action() {
|
|
51259
51258
|
return noop$1;
|
|
@@ -51285,13 +51284,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51285
51284
|
}, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
51286
51285
|
"aria-label": "Open tooltip"
|
|
51287
51286
|
}, /*#__PURE__*/React__default.createElement(IconTrigger, {
|
|
51288
|
-
color:
|
|
51287
|
+
color: tooltipTriggerColor
|
|
51289
51288
|
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
51290
51289
|
padding: "0",
|
|
51291
51290
|
srOnly: true
|
|
51292
51291
|
}, /*#__PURE__*/React__default.createElement(Text$1, null, iconHelpText))), !hasIconTrigger && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
51293
|
-
extraStyles: "color: ".concat(tooltipTriggerColor, "; &:hover {\n ").concat(hoverColor, "; &:active ").concat(activeColor, "; ").concat(
|
|
51294
|
-
},
|
|
51292
|
+
extraStyles: "color: ".concat(tooltipTriggerColor, "; &:hover {\n ").concat(hoverColor, "; &:active ").concat(activeColor, "; ").concat(triggerTextExtraStyles)
|
|
51293
|
+
}, tooltipTriggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
51295
51294
|
background: backgroundColor,
|
|
51296
51295
|
borderRadius: "4px",
|
|
51297
51296
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
@@ -51300,8 +51299,8 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51300
51299
|
minWidth: minWidth,
|
|
51301
51300
|
maxWidth: maxWidth,
|
|
51302
51301
|
"aria-hidden": !tooltipOpen,
|
|
51303
|
-
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(
|
|
51304
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null,
|
|
51302
|
+
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 ")
|
|
51303
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, tooltipContent), /*#__PURE__*/React__default.createElement(Box, {
|
|
51305
51304
|
padding: "0",
|
|
51306
51305
|
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 ")
|
|
51307
51306
|
})));
|