@thecb/components 9.2.4-beta.1 → 9.2.4-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.cjs.js +12 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +3 -1
- package/src/components/molecules/radio-group/RadioGroup.js +4 -1
- package/src/components/molecules/radio-group/RadioGroup.stories.js +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -27310,7 +27310,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27310
27310
|
_ref5$handleChange = _ref5.handleChange,
|
|
27311
27311
|
handleChange = _ref5$handleChange === void 0 ? noop : _ref5$handleChange,
|
|
27312
27312
|
field = _ref5.field,
|
|
27313
|
-
config = _ref5.config
|
|
27313
|
+
config = _ref5.config,
|
|
27314
|
+
_ref5$isRequired = _ref5.isRequired,
|
|
27315
|
+
isRequired = _ref5$isRequired === void 0 ? false : _ref5$isRequired;
|
|
27314
27316
|
|
|
27315
27317
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
27316
27318
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
@@ -27343,7 +27345,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
27343
27345
|
setValue(e.target.value);
|
|
27344
27346
|
handleChange(e);
|
|
27345
27347
|
},
|
|
27346
|
-
defaultChecked: getDefaultChecked(value, index)
|
|
27348
|
+
defaultChecked: getDefaultChecked(value, index),
|
|
27349
|
+
required: isRequired
|
|
27347
27350
|
}), /*#__PURE__*/React.createElement(Text$1, {
|
|
27348
27351
|
as: "label",
|
|
27349
27352
|
htmlFor: id,
|
|
@@ -48585,7 +48588,9 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48585
48588
|
_ref$handleChange = _ref.handleChange,
|
|
48586
48589
|
handleChange = _ref$handleChange === void 0 ? noop : _ref$handleChange,
|
|
48587
48590
|
field = _ref.field,
|
|
48588
|
-
fieldActions = _ref.fieldActions
|
|
48591
|
+
fieldActions = _ref.fieldActions,
|
|
48592
|
+
_ref$isRequired = _ref.isRequired,
|
|
48593
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48589
48594
|
|
|
48590
48595
|
var setValue = function setValue(value) {
|
|
48591
48596
|
return fieldActions.set(value);
|
|
@@ -48594,7 +48599,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48594
48599
|
return /*#__PURE__*/React.createElement(StyledFieldset, {
|
|
48595
48600
|
role: "radiogroup",
|
|
48596
48601
|
"aria-labelledby": "radio-group-".concat(groupName, "-heading"),
|
|
48597
|
-
$extraStyles: extraStyles
|
|
48602
|
+
$extraStyles: extraStyles,
|
|
48603
|
+
required: isRequired
|
|
48598
48604
|
}, Heading !== null && Heading, /*#__PURE__*/React.createElement(Stack, {
|
|
48599
48605
|
childGap: "4px"
|
|
48600
48606
|
}, config.map(function (c, idx) {
|
|
@@ -48607,7 +48613,8 @@ var RadioGroup = function RadioGroup(_ref) {
|
|
|
48607
48613
|
handleChange: handleChange,
|
|
48608
48614
|
field: field,
|
|
48609
48615
|
config: config,
|
|
48610
|
-
"aria-invalid": field.dirty && field.hasErrors
|
|
48616
|
+
"aria-invalid": field.dirty && field.hasErrors,
|
|
48617
|
+
isRequired: isRequired
|
|
48611
48618
|
}));
|
|
48612
48619
|
})));
|
|
48613
48620
|
};
|