@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.esm.js CHANGED
@@ -19244,7 +19244,7 @@ var AlertInfoIcon = function AlertInfoIcon() {
19244
19244
  xlinkHref: "#path-1"
19245
19245
  })), /*#__PURE__*/React__default.createElement("use", {
19246
19246
  id: "background-2",
19247
- fill: "#281978",
19247
+ fill: "#15749d",
19248
19248
  fillRule: "nonzero",
19249
19249
  xlinkHref: "#path-1"
19250
19250
  })))));
@@ -19395,13 +19395,13 @@ var AlertIcons = {
19395
19395
  };
19396
19396
 
19397
19397
  var background = {
19398
- info: "".concat(HAWKES_BLUE),
19398
+ info: "".concat(INFO_BLUE),
19399
19399
  warn: "".concat(APRICOT_ORANGE),
19400
19400
  error: "".concat(BLUSH_RED),
19401
19401
  success: "".concat(HINT_GREEN)
19402
19402
  };
19403
19403
  var border$1 = {
19404
- info: "".concat(LUCKY_POINT),
19404
+ info: "".concat(MATISSE_BLUE),
19405
19405
  warn: "".concat(ZEST_ORANGE),
19406
19406
  error: "".concat(RAZZMATAZZ_RED),
19407
19407
  success: "".concat(EMERALD_GREEN)
@@ -47167,13 +47167,18 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
47167
47167
  backButtonTestId = _ref$backButtonTestId === void 0 ? null : _ref$backButtonTestId;
47168
47168
  var _useContext = useContext(ThemeContext),
47169
47169
  isMobile = _useContext.isMobile;
47170
- var backButton = !!cancelURL && !!cancelText ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
47170
+
47171
+ // cancel URLs are external (back to client system)
47172
+ var handleCancel = function handleCancel() {
47173
+ window.location.href = cancelURL;
47174
+ };
47175
+ var backButton = !!cancelURL && !!cancelText ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47171
47176
  text: cancelText,
47172
- url: cancelURL,
47177
+ action: handleCancel,
47173
47178
  variant: backButtonVariant,
47174
47179
  extraStyles: isMobile && "flex-grow: 1",
47175
47180
  dataQa: backButtonTestId || cancelText,
47176
- "aria-labelledby": "".concat(kebabCaseString(cancelText), "-button"),
47181
+ "aria-label": "".concat(cancelText, ", navigate back to previous site"),
47177
47182
  role: "link"
47178
47183
  }) : backButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
47179
47184
  text: "Back",
@@ -47181,7 +47186,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
47181
47186
  action: backButtonAction,
47182
47187
  extraStyles: isMobile && "flex-grow: 1",
47183
47188
  dataQa: "Back",
47184
- "aria-labelledby": "back-button",
47189
+ "aria-label": "Back, navigate to previous page",
47185
47190
  role: "link"
47186
47191
  });
47187
47192
  var forwardButton = !!redirectURL ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
