@thecb/components 11.8.0-beta.3 → 11.8.0-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 +50 -36
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +50 -36
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.theme.js +5 -5
- package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +9 -4
- package/src/components/molecules/tooltip/Tooltip.js +27 -21
- package/src/components/molecules/tooltip/Tooltip.stories.js +4 -5
- package/src/deprecated/icons/AlertInfoIcon.js +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -19252,7 +19252,7 @@ var AlertInfoIcon = function AlertInfoIcon() {
|
|
|
19252
19252
|
xlinkHref: "#path-1"
|
|
19253
19253
|
})), /*#__PURE__*/React__default.createElement("use", {
|
|
19254
19254
|
id: "background-2",
|
|
19255
|
-
fill: "#
|
|
19255
|
+
fill: "#15749d",
|
|
19256
19256
|
fillRule: "nonzero",
|
|
19257
19257
|
xlinkHref: "#path-1"
|
|
19258
19258
|
})))));
|
|
@@ -19403,13 +19403,13 @@ var AlertIcons = {
|
|
|
19403
19403
|
};
|
|
19404
19404
|
|
|
19405
19405
|
var background = {
|
|
19406
|
-
info: "".concat(
|
|
19406
|
+
info: "".concat(INFO_BLUE),
|
|
19407
19407
|
warn: "".concat(APRICOT_ORANGE),
|
|
19408
19408
|
error: "".concat(BLUSH_RED),
|
|
19409
19409
|
success: "".concat(HINT_GREEN)
|
|
19410
19410
|
};
|
|
19411
19411
|
var border$1 = {
|
|
19412
|
-
info: "".concat(
|
|
19412
|
+
info: "".concat(MATISSE_BLUE),
|
|
19413
19413
|
warn: "".concat(ZEST_ORANGE),
|
|
19414
19414
|
error: "".concat(RAZZMATAZZ_RED),
|
|
19415
19415
|
success: "".concat(EMERALD_GREEN)
|
|
@@ -47175,13 +47175,18 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47175
47175
|
backButtonTestId = _ref$backButtonTestId === void 0 ? null : _ref$backButtonTestId;
|
|
47176
47176
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
47177
47177
|
isMobile = _useContext.isMobile;
|
|
47178
|
-
|
|
47178
|
+
|
|
47179
|
+
// cancel URLs are external (back to client system)
|
|
47180
|
+
var handleCancel = function handleCancel() {
|
|
47181
|
+
window.location.href = cancelURL;
|
|
47182
|
+
};
|
|
47183
|
+
var backButton = !!cancelURL && !!cancelText ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
47179
47184
|
text: cancelText,
|
|
47180
|
-
|
|
47185
|
+
action: handleCancel,
|
|
47181
47186
|
variant: backButtonVariant,
|
|
47182
47187
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47183
47188
|
dataQa: backButtonTestId || cancelText,
|
|
47184
|
-
"aria-
|
|
47189
|
+
"aria-label": "".concat(cancelText, ", navigate back to previous site"),
|
|
47185
47190
|
role: "link"
|
|
47186
47191
|
}) : backButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
47187
47192
|
text: "Back",
|
|
@@ -47189,7 +47194,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47189
47194
|
action: backButtonAction,
|
|
47190
47195
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47191
47196
|
dataQa: "Back",
|
|
47192
|
-
"aria-
|
|
47197
|
+
"aria-label": "Back, navigate to previous page",
|
|
47193
47198
|
role: "link"
|
|
47194
47199
|
});
|
|
47195
47200
|
var forwardButton = !!redirectURL ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
@@ -51201,12 +51206,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51201
51206
|
_ref$hasIconTrigger = _ref.hasIconTrigger,
|
|
51202
51207
|
hasIconTrigger = _ref$hasIconTrigger === void 0 ? false : _ref$hasIconTrigger,
|
|
51203
51208
|
_ref$IconTrigger = _ref.IconTrigger,
|
|
51204
|
-
IconTrigger = _ref$IconTrigger === void 0 ?
|
|
51209
|
+
IconTrigger = _ref$IconTrigger === void 0 ? WarningIconXS : _ref$IconTrigger,
|
|
51205
51210
|
_ref$iconHelpText = _ref.iconHelpText,
|
|
51206
51211
|
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
51207
51212
|
_ref$tooltipID = _ref.tooltipID,
|
|
51208
|
-
tooltipID = _ref$tooltipID === void 0 ?
|
|
51209
|
-
extraStyles = _ref.extraStyles,
|
|
51213
|
+
tooltipID = _ref$tooltipID === void 0 ? "tooltip-content" : _ref$tooltipID,
|
|
51214
|
+
_ref$extraStyles = _ref.extraStyles,
|
|
51215
|
+
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
51210
51216
|
_ref$textExtraStyles = _ref.textExtraStyles,
|
|
51211
51217
|
textExtraStyles = _ref$textExtraStyles === void 0 ? "" : _ref$textExtraStyles,
|
|
51212
51218
|
_ref$minWidth = _ref.minWidth,
|
|
@@ -51215,39 +51221,43 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51215
51221
|
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
51216
51222
|
_ref$height = _ref.height,
|
|
51217
51223
|
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
51218
|
-
position = _ref.position,
|
|
51219
|
-
arrowPosition = _ref.arrowPosition,
|
|
51220
51224
|
_ref$arrowDirection = _ref.arrowDirection,
|
|
51221
51225
|
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
51222
|
-
_ref$
|
|
51223
|
-
|
|
51226
|
+
_ref$arrowPosition = _ref.arrowPosition,
|
|
51227
|
+
arrowPosition = _ref$arrowPosition === void 0 ? {
|
|
51228
|
+
arrowTop: "auto",
|
|
51229
|
+
arrowRight: "10px",
|
|
51230
|
+
arrowBottom: "-8px",
|
|
51231
|
+
arrowLeft: "auto"
|
|
51232
|
+
} : _ref$arrowPosition,
|
|
51233
|
+
_ref$position = _ref.position,
|
|
51234
|
+
position = _ref$position === void 0 ? {
|
|
51235
|
+
top: "-110px",
|
|
51236
|
+
right: "auto",
|
|
51237
|
+
bottom: "auto",
|
|
51238
|
+
left: "-225px"
|
|
51239
|
+
} : _ref$position,
|
|
51240
|
+
_ref$iconColor = _ref.iconColor,
|
|
51241
|
+
iconColor = _ref$iconColor === void 0 ? SELECTIVE_YELLOW : _ref$iconColor,
|
|
51224
51242
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
51225
51243
|
_ref$backgroundColor = _ref.backgroundColor,
|
|
51226
51244
|
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
51227
51245
|
_ref$borderColor = _ref.borderColor,
|
|
51228
51246
|
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
51229
|
-
|
|
51247
|
+
tooltipContentExtraStyles = _ref.tooltipContentExtraStyles;
|
|
51230
51248
|
var hoverColor = themeValues.hoverColor,
|
|
51231
51249
|
activeColor = themeValues.activeColor,
|
|
51232
51250
|
tooltipTriggerColor = themeValues.tooltipTriggerColor;
|
|
51233
51251
|
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
51234
|
-
|
|
51235
|
-
|
|
51236
|
-
|
|
51237
|
-
|
|
51238
|
-
_ref2$bottom = _ref2.bottom,
|
|
51239
|
-
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
51240
|
-
_ref2$left = _ref2.left,
|
|
51241
|
-
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
51252
|
+
top = _ref2.top,
|
|
51253
|
+
right = _ref2.right,
|
|
51254
|
+
bottom = _ref2.bottom,
|
|
51255
|
+
left = _ref2.left;
|
|
51242
51256
|
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
51243
|
-
|
|
51244
|
-
|
|
51245
|
-
|
|
51246
|
-
|
|
51247
|
-
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
51248
|
-
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
51249
|
-
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
51250
|
-
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
51257
|
+
arrowTop = _ref3.arrowTop,
|
|
51258
|
+
arrowRight = _ref3.arrowRight,
|
|
51259
|
+
arrowBottom = _ref3.arrowBottom,
|
|
51260
|
+
arrowLeft = _ref3.arrowLeft;
|
|
51251
51261
|
var _useState = React.useState(false),
|
|
51252
51262
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51253
51263
|
tooltipOpen = _useState2[0],
|
|
@@ -51293,11 +51303,14 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51293
51303
|
tabIndex: "0",
|
|
51294
51304
|
"aria-describedby": tooltipID,
|
|
51295
51305
|
extraStyles: buttonExtraStyles
|
|
51296
|
-
}, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(
|
|
51297
|
-
|
|
51298
|
-
}
|
|
51306
|
+
}, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
51307
|
+
"aria-label": "Trigger Popover"
|
|
51308
|
+
}, /*#__PURE__*/React__default.createElement(IconTrigger, {
|
|
51309
|
+
color: iconColor
|
|
51310
|
+
})), /*#__PURE__*/React__default.createElement(Box, {
|
|
51299
51311
|
padding: "0",
|
|
51300
|
-
srOnly: true
|
|
51312
|
+
srOnly: true,
|
|
51313
|
+
"aria-hidden": "true"
|
|
51301
51314
|
}, /*#__PURE__*/React__default.createElement(Text$1, null, iconHelpText))), !hasIconTrigger && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
51302
51315
|
extraStyles: textExtraStyles
|
|
51303
51316
|
}, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -51308,7 +51321,8 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51308
51321
|
role: "tooltip",
|
|
51309
51322
|
minWidth: minWidth,
|
|
51310
51323
|
maxWidth: maxWidth,
|
|
51311
|
-
|
|
51324
|
+
"aria-hidden": !tooltipOpen,
|
|
51325
|
+
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(tooltipContentExtraStyles, ";\n ")
|
|
51312
51326
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
|
|
51313
51327
|
padding: "0",
|
|
51314
51328
|
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder$1(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 ")
|