@thecb/components 9.2.4-beta.6 → 9.2.4-beta.8

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.6",
3
+ "version": "9.2.4-beta.8",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -106,7 +106,7 @@ const RadioSection = ({
106
106
  borderRadius="4px"
107
107
  extraStyles={containerStyles}
108
108
  >
109
- <Stack childGap="0" role="radiogroup" required={isSectionRequired}>
109
+ <Stack childGap="0" role="radiogroup" aria-required={isSectionRequired}>
110
110
  {sections
111
111
  .filter(section => !section.hidden)
112
112
  .map(section => (
@@ -125,7 +125,7 @@ const RadioSection = ({
125
125
  role="radio"
126
126
  aria-checked={openSection === section.id}
127
127
  aria-disabled={section.disabled}
128
- required={!!section?.required}
128
+ aria-required={!!section?.required}
129
129
  >
130
130
  <Stack childGap="0">
131
131
  <Box
@@ -179,7 +179,7 @@ const RadioSection = ({
179
179
  : () => toggleOpenSection(section.id)
180
180
  }
181
181
  tabIndex="-1"
182
- isRequired={!!section?.required}
182
+ aria-required={!!section?.required}
183
183
  />
184
184
  </Box>
185
185
  )}
@@ -20,7 +20,7 @@ const RadioButton = ({
20
20
  themeValues,
21
21
  ariaLabelledBy = "",
22
22
  ariaLabel = null,
23
- isRequired = false
23
+ ...rest
24
24
  }) => {
25
25
  const buttonBorder = {
26
26
  onFocused: {
@@ -65,7 +65,7 @@ const RadioButton = ({
65
65
  width: "0px"
66
66
  }
67
67
  };
68
- const extraProps = {};
68
+ const extraProps = rest?.length ? rest : {};
69
69
  if (ariaLabelledBy && ariaLabelledBy.length) {
70
70
  extraProps["aria-labelledby"] = ariaLabelledBy;
71
71
  } else if (ariaLabel && ariaLabel !== null) {
@@ -94,7 +94,6 @@ const RadioButton = ({
94
94
  onClick={toggleRadio}
95
95
  aria-describedby={ariaDescribedBy}
96
96
  tabIndex="-1"
97
- required={isRequired}
98
97
  {...extraProps}
99
98
  />
100
99
  <Motion