@thecb/components 9.1.1-beta.0 → 9.1.1-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.esm.js CHANGED
@@ -48506,11 +48506,11 @@ var RadioGroup = function RadioGroup(_ref) {
48506
48506
  };
48507
48507
 
48508
48508
  return /*#__PURE__*/React.createElement(StyledFieldset, {
48509
- role: "radiogroup",
48510
- "aria-labelledby": "radio-group-".concat(groupName, "-heading"),
48511
48509
  $extraStyles: extraStyles
48512
48510
  }, Heading !== null && Heading, /*#__PURE__*/React.createElement(Stack, {
48513
- childGap: "4px"
48511
+ childGap: "4px",
48512
+ role: "radiogroup",
48513
+ "aria-labelledby": "radio-group-".concat(groupName, "-heading")
48514
48514
  }, config.map(function (c, idx) {
48515
48515
  return /*#__PURE__*/React.createElement(RadioButtonWithLabel$1, _extends({
48516
48516
  required: isRequired,
@@ -48584,7 +48584,13 @@ var RadioSection = function RadioSection(_ref) {
48584
48584
  openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
48585
48585
  _ref$containerStyles = _ref.containerStyles,
48586
48586
  containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
48587
- ariaDescribedBy = _ref.ariaDescribedBy;
48587
+ ariaDescribedBy = _ref.ariaDescribedBy,
48588
+ _ref$role = _ref.role,
48589
+ role = _ref$role === void 0 ? "radiogroup" : _ref$role,
48590
+ _ref$required = _ref.required,
48591
+ required = _ref$required === void 0 ? false : _ref$required,
48592
+ _ref$label = _ref.label,
48593
+ label = _ref$label === void 0 ? "" : _ref$label;
48588
48594
 
48589
48595
  var handleKeyDown = function handleKeyDown(id, e) {
48590
48596
  if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
@@ -48640,7 +48646,8 @@ var RadioSection = function RadioSection(_ref) {
48640
48646
  extraStyles: containerStyles
48641
48647
  }, /*#__PURE__*/React.createElement(Stack, {
48642
48648
  childGap: "0",
48643
- role: "radiogroup"
48649
+ role: role,
48650
+ required: required
48644
48651
  }, sections.filter(function (section) {
48645
48652
  return !section.hidden;
48646
48653
  }).map(function (section) {
@@ -48662,7 +48669,8 @@ var RadioSection = function RadioSection(_ref) {
48662
48669
  extraStyles: borderStyles,
48663
48670
  role: "radio",
48664
48671
  "aria-checked": openSection === section.id,
48665
- "aria-disabled": section.disabled
48672
+ "aria-disabled": section.disabled,
48673
+ "aria-label": label || section.title
48666
48674
  }, /*#__PURE__*/React.createElement(Stack, {
48667
48675
  childGap: "0"
48668
48676
  }, /*#__PURE__*/React.createElement(Box, {
@@ -48701,7 +48709,7 @@ var RadioSection = function RadioSection(_ref) {
48701
48709
  return toggleOpenSection(section.id);
48702
48710
  },
48703
48711
  tabIndex: "-1",
48704
- isRequired: true
48712
+ isRequired: required
48705
48713
  })), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
48706
48714
  align: "center"
48707
48715
  }, section.titleIcon), /*#__PURE__*/React.createElement(Box, {