@thecb/components 9.2.13-beta.1 → 9.2.13-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
@@ -6363,10 +6363,10 @@ var titleCaseString = function titleCaseString(string) {
6363
6363
  var kebabCaseString = function kebabCaseString(string) {
6364
6364
  return string === null || string === void 0 ? void 0 : string.replaceAll(" ", "-").toLowerCase();
6365
6365
  };
6366
- var wrapIndex$1 = function wrapIndex(index, length) {
6367
- if (index == -1) {
6366
+ var wrapIndex = function wrapIndex(index, length) {
6367
+ if (index <= -1) {
6368
6368
  return length - 1;
6369
- } else if (index == length) {
6369
+ } else if (index >= length) {
6370
6370
  return 0;
6371
6371
  } else {
6372
6372
  return index;
@@ -6393,7 +6393,7 @@ var general = /*#__PURE__*/Object.freeze({
6393
6393
  titleCaseWord: titleCaseWord,
6394
6394
  titleCaseString: titleCaseString,
6395
6395
  kebabCaseString: kebabCaseString,
6396
- wrapIndex: wrapIndex$1
6396
+ wrapIndex: wrapIndex
6397
6397
  });
6398
6398
 
6399
6399
  var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
@@ -22118,6 +22118,7 @@ var fallbackValues$d = {
22118
22118
  disabledCheckedStyles: disabledCheckedStyles
22119
22119
  };
22120
22120
 
22121
+ var ARROW_LEFT = 37;
22121
22122
  var ARROW_UP = 38;
22122
22123
  var ARROW_RIGHT = 39;
22123
22124
  var ARROW_DOWN = 40;
@@ -48756,7 +48757,7 @@ var RadioSection = function RadioSection(_ref) {
48756
48757
 
48757
48758
  e.preventDefault();
48758
48759
  var indexIncrement = e.keyCode == ARROW_RIGHT || e.keyCode == ARROW_DOWN ? 1 : -1;
48759
- var nextIndex = wrapIndex(i + indexIncrement);
48760
+ var nextIndex = wrapIndex(i + indexIncrement, sections.length);
48760
48761
  sectionRefs === null || sectionRefs === void 0 ? void 0 : (_sectionRefs$current$ = sectionRefs.current[nextIndex]) === null || _sectionRefs$current$ === void 0 ? void 0 : (_sectionRefs$current$2 = _sectionRefs$current$.current) === null || _sectionRefs$current$2 === void 0 ? void 0 : _sectionRefs$current$2.focus();
48761
48762
  setFocused((_sections$nextIndex = sections[nextIndex]) === null || _sections$nextIndex === void 0 ? void 0 : _sections$nextIndex.id);
48762
48763
  toggleOpenSection((_sections$nextIndex2 = sections[nextIndex]) === null || _sections$nextIndex2 === void 0 ? void 0 : _sections$nextIndex2.id);