@loafmarkets/ui 0.1.17 → 0.1.19
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/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +110 -50
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +110 -50
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -470,6 +470,14 @@ type LoginPopupProps = {
|
|
|
470
470
|
onKycStart?: () => Promise<{
|
|
471
471
|
passed: boolean;
|
|
472
472
|
}> | void;
|
|
473
|
+
/**
|
|
474
|
+
* Render prop for embedding an inline KYC widget (e.g. Sumsub). When provided, clicking
|
|
475
|
+
* "KYC me now" will display this widget inside the popup. The callback should be invoked
|
|
476
|
+
* when the verification flow completes.
|
|
477
|
+
*/
|
|
478
|
+
renderKycWidget?: (onResult: (result: {
|
|
479
|
+
passed: boolean;
|
|
480
|
+
}) => void) => React__default.ReactNode;
|
|
473
481
|
/**
|
|
474
482
|
* Handler called when the user clicks "Fund my account". Should open the funding UI (e.g. Coinbase onramp)
|
|
475
483
|
* and resolve with { funded: boolean } when the user exits.
|
|
@@ -503,7 +511,6 @@ type HeaderProps = {
|
|
|
503
511
|
onLogout?: () => Promise<void> | void;
|
|
504
512
|
onSignInClick?: () => void;
|
|
505
513
|
loginPopupComponent?: React__default.ComponentType<HeaderLoginPopupComponentProps>;
|
|
506
|
-
tradeUrl?: string;
|
|
507
514
|
tradePath?: string;
|
|
508
515
|
homePath?: string;
|
|
509
516
|
aboutPath?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -470,6 +470,14 @@ type LoginPopupProps = {
|
|
|
470
470
|
onKycStart?: () => Promise<{
|
|
471
471
|
passed: boolean;
|
|
472
472
|
}> | void;
|
|
473
|
+
/**
|
|
474
|
+
* Render prop for embedding an inline KYC widget (e.g. Sumsub). When provided, clicking
|
|
475
|
+
* "KYC me now" will display this widget inside the popup. The callback should be invoked
|
|
476
|
+
* when the verification flow completes.
|
|
477
|
+
*/
|
|
478
|
+
renderKycWidget?: (onResult: (result: {
|
|
479
|
+
passed: boolean;
|
|
480
|
+
}) => void) => React__default.ReactNode;
|
|
473
481
|
/**
|
|
474
482
|
* Handler called when the user clicks "Fund my account". Should open the funding UI (e.g. Coinbase onramp)
|
|
475
483
|
* and resolve with { funded: boolean } when the user exits.
|
|
@@ -503,7 +511,6 @@ type HeaderProps = {
|
|
|
503
511
|
onLogout?: () => Promise<void> | void;
|
|
504
512
|
onSignInClick?: () => void;
|
|
505
513
|
loginPopupComponent?: React__default.ComponentType<HeaderLoginPopupComponentProps>;
|
|
506
|
-
tradeUrl?: string;
|
|
507
514
|
tradePath?: string;
|
|
508
515
|
homePath?: string;
|
|
509
516
|
aboutPath?: string;
|
package/dist/index.js
CHANGED
|
@@ -4437,16 +4437,13 @@ var PriceBlock = styled23__default.default.span`
|
|
|
4437
4437
|
border-left: 1px solid rgba(255, 255, 255, 0.25);
|
|
4438
4438
|
min-height: 1.5rem;
|
|
4439
4439
|
`;
|
|
4440
|
-
var DEFAULT_TRADE_URL = "https://loafx-frontend-web.vercel.app/";
|
|
4441
4440
|
var DEFAULT_TRADE_PATH = "/trade";
|
|
4442
4441
|
var DEFAULT_HOME_PATH = "/";
|
|
4443
4442
|
var DEFAULT_ABOUT_PATH = "/about";
|
|
4444
4443
|
var DEFAULT_LEARN_PATH = "/learn";
|
|
4445
|
-
var DEFAULT_OFFERINGS_PATH = "/ipo/musgrave";
|
|
4446
4444
|
var DEFAULT_PROPERTY_MAP_PATH = "/map";
|
|
4447
4445
|
var DEFAULT_PORTFOLIO_PATH = "/portfolio";
|
|
4448
4446
|
var DEFAULT_LOAF_LIQUIDITY_PATH = "/loaf-liquidity";
|
|
4449
|
-
var DEFAULT_AUTH_LOGIN_URL = "http://localhost:5174/";
|
|
4450
4447
|
var DEFAULT_AUTH_RETURN_PARAM = "returnTo";
|
|
4451
4448
|
var LOGIN_POPUP_EVENT = "loaf:open-login-popup";
|
|
4452
4449
|
var Header = ({
|
|
@@ -4458,16 +4455,15 @@ var Header = ({
|
|
|
4458
4455
|
onLogout,
|
|
4459
4456
|
onSignInClick,
|
|
4460
4457
|
loginPopupComponent: LoginPopupComponent,
|
|
4461
|
-
tradeUrl = DEFAULT_TRADE_URL,
|
|
4462
4458
|
tradePath = DEFAULT_TRADE_PATH,
|
|
4463
4459
|
homePath = DEFAULT_HOME_PATH,
|
|
4464
4460
|
aboutPath = DEFAULT_ABOUT_PATH,
|
|
4465
4461
|
learnPath = DEFAULT_LEARN_PATH,
|
|
4466
|
-
offeringsPath
|
|
4462
|
+
offeringsPath,
|
|
4467
4463
|
propertyMapPath = DEFAULT_PROPERTY_MAP_PATH,
|
|
4468
4464
|
portfolioPath = DEFAULT_PORTFOLIO_PATH,
|
|
4469
4465
|
loafLiquidityPath = DEFAULT_LOAF_LIQUIDITY_PATH,
|
|
4470
|
-
authLoginUrl
|
|
4466
|
+
authLoginUrl,
|
|
4471
4467
|
authReturnParam = DEFAULT_AUTH_RETURN_PARAM,
|
|
4472
4468
|
getAuthReturnUrl,
|
|
4473
4469
|
logoHref,
|
|
@@ -4563,7 +4559,7 @@ var Header = ({
|
|
|
4563
4559
|
onLoafLiquidityClick();
|
|
4564
4560
|
return;
|
|
4565
4561
|
}
|
|
4566
|
-
performNavigation(
|
|
4562
|
+
performNavigation(resolvedLoafLiquidityPath);
|
|
4567
4563
|
};
|
|
4568
4564
|
const handleTradeNavigation = () => {
|
|
4569
4565
|
closeMenus();
|
|
@@ -4571,9 +4567,7 @@ var Header = ({
|
|
|
4571
4567
|
onTradeClick();
|
|
4572
4568
|
return;
|
|
4573
4569
|
}
|
|
4574
|
-
|
|
4575
|
-
window.location.href = tradeUrl;
|
|
4576
|
-
}
|
|
4570
|
+
performNavigation(resolvedTradePath);
|
|
4577
4571
|
};
|
|
4578
4572
|
const handleLogoutClick = async (event) => {
|
|
4579
4573
|
event?.preventDefault();
|
|
@@ -4602,7 +4596,9 @@ var Header = ({
|
|
|
4602
4596
|
onNavigate("/portfolio");
|
|
4603
4597
|
}
|
|
4604
4598
|
};
|
|
4605
|
-
const
|
|
4599
|
+
const rawDisplayName = currentUser?.displayName;
|
|
4600
|
+
const normalizedDisplayName = typeof rawDisplayName === "string" ? rawDisplayName.trim() : void 0;
|
|
4601
|
+
const userPrimaryLabel = normalizedDisplayName || currentUser?.email || currentUser?.walletAddress || "User";
|
|
4606
4602
|
const resolveAuthReturnUrl = () => {
|
|
4607
4603
|
if (getAuthReturnUrl) {
|
|
4608
4604
|
return getAuthReturnUrl();
|
|
@@ -4653,14 +4649,23 @@ var Header = ({
|
|
|
4653
4649
|
setShowLoginPopup(false);
|
|
4654
4650
|
setLoginPopupInitialView(void 0);
|
|
4655
4651
|
}, []);
|
|
4652
|
+
const resolvedTradePath = tradePath ?? DEFAULT_TRADE_PATH;
|
|
4653
|
+
const resolvedHomePath = homePath ?? DEFAULT_HOME_PATH;
|
|
4654
|
+
const resolvedAboutPath = aboutPath ?? DEFAULT_ABOUT_PATH;
|
|
4655
|
+
const resolvedLearnPath = learnPath ?? DEFAULT_LEARN_PATH;
|
|
4656
|
+
const resolvedOfferingsPath = offeringsPath ?? void 0;
|
|
4657
|
+
const offeringsHref = resolvedOfferingsPath ?? resolvedHomePath;
|
|
4658
|
+
const resolvedPropertyMapPath = propertyMapPath ?? DEFAULT_PROPERTY_MAP_PATH;
|
|
4659
|
+
const resolvedPortfolioPath = portfolioPath ?? DEFAULT_PORTFOLIO_PATH;
|
|
4660
|
+
const resolvedLoafLiquidityPath = loafLiquidityPath ?? DEFAULT_LOAF_LIQUIDITY_PATH;
|
|
4656
4661
|
const inferredActiveTab = (() => {
|
|
4657
|
-
if (locationPath ===
|
|
4658
|
-
if (locationPath ===
|
|
4659
|
-
if (locationPath ===
|
|
4660
|
-
if (locationPath ===
|
|
4661
|
-
if (locationPath.startsWith(
|
|
4662
|
-
if (locationPath ===
|
|
4663
|
-
if (locationPath ===
|
|
4662
|
+
if (locationPath === resolvedTradePath) return "trade";
|
|
4663
|
+
if (locationPath === resolvedHomePath) return "home";
|
|
4664
|
+
if (locationPath === resolvedAboutPath) return "about";
|
|
4665
|
+
if (locationPath === resolvedLearnPath) return "learn";
|
|
4666
|
+
if (resolvedOfferingsPath && locationPath.startsWith(resolvedOfferingsPath)) return "offerings";
|
|
4667
|
+
if (locationPath === resolvedPropertyMapPath) return "propertyMap";
|
|
4668
|
+
if (locationPath === resolvedPortfolioPath) return "portfolio";
|
|
4664
4669
|
return null;
|
|
4665
4670
|
})();
|
|
4666
4671
|
const resolvedActiveTab = activeTab ?? inferredActiveTab;
|
|
@@ -4676,7 +4681,7 @@ var Header = ({
|
|
|
4676
4681
|
/* @__PURE__ */ jsxRuntime.jsxs(HeaderContainer, { children: [
|
|
4677
4682
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
4678
4683
|
/* @__PURE__ */ jsxRuntime.jsxs(Logo, { children: [
|
|
4679
|
-
/* @__PURE__ */ jsxRuntime.jsx(LogoLink, { href: logoHref ??
|
|
4684
|
+
/* @__PURE__ */ jsxRuntime.jsx(LogoLink, { href: logoHref ?? resolvedHomePath, onClick: handleLogoNavigation, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: Loaf_logo_Banner_default, alt: "LOAF Logo" }) }),
|
|
4680
4685
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { children: "LOAF" })
|
|
4681
4686
|
] }),
|
|
4682
4687
|
/* @__PURE__ */ jsxRuntime.jsxs(Nav, { $isOpen: isMobileMenuOpen, className: "mobile-menu", children: [
|
|
@@ -4689,11 +4694,11 @@ var Header = ({
|
|
|
4689
4694
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4690
4695
|
NavLink,
|
|
4691
4696
|
{
|
|
4692
|
-
href:
|
|
4697
|
+
href: resolvedHomePath,
|
|
4693
4698
|
className: homeActive ? "active" : "",
|
|
4694
4699
|
onClick: (event) => {
|
|
4695
4700
|
event.preventDefault();
|
|
4696
|
-
handleNavigation(
|
|
4701
|
+
handleNavigation(resolvedHomePath);
|
|
4697
4702
|
},
|
|
4698
4703
|
children: "Home"
|
|
4699
4704
|
}
|
|
@@ -4701,7 +4706,7 @@ var Header = ({
|
|
|
4701
4706
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4702
4707
|
NavLink,
|
|
4703
4708
|
{
|
|
4704
|
-
href:
|
|
4709
|
+
href: resolvedTradePath,
|
|
4705
4710
|
className: tradeActive ? "active" : "",
|
|
4706
4711
|
onClick: (event) => {
|
|
4707
4712
|
event.preventDefault();
|
|
@@ -4713,11 +4718,11 @@ var Header = ({
|
|
|
4713
4718
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4714
4719
|
NavLink,
|
|
4715
4720
|
{
|
|
4716
|
-
href:
|
|
4721
|
+
href: resolvedPortfolioPath,
|
|
4717
4722
|
className: portfolioActive ? "active" : "",
|
|
4718
4723
|
onClick: (event) => {
|
|
4719
4724
|
event.preventDefault();
|
|
4720
|
-
handleNavigation(
|
|
4725
|
+
handleNavigation(resolvedPortfolioPath);
|
|
4721
4726
|
},
|
|
4722
4727
|
children: "Portfolio"
|
|
4723
4728
|
}
|
|
@@ -4725,11 +4730,11 @@ var Header = ({
|
|
|
4725
4730
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4726
4731
|
NavLink,
|
|
4727
4732
|
{
|
|
4728
|
-
href:
|
|
4733
|
+
href: offeringsHref,
|
|
4729
4734
|
className: offeringsActive ? "active" : "",
|
|
4730
4735
|
onClick: (event) => {
|
|
4731
4736
|
event.preventDefault();
|
|
4732
|
-
handleNavigation(
|
|
4737
|
+
handleNavigation(offeringsHref);
|
|
4733
4738
|
},
|
|
4734
4739
|
children: "Initial Offerings"
|
|
4735
4740
|
}
|
|
@@ -4737,11 +4742,11 @@ var Header = ({
|
|
|
4737
4742
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4738
4743
|
NavLink,
|
|
4739
4744
|
{
|
|
4740
|
-
href:
|
|
4745
|
+
href: resolvedPropertyMapPath,
|
|
4741
4746
|
className: propertyMapActive ? "active" : "",
|
|
4742
4747
|
onClick: (event) => {
|
|
4743
4748
|
event.preventDefault();
|
|
4744
|
-
handleNavigation(
|
|
4749
|
+
handleNavigation(resolvedPropertyMapPath);
|
|
4745
4750
|
},
|
|
4746
4751
|
children: "Property Map"
|
|
4747
4752
|
}
|
|
@@ -4749,11 +4754,11 @@ var Header = ({
|
|
|
4749
4754
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4750
4755
|
NavLink,
|
|
4751
4756
|
{
|
|
4752
|
-
href:
|
|
4757
|
+
href: resolvedLearnPath,
|
|
4753
4758
|
className: learnActive ? "active" : "",
|
|
4754
4759
|
onClick: (event) => {
|
|
4755
4760
|
event.preventDefault();
|
|
4756
|
-
handleNavigation(
|
|
4761
|
+
handleNavigation(resolvedLearnPath);
|
|
4757
4762
|
},
|
|
4758
4763
|
children: "Learn"
|
|
4759
4764
|
}
|
|
@@ -4761,11 +4766,11 @@ var Header = ({
|
|
|
4761
4766
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4762
4767
|
NavLink,
|
|
4763
4768
|
{
|
|
4764
|
-
href:
|
|
4769
|
+
href: resolvedAboutPath,
|
|
4765
4770
|
className: aboutActive ? "active" : "",
|
|
4766
4771
|
onClick: (event) => {
|
|
4767
4772
|
event.preventDefault();
|
|
4768
|
-
handleNavigation(
|
|
4773
|
+
handleNavigation(resolvedAboutPath);
|
|
4769
4774
|
},
|
|
4770
4775
|
children: "About"
|
|
4771
4776
|
}
|
|
@@ -4795,7 +4800,7 @@ var Header = ({
|
|
|
4795
4800
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zM5 9.5C5 7.01 7.01 5 9.5 5S14 7.01 14 9.5 11.99 14 9.5 14 5 11.99 5 9.5z" }) }),
|
|
4796
4801
|
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "text", placeholder: "Search..." })
|
|
4797
4802
|
] }),
|
|
4798
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4803
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedHomePath), children: "Home" }),
|
|
4799
4804
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4800
4805
|
MobileNavItem,
|
|
4801
4806
|
{
|
|
@@ -4805,11 +4810,11 @@ var Header = ({
|
|
|
4805
4810
|
children: "Trade"
|
|
4806
4811
|
}
|
|
4807
4812
|
),
|
|
4808
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4809
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4810
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4811
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4812
|
-
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(
|
|
4813
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedPortfolioPath), children: "Portfolio" }),
|
|
4814
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(offeringsHref), children: "Initial Offerings" }),
|
|
4815
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedPropertyMapPath), children: "Property Map" }),
|
|
4816
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedLearnPath), children: "Learn" }),
|
|
4817
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { onClick: () => handleNavigation(resolvedAboutPath), children: "About" }),
|
|
4813
4818
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { borderTop: "1px solid #2b3139", margin: "8px 0" } }),
|
|
4814
4819
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4815
4820
|
MobileNavItem,
|
|
@@ -5448,6 +5453,7 @@ var LoginPopup = ({
|
|
|
5448
5453
|
logoAlt = DEFAULT_LOGO_ALT,
|
|
5449
5454
|
autoCloseOnAuth = true,
|
|
5450
5455
|
onKycStart,
|
|
5456
|
+
renderKycWidget,
|
|
5451
5457
|
onFundWallet,
|
|
5452
5458
|
initialView
|
|
5453
5459
|
}) => {
|
|
@@ -5460,6 +5466,7 @@ var LoginPopup = ({
|
|
|
5460
5466
|
const [isSignUp, setIsSignUp] = React5.useState(false);
|
|
5461
5467
|
const [fundingAmount, setFundingAmount] = React5.useState("");
|
|
5462
5468
|
const [kycLoading, setKycLoading] = React5.useState(false);
|
|
5469
|
+
const [showKycWidget, setShowKycWidget] = React5.useState(false);
|
|
5463
5470
|
const [fundingLoading, setFundingLoading] = React5.useState(false);
|
|
5464
5471
|
const [fundingError, setFundingError] = React5.useState("");
|
|
5465
5472
|
const suppressAutoCloseRef = React5__namespace.default.useRef(false);
|
|
@@ -5654,7 +5661,19 @@ var LoginPopup = ({
|
|
|
5654
5661
|
setLoading(false);
|
|
5655
5662
|
}
|
|
5656
5663
|
};
|
|
5664
|
+
const handleKycWidgetResult = (result) => {
|
|
5665
|
+
setShowKycWidget(false);
|
|
5666
|
+
if (result.passed) {
|
|
5667
|
+
setView("kyc-success");
|
|
5668
|
+
} else {
|
|
5669
|
+
setView("kyc-failed");
|
|
5670
|
+
}
|
|
5671
|
+
};
|
|
5657
5672
|
const handleKycStart = async () => {
|
|
5673
|
+
if (renderKycWidget) {
|
|
5674
|
+
setShowKycWidget(true);
|
|
5675
|
+
return;
|
|
5676
|
+
}
|
|
5658
5677
|
if (!onKycStart) {
|
|
5659
5678
|
setView("kyc-success");
|
|
5660
5679
|
return;
|
|
@@ -5867,18 +5886,25 @@ var LoginPopup = ({
|
|
|
5867
5886
|
] }) });
|
|
5868
5887
|
}
|
|
5869
5888
|
if (view === "kyc") {
|
|
5870
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5877
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5889
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5890
|
+
KycPopupContainer,
|
|
5891
|
+
{
|
|
5892
|
+
onClick: (event) => event.stopPropagation(),
|
|
5893
|
+
$expanded: showKycWidget,
|
|
5894
|
+
children: [
|
|
5895
|
+
/* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
|
|
5896
|
+
showKycWidget && renderKycWidget ? /* @__PURE__ */ jsxRuntime.jsx(KycWidgetContainer, { children: renderKycWidget(handleKycWidgetResult) }) : /* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { children: [
|
|
5897
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "KYC to Continue" }),
|
|
5898
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { children: "Loaf requires all users to KYC before they can start purchasing properties." }),
|
|
5899
|
+
/* @__PURE__ */ jsxRuntime.jsxs(OnboardingButtonGroup, { children: [
|
|
5900
|
+
/* @__PURE__ */ jsxRuntime.jsx(SubmitButton, { onClick: handleKycStart, disabled: kycLoading, children: kycLoading ? "Verifying\u2026" : "KYC me now" }),
|
|
5901
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSkipButton, { onClick: handleKycSkip, children: "I'll do this later, I want to see the properties first" })
|
|
5902
|
+
] }),
|
|
5903
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: error })
|
|
5904
|
+
] })
|
|
5905
|
+
]
|
|
5906
|
+
}
|
|
5907
|
+
) });
|
|
5882
5908
|
}
|
|
5883
5909
|
if (view === "kyc-success") {
|
|
5884
5910
|
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
@@ -6008,6 +6034,40 @@ var PopupContainer = styled23__default.default.div`
|
|
|
6008
6034
|
max-width: 90%;
|
|
6009
6035
|
}
|
|
6010
6036
|
`;
|
|
6037
|
+
var KycPopupContainer = styled23__default.default.div`
|
|
6038
|
+
background-color: var(--color-background, #0a0a0a);
|
|
6039
|
+
border: 1px solid rgba(230, 198, 86, 0.3);
|
|
6040
|
+
border-radius: var(--border-radius, 12px);
|
|
6041
|
+
padding: 2.5rem;
|
|
6042
|
+
max-width: ${(props) => props.$expanded ? "680px" : "440px"};
|
|
6043
|
+
width: 90%;
|
|
6044
|
+
position: relative;
|
|
6045
|
+
animation: slideUp 0.3s ease-out;
|
|
6046
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
6047
|
+
transition: max-width 0.3s ease;
|
|
6048
|
+
|
|
6049
|
+
@keyframes slideUp {
|
|
6050
|
+
from {
|
|
6051
|
+
transform: translateY(20px);
|
|
6052
|
+
opacity: 0;
|
|
6053
|
+
}
|
|
6054
|
+
to {
|
|
6055
|
+
transform: translateY(0);
|
|
6056
|
+
opacity: 1;
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
|
|
6060
|
+
@media (max-width: 768px) {
|
|
6061
|
+
padding: 1.5rem;
|
|
6062
|
+
max-width: 95%;
|
|
6063
|
+
}
|
|
6064
|
+
`;
|
|
6065
|
+
var KycWidgetContainer = styled23__default.default.div`
|
|
6066
|
+
min-height: 500px;
|
|
6067
|
+
width: 100%;
|
|
6068
|
+
display: flex;
|
|
6069
|
+
flex-direction: column;
|
|
6070
|
+
`;
|
|
6011
6071
|
var CloseButton = styled23__default.default.button`
|
|
6012
6072
|
position: absolute;
|
|
6013
6073
|
top: 1rem;
|