@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
package/dist/harmonic.esm.js
CHANGED
|
@@ -6153,8 +6153,6 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6153
6153
|
bottomBorder = _ref$bottomBorder === void 0 ? false : _ref$bottomBorder,
|
|
6154
6154
|
_ref$withShadow = _ref.withShadow,
|
|
6155
6155
|
withShadow = _ref$withShadow === void 0 ? false : _ref$withShadow,
|
|
6156
|
-
_ref$offsetHeight = _ref.offsetHeight,
|
|
6157
|
-
offsetHeight = _ref$offsetHeight === void 0 ? 0 : _ref$offsetHeight,
|
|
6158
6156
|
className = _ref.className;
|
|
6159
6157
|
var tabListRef = useRef(null);
|
|
6160
6158
|
var wrapperRef = useRef(null);
|
|
@@ -6176,26 +6174,15 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6176
6174
|
return id === selectedItem;
|
|
6177
6175
|
};
|
|
6178
6176
|
var onClickTab = function onClickTab(e, id) {
|
|
6179
|
-
e.preventDefault();
|
|
6180
6177
|
if (onTabClick) {
|
|
6181
6178
|
onTabClick(e, id);
|
|
6182
6179
|
}
|
|
6183
6180
|
setSelectedItem(id);
|
|
6184
|
-
};
|
|
6185
|
-
useEffect(function () {
|
|
6186
|
-
if (!selectedItem) return;
|
|
6187
|
-
var targetSectionElement = document.getElementById(selectedItem);
|
|
6188
|
-
if (targetSectionElement) {
|
|
6189
|
-
var sectionTop = targetSectionElement.getBoundingClientRect().top;
|
|
6190
|
-
var scrollPosition = window.scrollY + sectionTop - offsetHeight;
|
|
6191
|
-
// Instant scroll
|
|
6192
|
-
window.scrollTo(0, scrollPosition);
|
|
6193
|
-
}
|
|
6194
6181
|
var clickedTab = document.getElementById("tablink-" + selectedItem);
|
|
6195
6182
|
if (clickedTab) {
|
|
6196
6183
|
clickedTab.focus();
|
|
6197
6184
|
}
|
|
6198
|
-
}
|
|
6185
|
+
};
|
|
6199
6186
|
var getScrollWidth = function getScrollWidth() {
|
|
6200
6187
|
var width = 0;
|
|
6201
6188
|
var selectedItemIndex = tabs.findIndex(function (el) {
|