@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.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"];
|
|
@@ -22693,10 +22697,10 @@ var shared = createCommonjsModule(function (module) {
|
|
|
22693
22697
|
(module.exports = function (key, value) {
|
|
22694
22698
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22695
22699
|
})('versions', []).push({
|
|
22696
|
-
version: '3.
|
|
22700
|
+
version: '3.33.3',
|
|
22697
22701
|
mode: 'global',
|
|
22698
22702
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22699
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22703
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
22700
22704
|
source: 'https://github.com/zloirock/core-js'
|
|
22701
22705
|
});
|
|
22702
22706
|
});
|
|
@@ -27266,7 +27270,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27266
27270
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$u);
|
|
27267
27271
|
|
|
27268
27272
|
var activeColor$6 = "".concat(MATISSE_BLUE);
|
|
27269
|
-
var inactiveColor = "".concat(
|
|
27273
|
+
var inactiveColor = "".concat(STORM_GREY);
|
|
27270
27274
|
var fallbackValues$v = {
|
|
27271
27275
|
activeColor: activeColor$6,
|
|
27272
27276
|
inactiveColor: inactiveColor
|
|
@@ -27299,19 +27303,21 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27299
27303
|
var buttonBorder = {
|
|
27300
27304
|
onFocused: {
|
|
27301
27305
|
borderColor: themeValues.activeColor,
|
|
27302
|
-
|
|
27306
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27307
|
+
outlineOffset: "2px"
|
|
27303
27308
|
},
|
|
27304
27309
|
offFocused: {
|
|
27305
27310
|
borderColor: themeValues.activeColor,
|
|
27306
|
-
|
|
27311
|
+
outline: "3px solid ".concat(themeValues.activeColor),
|
|
27312
|
+
outlineOffset: "2px"
|
|
27307
27313
|
},
|
|
27308
27314
|
on: {
|
|
27309
27315
|
borderColor: themeValues.activeColor,
|
|
27310
|
-
|
|
27316
|
+
outline: "0"
|
|
27311
27317
|
},
|
|
27312
27318
|
off: {
|
|
27313
27319
|
borderColor: themeValues.inactiveColor,
|
|
27314
|
-
|
|
27320
|
+
outline: "0"
|
|
27315
27321
|
}
|
|
27316
27322
|
};
|
|
27317
27323
|
var buttonCenter = {
|
|
@@ -27360,7 +27366,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27360
27366
|
borderWidth: "1px",
|
|
27361
27367
|
borderStyle: "solid",
|
|
27362
27368
|
borderRadius: "12px",
|
|
27363
|
-
margin: "
|
|
27369
|
+
margin: "6px 14px 6px 6px",
|
|
27364
27370
|
height: "24px",
|
|
27365
27371
|
width: "24px",
|
|
27366
27372
|
variants: buttonBorder,
|
|
@@ -47101,6 +47107,8 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47101
47107
|
forwardButtonLoading = _ref.forwardButtonLoading,
|
|
47102
47108
|
_ref$forwardButtonVar = _ref.forwardButtonVariant,
|
|
47103
47109
|
forwardButtonVariant = _ref$forwardButtonVar === void 0 ? "primary" : _ref$forwardButtonVar,
|
|
47110
|
+
_ref$forwardButtonAri = _ref.forwardButtonAriaRole,
|
|
47111
|
+
forwardButtonAriaRole = _ref$forwardButtonAri === void 0 ? "button" : _ref$forwardButtonAri,
|
|
47104
47112
|
_ref$backButtonVarian = _ref.backButtonVariant,
|
|
47105
47113
|
backButtonVariant = _ref$backButtonVarian === void 0 ? "secondary" : _ref$backButtonVarian,
|
|
47106
47114
|
backButtonAction = _ref.backButtonAction,
|
|
@@ -47124,13 +47132,17 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47124
47132
|
url: cancelURL,
|
|
47125
47133
|
variant: backButtonVariant,
|
|
47126
47134
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47127
|
-
dataQa: cancelText
|
|
47135
|
+
dataQa: cancelText,
|
|
47136
|
+
"aria-labelledby": "".concat(kebabCaseString(cancelText), "-button"),
|
|
47137
|
+
role: "link"
|
|
47128
47138
|
}) : backButtonAction && /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47129
47139
|
text: "Back",
|
|
47130
47140
|
variant: backButtonVariant,
|
|
47131
47141
|
action: backButtonAction,
|
|
47132
47142
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47133
|
-
dataQa: "Back"
|
|
47143
|
+
dataQa: "Back",
|
|
47144
|
+
"aria-labelledby": "back-button",
|
|
47145
|
+
role: "link"
|
|
47134
47146
|
});
|
|
47135
47147
|
var forwardButton = !!redirectURL ? /*#__PURE__*/React.createElement(ButtonWithLink, {
|
|
47136
47148
|
url: redirectURL,
|
|
@@ -47138,7 +47150,9 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47138
47150
|
variant: forwardButtonVariant,
|
|
47139
47151
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47140
47152
|
dataQa: redirectText,
|
|
47141
|
-
disabled: isForwardButtonDisabled
|
|
47153
|
+
disabled: isForwardButtonDisabled,
|
|
47154
|
+
"aria-labelledby": "".concat(kebabCaseString(redirectText), "-button"),
|
|
47155
|
+
role: forwardButtonAriaRole
|
|
47142
47156
|
}) : forwardButtonAction && /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
47143
47157
|
text: forwardButtonText,
|
|
47144
47158
|
variant: forwardButtonVariant,
|
|
@@ -47146,7 +47160,9 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
47146
47160
|
isLoading: forwardButtonLoading,
|
|
47147
47161
|
extraStyles: isMobile && "flex-grow: 1",
|
|
47148
47162
|
dataQa: forwardButtonText,
|
|
47149
|
-
disabled: isForwardButtonDisabled
|
|
47163
|
+
disabled: isForwardButtonDisabled,
|
|
47164
|
+
"aria-labelledby": "".concat(kebabCaseString(forwardButtonText), "-button"),
|
|
47165
|
+
role: forwardButtonAriaRole
|
|
47150
47166
|
});
|
|
47151
47167
|
return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Box, {
|
|
47152
47168
|
padding: "1.25rem 0"
|