@@ -51193,12 +51198,13 @@ var Tooltip = function Tooltip(_ref) {
51193
51198
  _ref$hasIconTrigger = _ref.hasIconTrigger,
51194
51199
  hasIconTrigger = _ref$hasIconTrigger === void 0 ? false : _ref$hasIconTrigger,
51195
51200
  _ref$IconTrigger = _ref.IconTrigger,
51196
- IconTrigger = _ref$IconTrigger === void 0 ? IconAdd : _ref$IconTrigger,
51201
+ IconTrigger = _ref$IconTrigger === void 0 ? WarningIconXS : _ref$IconTrigger,
51197
51202
  _ref$iconHelpText = _ref.iconHelpText,
51198
51203
  iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
51199
51204
  _ref$tooltipID = _ref.tooltipID,
51200
- tooltipID = _ref$tooltipID === void 0 ? 0 : _ref$tooltipID,
51201
- extraStyles = _ref.extraStyles,
51205
+ tooltipID = _ref$tooltipID === void 0 ? "tooltip-content" : _ref$tooltipID,
51206
+ _ref$extraStyles = _ref.extraStyles,
51207
+ extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
51202
51208
  _ref$textExtraStyles = _ref.textExtraStyles,
51203
51209
  textExtraStyles = _ref$textExtraStyles === void 0 ? "" : _ref$textExtraStyles,
51204
51210
  _ref$minWidth = _ref.minWidth,
@@ -51207,39 +51213,43 @@ var Tooltip = function Tooltip(_ref) {
51207
51213
  maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
51208
51214
  _ref$height = _ref.height,
51209
51215
  height = _ref$height === void 0 ? "auto" : _ref$height,
51210
- position = _ref.position,
51211
- arrowPosition = _ref.arrowPosition,
51212
51216
  _ref$arrowDirection = _ref.arrowDirection,
51213
51217
  arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
51214
- _ref$transform = _ref.transform,
51215
- transform = _ref$transform === void 0 ? "none" : _ref$transform,
51218
+ _ref$arrowPosition = _ref.arrowPosition,
51219
+ arrowPosition = _ref$arrowPosition === void 0 ? {
51220
+ arrowTop: "auto",
51221
+ arrowRight: "10px",
51222
+ arrowBottom: "-8px",
51223
+ arrowLeft: "auto"
51224
+ } : _ref$arrowPosition,
51225
+ _ref$position = _ref.position,
51226
+ position = _ref$position === void 0 ? {
51227
+ top: "-110px",
51228
+ right: "auto",
51229
+ bottom: "auto",
51230
+ left: "-225px"
51231
+ } : _ref$position,
51232
+ _ref$iconColor = _ref.iconColor,
51233
+ iconColor = _ref$iconColor === void 0 ? SELECTIVE_YELLOW : _ref$iconColor,
51216
51234
  buttonExtraStyles = _ref.buttonExtraStyles,
51217
51235
  _ref$backgroundColor = _ref.backgroundColor,
51218
51236
  backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
51219
51237
  _ref$borderColor = _ref.borderColor,
51220
51238
  borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
51221
- tooltipExtraStyles = _ref.tooltipExtraStyles;
51239
+ tooltipContentExtraStyles = _ref.tooltipContentExtraStyles;
51222
51240
  var hoverColor = themeValues.hoverColor,
51223
51241
  activeColor = themeValues.activeColor,
51224
51242
  tooltipTriggerColor = themeValues.tooltipTriggerColor;
51225
51243
  var _ref2 = position !== null && position !== void 0 ? position : {},
51226
- _ref2$top = _ref2.top,
51227
- top = _ref2$top === void 0 ? "-110px" : _ref2$top,
51228
- _ref2$right = _ref2.right,
51229
- right = _ref2$right === void 0 ? "auto" : _ref2$right,
51230
- _ref2$bottom = _ref2.bottom,
51231
- bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
51232
- _ref2$left = _ref2.left,
51233
- left = _ref2$left === void 0 ? "-225px" : _ref2$left;
51244
+ top = _ref2.top,
51245
+ right = _ref2.right,
51246
+ bottom = _ref2.bottom,
51247
+ left = _ref2.left;
51234
51248
  var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
51235
- _ref3$arrowTop = _ref3.arrowTop,
51236
- arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
51237
- _ref3$arrowRight = _ref3.arrowRight,
51238
- arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
51239
- _ref3$arrowBottom = _ref3.arrowBottom,
51240
- arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
51241
- _ref3$arrowLeft = _ref3.arrowLeft,
51242
- arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
51249
+ arrowTop = _ref3.arrowTop,
51250
+ arrowRight = _ref3.arrowRight,
51251
+ arrowBottom = _ref3.arrowBottom,
51252
+ arrowLeft = _ref3.arrowLeft;
51243
51253
  var _useState = useState(false),
51244
51254
  _useState2 = _slicedToArray(_useState, 2),
51245
51255
  tooltipOpen = _useState2[0],
@@ -51285,11 +51295,14 @@ var Tooltip = function Tooltip(_ref) {
51285
51295
  tabIndex: "0",
51286
51296
  "aria-describedby": tooltipID,
51287
51297
  extraStyles: buttonExtraStyles
51288
- }, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IconTrigger, {
51289
- stroke: BLACK
51290
- }), /*#__PURE__*/React__default.createElement(Box, {
51298
+ }, hasIconTrigger && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
51299
+ "aria-label": "Trigger Popover"
51300
+ }, /*#__PURE__*/React__default.createElement(IconTrigger, {
51301
+ color: iconColor
51302
+ })), /*#__PURE__*/React__default.createElement(Box, {
51291
51303
  padding: "0",
51292
- srOnly: true
51304
+ srOnly: true,
51305
+ "aria-hidden": "true"
51293
51306
  }, /*#__PURE__*/React__default.createElement(Text$1, null, iconHelpText))), !hasIconTrigger && /*#__PURE__*/React__default.createElement(Text$1, {
51294
51307
  extraStyles: textExtraStyles
51295
51308
  }, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
@@ -51300,7 +51313,8 @@ var Tooltip = function Tooltip(_ref) {
51300
51313
  role: "tooltip",
51301
51314
  minWidth: minWidth,
51302
51315
  maxWidth: maxWidth,
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 transform: ").concat(transform, ";\n ").concat(tooltipExtraStyles, ";\n ")
51316
+ "aria-hidden": !tooltipOpen,
51317
+ 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 ")
51304
51318
  }, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
51305
51319
  padding: "0",
51306
51320
  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 ")