@thecb/components 9.0.3-beta.11 → 9.0.3-beta.12

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
@@ -48478,7 +48478,7 @@ var fallbackValues$Q = {
48478
48478
 
48479
48479
  */
48480
48480
 
48481
- var computeSectionId = function computeSectionId(section) {
48481
+ var idString = function idString(section) {
48482
48482
  return typeof section.title === "string" ? createIdFromString(section.title) : section.id;
48483
48483
  };
48484
48484
 
@@ -48499,9 +48499,7 @@ var RadioSection = function RadioSection(_ref) {
48499
48499
  openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
48500
48500
  _ref$containerStyles = _ref.containerStyles,
48501
48501
  containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
48502
- ariaDescribedBy = _ref.ariaDescribedBy,
48503
- _ref$rightIconsLabel = _ref.rightIconsLabel,
48504
- rightIconsLabel = _ref$rightIconsLabel === void 0 ? null : _ref$rightIconsLabel;
48502
+ ariaDescribedBy = _ref.ariaDescribedBy;
48505
48503
 
48506
48504
  var handleKeyDown = function handleKeyDown(id, e) {
48507
48505
  if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
@@ -48578,7 +48576,8 @@ var RadioSection = function RadioSection(_ref) {
48578
48576
  key: "item-".concat(section.id),
48579
48577
  extraStyles: borderStyles,
48580
48578
  role: "radio",
48581
- "aria-checked": openSection === section.id
48579
+ "aria-checked": openSection === section.id,
48580
+ "aria-disabled": section.disabled
48582
48581
  }, /*#__PURE__*/React.createElement(Stack, {
48583
48582
  childGap: "0"
48584
48583
  }, /*#__PURE__*/React.createElement(Box, {
@@ -48608,10 +48607,9 @@ var RadioSection = function RadioSection(_ref) {
48608
48607
  }, !section.hideRadioButton && /*#__PURE__*/React.createElement(Box, {
48609
48608
  padding: "0"
48610
48609
  }, /*#__PURE__*/React.createElement(RadioButton$2, {
48611
- id: computeSectionId(section),
48612
- name: computeSectionId(section),
48610
+ id: "radio-input-".concat(idString(section)),
48611
+ name: idString(section),
48613
48612
  ariaDescribedBy: ariaDescribedBy,
48614
- ariaLabelledBy: "radio-input-".concat(computeSectionId(section)),
48615
48613
  radioOn: openSection === section.id,
48616
48614
  radioFocused: focused === section.id,
48617
48615
  toggleRadio: section.disabled ? noop : function () {
@@ -48624,19 +48622,20 @@ var RadioSection = function RadioSection(_ref) {
48624
48622
  padding: section.titleIcon ? "0 0 0 8px" : "0"
48625
48623
  }, /*#__PURE__*/React.createElement(Text$1, {
48626
48624
  as: "label",
48627
- color: CHARADE_GREY,
48628
- htmlFor: "radio-input-".concat(computeSectionId(section))
48629
- }, section.title))), section.rightIcons && /*#__PURE__*/React.createElement(Cluster, _extends({
48630
- childGap: "0.5rem"
48631
- }, rightIconsLabel !== null ? {
48632
- "aria-label": rightIconsLabel
48633
- } : {}), section.rightIcons.map(function (icon) {
48625
+ htmlFor: "radio-input-".concat(idString(section)),
48626
+ color: CHARADE_GREY
48627
+ }, section.title))), section.rightIcons && /*#__PURE__*/React.createElement(Cluster, {
48628
+ childGap: "0.5rem",
48629
+ "aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
48630
+ role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
48631
+ }, section.rightIcons.map(function (icon) {
48634
48632
  return /*#__PURE__*/React.createElement(RightIcon, {
48635
48633
  src: icon.img,
48636
48634
  key: icon.img,
48637
48635
  fade: !icon.enabled,
48638
48636
  isMobile: isMobile,
48639
- alt: icon.altText
48637
+ alt: icon.altText,
48638
+ "aria-disabled": !icon.enabled
48640
48639
  });
48641
48640
  })), section.rightTitleContent && /*#__PURE__*/React.createElement(Fragment$1, null, section.rightTitleContent))), /*#__PURE__*/React.createElement(AnimatePresence, {
48642
48641
  initial: false