@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.cjs.js
CHANGED
|
@@ -6371,10 +6371,10 @@ var titleCaseString = function titleCaseString(string) {
|
|
|
6371
6371
|
var kebabCaseString = function kebabCaseString(string) {
|
|
6372
6372
|
return string === null || string === void 0 ? void 0 : string.replaceAll(" ", "-").toLowerCase();
|
|
6373
6373
|
};
|
|
6374
|
-
var wrapIndex
|
|
6375
|
-
if (index
|
|
6374
|
+
var wrapIndex = function wrapIndex(index, length) {
|
|
6375
|
+
if (index <= -1) {
|
|
6376
6376
|
return length - 1;
|
|
6377
|
-
} else if (index
|
|
6377
|
+
} else if (index >= length) {
|
|
6378
6378
|
return 0;
|
|
6379
6379
|
} else {
|
|
6380
6380
|
return index;
|
|
@@ -6401,7 +6401,7 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6401
6401
|
titleCaseWord: titleCaseWord,
|
|
6402
6402
|
titleCaseString: titleCaseString,
|
|
6403
6403
|
kebabCaseString: kebabCaseString,
|
|
6404
|
-
wrapIndex: wrapIndex
|
|
6404
|
+
wrapIndex: wrapIndex
|
|
6405
6405
|
});
|
|
6406
6406
|
|
|
6407
6407
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children", "variant"];
|
|
@@ -22126,6 +22126,7 @@ var fallbackValues$d = {
|
|
|
22126
22126
|
disabledCheckedStyles: disabledCheckedStyles
|
|
22127
22127
|
};
|
|
22128
22128
|
|
|
22129
|
+
var ARROW_LEFT = 37;
|
|
22129
22130
|
var ARROW_UP = 38;
|
|
22130
22131
|
var ARROW_RIGHT = 39;
|
|
22131
22132
|
var ARROW_DOWN = 40;
|
|
@@ -48764,7 +48765,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48764
48765
|
|
|
48765
48766
|
e.preventDefault();
|
|
48766
48767
|
var indexIncrement = e.keyCode == ARROW_RIGHT || e.keyCode == ARROW_DOWN ? 1 : -1;
|
|
48767
|
-
var nextIndex = wrapIndex(i + indexIncrement);
|
|
48768
|
+
var nextIndex = wrapIndex(i + indexIncrement, sections.length);
|
|
48768
48769
|
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();
|
|
48769
48770
|
setFocused((_sections$nextIndex = sections[nextIndex]) === null || _sections$nextIndex === void 0 ? void 0 : _sections$nextIndex.id);
|
|
48770
48771
|
toggleOpenSection((_sections$nextIndex2 = sections[nextIndex]) === null || _sections$nextIndex2 === void 0 ? void 0 : _sections$nextIndex2.id);
|