@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/package.json
CHANGED
|
@@ -62,7 +62,8 @@ const RadioButtonWithLabel = ({
|
|
|
62
62
|
index,
|
|
63
63
|
handleChange = noop, // optional, for custom event handling in ingesting app
|
|
64
64
|
field,
|
|
65
|
-
config
|
|
65
|
+
config,
|
|
66
|
+
isRequired = false
|
|
66
67
|
}) => {
|
|
67
68
|
const getDefaultChecked = (value, idx) => {
|
|
68
69
|
const selectionExistsInConfig = config
|
|
@@ -94,6 +95,7 @@ const RadioButtonWithLabel = ({
|
|
|
94
95
|
handleChange(e);
|
|
95
96
|
}}
|
|
96
97
|
defaultChecked={getDefaultChecked(value, index)}
|
|
98
|
+
required={isRequired}
|
|
97
99
|
/>
|
|
98
100
|
<Text
|
|
99
101
|
as="label"
|
|
@@ -29,7 +29,8 @@ const RadioGroup = ({
|
|
|
29
29
|
handleChange = noop, // optional, for custom event handling in ingesting app
|
|
30
30
|
// redux-freeform props - this is similar to how FormInput works, duplicated because the radio input is hidden for styling overrides
|
|
31
31
|
field,
|
|
32
|
-
fieldActions
|
|
32
|
+
fieldActions,
|
|
33
|
+
isRequired = false
|
|
33
34
|
}) => {
|
|
34
35
|
const setValue = value => fieldActions.set(value);
|
|
35
36
|
return (
|
|
@@ -37,6 +38,7 @@ const RadioGroup = ({
|
|
|
37
38
|
role="radiogroup"
|
|
38
39
|
aria-labelledby={`radio-group-${groupName}-heading`}
|
|
39
40
|
$extraStyles={extraStyles}
|
|
41
|
+
required={isRequired}
|
|
40
42
|
>
|
|
41
43
|
{Heading !== null && Heading}
|
|
42
44
|
<Stack childGap="4px">
|
|
@@ -51,6 +53,7 @@ const RadioGroup = ({
|
|
|
51
53
|
field={field}
|
|
52
54
|
config={config}
|
|
53
55
|
aria-invalid={field.dirty && field.hasErrors}
|
|
56
|
+
isRequired={isRequired}
|
|
54
57
|
/>
|
|
55
58
|
))}
|
|
56
59
|
</Stack>
|