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.
@@ -1730,14 +1730,34 @@ var Modal = ({
1730
1730
  return () => document.removeEventListener("keydown", handleEscape);
1731
1731
  }, [isOpen, closeOnEscape, onClose]);
1732
1732
  (0, import_react5.useEffect)(() => {
1733
+ if (!isOpen) return;
1734
+ const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
1733
1735
  const originalOverflow = document.body.style.overflow;
1734
- if (isOpen) {
1735
- document.body.style.overflow = "hidden";
1736
- } else {
1737
- document.body.style.overflow = originalOverflow;
1736
+ const originalPaddingRight = document.body.style.paddingRight;
1737
+ document.body.style.overflow = "hidden";
1738
+ if (scrollbarWidth > 0) {
1739
+ document.body.style.paddingRight = `${scrollbarWidth}px`;
1740
+ const overlay = document.createElement("div");
1741
+ overlay.id = "modal-scrollbar-overlay";
1742
+ overlay.style.cssText = `
1743
+ position: fixed;
1744
+ top: 0;
1745
+ right: 0;
1746
+ width: ${scrollbarWidth}px;
1747
+ height: 100vh;
1748
+ background-color: rgb(0 0 0 / 0.6);
1749
+ z-index: 40;
1750
+ pointer-events: none;
1751
+ `;
1752
+ document.body.appendChild(overlay);
1738
1753
  }
1739
1754
  return () => {
1740
1755
  document.body.style.overflow = originalOverflow;
1756
+ document.body.style.paddingRight = originalPaddingRight;
1757
+ const overlay = document.getElementById("modal-scrollbar-overlay");
1758
+ if (overlay) {
1759
+ overlay.remove();
1760
+ }
1741
1761
  };
1742
1762
  }, [isOpen]);
1743
1763
  if (!isOpen) return null;
@@ -5946,18 +5966,14 @@ var QuizFooter = (0, import_react14.forwardRef)(
5946
5966
  ] })
5947
5967
  ] }),
5948
5968
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
5949
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
5969
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
5950
5970
  Button_default,
5951
5971
  {
5952
5972
  variant: "outline",
5953
5973
  className: "w-full",
5954
5974
  size: "small",
5955
5975
  onClick: onGoToSimulated,
5956
- children: [
5957
- "Ir para ",
5958
- quizTypeLabel.toLocaleLowerCase(),
5959
- "s"
5960
- ]
5976
+ children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
5961
5977
  }
5962
5978
  ),
5963
5979
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })