@thecb/components 9.5.0-beta.0 → 9.5.0-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.5.0-beta.0",
3
+ "version": "9.5.0-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -91,6 +91,17 @@ const InnerRadioSection = ({
91
91
  aria-required={section.required}
92
92
  aria-labelledby={ariaLabelledBy}
93
93
  aria-describedby={ariaDescribedBy}
94
+ onClick={
95
+ // This needs to be associated with the same component that has the aria-checked property
96
+ (isMobile && supportsTouch) || section.disabled
97
+ ? noop
98
+ : () => toggleOpenSection(section.id)
99
+ }
100
+ onTouchEnd={
101
+ isMobile && supportsTouch && !section.disabled
102
+ ? () => toggleOpenSection(section.id)
103
+ : noop
104
+ }
94
105
  >
95
106
  <Stack childGap="0">
96
107
  <Box
@@ -100,16 +111,6 @@ const InnerRadioSection = ({
100
111
  ? themeValues.headingDisabledColor
101
112
  : themeValues.headingBackgroundColor
102
113
  }
103
- onClick={
104
- (isMobile && supportsTouch) || section.disabled
105
- ? noop
106
- : () => toggleOpenSection(section.id)
107
- }
108
- onTouchEnd={
109
- isMobile && supportsTouch && !section.disabled
110
- ? () => toggleOpenSection(section.id)
111
- : noop
112
- }
113
114
  key={`header-${section.id}`}
114
115
  borderSize="0px"
115
116
  borderColor={themeValues.borderColor}
@@ -100,13 +100,11 @@ const RadioSection = ({
100
100
  border={`1px solid ${themeValues.borderColor}`}
101
101
  borderRadius="4px"
102
102
  extraStyles={containerStyles}
103
+ role="radiogroup"
104
+ aria-required={isSectionRequired}
105
+ {...rest}
103
106
  >
104
- <Stack
105
- childGap="0"
106
- role="radiogroup"
107
- aria-required={isSectionRequired}
108
- {...rest}
109
- >
107
+ <Stack childGap="0">
110
108
  {!!sections &&
111
109
  sections
112
110
  .filter(section => !section.hidden)