analytica-frontend-lib 1.1.87 → 1.1.89

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.
@@ -1706,14 +1706,34 @@ var Modal = ({
1706
1706
  return () => document.removeEventListener("keydown", handleEscape);
1707
1707
  }, [isOpen, closeOnEscape, onClose]);
1708
1708
  useEffect3(() => {
1709
+ if (!isOpen) return;
1710
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
1709
1711
  const originalOverflow = document.body.style.overflow;
1710
- if (isOpen) {
1711
- document.body.style.overflow = "hidden";
1712
- } else {
1713
- document.body.style.overflow = originalOverflow;
1712
+ const originalPaddingRight = document.body.style.paddingRight;
1713
+ document.body.style.overflow = "hidden";
1714
+ if (scrollbarWidth > 0) {
1715
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
1716
+ const overlay = document.createElement("div");
1717
+ overlay.id = "modal-scrollbar-overlay";
1718
+ overlay.style.cssText = `
1719
+ position: fixed;
1720
+ top: 0;
1721
+ right: 0;
1722
+ width: ${scrollbarWidth}px;
1723
+ height: 100vh;
1724
+ background-color: rgb(0 0 0 / 0.6);
1725
+ z-index: 40;
1726
+ pointer-events: none;
1727
+ `;
1728
+ document.body.appendChild(overlay);
1714
1729
  }
1715
1730
  return () => {
1716
1731
  document.body.style.overflow = originalOverflow;
1732
+ document.body.style.paddingRight = originalPaddingRight;
1733
+ const overlay = document.getElementById("modal-scrollbar-overlay");
1734
+ if (overlay) {
1735
+ overlay.remove();
1736
+ }
1717
1737
  };
1718
1738
  }, [isOpen]);
1719
1739
  if (!isOpen) return null;
@@ -5971,18 +5991,14 @@ var QuizFooter = forwardRef11(
5971
5991
  ] })
5972
5992
  ] }),
5973
5993
  /* @__PURE__ */ jsxs17("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
5974
- /* @__PURE__ */ jsxs17(
5994
+ /* @__PURE__ */ jsx21(
5975
5995
  Button_default,
5976
5996
  {
5977
5997
  variant: "outline",
5978
5998
  className: "w-full",
5979
5999
  size: "small",
5980
6000
  onClick: onGoToSimulated,
5981
- children: [
5982
- "Ir para ",
5983
- quizTypeLabel.toLocaleLowerCase(),
5984
- "s"
5985
- ]
6001
+ children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
5986
6002
  }
5987
6003
  ),
5988
6004
  /* @__PURE__ */ jsx21(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })