@thecb/components 9.2.4-beta.2 → 9.2.4-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.2.4-beta.2",
3
+ "version": "9.2.4-beta.3",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -47,7 +47,8 @@ const RadioSection = ({
47
47
  initiallyOpen = true,
48
48
  openHeight = "auto",
49
49
  containerStyles = "",
50
- ariaDescribedBy
50
+ ariaDescribedBy,
51
+ isRequired = false
51
52
  }) => {
52
53
  const handleKeyDown = (id, e) => {
53
54
  if (e?.keyCode === 13 || e?.keyCode === 32) {
@@ -105,7 +106,7 @@ const RadioSection = ({
105
106
  borderRadius="4px"
106
107
  extraStyles={containerStyles}
107
108
  >
108
- <Stack childGap="0" role="radiogroup">
109
+ <Stack childGap="0" role="radiogroup" required={isRequired}>
109
110
  {sections
110
111
  .filter(section => !section.hidden)
111
112
  .map(section => (
@@ -124,6 +125,7 @@ const RadioSection = ({
124
125
  role="radio"
125
126
  aria-checked={openSection === section.id}
126
127
  aria-disabled={section.disabled}
128
+ required={section?.required}
127
129
  >
128
130
  <Stack childGap="0">
129
131
  <Box
@@ -66,6 +66,7 @@ export const radioSection = () => {
66
66
  openSection={openSection}
67
67
  staggeredAnimation={boolean("staggeredAnimation", false, "props")}
68
68
  sections={sections}
69
+ isRequired={true}
69
70
  />
70
71
  );
71
72
  };