astra-sdk-web 1.1.25 → 1.1.26

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.
@@ -1737,7 +1737,7 @@ function MobileRoute({ onClose, onNavigate } = {}) {
1737
1737
  ] }) });
1738
1738
  }
1739
1739
  var MobileRoute_default = MobileRoute;
1740
- function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraprotocol.com", sessionId, apiBaseUrl, serverKey } = {}) {
1740
+ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk.astraprotocol.com", sessionId, apiBaseUrl, serverKey } = {}) {
1741
1741
  const [qrUrl, setQrUrl] = React.useState("");
1742
1742
  const [copied, setCopied] = React.useState(false);
1743
1743
  React.useEffect(() => {
@@ -1767,14 +1767,9 @@ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraproto
1767
1767
  }
1768
1768
  }
1769
1769
  };
1770
- const handleClose = () => {
1771
- if (onClose) {
1772
- onClose();
1773
- }
1774
- };
1775
1770
  const handleCheckResult = async () => {
1776
1771
  if (!apiBaseUrl || !sessionId || !serverKey) {
1777
- reactToastify.toast.error("Missing configuration to check KYC result.");
1772
+ reactToastify.toast.warn("Missing configuration to check KYC result.");
1778
1773
  return;
1779
1774
  }
1780
1775
  try {
@@ -1795,69 +1790,55 @@ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraproto
1795
1790
  reactToastify.toast.error(`Result fetch failed: ${msg}`);
1796
1791
  }
1797
1792
  };
1798
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 flex items-center justify-center bg-gradient-to-br from-gray-900 via-gray-800 to-black p-4 sm:p-6 md:p-8 z-[1000]", children: [
1793
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 flex items-center justify-center bg-gradient-to-br from-gray-900 via-gray-800 to-black p-4 sm:p-6 md:p-8 z-[1000]", children: [
1799
1794
  /* @__PURE__ */ jsxRuntime.jsx(reactToastify.ToastContainer, { position: "top-right" }),
1800
1795
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 opacity-10", style: {
1801
1796
  backgroundImage: `radial-gradient(circle at 2px 2px, rgba(255,255,255,0.15) 1px, transparent 0)`,
1802
1797
  backgroundSize: "40px 40px"
1803
1798
  } }),
1804
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative bg-[rgba(20,20,20,0.95)] backdrop-blur-sm rounded-2xl p-5 sm:p-6 md:p-7 max-w-[450px] w-full h-[80vh] flex flex-col text-center shadow-[0_8px_32px_rgba(0,0,0,0.5)] border border-white/10", children: [
1799
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative bg-[rgba(20,20,20,0.95)] backdrop-blur-sm rounded-2xl p-5 sm:p-6 md:p-7 max-w-[450px] w-full h-[80vh] flex flex-col text-center shadow-[0_8px_32px_rgba(0,0,0,0.5)] border border-white/10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4 flex-1 overflow-y-auto custom__scrollbar", children: [
1800
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "m-0 text-white text-xl sm:text-2xl font-semibold leading-tight", children: "Continue on Mobile" }),
1801
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 text-white text-sm sm:text-base opacity-90 leading-relaxed", children: "Scan this QR on your phone to capture your face and document" }),
1802
+ qrUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center p-3 sm:p-4 bg-black rounded-xl border-2 border-white shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
1803
+ qrcode_react.QRCodeSVG,
1804
+ {
1805
+ value: qrUrl,
1806
+ size: 180,
1807
+ level: "H",
1808
+ includeMargin: true,
1809
+ bgColor: "#000000",
1810
+ fgColor: "#FFFFFF"
1811
+ }
1812
+ ) }),
1813
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-left mt-auto", children: [
1814
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 mb-2 text-white text-xs sm:text-sm opacity-80", children: "Or open:" }),
1815
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 p-2 sm:p-3 bg-white/10 rounded-lg border border-white/20", children: [
1816
+ /* @__PURE__ */ jsxRuntime.jsx("code", { className: "flex-1 text-white text-xs sm:text-sm break-all text-left m-0 font-mono line-clamp-1", children: qrUrl }),
1817
+ /* @__PURE__ */ jsxRuntime.jsx(
1818
+ "button",
1819
+ {
1820
+ className: "bg-transparent border-none text-white cursor-pointer p-1.5 flex items-center justify-center rounded transition-colors flex-shrink-0 hover:bg-white/10 active:bg-white/20 self-end sm:self-auto",
1821
+ onClick: handleCopyUrl,
1822
+ "aria-label": "Copy URL",
1823
+ title: copied ? "Copied!" : "Copy URL",
1824
+ children: copied ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1825
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1826
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
1827
+ ] })
1828
+ }
1829
+ )
1830
+ ] })
1831
+ ] }),
1805
1832
  /* @__PURE__ */ jsxRuntime.jsx(
1806
1833
  "button",
1807
1834
  {
1808
- className: "absolute top-5 right-5 bg-transparent border-none text-white cursor-pointer p-2 flex items-center justify-center rounded transition-colors hover:bg-white/10 active:bg-white/20",
1809
- onClick: handleClose,
1810
- "aria-label": "Close",
1811
- children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1812
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
1813
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
1814
- ] })
1835
+ className: "w-full py-3 sm:py-4 px-6 bg-gradient-to-r from-[#FF842D] to-[#FF2D55] border-none rounded-lg text-white text-sm sm:text-base font-semibold cursor-pointer transition-all hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(255,107,53,0.4)] active:translate-y-0",
1836
+ onClick: handleCheckResult,
1837
+ children: "I've completed on mobile - Move to next step"
1815
1838
  }
