@loafmarkets/ui 0.1.357 → 0.1.359
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +47 -81
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -81
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -584,6 +584,8 @@ type LoginPopupProps = {
|
|
|
584
584
|
walletAddress?: string | null;
|
|
585
585
|
/** Called when the user submits a referral code during onboarding. */
|
|
586
586
|
onSubmitReferralCode?: (code: string) => Promise<void> | void;
|
|
587
|
+
/** Called when the user skips the referral code and joins the waitlist. Receives their signup email. Resolves to a success message. */
|
|
588
|
+
onJoinWaitlist?: (email: string) => Promise<string> | void;
|
|
587
589
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
588
590
|
onWalletLogin?: () => Promise<void> | void;
|
|
589
591
|
/** Handler invoked when the user selects "Sign in with Passkey". When omitted, the button is hidden. */
|
package/dist/index.d.ts
CHANGED
|
@@ -584,6 +584,8 @@ type LoginPopupProps = {
|
|
|
584
584
|
walletAddress?: string | null;
|
|
585
585
|
/** Called when the user submits a referral code during onboarding. */
|
|
586
586
|
onSubmitReferralCode?: (code: string) => Promise<void> | void;
|
|
587
|
+
/** Called when the user skips the referral code and joins the waitlist. Receives their signup email. Resolves to a success message. */
|
|
588
|
+
onJoinWaitlist?: (email: string) => Promise<string> | void;
|
|
587
589
|
/** Handler invoked when the user selects "Sign in with Wallet". */
|
|
588
590
|
onWalletLogin?: () => Promise<void> | void;
|
|
589
591
|
/** Handler invoked when the user selects "Sign in with Passkey". When omitted, the button is hidden. */
|
package/dist/index.js
CHANGED
|
@@ -4591,9 +4591,14 @@ var PriceChart = React5__namespace.forwardRef(
|
|
|
4591
4591
|
}
|
|
4592
4592
|
);
|
|
4593
4593
|
PriceChart.displayName = "PriceChart";
|
|
4594
|
-
var formatPrice3 = (value, currencySymbol) => {
|
|
4594
|
+
var formatPrice3 = (value, currencySymbol, compact) => {
|
|
4595
4595
|
const abs = Math.abs(value);
|
|
4596
4596
|
if (abs >= 1e6) {
|
|
4597
|
+
if (!compact) {
|
|
4598
|
+
return `${currencySymbol}${Math.round(value).toLocaleString(void 0, {
|
|
4599
|
+
maximumFractionDigits: 0
|
|
4600
|
+
})}`;
|
|
4601
|
+
}
|
|
4597
4602
|
const unit = abs >= 1e12 ? { v: 1e12, s: "T" } : abs >= 1e9 ? { v: 1e9, s: "B" } : { v: 1e6, s: "M" };
|
|
4598
4603
|
return `${currencySymbol}${(value / unit.v).toFixed(1)}${unit.s}`;
|
|
4599
4604
|
}
|
|
@@ -4636,6 +4641,14 @@ var PropertyHeroHeader = React5__namespace.forwardRef(
|
|
|
4636
4641
|
const tradeHoverColor = "#f5dd9a";
|
|
4637
4642
|
const [isTradeInteracting, setIsTradeInteracting] = React5__namespace.useState(false);
|
|
4638
4643
|
const [isOfferInteracting, setIsOfferInteracting] = React5__namespace.useState(false);
|
|
4644
|
+
const [isMobile, setIsMobile] = React5__namespace.useState(
|
|
4645
|
+
() => typeof window !== "undefined" && window.innerWidth <= 768
|
|
4646
|
+
);
|
|
4647
|
+
React5__namespace.useEffect(() => {
|
|
4648
|
+
const onResize = () => setIsMobile(window.innerWidth <= 768);
|
|
4649
|
+
window.addEventListener("resize", onResize);
|
|
4650
|
+
return () => window.removeEventListener("resize", onResize);
|
|
4651
|
+
}, []);
|
|
4639
4652
|
const isTradeDisabled = !onTrade;
|
|
4640
4653
|
const isMakeOfferButtonDisabled = makeOfferDisabled || !onMakeOffer;
|
|
4641
4654
|
const showMakeOfferButton = !hideMakeOfferButton;
|
|
@@ -4683,7 +4696,7 @@ var PropertyHeroHeader = React5__namespace.forwardRef(
|
|
|
4683
4696
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 110, height: 24 }) : price == null ? null : /* @__PURE__ */ jsxRuntime.jsxs(PriceRow, { children: [
|
|
4684
4697
|
/* @__PURE__ */ jsxRuntime.jsx(CurrencyLabel, { children: "USD" }),
|
|
4685
4698
|
changePercent != null ? /* @__PURE__ */ jsxRuntime.jsx(PriceArrow, { $isPositive: isPositive, children: isPositive ? "\u25B2" : "\u25BC" }) : null,
|
|
4686
|
-
formatPrice3(price, "")
|
|
4699
|
+
formatPrice3(price, "", isMobile)
|
|
4687
4700
|
] }),
|
|
4688
4701
|
changePercent != null ? /* @__PURE__ */ jsxRuntime.jsxs(PriceChangeRow, { $isPositive: isPositive, children: [
|
|
4689
4702
|
priceChange != null ? `${isPositive ? "+" : ""}${priceChange.toFixed(2)} ` : null,
|
|
@@ -6465,7 +6478,8 @@ var LoginPopup = ({
|
|
|
6465
6478
|
initialView,
|
|
6466
6479
|
kycStatus: kycStatusProp,
|
|
6467
6480
|
walletAddress,
|
|
6468
|
-
onSubmitReferralCode
|
|
6481
|
+
onSubmitReferralCode,
|
|
6482
|
+
onJoinWaitlist
|
|
6469
6483
|
}) => {
|
|
6470
6484
|
const [view, setView] = React5.useState(() => initialView ?? "main");
|
|
6471
6485
|
const [email, setEmail] = React5.useState("");
|
|
@@ -6476,6 +6490,8 @@ var LoginPopup = ({
|
|
|
6476
6490
|
const [referralCode, setReferralCode] = React5.useState("");
|
|
6477
6491
|
const [referralLoading, setReferralLoading] = React5.useState(false);
|
|
6478
6492
|
const [referralError, setReferralError] = React5.useState("");
|
|
6493
|
+
const [waitlistLoading, setWaitlistLoading] = React5.useState(false);
|
|
6494
|
+
const [waitlistMessage, setWaitlistMessage] = React5.useState("");
|
|
6479
6495
|
const [loading, setLoading] = React5.useState(false);
|
|
6480
6496
|
const [isSignUp, setIsSignUp] = React5.useState(false);
|
|
6481
6497
|
const [fundingAmount] = React5.useState("");
|
|
@@ -6845,30 +6861,6 @@ var LoginPopup = ({
|
|
|
6845
6861
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C9.79 2 8 3.79 8 6v4H6c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2h-2V6c0-2.21-1.79-4-4-4zm-2 4c0-1.1.9-2 2-2s2 .9 2 2v4h-4V6zm2 9a2 2 0 100 4 2 2 0 000-4z" }) }),
|
|
6846
6862
|
"Sign in with Passkey"
|
|
6847
6863
|
] })
|
|
6848
|
-
] }),
|
|
6849
|
-
/* @__PURE__ */ jsxRuntime.jsx(Divider, {}),
|
|
6850
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AnnotationContainer, { children: [
|
|
6851
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Annotation, { children: [
|
|
6852
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) }),
|
|
6853
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AnnotationText, { children: [
|
|
6854
|
-
/* @__PURE__ */ jsxRuntime.jsx(AnnotationLabel, { children: "\u2190 Digital Asset users" }),
|
|
6855
|
-
"Connect your Web3 wallet to access your assets"
|
|
6856
|
-
] })
|
|
6857
|
-
] }),
|
|
6858
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Annotation, { children: [
|
|
6859
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z" }) }),
|
|
6860
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AnnotationText, { children: [
|
|
6861
|
-
/* @__PURE__ */ jsxRuntime.jsx(AnnotationLabel, { children: "\u2190 Traditional Finance users" }),
|
|
6862
|
-
"Sign in with email, no web3 experience needed"
|
|
6863
|
-
] })
|
|
6864
|
-
] }),
|
|
6865
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Annotation, { children: [
|
|
6866
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" }) }),
|
|
6867
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AnnotationText, { children: [
|
|
6868
|
-
/* @__PURE__ */ jsxRuntime.jsx(AnnotationLabel, { children: "\u2190 Self custodial" }),
|
|
6869
|
-
"We never have ownership of your assets. All units are self custodial"
|
|
6870
|
-
] })
|
|
6871
|
-
] })
|
|
6872
6864
|
] })
|
|
6873
6865
|
] }) });
|
|
6874
6866
|
}
|
|
@@ -7128,6 +7120,22 @@ var LoginPopup = ({
|
|
|
7128
7120
|
setReferralLoading(false);
|
|
7129
7121
|
}
|
|
7130
7122
|
};
|
|
7123
|
+
const handleJoinWaitlistSkip = async () => {
|
|
7124
|
+
if (!onJoinWaitlist) {
|
|
7125
|
+
onClose();
|
|
7126
|
+
return;
|
|
7127
|
+
}
|
|
7128
|
+
setReferralError("");
|
|
7129
|
+
setWaitlistLoading(true);
|
|
7130
|
+
try {
|
|
7131
|
+
const message = await onJoinWaitlist(email);
|
|
7132
|
+
setWaitlistMessage(message || "You're on the waitlist.");
|
|
7133
|
+
setTimeout(() => onClose(), 1400);
|
|
7134
|
+
} catch (err) {
|
|
7135
|
+
setReferralError(err instanceof Error ? err.message : "Couldn't join the waitlist. Please try again.");
|
|
7136
|
+
setWaitlistLoading(false);
|
|
7137
|
+
}
|
|
7138
|
+
};
|
|
7131
7139
|
return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
|
|
7132
7140
|
/* @__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" }) }) }),
|
|
7133
7141
|
/* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { children: [
|
|
@@ -7147,7 +7155,7 @@ var LoginPopup = ({
|
|
|
7147
7155
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
|
|
7148
7156
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
7149
7157
|
] }) }),
|
|
7150
|
-
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "
|
|
7158
|
+
/* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "Enter code to access Private Beta trading" }),
|
|
7151
7159
|
/* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter your code to unlock $100k in testnet USD, or skip to continue." }),
|
|
7152
7160
|
/* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginBottom: 0 }, children: [
|
|
7153
7161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7177,13 +7185,17 @@ var LoginPopup = ({
|
|
|
7177
7185
|
),
|
|
7178
7186
|
referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
|
|
7179
7187
|
] }),
|
|
7180
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7188
|
+
waitlistMessage ? /* @__PURE__ */ jsxRuntime.jsxs(StatusMessage, { style: { marginTop: "0.75rem" }, children: [
|
|
7189
|
+
"\u2713 ",
|
|
7190
|
+
waitlistMessage
|
|
7191
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
7181
7192
|
OnboardingSkipButton,
|
|
7182
7193
|
{
|
|
7183
7194
|
type: "button",
|
|
7184
|
-
onClick:
|
|
7195
|
+
onClick: () => void handleJoinWaitlistSkip(),
|
|
7196
|
+
disabled: waitlistLoading,
|
|
7185
7197
|
style: { marginTop: "0.75rem" },
|
|
7186
|
-
children: "Skip for now"
|
|
7198
|
+
children: waitlistLoading ? "Joining\u2026" : "Skip for now & join Waitlist"
|
|
7187
7199
|
}
|
|
7188
7200
|
)
|
|
7189
7201
|
] })
|
|
@@ -7581,57 +7593,12 @@ var LoginButton = styled9__default.default.button`
|
|
|
7581
7593
|
color: var(--color-accent, #e6c656);
|
|
7582
7594
|
}
|
|
7583
7595
|
`;
|
|
7584
|
-
var Divider = styled9__default.default.div`
|
|
7585
|
-
display: flex;
|
|
7586
|
-
align-items: center;
|
|
7587
|
-
margin: 1.5rem 0;
|
|
7588
|
-
|
|
7589
|
-
&::before,
|
|
7590
|
-
&::after {
|
|
7591
|
-
content: "";
|
|
7592
|
-
flex: 1;
|
|
7593
|
-
height: 1px;
|
|
7594
|
-
background-color: rgba(230, 198, 86, 0.2);
|
|
7595
|
-
}
|
|
7596
|
-
`;
|
|
7597
7596
|
var InfoText = styled9__default.default.p`
|
|
7598
7597
|
color: var(--color-text-secondary, #848e9c);
|
|
7599
7598
|
font-size: 0.875rem;
|
|
7600
7599
|
text-align: center;
|
|
7601
7600
|
line-height: 1.5;
|
|
7602
7601
|
`;
|
|
7603
|
-
var AnnotationContainer = styled9__default.default.div`
|
|
7604
|
-
display: flex;
|
|
7605
|
-
flex-direction: column;
|
|
7606
|
-
gap: 0.75rem;
|
|
7607
|
-
margin-top: 1.5rem;
|
|
7608
|
-
padding-top: 1.5rem;
|
|
7609
|
-
border-top: 1px solid rgba(230, 198, 86, 0.2);
|
|
7610
|
-
`;
|
|
7611
|
-
var Annotation = styled9__default.default.div`
|
|
7612
|
-
display: flex;
|
|
7613
|
-
align-items: flex-start;
|
|
7614
|
-
gap: 1rem;
|
|
7615
|
-
color: var(--color-text-secondary, #848e9c);
|
|
7616
|
-
font-size: 0.8rem;
|
|
7617
|
-
|
|
7618
|
-
svg {
|
|
7619
|
-
width: 16px;
|
|
7620
|
-
height: 16px;
|
|
7621
|
-
flex-shrink: 0;
|
|
7622
|
-
margin-top: 2px;
|
|
7623
|
-
color: var(--color-accent, #e6c656);
|
|
7624
|
-
}
|
|
7625
|
-
`;
|
|
7626
|
-
var AnnotationText = styled9__default.default.span`
|
|
7627
|
-
flex: 1;
|
|
7628
|
-
line-height: 1.4;
|
|
7629
|
-
`;
|
|
7630
|
-
var AnnotationLabel = styled9__default.default.span`
|
|
7631
|
-
color: var(--color-text, #eaecef);
|
|
7632
|
-
font-weight: 500;
|
|
7633
|
-
margin-right: 0.25rem;
|
|
7634
|
-
`;
|
|
7635
7602
|
var EmailFormContainer = styled9__default.default.div`
|
|
7636
7603
|
display: flex;
|
|
7637
7604
|
flex-direction: column;
|
|
@@ -9218,8 +9185,7 @@ function PropertyOverview({
|
|
|
9218
9185
|
propertyLocation: location,
|
|
9219
9186
|
videoUrl,
|
|
9220
9187
|
tokenName,
|
|
9221
|
-
onPhotoClick: onPhotosClick
|
|
9222
|
-
hideMap: true
|
|
9188
|
+
onPhotoClick: onPhotosClick
|
|
9223
9189
|
}
|
|
9224
9190
|
),
|
|
9225
9191
|
/* @__PURE__ */ jsxRuntime.jsx(FeaturesPanel, { children: features.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(AssetFeatureItem, { children: [
|
|
@@ -12198,7 +12164,7 @@ function OrderPanel({
|
|
|
12198
12164
|
] })
|
|
12199
12165
|
] })
|
|
12200
12166
|
] }),
|
|
12201
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12167
|
+
/* @__PURE__ */ jsxRuntime.jsx(Divider, { children: "\u2193" }),
|
|
12202
12168
|
/* @__PURE__ */ jsxRuntime.jsxs(ReadyChecklist, { children: [
|
|
12203
12169
|
/* @__PURE__ */ jsxRuntime.jsx(ChecklistTitle, { children: "Get ready to invest" }),
|
|
12204
12170
|
/* @__PURE__ */ jsxRuntime.jsx(ChecklistSub, { children: "Complete these steps to be first in line" }),
|
|
@@ -12372,7 +12338,7 @@ function OrderPanel({
|
|
|
12372
12338
|
}
|
|
12373
12339
|
)
|
|
12374
12340
|
] }),
|
|
12375
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12341
|
+
/* @__PURE__ */ jsxRuntime.jsx(Divider, { children: "\u2193" }),
|
|
12376
12342
|
/* @__PURE__ */ jsxRuntime.jsxs(Card2, { children: [
|
|
12377
12343
|
/* @__PURE__ */ jsxRuntime.jsxs(CardTopRow, { children: [
|
|
12378
12344
|
/* @__PURE__ */ jsxRuntime.jsx(CardLabel, { children: ipoStarted ? "You Receive" : "You'll Receive" }),
|
|
@@ -12671,7 +12637,7 @@ var DepositButton2 = styled9__default.default.button`
|
|
|
12671
12637
|
cursor: pointer;
|
|
12672
12638
|
font-weight: 500;
|
|
12673
12639
|
`;
|
|
12674
|
-
var
|
|
12640
|
+
var Divider = styled9__default.default.div`
|
|
12675
12641
|
text-align: center;
|
|
12676
12642
|
margin: 0.25rem 0;
|
|
12677
12643
|
color: var(--color-text-secondary);
|