astra-sdk-web 1.1.25 → 1.1.27

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.
@@ -1942,7 +1942,7 @@ function MobileRoute({ onClose, onNavigate } = {}) {
1942
1942
  ] }) });
1943
1943
  }
1944
1944
  var MobileRoute_default = MobileRoute;
1945
- function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraprotocol.com", sessionId, apiBaseUrl, serverKey } = {}) {
1945
+ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk.astraprotocol.com", sessionId, apiBaseUrl, serverKey } = {}) {
1946
1946
  const [qrUrl, setQrUrl] = React.useState("");
1947
1947
  const [copied, setCopied] = React.useState(false);
1948
1948
  React.useEffect(() => {
@@ -1972,14 +1972,9 @@ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraproto
1972
1972
  }
1973
1973
  }
1974
1974
  };
1975
- const handleClose = () => {
1976
- if (onClose) {
1977
- onClose();
1978
- }
1979
- };
1980
1975
  const handleCheckResult = async () => {
1981
1976
  if (!apiBaseUrl || !sessionId || !serverKey) {
1982
- reactToastify.toast.error("Missing configuration to check KYC result.");
1977
+ reactToastify.toast.warn("Missing configuration to check KYC result.");
1983
1978
  return;
1984
1979
  }
1985
1980
  try {
@@ -2000,69 +1995,55 @@ function QRCodePage({ onClose, mobileBaseUrl = "https://kyc-sdk-stage.astraproto
2000
1995
  reactToastify.toast.error(`Result fetch failed: ${msg}`);
2001
1996
  }
2002
1997
  };
2003
- 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: [
1998
+ 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: [
2004
1999
  /* @__PURE__ */ jsxRuntime.jsx(reactToastify.ToastContainer, { position: "top-right" }),
2005
2000
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 opacity-10", style: {
2006
2001
  backgroundImage: `radial-gradient(circle at 2px 2px, rgba(255,255,255,0.15) 1px, transparent 0)`,
2007
2002
  backgroundSize: "40px 40px"
2008
2003
  } }),
2009
- /* @__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: [
2004
+ /* @__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)]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4 flex-1 overflow-y-auto custom__scrollbar", children: [
2005
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "m-0 text-white text-xl sm:text-2xl font-semibold leading-tight", children: "Continue on Mobile" }),
2006
+ /* @__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" }),
2007
+ 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(
2008
+ qrcode_react.QRCodeSVG,
2009
+ {
2010
+ value: qrUrl,
2011
+ size: 180,
2012
+ level: "H",
2013
+ includeMargin: true,
2014
+ bgColor: "#000000",
2015
+ fgColor: "#FFFFFF"
2016
+ }
2017
+ ) }),
2018
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-left mt-auto", children: [
2019
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 mb-2 text-white text-xs sm:text-sm opacity-80", children: "Or open:" }),
2020
+ /* @__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: [
2021
+ /* @__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 }),
2022
+ /* @__PURE__ */ jsxRuntime.jsx(
2023
+ "button",
2024
+ {
2025
+ 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",
2026
+ onClick: handleCopyUrl,
2027
+ "aria-label": "Copy URL",
2028
+ title: copied ? "Copied!" : "Copy URL",
2029
+ 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: [
2030
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
2031
+ /* @__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" })
2032
+ ] })
2033
+ }
2034
+ )
2035
+ ] })
2036
+ ] }),
2010
2037
  /* @__PURE__ */ jsxRuntime.jsx(
2011
2038
  "button",
2012
2039
  {
2013
- 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",
2014
- onClick: handleClose,
2015
- "aria-label": "Close",
2016
- children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
2017
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
2018
- /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
2019
- ] })
2040
+ 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",
2041
+ onClick: handleCheckResult,
2042
+ children: "I've completed on mobile - Move to next step"
2020
2043
  }
2021
- ),
2022
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4 flex-1 overflow-y-auto custom__scrollbar", children: [
2023
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "m-0 text-white text-xl sm:text-2xl font-semibold leading-tight", children: "Continue on Mobile" }),
2024
- /* @__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" }),
2025
- 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(
2026
- qrcode_react.QRCodeSVG,
2027
- {
2028
- value: qrUrl,
2029
- size: 180,
2030
- level: "H",
2031
- includeMargin: true,
2032
- bgColor: "#000000",
2033
- fgColor: "#FFFFFF"
2034
- }
2035
- ) }),
2036
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-left mt-auto", children: [
2037
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 mb-2 text-white text-xs sm:text-sm opacity-80", children: "Or open:" }),
2038
- /* @__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: [
2039
- /* @__PURE__ */ jsxRuntime.jsx("code", { className: "flex-1 text-white text-xs sm:text-sm break-all text-left m-0 font-mono", children: qrUrl }),
2040
- /* @__PURE__ */ jsxRuntime.jsx(
2041
- "button",
2042
- {
2043
- 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",
2044
- onClick: handleCopyUrl,
2045
- "aria-label": "Copy URL",
2046
- title: copied ? "Copied!" : "Copy URL",
2047
- 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: [
2048
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
2049
- /* @__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" })
2050
- ] })
2051
- }
2052
- )
2053
- ] })
2054
- ] }),
2055
- /* @__PURE__ */ jsxRuntime.jsx(
2056
- "button",
2057
- {
2058
- 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",
2059
- onClick: handleCheckResult,
2060
- children: "I've completed on mobile - Move to next step"
2061
- }
2062
- )
2063
- ] })
2064
- ] })
2065
- ] });
2044
+ )
2045
+ ] }) })
2046
+ ] }) });
2066
2047
  }
2067
2048
  var QRCodePage_default = QRCodePage;
2068
2049
  var KycFlow = ({