@royaloperahouse/harmonic 0.11.0-n → 0.11.0-p
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/harmonic.cjs.development.js +1 -14
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +1 -14
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/navigation.d.ts +0 -2
- package/package.json +1 -1
|
@@ -6112,8 +6112,6 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6112
6112
|
bottomBorder = _ref$bottomBorder === void 0 ? false : _ref$bottomBorder,
|
|
6113
6113
|
_ref$withShadow = _ref.withShadow,
|
|
6114
6114
|
withShadow = _ref$withShadow === void 0 ? false : _ref$withShadow,
|
|
6115
|
-
_ref$offsetHeight = _ref.offsetHeight,
|
|
6116
|
-
offsetHeight = _ref$offsetHeight === void 0 ? 0 : _ref$offsetHeight,
|
|
6117
6115
|
className = _ref.className;
|
|
6118
6116
|
var tabListRef = React.useRef(null);
|
|
6119
6117
|
var wrapperRef = React.useRef(null);
|
|
@@ -6135,26 +6133,15 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6135
6133
|
return id === selectedItem;
|
|
6136
6134
|
};
|
|
6137
6135
|
var onClickTab = function onClickTab(e, id) {
|
|
6138
|
-
e.preventDefault();
|
|
6139
6136
|
if (onTabClick) {
|
|
6140
6137
|
onTabClick(e, id);
|
|
6141
6138
|
}
|
|
6142
6139
|
setSelectedItem(id);
|
|
6143
|
-
};
|
|
6144
|
-
React.useEffect(function () {
|
|
6145
|
-
if (!selectedItem) return;
|
|
6146
|
-
var targetSectionElement = document.getElementById(selectedItem);
|
|
6147
|
-
if (targetSectionElement) {
|
|
6148
|
-
var sectionTop = targetSectionElement.getBoundingClientRect().top;
|
|
6149
|
-
var scrollPosition = window.scrollY + sectionTop - offsetHeight;
|
|
6150
|
-
// Instant scroll
|
|
6151
|
-
window.scrollTo(0, scrollPosition);
|
|
6152
|
-
}
|
|
6153
6140
|
var clickedTab = document.getElementById("tablink-" + selectedItem);
|
|
6154
6141
|
if (clickedTab) {
|
|
6155
6142
|
clickedTab.focus();
|
|
6156
6143
|
}
|
|
6157
|
-
}
|
|
6144
|
+
};
|
|
6158
6145
|
var getScrollWidth = function getScrollWidth() {
|
|
6159
6146
|
var width = 0;
|
|
6160
6147
|
var selectedItemIndex = tabs.findIndex(function (el) {
|