@retinalabsllc/zairusjs 14.0.15 → 14.0.20
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 +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.js +193 -1
- package/dist/index.mjs +196 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -874,4 +874,33 @@ interface UniversalReferralPageProps {
|
|
|
874
874
|
}
|
|
875
875
|
declare const UniversalReferralPage: React.FC<UniversalReferralPageProps>;
|
|
876
876
|
|
|
877
|
-
|
|
877
|
+
interface PricingFeature2 {
|
|
878
|
+
name: string;
|
|
879
|
+
value: boolean | string;
|
|
880
|
+
}
|
|
881
|
+
interface TierOption {
|
|
882
|
+
tierName: string;
|
|
883
|
+
priceUSD: number;
|
|
884
|
+
isYearly: boolean;
|
|
885
|
+
description: string;
|
|
886
|
+
features: PricingFeature2[];
|
|
887
|
+
acceptWaitlist: boolean;
|
|
888
|
+
acceptPreorder: boolean;
|
|
889
|
+
isAvailable?: boolean;
|
|
890
|
+
}
|
|
891
|
+
interface UniversalCardActionPageProps {
|
|
892
|
+
cardId: string;
|
|
893
|
+
cardType: 'VIRTUAL' | 'PHYSICAL';
|
|
894
|
+
currentTier: string;
|
|
895
|
+
hasPreordered: boolean;
|
|
896
|
+
onWaitlist: boolean;
|
|
897
|
+
tiers: TierOption[];
|
|
898
|
+
isLoadingData: boolean;
|
|
899
|
+
onBack?: () => void;
|
|
900
|
+
onConfirmAction: (tierName: string, action: 'pre_order' | 'join_waitlist' | 'upgrade') => Promise<{
|
|
901
|
+
success: boolean;
|
|
902
|
+
}>;
|
|
903
|
+
}
|
|
904
|
+
declare const UniversalCardActionPage: React.FC<UniversalCardActionPageProps>;
|
|
905
|
+
|
|
906
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NotificationItem, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHomeView, type UniversalHomeViewProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -874,4 +874,33 @@ interface UniversalReferralPageProps {
|
|
|
874
874
|
}
|
|
875
875
|
declare const UniversalReferralPage: React.FC<UniversalReferralPageProps>;
|
|
876
876
|
|
|
877
|
-
|
|
877
|
+
interface PricingFeature2 {
|
|
878
|
+
name: string;
|
|
879
|
+
value: boolean | string;
|
|
880
|
+
}
|
|
881
|
+
interface TierOption {
|
|
882
|
+
tierName: string;
|
|
883
|
+
priceUSD: number;
|
|
884
|
+
isYearly: boolean;
|
|
885
|
+
description: string;
|
|
886
|
+
features: PricingFeature2[];
|
|
887
|
+
acceptWaitlist: boolean;
|
|
888
|
+
acceptPreorder: boolean;
|
|
889
|
+
isAvailable?: boolean;
|
|
890
|
+
}
|
|
891
|
+
interface UniversalCardActionPageProps {
|
|
892
|
+
cardId: string;
|
|
893
|
+
cardType: 'VIRTUAL' | 'PHYSICAL';
|
|
894
|
+
currentTier: string;
|
|
895
|
+
hasPreordered: boolean;
|
|
896
|
+
onWaitlist: boolean;
|
|
897
|
+
tiers: TierOption[];
|
|
898
|
+
isLoadingData: boolean;
|
|
899
|
+
onBack?: () => void;
|
|
900
|
+
onConfirmAction: (tierName: string, action: 'pre_order' | 'join_waitlist' | 'upgrade') => Promise<{
|
|
901
|
+
success: boolean;
|
|
902
|
+
}>;
|
|
903
|
+
}
|
|
904
|
+
declare const UniversalCardActionPage: React.FC<UniversalCardActionPageProps>;
|
|
905
|
+
|
|
906
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CompanyDetails, type ConsultantProfile, ConsultantShowcase, type ConsultantShowcaseProps, ContentGridBlock, type ContentGridBlockProps, type DocumentSectionData, type EmailContact, Faq, type FaqItem, type FaqProps, FeatureScroll, type FeatureScrollProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GifFeatureCard, type GifFeatureCardProps, Header, type HeaderLink, type HeaderProps, type AppLogo$1 as HeroAppLogo, HeroSection, type HeroSectionProps, type HomeActionBtn, type LeaderboardItem, ManagedBoardBlock, type ManagedBoardBlockProps, ManagedContactBlock, type ManagedContactBlockProps, ManagedDocument, type ManagedDocumentProps, ManagedNewsletterSplitBlock, type ManagedNewsletterSplitBlockProps, ManagedNotFoundBlock, type ManagedNotFoundBlockProps, ManagedPricingBlock, type ManagedPricingBlockProps, ManagedProjectsBlock, type ManagedProjectsBlockProps, ManagedToaster, MedicalFeatureStatsBlock, MobileNav, type MobileNavItem, type MobileNavProps, type NavItem, type NotificationItem, NumberInput, type NumberInputProps, PageSpinner, type PageSpinnerProps, PipleAuth, type PipleAuthProps, type PlatformFeatureItem, PlatformFeatures, type PlatformFeaturesProps, PortfolioHero, type PortfolioHeroProps, type AppLogo as PricingAppLogo, type PricingFeature, type PricingFeature2, type PricingPlan, type PricingTab, type ProjectItem, type ReferralProfile, type RewardItem, type RewardProfile, type ScrollFeature, type SocialContact, type SocialLink, type StatItem, TextInput, type TextInputProps, ThreeDActionButton, type ThreeDActionButtonProps, ThreeDButton, type ThreeDButtonProps, type TierOption, UniversalCardActionPage, type UniversalCardActionPageProps, UniversalCardPage, type UniversalCardPageProps, UniversalErrorView, type UniversalErrorViewProps, UniversalHomeView, type UniversalHomeViewProps, UniversalOrganizationPage, type UniversalOrganizationPageProps, UniversalProfilePage, type UniversalProfilePageProps, UniversalProfileSettings, type UniversalProfileSettingsProps, type UniversalReferralItem, UniversalReferralPage, type UniversalReferralPageProps, UniversalRewardPage, type UniversalRewardPageProps, UniversalSecurityPage, type UniversalSecurityPageProps, UniversalSidebar, type UniversalSidebarProps, type UniversalTransaction, UniversalTransactionPage, type UniversalTransactionPageProps, UniversalVerificationPage, type UniversalVerificationPageProps, type UniversalWallet, UniversalWalletPage, type UniversalWalletPageProps, type VerificationStatus, WaitlistDialog, type WaitlistDialogProps };
|
package/dist/index.js
CHANGED
|
@@ -58,6 +58,7 @@ __export(index_exports, {
|
|
|
58
58
|
TextInput: () => TextInput,
|
|
59
59
|
ThreeDActionButton: () => ThreeDActionButton,
|
|
60
60
|
ThreeDButton: () => ThreeDButton,
|
|
61
|
+
UniversalCardActionPage: () => UniversalCardActionPage,
|
|
61
62
|
UniversalCardPage: () => UniversalCardPage,
|
|
62
63
|
UniversalErrorView: () => UniversalErrorView,
|
|
63
64
|
UniversalHomeView: () => UniversalHomeView,
|
|
@@ -1930,7 +1931,7 @@ var ConfirmationDialog = ({
|
|
|
1930
1931
|
{
|
|
1931
1932
|
onClick: onConfirm,
|
|
1932
1933
|
disabled: isProcessing,
|
|
1933
|
-
className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-
|
|
1934
|
+
className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-black hover:bg-red-50" : "text-black hover:bg-neutral-50"}`
|
|
1934
1935
|
},
|
|
1935
1936
|
isProcessing ? /* @__PURE__ */ import_react29.default.createElement(import_react30.HugeiconsIcon, { icon: import_core_free_icons10.Loading03Icon, className: "animate-spin", size: 18 }) : confirmText
|
|
1936
1937
|
))));
|
|
@@ -4221,6 +4222,196 @@ var UniversalReferralPage = ({
|
|
|
4221
4222
|
/* @__PURE__ */ import_react71.default.createElement(import_react72.HugeiconsIcon, { icon: import_core_free_icons24.ArrowRight01Icon, size: 14 })
|
|
4222
4223
|
)))))));
|
|
4223
4224
|
};
|
|
4225
|
+
|
|
4226
|
+
// src/components/UniversalCardActionPage.tsx
|
|
4227
|
+
var import_react73 = __toESM(require("react"));
|
|
4228
|
+
var import_react_confetti2 = __toESM(require("react-confetti"));
|
|
4229
|
+
var import_react_use2 = require("react-use");
|
|
4230
|
+
var import_react74 = require("@hugeicons/react");
|
|
4231
|
+
var import_core_free_icons25 = require("@hugeicons/core-free-icons");
|
|
4232
|
+
var CheckIcon2 = ({ className = "" }) => /* @__PURE__ */ import_react73.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react73.default.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ import_react73.default.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
4233
|
+
var CrossIcon2 = ({ className = "" }) => /* @__PURE__ */ import_react73.default.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react73.default.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "#F5F5F5" }), /* @__PURE__ */ import_react73.default.createElement("path", { d: "M15 9L9 15M9 9l6 6", stroke: "#D4D4D4", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
4234
|
+
var formatTierName = (name) => {
|
|
4235
|
+
if (!name) return "";
|
|
4236
|
+
return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();
|
|
4237
|
+
};
|
|
4238
|
+
var getTierGlow = (tier) => {
|
|
4239
|
+
switch (tier.toUpperCase()) {
|
|
4240
|
+
case "PLATINUM":
|
|
4241
|
+
return "from-neutral-300";
|
|
4242
|
+
case "PREMIUM":
|
|
4243
|
+
return "from-purple-200";
|
|
4244
|
+
case "GOLD":
|
|
4245
|
+
return "from-yellow-200";
|
|
4246
|
+
case "SILVER":
|
|
4247
|
+
return "from-slate-300";
|
|
4248
|
+
case "NEO":
|
|
4249
|
+
return "from-cyan-200";
|
|
4250
|
+
case "BASIC":
|
|
4251
|
+
return "from-blue-200";
|
|
4252
|
+
case "ONE":
|
|
4253
|
+
return "from-emerald-200";
|
|
4254
|
+
case "ZERO":
|
|
4255
|
+
return "from-rose-200";
|
|
4256
|
+
default:
|
|
4257
|
+
return "from-neutral-200";
|
|
4258
|
+
}
|
|
4259
|
+
};
|
|
4260
|
+
var UniversalCardActionPage = ({
|
|
4261
|
+
cardType,
|
|
4262
|
+
currentTier,
|
|
4263
|
+
hasPreordered,
|
|
4264
|
+
onWaitlist,
|
|
4265
|
+
tiers,
|
|
4266
|
+
isLoadingData,
|
|
4267
|
+
onBack,
|
|
4268
|
+
onConfirmAction
|
|
4269
|
+
}) => {
|
|
4270
|
+
const onBackHandler = onBack ?? (() => {
|
|
4271
|
+
if (typeof window !== "undefined") window.history.back();
|
|
4272
|
+
});
|
|
4273
|
+
const { width, height } = (0, import_react_use2.useWindowSize)();
|
|
4274
|
+
const [selectedTier, setSelectedTier] = (0, import_react73.useState)(null);
|
|
4275
|
+
const [intendedAction, setIntendedAction] = (0, import_react73.useState)(null);
|
|
4276
|
+
const [isProcessing, setIsProcessing] = (0, import_react73.useState)(false);
|
|
4277
|
+
const [showConfetti, setShowConfetti] = (0, import_react73.useState)(false);
|
|
4278
|
+
const availableTiers = tiers.filter((t) => t.isAvailable || t.acceptPreorder || t.acceptWaitlist);
|
|
4279
|
+
const handleTierClick = (tier, explicitAction) => {
|
|
4280
|
+
setSelectedTier(tier);
|
|
4281
|
+
setIntendedAction(explicitAction);
|
|
4282
|
+
};
|
|
4283
|
+
const processAction = async () => {
|
|
4284
|
+
if (!selectedTier || !intendedAction) return;
|
|
4285
|
+
setIsProcessing(true);
|
|
4286
|
+
try {
|
|
4287
|
+
const result = await onConfirmAction(selectedTier.tierName, intendedAction);
|
|
4288
|
+
if (result.success) {
|
|
4289
|
+
if (intendedAction === "pre_order") {
|
|
4290
|
+
setShowConfetti(true);
|
|
4291
|
+
setTimeout(() => setShowConfetti(false), 6e3);
|
|
4292
|
+
}
|
|
4293
|
+
setSelectedTier(null);
|
|
4294
|
+
setIntendedAction(null);
|
|
4295
|
+
}
|
|
4296
|
+
} finally {
|
|
4297
|
+
setIsProcessing(false);
|
|
4298
|
+
}
|
|
4299
|
+
};
|
|
4300
|
+
const getPrimaryButtonText = (tier) => {
|
|
4301
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4302
|
+
if (isCurrent) {
|
|
4303
|
+
if (hasPreordered) return "Secured (Pre-ordered)";
|
|
4304
|
+
return "Pre-order Now";
|
|
4305
|
+
}
|
|
4306
|
+
if (hasPreordered) return "Unavailable";
|
|
4307
|
+
return `Upgrade to ${formatTierName(tier.tierName)}`;
|
|
4308
|
+
};
|
|
4309
|
+
const getWaitlistButtonText = (tier) => {
|
|
4310
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4311
|
+
if (isCurrent && (onWaitlist || hasPreordered)) return "Joined";
|
|
4312
|
+
return "Join Waitlist";
|
|
4313
|
+
};
|
|
4314
|
+
return /* @__PURE__ */ import_react73.default.createElement("div", { className: "w-full" }, /* @__PURE__ */ import_react73.default.createElement(ManagedToaster, null), showConfetti && /* @__PURE__ */ import_react73.default.createElement("div", { className: "fixed inset-0 z-200 pointer-events-none" }, /* @__PURE__ */ import_react73.default.createElement(import_react_confetti2.default, { width, height, recycle: false, numberOfPieces: 500, gravity: 0.15 })), /* @__PURE__ */ import_react73.default.createElement("div", { className: "mb-6 flex max-w-3xl w-full mx-auto items-center px-1" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4315
|
+
"button",
|
|
4316
|
+
{
|
|
4317
|
+
onClick: onBackHandler,
|
|
4318
|
+
className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
|
|
4319
|
+
},
|
|
4320
|
+
/* @__PURE__ */ import_react73.default.createElement(import_react74.HugeiconsIcon, { icon: import_core_free_icons25.ArrowLeft01Icon, size: 16 }),
|
|
4321
|
+
" Back"
|
|
4322
|
+
)), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col animate-in max-w-5xl w-full mx-auto fade-in duration-300" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "w-full flex flex-col items-center text-center mb-10 px-4" }, /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[10px] tracking-[0.4em] text-neutral-400 block uppercase mb-3" }, cardType, " CARD ACTIVATION"), /* @__PURE__ */ import_react73.default.createElement("h1", { className: "text-2xl sm:text-3xl text-black tracking-tight mb-2" }, "Select Your Tier"), /* @__PURE__ */ import_react73.default.createElement("p", { className: "text-xs text-neutral-500 max-w-lg" }, hasPreordered ? "You have already secured your card. Upgrades are disabled while your order is pending processing." : "Upgrade your tier or secure your card now. Pre-orders guarantee priority processing when the batch goes live.")), isLoadingData ? /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ import_react73.default.createElement(import_react74.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 32, className: "animate-spin text-neutral-300" })) : /* @__PURE__ */ import_react73.default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5 w-full max-w-4xl mx-auto px-4" }, availableTiers.map((tier) => {
|
|
4323
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4324
|
+
const isCardDisabled = hasPreordered && !isCurrent;
|
|
4325
|
+
const isHighlighted = hasPreordered && isCurrent;
|
|
4326
|
+
const isThisCardLoading = isProcessing && selectedTier?.tierName === tier.tierName;
|
|
4327
|
+
const isPrimaryDisabled = isCardDisabled || isHighlighted || isThisCardLoading || !tier.acceptPreorder;
|
|
4328
|
+
const isWaitlistDisabled = !isCurrent || isCurrent && (onWaitlist || hasPreordered) || isThisCardLoading || !tier.acceptWaitlist;
|
|
4329
|
+
return /* @__PURE__ */ import_react73.default.createElement(
|
|
4330
|
+
"div",
|
|
4331
|
+
{
|
|
4332
|
+
key: tier.tierName,
|
|
4333
|
+
className: `relative bg-white rounded-3xl p-6 flex flex-col overflow-hidden transition-all duration-300
|
|
4334
|
+
${isCardDisabled ? "opacity-50 grayscale-50 pointer-events-none" : ""}
|
|
4335
|
+
|
|
4336
|
+
`
|
|
4337
|
+
},
|
|
4338
|
+
/* @__PURE__ */ import_react73.default.createElement(
|
|
4339
|
+
"div",
|
|
4340
|
+
{
|
|
4341
|
+
className: `absolute -top-10 -right-10 w-48 h-48 bg-linear-to-bl ${getTierGlow(tier.tierName)} to-transparent opacity-40 blur-2xl rounded-full pointer-events-none`
|
|
4342
|
+
}
|
|
4343
|
+
),
|
|
4344
|
+
isThisCardLoading && /* @__PURE__ */ import_react73.default.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/40 backdrop-blur-[1px]" }, /* @__PURE__ */ import_react73.default.createElement(import_react74.HugeiconsIcon, { icon: import_core_free_icons25.Loading03Icon, size: 32, className: "animate-spin text-black" })),
|
|
4345
|
+
/* @__PURE__ */ import_react73.default.createElement("div", { className: "mb-6 relative z-10" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex justify-between items-start mb-1" }, /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-black text-sm tracking-widest " }, formatTierName(tier.tierName)), isCurrent && !hasPreordered && /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[9px] bg-neutral-100 text-neutral-600 px-2 py-1 rounded-full uppercase tracking-wider" }, "Current")), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex items-baseline gap-1 mt-2" }, /* @__PURE__ */ import_react73.default.createElement("h3", { className: "text-3xl font-light text-black" }, tier.priceUSD === 0 ? "Free" : `$${tier.priceUSD.toFixed(2)}`), tier.priceUSD > 0 && /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-xs text-neutral-500" }, tier.isYearly ? "/ year" : "one-time")), /* @__PURE__ */ import_react73.default.createElement("p", { className: "text-[13px] text-neutral-500 mt-3 min-h-12 leading-relaxed" }, tier.description)),
|
|
4346
|
+
/* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col gap-2.5 mb-6 relative z-10" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: isPrimaryDisabled ? "opacity-50 pointer-events-none" : "" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4347
|
+
ThreeDActionButton,
|
|
4348
|
+
{
|
|
4349
|
+
disabled: isPrimaryDisabled,
|
|
4350
|
+
onClick: () => handleTierClick(tier, isCurrent ? "pre_order" : "upgrade"),
|
|
4351
|
+
className: "w-full"
|
|
4352
|
+
},
|
|
4353
|
+
getPrimaryButtonText(tier)
|
|
4354
|
+
)), /* @__PURE__ */ import_react73.default.createElement(
|
|
4355
|
+
"button",
|
|
4356
|
+
{
|
|
4357
|
+
disabled: isWaitlistDisabled,
|
|
4358
|
+
onClick: () => handleTierClick(tier, "join_waitlist"),
|
|
4359
|
+
className: `w-full py-2.5 rounded-full text-xs tracking-wide transition-all outline-none border
|
|
4360
|
+
${isCurrent && (onWaitlist || hasPreordered) ? "bg-neutral-50 border-neutral-100 text-neutral-400 cursor-not-allowed" : "bg-white border-neutral-200 text-black hover:bg-neutral-50"}
|
|
4361
|
+
disabled:opacity-40 disabled:cursor-not-allowed
|
|
4362
|
+
`
|
|
4363
|
+
},
|
|
4364
|
+
getWaitlistButtonText(tier)
|
|
4365
|
+
)),
|
|
4366
|
+
/* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col gap-3 relative z-10" }, tier.features.map((feature, featureIdx) => {
|
|
4367
|
+
const isAvailable = feature.value !== false;
|
|
4368
|
+
const valueText = typeof feature.value === "string" ? feature.value : "";
|
|
4369
|
+
return /* @__PURE__ */ import_react73.default.createElement("div", { key: featureIdx, className: "flex items-center gap-3" }, isAvailable ? /* @__PURE__ */ import_react73.default.createElement(CheckIcon2, null) : /* @__PURE__ */ import_react73.default.createElement(CrossIcon2, null), /* @__PURE__ */ import_react73.default.createElement("span", { className: `text-[12px] truncate ${isAvailable ? "text-neutral-800" : "text-neutral-400"}` }, feature.name, valueText && /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-neutral-500 ml-1 " }, valueText)));
|
|
4370
|
+
}))
|
|
4371
|
+
);
|
|
4372
|
+
}))), selectedTier && intendedAction !== "join_waitlist" && /* @__PURE__ */ import_react73.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isProcessing && setSelectedTier(null) }), /* @__PURE__ */ import_react73.default.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4373
|
+
"div",
|
|
4374
|
+
{
|
|
4375
|
+
className: `absolute -top-10 -right-10 w-40 h-40 bg-linear-to-bl ${getTierGlow(selectedTier.tierName)} to-transparent opacity-40 blur-2xl rounded-full pointer-events-none`
|
|
4376
|
+
}
|
|
4377
|
+
), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 relative z-10" }, /* @__PURE__ */ import_react73.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Confirm Action"), /* @__PURE__ */ import_react73.default.createElement(
|
|
4378
|
+
"button",
|
|
4379
|
+
{
|
|
4380
|
+
disabled: isProcessing,
|
|
4381
|
+
onClick: () => setSelectedTier(null),
|
|
4382
|
+
className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
|
|
4383
|
+
},
|
|
4384
|
+
/* @__PURE__ */ import_react73.default.createElement(import_react74.HugeiconsIcon, { icon: import_core_free_icons25.CancelCircleIcon, size: 18 })
|
|
4385
|
+
)), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 relative z-10" }, /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col items-center justify-center mb-6" }, /* @__PURE__ */ import_react73.default.createElement("p", { className: "text-2xl text-black mb-1" }, selectedTier.priceUSD === 0 ? "Free" : `$${selectedTier.priceUSD.toFixed(2)}`), /* @__PURE__ */ import_react73.default.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full bg-neutral-100 text-black mt-1` }, formatTierName(selectedTier.tierName), " ", formatTierName(cardType))), /* @__PURE__ */ import_react73.default.createElement("div", { className: "grid grid-cols-1 gap-y-6 mb-8 mt-4" }, /* @__PURE__ */ import_react73.default.createElement("div", null, /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Action"), /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[13px] text-black " }, intendedAction === "upgrade" ? `Upgrade to ${formatTierName(selectedTier.tierName)}` : `Pre-order Card`)), intendedAction === "pre_order" && selectedTier.priceUSD > 0 && /* @__PURE__ */ import_react73.default.createElement("div", null, /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Payment Notice"), /* @__PURE__ */ import_react73.default.createElement("span", { className: "text-[12px] text-neutral-600 leading-relaxed block" }, "By confirming, $", selectedTier.priceUSD.toFixed(2), " will be securely deducted from your USD asset balance to guarantee your order."))), /* @__PURE__ */ import_react73.default.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ import_react73.default.createElement(
|
|
4386
|
+
ThreeDActionButton,
|
|
4387
|
+
{
|
|
4388
|
+
onClick: processAction,
|
|
4389
|
+
isLoading: isProcessing,
|
|
4390
|
+
className: "w-full"
|
|
4391
|
+
},
|
|
4392
|
+
"Confirm & Proceed"
|
|
4393
|
+
), /* @__PURE__ */ import_react73.default.createElement(
|
|
4394
|
+
"button",
|
|
4395
|
+
{
|
|
4396
|
+
disabled: isProcessing,
|
|
4397
|
+
onClick: () => setSelectedTier(null),
|
|
4398
|
+
className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-[13px] mt-1 disabled:opacity-50"
|
|
4399
|
+
},
|
|
4400
|
+
"Cancel"
|
|
4401
|
+
))))), selectedTier && intendedAction === "join_waitlist" && /* @__PURE__ */ import_react73.default.createElement(
|
|
4402
|
+
ConfirmationDialog,
|
|
4403
|
+
{
|
|
4404
|
+
isOpen: true,
|
|
4405
|
+
title: "Join Waitlist",
|
|
4406
|
+
message: `Are you sure you want to join the waitlist for the ${formatTierName(selectedTier.tierName)} ${formatTierName(cardType)} card? You will be notified via email when it becomes available.`,
|
|
4407
|
+
confirmText: "Join Waitlist",
|
|
4408
|
+
isDestructive: false,
|
|
4409
|
+
isProcessing,
|
|
4410
|
+
onClose: () => setSelectedTier(null),
|
|
4411
|
+
onConfirm: processAction
|
|
4412
|
+
}
|
|
4413
|
+
));
|
|
4414
|
+
};
|
|
4224
4415
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4225
4416
|
0 && (module.exports = {
|
|
4226
4417
|
AppBento2,
|
|
@@ -4250,6 +4441,7 @@ var UniversalReferralPage = ({
|
|
|
4250
4441
|
TextInput,
|
|
4251
4442
|
ThreeDActionButton,
|
|
4252
4443
|
ThreeDButton,
|
|
4444
|
+
UniversalCardActionPage,
|
|
4253
4445
|
UniversalCardPage,
|
|
4254
4446
|
UniversalErrorView,
|
|
4255
4447
|
UniversalHomeView,
|
package/dist/index.mjs
CHANGED
|
@@ -1905,7 +1905,7 @@ var ConfirmationDialog = ({
|
|
|
1905
1905
|
{
|
|
1906
1906
|
onClick: onConfirm,
|
|
1907
1907
|
disabled: isProcessing,
|
|
1908
|
-
className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-
|
|
1908
|
+
className: `flex-1 py-4 text-[13px] transition-colors disabled:opacity-50 flex justify-center items-center outline-none ${isDestructive ? "text-black hover:bg-red-50" : "text-black hover:bg-neutral-50"}`
|
|
1909
1909
|
},
|
|
1910
1910
|
isProcessing ? /* @__PURE__ */ React18.createElement(HugeiconsIcon12, { icon: Loading03Icon7, className: "animate-spin", size: 18 }) : confirmText
|
|
1911
1911
|
))));
|
|
@@ -4235,6 +4235,200 @@ var UniversalReferralPage = ({
|
|
|
4235
4235
|
/* @__PURE__ */ React43.createElement(HugeiconsIcon29, { icon: ArrowRight01Icon8, size: 14 })
|
|
4236
4236
|
)))))));
|
|
4237
4237
|
};
|
|
4238
|
+
|
|
4239
|
+
// src/components/UniversalCardActionPage.tsx
|
|
4240
|
+
import React44, { useState as useState29 } from "react";
|
|
4241
|
+
import Confetti2 from "react-confetti";
|
|
4242
|
+
import { useWindowSize as useWindowSize2 } from "react-use";
|
|
4243
|
+
import { HugeiconsIcon as HugeiconsIcon30 } from "@hugeicons/react";
|
|
4244
|
+
import {
|
|
4245
|
+
ArrowLeft01Icon as ArrowLeft01Icon11,
|
|
4246
|
+
CancelCircleIcon as CancelCircleIcon7,
|
|
4247
|
+
Loading03Icon as Loading03Icon19
|
|
4248
|
+
} from "@hugeicons/core-free-icons";
|
|
4249
|
+
var CheckIcon2 = ({ className = "" }) => /* @__PURE__ */ React44.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React44.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "black" }), /* @__PURE__ */ React44.createElement("path", { d: "M8 12L11 15L16 9", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
4250
|
+
var CrossIcon2 = ({ className = "" }) => /* @__PURE__ */ React44.createElement("svg", { viewBox: "0 0 24 24", fill: "none", className: `w-4 h-4 shrink-0 ${className}`, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React44.createElement("circle", { cx: "12", cy: "12", r: "10", fill: "#F5F5F5" }), /* @__PURE__ */ React44.createElement("path", { d: "M15 9L9 15M9 9l6 6", stroke: "#D4D4D4", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
4251
|
+
var formatTierName = (name) => {
|
|
4252
|
+
if (!name) return "";
|
|
4253
|
+
return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();
|
|
4254
|
+
};
|
|
4255
|
+
var getTierGlow = (tier) => {
|
|
4256
|
+
switch (tier.toUpperCase()) {
|
|
4257
|
+
case "PLATINUM":
|
|
4258
|
+
return "from-neutral-300";
|
|
4259
|
+
case "PREMIUM":
|
|
4260
|
+
return "from-purple-200";
|
|
4261
|
+
case "GOLD":
|
|
4262
|
+
return "from-yellow-200";
|
|
4263
|
+
case "SILVER":
|
|
4264
|
+
return "from-slate-300";
|
|
4265
|
+
case "NEO":
|
|
4266
|
+
return "from-cyan-200";
|
|
4267
|
+
case "BASIC":
|
|
4268
|
+
return "from-blue-200";
|
|
4269
|
+
case "ONE":
|
|
4270
|
+
return "from-emerald-200";
|
|
4271
|
+
case "ZERO":
|
|
4272
|
+
return "from-rose-200";
|
|
4273
|
+
default:
|
|
4274
|
+
return "from-neutral-200";
|
|
4275
|
+
}
|
|
4276
|
+
};
|
|
4277
|
+
var UniversalCardActionPage = ({
|
|
4278
|
+
cardType,
|
|
4279
|
+
currentTier,
|
|
4280
|
+
hasPreordered,
|
|
4281
|
+
onWaitlist,
|
|
4282
|
+
tiers,
|
|
4283
|
+
isLoadingData,
|
|
4284
|
+
onBack,
|
|
4285
|
+
onConfirmAction
|
|
4286
|
+
}) => {
|
|
4287
|
+
const onBackHandler = onBack ?? (() => {
|
|
4288
|
+
if (typeof window !== "undefined") window.history.back();
|
|
4289
|
+
});
|
|
4290
|
+
const { width, height } = useWindowSize2();
|
|
4291
|
+
const [selectedTier, setSelectedTier] = useState29(null);
|
|
4292
|
+
const [intendedAction, setIntendedAction] = useState29(null);
|
|
4293
|
+
const [isProcessing, setIsProcessing] = useState29(false);
|
|
4294
|
+
const [showConfetti, setShowConfetti] = useState29(false);
|
|
4295
|
+
const availableTiers = tiers.filter((t) => t.isAvailable || t.acceptPreorder || t.acceptWaitlist);
|
|
4296
|
+
const handleTierClick = (tier, explicitAction) => {
|
|
4297
|
+
setSelectedTier(tier);
|
|
4298
|
+
setIntendedAction(explicitAction);
|
|
4299
|
+
};
|
|
4300
|
+
const processAction = async () => {
|
|
4301
|
+
if (!selectedTier || !intendedAction) return;
|
|
4302
|
+
setIsProcessing(true);
|
|
4303
|
+
try {
|
|
4304
|
+
const result = await onConfirmAction(selectedTier.tierName, intendedAction);
|
|
4305
|
+
if (result.success) {
|
|
4306
|
+
if (intendedAction === "pre_order") {
|
|
4307
|
+
setShowConfetti(true);
|
|
4308
|
+
setTimeout(() => setShowConfetti(false), 6e3);
|
|
4309
|
+
}
|
|
4310
|
+
setSelectedTier(null);
|
|
4311
|
+
setIntendedAction(null);
|
|
4312
|
+
}
|
|
4313
|
+
} finally {
|
|
4314
|
+
setIsProcessing(false);
|
|
4315
|
+
}
|
|
4316
|
+
};
|
|
4317
|
+
const getPrimaryButtonText = (tier) => {
|
|
4318
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4319
|
+
if (isCurrent) {
|
|
4320
|
+
if (hasPreordered) return "Secured (Pre-ordered)";
|
|
4321
|
+
return "Pre-order Now";
|
|
4322
|
+
}
|
|
4323
|
+
if (hasPreordered) return "Unavailable";
|
|
4324
|
+
return `Upgrade to ${formatTierName(tier.tierName)}`;
|
|
4325
|
+
};
|
|
4326
|
+
const getWaitlistButtonText = (tier) => {
|
|
4327
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4328
|
+
if (isCurrent && (onWaitlist || hasPreordered)) return "Joined";
|
|
4329
|
+
return "Join Waitlist";
|
|
4330
|
+
};
|
|
4331
|
+
return /* @__PURE__ */ React44.createElement("div", { className: "w-full" }, /* @__PURE__ */ React44.createElement(ManagedToaster, null), showConfetti && /* @__PURE__ */ React44.createElement("div", { className: "fixed inset-0 z-200 pointer-events-none" }, /* @__PURE__ */ React44.createElement(Confetti2, { width, height, recycle: false, numberOfPieces: 500, gravity: 0.15 })), /* @__PURE__ */ React44.createElement("div", { className: "mb-6 flex max-w-3xl w-full mx-auto items-center px-1" }, /* @__PURE__ */ React44.createElement(
|
|
4332
|
+
"button",
|
|
4333
|
+
{
|
|
4334
|
+
onClick: onBackHandler,
|
|
4335
|
+
className: "flex items-center gap-2 text-neutral-500 hover:text-black transition-colors text-[13px] outline-none"
|
|
4336
|
+
},
|
|
4337
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: ArrowLeft01Icon11, size: 16 }),
|
|
4338
|
+
" Back"
|
|
4339
|
+
)), /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col animate-in max-w-5xl w-full mx-auto fade-in duration-300" }, /* @__PURE__ */ React44.createElement("div", { className: "w-full flex flex-col items-center text-center mb-10 px-4" }, /* @__PURE__ */ React44.createElement("span", { className: "text-[10px] tracking-[0.4em] text-neutral-400 block uppercase mb-3" }, cardType, " CARD ACTIVATION"), /* @__PURE__ */ React44.createElement("h1", { className: "text-2xl sm:text-3xl text-black tracking-tight mb-2" }, "Select Your Tier"), /* @__PURE__ */ React44.createElement("p", { className: "text-xs text-neutral-500 max-w-lg" }, hasPreordered ? "You have already secured your card. Upgrades are disabled while your order is pending processing." : "Upgrade your tier or secure your card now. Pre-orders guarantee priority processing when the batch goes live.")), isLoadingData ? /* @__PURE__ */ React44.createElement("div", { className: "flex justify-center py-20" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: Loading03Icon19, size: 32, className: "animate-spin text-neutral-300" })) : /* @__PURE__ */ React44.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-5 w-full max-w-4xl mx-auto px-4" }, availableTiers.map((tier) => {
|
|
4340
|
+
const isCurrent = tier.tierName === currentTier;
|
|
4341
|
+
const isCardDisabled = hasPreordered && !isCurrent;
|
|
4342
|
+
const isHighlighted = hasPreordered && isCurrent;
|
|
4343
|
+
const isThisCardLoading = isProcessing && selectedTier?.tierName === tier.tierName;
|
|
4344
|
+
const isPrimaryDisabled = isCardDisabled || isHighlighted || isThisCardLoading || !tier.acceptPreorder;
|
|
4345
|
+
const isWaitlistDisabled = !isCurrent || isCurrent && (onWaitlist || hasPreordered) || isThisCardLoading || !tier.acceptWaitlist;
|
|
4346
|
+
return /* @__PURE__ */ React44.createElement(
|
|
4347
|
+
"div",
|
|
4348
|
+
{
|
|
4349
|
+
key: tier.tierName,
|
|
4350
|
+
className: `relative bg-white rounded-3xl p-6 flex flex-col overflow-hidden transition-all duration-300
|
|
4351
|
+
${isCardDisabled ? "opacity-50 grayscale-50 pointer-events-none" : ""}
|
|
4352
|
+
|
|
4353
|
+
`
|
|
4354
|
+
},
|
|
4355
|
+
/* @__PURE__ */ React44.createElement(
|
|
4356
|
+
"div",
|
|
4357
|
+
{
|
|
4358
|
+
className: `absolute -top-10 -right-10 w-48 h-48 bg-linear-to-bl ${getTierGlow(tier.tierName)} to-transparent opacity-40 blur-2xl rounded-full pointer-events-none`
|
|
4359
|
+
}
|
|
4360
|
+
),
|
|
4361
|
+
isThisCardLoading && /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-0 z-50 flex items-center justify-center bg-white/40 backdrop-blur-[1px]" }, /* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: Loading03Icon19, size: 32, className: "animate-spin text-black" })),
|
|
4362
|
+
/* @__PURE__ */ React44.createElement("div", { className: "mb-6 relative z-10" }, /* @__PURE__ */ React44.createElement("div", { className: "flex justify-between items-start mb-1" }, /* @__PURE__ */ React44.createElement("span", { className: "text-black text-sm tracking-widest " }, formatTierName(tier.tierName)), isCurrent && !hasPreordered && /* @__PURE__ */ React44.createElement("span", { className: "text-[9px] bg-neutral-100 text-neutral-600 px-2 py-1 rounded-full uppercase tracking-wider" }, "Current")), /* @__PURE__ */ React44.createElement("div", { className: "flex items-baseline gap-1 mt-2" }, /* @__PURE__ */ React44.createElement("h3", { className: "text-3xl font-light text-black" }, tier.priceUSD === 0 ? "Free" : `$${tier.priceUSD.toFixed(2)}`), tier.priceUSD > 0 && /* @__PURE__ */ React44.createElement("span", { className: "text-xs text-neutral-500" }, tier.isYearly ? "/ year" : "one-time")), /* @__PURE__ */ React44.createElement("p", { className: "text-[13px] text-neutral-500 mt-3 min-h-12 leading-relaxed" }, tier.description)),
|
|
4363
|
+
/* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-2.5 mb-6 relative z-10" }, /* @__PURE__ */ React44.createElement("div", { className: isPrimaryDisabled ? "opacity-50 pointer-events-none" : "" }, /* @__PURE__ */ React44.createElement(
|
|
4364
|
+
ThreeDActionButton,
|
|
4365
|
+
{
|
|
4366
|
+
disabled: isPrimaryDisabled,
|
|
4367
|
+
onClick: () => handleTierClick(tier, isCurrent ? "pre_order" : "upgrade"),
|
|
4368
|
+
className: "w-full"
|
|
4369
|
+
},
|
|
4370
|
+
getPrimaryButtonText(tier)
|
|
4371
|
+
)), /* @__PURE__ */ React44.createElement(
|
|
4372
|
+
"button",
|
|
4373
|
+
{
|
|
4374
|
+
disabled: isWaitlistDisabled,
|
|
4375
|
+
onClick: () => handleTierClick(tier, "join_waitlist"),
|
|
4376
|
+
className: `w-full py-2.5 rounded-full text-xs tracking-wide transition-all outline-none border
|
|
4377
|
+
${isCurrent && (onWaitlist || hasPreordered) ? "bg-neutral-50 border-neutral-100 text-neutral-400 cursor-not-allowed" : "bg-white border-neutral-200 text-black hover:bg-neutral-50"}
|
|
4378
|
+
disabled:opacity-40 disabled:cursor-not-allowed
|
|
4379
|
+
`
|
|
4380
|
+
},
|
|
4381
|
+
getWaitlistButtonText(tier)
|
|
4382
|
+
)),
|
|
4383
|
+
/* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-3 relative z-10" }, tier.features.map((feature, featureIdx) => {
|
|
4384
|
+
const isAvailable = feature.value !== false;
|
|
4385
|
+
const valueText = typeof feature.value === "string" ? feature.value : "";
|
|
4386
|
+
return /* @__PURE__ */ React44.createElement("div", { key: featureIdx, className: "flex items-center gap-3" }, isAvailable ? /* @__PURE__ */ React44.createElement(CheckIcon2, null) : /* @__PURE__ */ React44.createElement(CrossIcon2, null), /* @__PURE__ */ React44.createElement("span", { className: `text-[12px] truncate ${isAvailable ? "text-neutral-800" : "text-neutral-400"}` }, feature.name, valueText && /* @__PURE__ */ React44.createElement("span", { className: "text-neutral-500 ml-1 " }, valueText)));
|
|
4387
|
+
}))
|
|
4388
|
+
);
|
|
4389
|
+
}))), selectedTier && intendedAction !== "join_waitlist" && /* @__PURE__ */ React44.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React44.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isProcessing && setSelectedTier(null) }), /* @__PURE__ */ React44.createElement("div", { className: "relative w-full max-w-sm bg-white rounded-2xl flex flex-col overflow-hidden shadow-2xl animate-in zoom-in-95 duration-200" }, /* @__PURE__ */ React44.createElement(
|
|
4390
|
+
"div",
|
|
4391
|
+
{
|
|
4392
|
+
className: `absolute -top-10 -right-10 w-40 h-40 bg-linear-to-bl ${getTierGlow(selectedTier.tierName)} to-transparent opacity-40 blur-2xl rounded-full pointer-events-none`
|
|
4393
|
+
}
|
|
4394
|
+
), /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 relative z-10" }, /* @__PURE__ */ React44.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Confirm Action"), /* @__PURE__ */ React44.createElement(
|
|
4395
|
+
"button",
|
|
4396
|
+
{
|
|
4397
|
+
disabled: isProcessing,
|
|
4398
|
+
onClick: () => setSelectedTier(null),
|
|
4399
|
+
className: "text-neutral-400 hover:text-black transition-colors outline-none disabled:opacity-50"
|
|
4400
|
+
},
|
|
4401
|
+
/* @__PURE__ */ React44.createElement(HugeiconsIcon30, { icon: CancelCircleIcon7, size: 18 })
|
|
4402
|
+
)), /* @__PURE__ */ React44.createElement("div", { className: "flex-1 overflow-y-auto custom-scrollbar p-6 relative z-10" }, /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col items-center justify-center mb-6" }, /* @__PURE__ */ React44.createElement("p", { className: "text-2xl text-black mb-1" }, selectedTier.priceUSD === 0 ? "Free" : `$${selectedTier.priceUSD.toFixed(2)}`), /* @__PURE__ */ React44.createElement("span", { className: `text-[10px] tracking-widest px-4 py-1.5 rounded-full bg-neutral-100 text-black mt-1` }, formatTierName(selectedTier.tierName), " ", formatTierName(cardType))), /* @__PURE__ */ React44.createElement("div", { className: "grid grid-cols-1 gap-y-6 mb-8 mt-4" }, /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Action"), /* @__PURE__ */ React44.createElement("span", { className: "text-[13px] text-black " }, intendedAction === "upgrade" ? `Upgrade to ${formatTierName(selectedTier.tierName)}` : `Pre-order Card`)), intendedAction === "pre_order" && selectedTier.priceUSD > 0 && /* @__PURE__ */ React44.createElement("div", null, /* @__PURE__ */ React44.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1" }, "Payment Notice"), /* @__PURE__ */ React44.createElement("span", { className: "text-[12px] text-neutral-600 leading-relaxed block" }, "By confirming, $", selectedTier.priceUSD.toFixed(2), " will be securely deducted from your USD asset balance to guarantee your order."))), /* @__PURE__ */ React44.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React44.createElement(
|
|
4403
|
+
ThreeDActionButton,
|
|
4404
|
+
{
|
|
4405
|
+
onClick: processAction,
|
|
4406
|
+
isLoading: isProcessing,
|
|
4407
|
+
className: "w-full"
|
|
4408
|
+
},
|
|
4409
|
+
"Confirm & Proceed"
|
|
4410
|
+
), /* @__PURE__ */ React44.createElement(
|
|
4411
|
+
"button",
|
|
4412
|
+
{
|
|
4413
|
+
disabled: isProcessing,
|
|
4414
|
+
onClick: () => setSelectedTier(null),
|
|
4415
|
+
className: "w-full flex items-center justify-center py-2.5 rounded-full border border-neutral-200 text-black hover:bg-neutral-50 transition-colors outline-none text-[13px] mt-1 disabled:opacity-50"
|
|
4416
|
+
},
|
|
4417
|
+
"Cancel"
|
|
4418
|
+
))))), selectedTier && intendedAction === "join_waitlist" && /* @__PURE__ */ React44.createElement(
|
|
4419
|
+
ConfirmationDialog,
|
|
4420
|
+
{
|
|
4421
|
+
isOpen: true,
|
|
4422
|
+
title: "Join Waitlist",
|
|
4423
|
+
message: `Are you sure you want to join the waitlist for the ${formatTierName(selectedTier.tierName)} ${formatTierName(cardType)} card? You will be notified via email when it becomes available.`,
|
|
4424
|
+
confirmText: "Join Waitlist",
|
|
4425
|
+
isDestructive: false,
|
|
4426
|
+
isProcessing,
|
|
4427
|
+
onClose: () => setSelectedTier(null),
|
|
4428
|
+
onConfirm: processAction
|
|
4429
|
+
}
|
|
4430
|
+
));
|
|
4431
|
+
};
|
|
4238
4432
|
export {
|
|
4239
4433
|
AppBento2,
|
|
4240
4434
|
ConsultantShowcase,
|
|
@@ -4263,6 +4457,7 @@ export {
|
|
|
4263
4457
|
TextInput,
|
|
4264
4458
|
ThreeDActionButton,
|
|
4265
4459
|
ThreeDButton,
|
|
4460
|
+
UniversalCardActionPage,
|
|
4266
4461
|
UniversalCardPage,
|
|
4267
4462
|
UniversalErrorView,
|
|
4268
4463
|
UniversalHomeView,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retinalabsllc/zairusjs",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.20",
|
|
4
4
|
"description": "A perceptive, Ai data driven Next.js UI component library.",
|
|
5
5
|
"author": "Retina Labs Company",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@tailwindcss/postcss": "^4.0.0",
|
|
55
|
+
"@types/canvas-confetti": "^1.9.0",
|
|
55
56
|
"@types/node": "^20.0.0",
|
|
56
57
|
"@types/react": "^19.0.0",
|
|
57
58
|
"@types/react-dom": "^19.0.0",
|