@thecb/components 9.1.2-beta.0 → 9.1.2-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.esm.js
CHANGED
|
@@ -6356,6 +6356,9 @@ var titleCaseString = function titleCaseString(string) {
|
|
|
6356
6356
|
return index === 0 || index === string.length - 1 || word.length > 3 ? titleCaseWord(word.toLowerCase()) : word;
|
|
6357
6357
|
}).join(" ");
|
|
6358
6358
|
};
|
|
6359
|
+
var kebabCaseString = function kebabCaseString(string) {
|
|
6360
|
+
return string === null || string === void 0 ? void 0 : string.replaceAll(" ", "-").toLowerCase();
|
|
6361
|
+
};
|
|
6359
6362
|
|
|
6360
6363
|
var general = /*#__PURE__*/Object.freeze({
|
|
6361
6364
|
__proto__: null,
|
|
@@ -6375,7 +6378,8 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6375
6378
|
MOBILE_WIDTH: MOBILE_WIDTH,
|
|
6376
6379
|
throttle: throttle,
|
|
6377
6380
|
titleCaseWord: titleCaseWord,
|
|
6378
|
-
titleCaseString: titleCaseString
|
|
6381
|
+
titleCaseString: titleCaseString,
|
|
6382
|
+
kebabCaseString: kebabCaseString
|
|
6379
6383
|
});
|
|
6380
6384
|
|
|
6381
6385
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
|
|
@@ -47058,6 +47062,8 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47058
47062
|
forwardButtonLoading = _ref.forwardButtonLoading,
|
|
47059
47063
|
_ref$forwardButtonVar = _ref.forwardButtonVariant,
|
|
47060
47064
|
forwardButtonVariant = _ref$forwardButtonVar === void 0 ? "primary" : _ref$forwardButtonVar,
|
|
47065
|
+
_ref$forwardButtonAri = _ref.forwardButtonAriaRole,
|
|
47066
|
+
forwardButtonAriaRole = _ref$forwardButtonAri === void 0 ? "button" : _ref$forwardButtonAri,
|
|
47061
47067
|
_ref$backButtonVarian = _ref.backButtonVariant,
|
|
47062
47068
|
backButtonVariant = _ref$backButtonVarian === void 0 ? "secondary" : _ref$backButtonVarian,
|
|
47063
47069
|
backButtonAction = _ref.backButtonAction,
|
|
@@ -47082,6 +47088,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47082
47088
|
variant: backButtonVariant,
|
|
47083
47089
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47084
47090
|
dataQa: cancelText,
|
|
47091
|
+
"aria-labelledby": "".concat(kebabCaseString(cancelText), "-button"),
|
|
47085
47092
|
role: "link"
|
|
47086
47093
|
}) : backButtonAction && /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47087
47094
|
text: "Back",
|
|
@@ -47089,6 +47096,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47089
47096
|
action: backButtonAction,
|
|
47090
47097
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47091
47098
|
dataQa: "Back",
|
|
47099
|
+
"aria-labelledby": "back-button",
|
|
47092
47100
|
role: "link"
|
|
47093
47101
|
});
|
|
47094
47102
|
var forwardButton = !!redirectURL ? /*#__PURE__*/React.createElement(ButtonWithLink, {
|
|
@@ -47098,7 +47106,8 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47098
47106
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47099
47107
|
dataQa: redirectText,
|
|
47100
47108
|
disabled: isForwardButtonDisabled,
|
|
47101
|
-
|
|
47109
|
+
"aria-labelledby": "".concat(kebabCaseString(redirectText), "-button"),
|
|
47110
|
+
role: forwardButtonAriaRole
|
|
47102
47111
|
}) : forwardButtonAction && /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47103
47112
|
text: forwardButtonText,
|
|
47104
47113
|
variant: forwardButtonVariant,
|
|
@@ -47107,7 +47116,8 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47107
47116
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47108
47117
|
dataQa: forwardButtonText,
|
|
47109
47118
|
disabled: isForwardButtonDisabled,
|
|
47110
|
-
|
|
47119
|
+
"aria-labelledby": "".concat(kebabCaseString(forwardButtonText), "-button"),
|
|
47120
|
+
role: forwardButtonAriaRole
|
|
47111
47121
|
});
|
|
47112
47122
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Box, {
|
|
47113
47123
|
padding: "1.25rem 0"
|