@thecb/components 9.1.4-beta.0 → 9.1.5-beta.0
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 +29 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +29 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/payment-button-bar/PaymentButtonBar.js +10 -0
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +7 -5
- package/src/components/molecules/radio-section/radio-button/RadioButton.theme.js +2 -2
- package/src/util/general.js +4 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6364,6 +6364,9 @@ var titleCaseString = function titleCaseString(string) {
|
|
|
6364
6364
|
return index === 0 || index === string.length - 1 || word.length > 3 ? titleCaseWord(word.toLowerCase()) : word;
|
|
6365
6365
|
}).join(" ");
|
|
6366
6366
|
};
|
|
6367
|
+
var kebabCaseString = function kebabCaseString(string) {
|
|
6368
|
+
return string === null || string === void 0 ? void 0 : string.replaceAll(" ", "-").toLowerCase();
|
|
6369
|
+
};
|
|
6367
6370
|
|
|
6368
6371
|
var general = /*#__PURE__*/Object.freeze({
|
|
6369
6372
|
__proto__: null,
|
|
@@ -6383,7 +6386,8 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6383
6386
|
MOBILE_WIDTH: MOBILE_WIDTH,
|
|
6384
6387
|
throttle: throttle,
|
|
6385
6388
|
titleCaseWord: titleCaseWord,
|
|
6386
|
-
titleCaseString: titleCaseString
|
|
6389
|
+
titleCaseString: titleCaseString,
|
|
6390
|
+
kebabCaseString: kebabCaseString
|
|
6387
6391
|
});
|
|
6388
6392
|
|
|
6389
6393
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
|
|
@@ -22701,10 +22705,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
22701
22705
|
(module.exports = function (key, value) {
|
|
22702
22706
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22703
22707
|
})('versions', []).push({
|
|
22704
|
-
version: '3.
|
|
22708
|
+
version: '3.33.3',
|
|
22705
22709
|
mode: 'global',
|
|
22706
22710
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22707
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22711
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
22708
22712
|
source: 'https://github.com/zloirock/core-js'
|
|
22709
22713
|
});
|
|
22710
22714
|
});
|
|
@@ -27274,7 +27278,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27274
27278
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$u);
|
|
27275
27279
|
|
|
27276
27280
|
var activeColor$6 = "".concat(MATISSE_BLUE);
|
|
27277
|
-
var inactiveColor = "".concat(
|
|
27281
|
+
var inactiveColor = "".concat(STORM_GREY);
|
|
27278
27282
|
var fallbackValues$v = {
|
|
27279
27283
|
activeColor: activeColor$6,
|
|
27280
27284
|
inactiveColor: inactiveColor
|
|
@@ -27307,19 +27311,21 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27307
27311
|
var buttonBorder = {
|
|
27308
27312
|
onFocused: {
|
|
27309
27313
|
borderColor: themeValues.activeColor,
|
|
27310
|
-
|
|
27314
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27315
|
+
outlineOffset: "2px"
|
|
27311
27316
|
},
|
|
27312
27317
|
offFocused: {
|
|
27313
27318
|
borderColor: themeValues.activeColor,
|
|
27314
|
-
|
|
27319
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27320
|
+
outlineOffset: "2px"
|
|
27315
27321
|
},
|
|
27316
27322
|
on: {
|
|
27317
27323
|
borderColor: themeValues.activeColor,
|
|
27318
|
-
|
|
27324
|
+
outline: "0"
|
|
27319
27325
|
},
|
|
27320
27326
|
off: {
|
|
27321
27327
|
borderColor: themeValues.inactiveColor,
|
|
27322
|
-
|
|
27328
|
+
outline: "0"
|
|
27323
27329
|
}
|
|
27324
27330
|
};
|
|
27325
27331
|
var buttonCenter = {
|
|
@@ -27368,7 +27374,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27368
27374
|
borderWidth: "1px",
|
|
27369
27375
|
borderStyle: "solid",
|
|
27370
27376
|
borderRadius: "12px",
|
|
27371
|
-
margin: "
|
|
27377
|
+
margin: "6px 14px 6px 6px",
|
|
27372
27378
|
height: "24px",
|
|
27373
27379
|
width: "24px",
|
|
27374
27380
|
variants: buttonBorder,
|
|
@@ -47109,6 +47115,8 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47109
47115
|
forwardButtonLoading = _ref.forwardButtonLoading,
|
|
47110
47116
|
_ref$forwardButtonVar = _ref.forwardButtonVariant,
|
|
47111
47117
|
forwardButtonVariant = _ref$forwardButtonVar === void 0 ? "primary" : _ref$forwardButtonVar,
|
|
47118
|
+
_ref$forwardButtonAri = _ref.forwardButtonAriaRole,
|
|
47119
|
+
forwardButtonAriaRole = _ref$forwardButtonAri === void 0 ? "button" : _ref$forwardButtonAri,
|
|
47112
47120
|
_ref$backButtonVarian = _ref.backButtonVariant,
|
|
47113
47121
|
backButtonVariant = _ref$backButtonVarian === void 0 ? "secondary" : _ref$backButtonVarian,
|
|
47114
47122
|
backButtonAction = _ref.backButtonAction,
|
|
@@ -47132,13 +47140,17 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47132
47140
|
url: cancelURL,
|
|
47133
47141
|
variant: backButtonVariant,
|
|
47134
47142
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47135
|
-
dataQa: cancelText
|
|
47143
|
+
dataQa: cancelText,
|
|
47144
|
+
"aria-labelledby": "".concat(kebabCaseString(cancelText), "-button"),
|
|
47145
|
+
role: "link"
|
|
47136
47146
|
}) : backButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
47137
47147
|
text: "Back",
|
|
47138
47148
|
variant: backButtonVariant,
|
|
47139
47149
|
action: backButtonAction,
|
|
47140
47150
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47141
|
-
dataQa: "Back"
|
|
47151
|
+
dataQa: "Back",
|
|
47152
|
+
"aria-labelledby": "back-button",
|
|
47153
|
+
role: "link"
|
|
47142
47154
|
});
|
|
47143
47155
|
var forwardButton = !!redirectURL ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
47144
47156
|
url: redirectURL,
|
|
@@ -47146,7 +47158,9 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47146
47158
|
variant: forwardButtonVariant,
|
|
47147
47159
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47148
47160
|
dataQa: redirectText,
|
|
47149
|
-
disabled: isForwardButtonDisabled
|
|
47161
|
+
disabled: isForwardButtonDisabled,
|
|
47162
|
+
"aria-labelledby": "".concat(kebabCaseString(redirectText), "-button"),
|
|
47163
|
+
role: forwardButtonAriaRole
|
|
47150
47164
|
}) : forwardButtonAction && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
47151
47165
|
text: forwardButtonText,
|
|
47152
47166
|
variant: forwardButtonVariant,
|
|
@@ -47154,7 +47168,9 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47154
47168
|
isLoading: forwardButtonLoading,
|
|
47155
47169
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47156
47170
|
dataQa: forwardButtonText,
|
|
47157
|
-
disabled: isForwardButtonDisabled
|
|
47171
|
+
disabled: isForwardButtonDisabled,
|
|
47172
|
+
"aria-labelledby": "".concat(kebabCaseString(forwardButtonText), "-button"),
|
|
47173
|
+
role: forwardButtonAriaRole
|
|
47158
47174
|
});
|
|
47159
47175
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
47160
47176
|
padding: "1.25rem 0"
|