1816
- ),
1817
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4 flex-1 overflow-y-auto custom__scrollbar", children: [
1818
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "m-0 text-white text-xl sm:text-2xl font-semibold leading-tight", children: "Continue on Mobile" }),
1819
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 text-white text-sm sm:text-base opacity-90 leading-relaxed", children: "Scan this QR on your phone to capture your face and document" }),
1820
- qrUrl && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center p-3 sm:p-4 bg-black rounded-xl border-2 border-white shadow-lg", children: /* @__PURE__ */ jsxRuntime.jsx(
1821
- qrcode_react.QRCodeSVG,
1822
- {
1823
- value: qrUrl,
1824
- size: 180,
1825
- level: "H",
1826
- includeMargin: true,
1827
- bgColor: "#000000",
1828
- fgColor: "#FFFFFF"
1829
- }
1830
- ) }),
1831
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-left mt-auto", children: [
1832
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 mb-2 text-white text-xs sm:text-sm opacity-80", children: "Or open:" }),
1833
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row items-start sm:items-center gap-2 p-2 sm:p-3 bg-white/10 rounded-lg border border-white/20", children: [
1834
- /* @__PURE__ */ jsxRuntime.jsx("code", { className: "flex-1 text-white text-xs sm:text-sm break-all text-left m-0 font-mono", children: qrUrl }),
1835
- /* @__PURE__ */ jsxRuntime.jsx(
1836
- "button",
1837
- {
1838
- className: "bg-transparent border-none text-white cursor-pointer p-1.5 flex items-center justify-center rounded transition-colors flex-shrink-0 hover:bg-white/10 active:bg-white/20 self-end sm:self-auto",
1839
- onClick: handleCopyUrl,
1840
- "aria-label": "Copy URL",
1841
- title: copied ? "Copied!" : "Copy URL",
1842
- children: copied ? /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1843
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
1844
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
1845
- ] })
1846
- }
1847
- )
1848
- ] })
1849
- ] }),
1850
- /* @__PURE__ */ jsxRuntime.jsx(
1851
- "button",
1852
- {
1853
- className: "w-full py-3 sm:py-4 px-6 bg-gradient-to-r from-[#FF842D] to-[#FF2D55] border-none rounded-lg text-white text-sm sm:text-base font-semibold cursor-pointer transition-all hover:-translate-y-0.5 hover:shadow-[0_4px_12px_rgba(255,107,53,0.4)] active:translate-y-0",
1854
- onClick: handleCheckResult,
1855
- children: "I've completed on mobile - Move to next step"
1856
- }
1857
- )
1858
- ] })
1859
- ] })
1860
- ] });
1839
+ )
1840
+ ] }) })
1841
+ ] }) });
1861
1842
  }
1862
1843
  var QRCodePage_default = QRCodePage;
1863
1844
  var KycFlow = ({