@thecb/components 8.4.10-beta.3 → 8.4.10-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 +4 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +4 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/form-select/FormSelect.js +1 -1
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +33 -49
- package/src/components/molecules/radio-group/RadioGroup.js +0 -2
- package/src/components/molecules/radio-group/RadioGroup.stories.js +1 -1
- package/src/types/common/Field.ts +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -24229,7 +24229,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24229
24229
|
smoothScroll: smoothScroll
|
|
24230
24230
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24231
24231
|
direction: "row",
|
|
24232
|
-
justify: "space-between"
|
|
24232
|
+
justify: "space-between",
|
|
24233
|
+
"aria-live": "polite"
|
|
24233
24234
|
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24234
24235
|
color: ERROR_COLOR,
|
|
24235
24236
|
variant: "pXS",
|
|
@@ -27108,24 +27109,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27108
27109
|
themeValues = _ref5.themeValues,
|
|
27109
27110
|
index = _ref5.index,
|
|
27110
27111
|
_ref5$handleChange = _ref5.handleChange,
|
|
27111
|
-
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange
|
|
27112
|
-
field = _ref5.field,
|
|
27113
|
-
config = _ref5.config;
|
|
27114
|
-
|
|
27115
|
-
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27116
|
-
var selectionExistsInConfig = config.map(function (c) {
|
|
27117
|
-
return c.value;
|
|
27118
|
-
}).includes(field.rawValue);
|
|
27119
|
-
|
|
27120
|
-
if (selectionExistsInConfig) {
|
|
27121
|
-
// if exists, selection comes from the redux-freeform state
|
|
27122
|
-
return field.rawValue === value;
|
|
27123
|
-
} // fallback to first option as default selection
|
|
27124
|
-
|
|
27125
|
-
|
|
27126
|
-
return idx === 0;
|
|
27127
|
-
};
|
|
27128
|
-
|
|
27112
|
+
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange;
|
|
27129
27113
|
return /*#__PURE__*/React__default.createElement(InputAndLabelContainer, {
|
|
27130
27114
|
align: "center",
|
|
27131
27115
|
childGap: "0.5rem",
|
|
@@ -27143,7 +27127,7 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27143
27127
|
setValue(e.target.value);
|
|
27144
27128
|
handleChange(e);
|
|
27145
27129
|
},
|
|
27146
|
-
defaultChecked:
|
|
27130
|
+
defaultChecked: index === 0
|
|
27147
27131
|
}), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27148
27132
|
as: "label",
|
|
27149
27133
|
htmlFor: id,
|
|
@@ -49399,8 +49383,6 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
49399
49383
|
groupName: groupName,
|
|
49400
49384
|
setValue: setValue,
|
|
49401
49385
|
handleChange: handleChange,
|
|
49402
|
-
field: field,
|
|
49403
|
-
config: config,
|
|
49404
49386
|
"aria-invalid": field.dirty && field.hasErrors
|
|
49405
49387
|
}));
|
|
49406
49388
|
})));
|