pge-front-common 14.0.44 → 14.0.46
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/lib/index.esm.js +86 -51
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +86 -51
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -774,7 +774,7 @@ var css_248z$s = ".header-module__separator_background___lYfCd {\r\n background
|
|
|
774
774
|
var styles$p = {"separator_background":"header-module__separator_background___lYfCd","container":"header-module__container___eaqPg","wrapperMenu":"header-module__wrapperMenu___m5rLa","iconLogo":"header-module__iconLogo___pcEoN","verticalDivider":"header-module__verticalDivider___4JMWc","containerHeaderIndex":"header-module__containerHeaderIndex___ueqa-","set_shadow":"header-module__set_shadow___UUN7Y","limitedWidth":"header-module__limitedWidth___fsCel","iconLogoCASC":"header-module__iconLogoCASC___3YUG6","iconLogoPGE":"header-module__iconLogoPGE___HK3gX","responsiveCASC":"header-module__responsiveCASC___KL8jM","IconMenu":"header-module__IconMenu___7JWj-"};
|
|
775
775
|
styleInject(css_248z$s);
|
|
776
776
|
|
|
777
|
-
var css_248z$r = ".dropdown-module__dropdown___EIaq- {\r\n position: absolute;\r\n border: 1px solid rgb(197, 197, 197);\r\n background: var(--header-bg-dropdown);\r\n padding: 8px 0;\r\n color: #0062cc;\r\n border-radius: 4px;\r\n z-index: 400;\r\n min-width: 280px;\r\n box-shadow: rgba(197, 164, 164, 0.35) 0px 5px 15px;\r\n cursor: pointer;\r\n}\r\n\r\n.dropdown-module__primaryDropdown___I7kas {\r\n margin: 0;\r\n padding: 0.375rem 0.88rem 0.88rem 0.88rem;\r\n min-width: 280px;\r\n color: var(--header-font-dropdown);\r\n font-size: var(--font-size-16, 16px);\r\n font-weight: 600;\r\n text-align: left;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n cursor: pointer;\r\n min-height: 50px;\r\n border: none;\r\n\r\n -webkit-appearance: button;\r\n background-color: transparent;\r\n background-image: none;\r\n}\r\n\r\n.dropdown-module__primaryDropdown___I7kas:hover {\r\n background-color: var(--header-hover-dropdown);\r\n width: 100%;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__disabled___McFgs {\r\n color: #c3c3c3;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__home___4Odwr {\r\n font-weight: 700;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__submenu___eXCiN {\r\n font-size: var(--font-size-16, 16px);\r\n line-height: 24px;\r\n text-align: left;\r\n padding-left: 30px;\r\n font-weight: 100;\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89 {\r\n transition: transform 0.3s ease;\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89.dropdown-module__active___RRrmk {\r\n transform: rotate(0deg);\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89.dropdown-module__inactive___AQdLm {\r\n transform: rotate(180deg);\r\n}\r\n";
|
|
777
|
+
var css_248z$r = ".dropdown-module__dropdown___EIaq- {\r\n position: absolute;\r\n border: 1px solid rgb(197, 197, 197);\r\n background: var(--header-bg-dropdown);\r\n padding: 8px 0;\r\n color: #0062cc;\r\n border-radius: 4px;\r\n z-index: 400;\r\n min-width: 280px;\r\n box-shadow: rgba(197, 164, 164, 0.35) 0px 5px 15px;\r\n cursor: pointer;\r\n margin-right: 5px;\r\n}\r\n\r\n.dropdown-module__primaryDropdown___I7kas {\r\n margin: 0;\r\n padding: 0.375rem 0.88rem 0.88rem 0.88rem;\r\n min-width: 280px;\r\n color: var(--header-font-dropdown);\r\n font-size: var(--font-size-16, 16px);\r\n font-weight: 600;\r\n text-align: left;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n cursor: pointer;\r\n min-height: 50px;\r\n border: none;\r\n\r\n -webkit-appearance: button;\r\n background-color: transparent;\r\n background-image: none;\r\n}\r\n\r\n.dropdown-module__primaryDropdown___I7kas:hover {\r\n background-color: var(--header-hover-dropdown);\r\n width: 100%;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__disabled___McFgs {\r\n color: #c3c3c3;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__home___4Odwr {\r\n font-weight: 700;\r\n}\r\n\r\n.dropdown-module__primaryDropdown__submenu___eXCiN {\r\n font-size: var(--font-size-16, 16px);\r\n line-height: 24px;\r\n text-align: left;\r\n padding-left: 30px;\r\n font-weight: 100;\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89 {\r\n transition: transform 0.3s ease;\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89.dropdown-module__active___RRrmk {\r\n transform: rotate(0deg);\r\n}\r\n\r\n.dropdown-module__contentIcon___aqI89.dropdown-module__inactive___AQdLm {\r\n transform: rotate(180deg);\r\n}\r\n";
|
|
778
778
|
var styles$o = {"dropdown":"dropdown-module__dropdown___EIaq-","primaryDropdown":"dropdown-module__primaryDropdown___I7kas","primaryDropdown__disabled":"dropdown-module__primaryDropdown__disabled___McFgs","primaryDropdown__home":"dropdown-module__primaryDropdown__home___4Odwr","primaryDropdown__submenu":"dropdown-module__primaryDropdown__submenu___eXCiN","contentIcon":"dropdown-module__contentIcon___aqI89","active":"dropdown-module__active___RRrmk","inactive":"dropdown-module__inactive___AQdLm"};
|
|
779
779
|
styleInject(css_248z$r);
|
|
780
780
|
|
|
@@ -23723,73 +23723,108 @@ var TooltipWithPortal = function (_a) {
|
|
|
23723
23723
|
var visible = internalVisible || forceVisible;
|
|
23724
23724
|
var PADDING = 8;
|
|
23725
23725
|
useEffect(function () {
|
|
23726
|
-
var handleResize = function () {
|
|
23726
|
+
var handleResize = function () {
|
|
23727
|
+
setIsMobile(window.innerWidth <= 480);
|
|
23728
|
+
};
|
|
23727
23729
|
handleResize();
|
|
23728
23730
|
window.addEventListener("resize", handleResize);
|
|
23729
|
-
return function () {
|
|
23731
|
+
return function () {
|
|
23732
|
+
window.removeEventListener("resize", handleResize);
|
|
23733
|
+
};
|
|
23730
23734
|
}, []);
|
|
23731
23735
|
useEffect(function () {
|
|
23732
23736
|
if (!visible || !targetRef.current || !tooltipRef.current)
|
|
23733
23737
|
return;
|
|
23734
|
-
var
|
|
23735
|
-
|
|
23736
|
-
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
|
|
23741
|
-
|
|
23742
|
-
|
|
23743
|
-
|
|
23744
|
-
|
|
23745
|
-
|
|
23746
|
-
|
|
23747
|
-
|
|
23738
|
+
var updatePosition = function () {
|
|
23739
|
+
var rect = targetRef.current.getBoundingClientRect();
|
|
23740
|
+
var tipRect = tooltipRef.current.getBoundingClientRect();
|
|
23741
|
+
var scrollY = window.scrollY || window.pageYOffset;
|
|
23742
|
+
var scrollX = window.scrollX || window.pageXOffset;
|
|
23743
|
+
var vw = window.innerWidth;
|
|
23744
|
+
var vh = window.innerHeight;
|
|
23745
|
+
var top;
|
|
23746
|
+
var left;
|
|
23747
|
+
if (isMobile) {
|
|
23748
|
+
var tooltipHeight = tipRect.height;
|
|
23749
|
+
var availableBelow = vh - rect.bottom;
|
|
23750
|
+
var availableAbove = rect.top;
|
|
23751
|
+
if (availableBelow < tooltipHeight + PADDING && availableAbove > tooltipHeight + PADDING) {
|
|
23752
|
+
top = rect.top + scrollY - tooltipHeight - PADDING;
|
|
23753
|
+
}
|
|
23754
|
+
else {
|
|
23755
|
+
top = rect.bottom + scrollY + PADDING;
|
|
23756
|
+
}
|
|
23757
|
+
left = rect.left + scrollX + rect.width / 2 - tipRect.width / 2;
|
|
23748
23758
|
}
|
|
23749
23759
|
else {
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
23760
|
+
var tooltipHeight = tipRect.height;
|
|
23761
|
+
var availableBelow = vh - rect.bottom;
|
|
23762
|
+
if (availableBelow < tooltipHeight + PADDING && rect.top > tooltipHeight + PADDING) {
|
|
23763
|
+
top = rect.top + scrollY - tooltipHeight - PADDING;
|
|
23764
|
+
}
|
|
23765
|
+
else {
|
|
23766
|
+
top = rect.bottom + scrollY + PADDING;
|
|
23767
|
+
}
|
|
23768
|
+
left = rect.left + scrollX;
|
|
23759
23769
|
}
|
|
23760
|
-
|
|
23761
|
-
|
|
23770
|
+
left = Math.max(PADDING + scrollX, left);
|
|
23771
|
+
if (left + tipRect.width + PADDING > scrollX + vw) {
|
|
23772
|
+
left = scrollX + vw - tipRect.width - PADDING;
|
|
23762
23773
|
}
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
|
|
23777
|
-
|
|
23778
|
-
|
|
23779
|
-
|
|
23780
|
-
|
|
23781
|
-
|
|
23782
|
-
|
|
23783
|
-
|
|
23784
|
-
|
|
23774
|
+
var minTop = PADDING + scrollY;
|
|
23775
|
+
var maxTop = scrollY + vh - tipRect.height - PADDING;
|
|
23776
|
+
top = Math.min(Math.max(top, minTop), maxTop);
|
|
23777
|
+
setTooltipStyle({
|
|
23778
|
+
position: "absolute",
|
|
23779
|
+
top: top,
|
|
23780
|
+
left: left,
|
|
23781
|
+
zIndex: 2000,
|
|
23782
|
+
maxWidth: isMobile ? "92vw" : 480,
|
|
23783
|
+
width: isMobile ? "auto" : undefined,
|
|
23784
|
+
padding: isMobile ? "14px 12px" : undefined,
|
|
23785
|
+
overflowY: isMobile ? "auto" : undefined,
|
|
23786
|
+
borderRadius: isMobile ? 10 : undefined,
|
|
23787
|
+
maxHeight: isMobile ? vh * 0.6 : undefined,
|
|
23788
|
+
transform: isMobile ? "none" : undefined,
|
|
23789
|
+
});
|
|
23790
|
+
};
|
|
23791
|
+
updatePosition();
|
|
23792
|
+
window.addEventListener("scroll", updatePosition);
|
|
23793
|
+
document.addEventListener("scroll", updatePosition, true);
|
|
23794
|
+
document.addEventListener("touchmove", updatePosition, { passive: true });
|
|
23795
|
+
return function () {
|
|
23796
|
+
window.removeEventListener("scroll", updatePosition);
|
|
23797
|
+
document.removeEventListener("scroll", updatePosition, true);
|
|
23798
|
+
document.removeEventListener("touchmove", updatePosition);
|
|
23799
|
+
};
|
|
23785
23800
|
}, [visible, isMobile, text]);
|
|
23801
|
+
useEffect(function () {
|
|
23802
|
+
if (!visible)
|
|
23803
|
+
return;
|
|
23804
|
+
var handleClickOutside = function (e) {
|
|
23805
|
+
var targetNode = e.target;
|
|
23806
|
+
if (targetRef.current &&
|
|
23807
|
+
tooltipRef.current &&
|
|
23808
|
+
!targetRef.current.contains(targetNode) &&
|
|
23809
|
+
!tooltipRef.current.contains(targetNode)) {
|
|
23810
|
+
setInternalVisible(false);
|
|
23811
|
+
}
|
|
23812
|
+
};
|
|
23813
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
23814
|
+
document.addEventListener("touchstart", handleClickOutside);
|
|
23815
|
+
return function () {
|
|
23816
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
23817
|
+
document.removeEventListener("touchstart", handleClickOutside);
|
|
23818
|
+
};
|
|
23819
|
+
}, [visible]);
|
|
23786
23820
|
var onMouseEnter = function () { return !isMobile && setInternalVisible(true); };
|
|
23787
23821
|
var onMouseLeave = function () { return !isMobile && setInternalVisible(false); };
|
|
23788
23822
|
var onTouch = function () { return isMobile && setInternalVisible(function (v) { return !v; }); };
|
|
23789
23823
|
var onClick = function () { return !isMobile && setInternalVisible(function (v) { return !v; }); };
|
|
23790
23824
|
return (React__default.createElement(React__default.Fragment, null,
|
|
23791
23825
|
React__default.createElement("div", { ref: targetRef, className: styles$2.container, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onTouchStart: onTouch, onClick: onClick, role: "button", "aria-haspopup": "true", "aria-expanded": visible }, children),
|
|
23792
|
-
visible &&
|
|
23826
|
+
visible &&
|
|
23827
|
+
typeof window !== "undefined" &&
|
|
23793
23828
|
ReactDOM__default.createPortal(React__default.createElement("div", { ref: tooltipRef, className: styles$2.tooltip, style: tooltipStyle, "aria-hidden": !visible },
|
|
23794
23829
|
React__default.createElement("span", { className: styles$2.textContent }, text)), document.body)));
|
|
23795
23830
|
};
|