@retinalabsllc/zairusjs 15.0.95 → 15.1.2
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +47 -0
- package/dist/index.mjs +45 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -328,6 +328,22 @@ interface UniversalCardPageProps {
|
|
|
328
328
|
onFundCard?: (cardId: string) => void;
|
|
329
329
|
}
|
|
330
330
|
declare const UniversalCardPage: React.FC<UniversalCardPageProps>;
|
|
331
|
+
interface CardInfoDialogProps {
|
|
332
|
+
isOpen: boolean;
|
|
333
|
+
onClose: () => void;
|
|
334
|
+
cardDetails: {
|
|
335
|
+
card_number: string;
|
|
336
|
+
expiry: string;
|
|
337
|
+
cvv: string;
|
|
338
|
+
} | null;
|
|
339
|
+
}
|
|
340
|
+
declare const CardInfoDialog: React.FC<CardInfoDialogProps>;
|
|
341
|
+
interface FundCardDialogProps {
|
|
342
|
+
isOpen: boolean;
|
|
343
|
+
onClose: () => void;
|
|
344
|
+
onSubmit: (amount: string) => Promise<void>;
|
|
345
|
+
}
|
|
346
|
+
declare const FundCardDialog: React.FC<FundCardDialogProps>;
|
|
331
347
|
|
|
332
348
|
interface UniversalProfilePageProps {
|
|
333
349
|
avatarSrc?: string;
|
|
@@ -905,4 +921,4 @@ interface PinDialerBottomSheetProps {
|
|
|
905
921
|
}
|
|
906
922
|
declare const PinDialerBottomSheet: React.FC<PinDialerBottomSheetProps>;
|
|
907
923
|
|
|
908
|
-
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, PinDialerBottomSheet, type PinDialerBottomSheetProps, 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 };
|
|
924
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, 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, FundCardDialog, type FundCardDialogProps, 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, PinDialerBottomSheet, type PinDialerBottomSheetProps, 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
|
@@ -328,6 +328,22 @@ interface UniversalCardPageProps {
|
|
|
328
328
|
onFundCard?: (cardId: string) => void;
|
|
329
329
|
}
|
|
330
330
|
declare const UniversalCardPage: React.FC<UniversalCardPageProps>;
|
|
331
|
+
interface CardInfoDialogProps {
|
|
332
|
+
isOpen: boolean;
|
|
333
|
+
onClose: () => void;
|
|
334
|
+
cardDetails: {
|
|
335
|
+
card_number: string;
|
|
336
|
+
expiry: string;
|
|
337
|
+
cvv: string;
|
|
338
|
+
} | null;
|
|
339
|
+
}
|
|
340
|
+
declare const CardInfoDialog: React.FC<CardInfoDialogProps>;
|
|
341
|
+
interface FundCardDialogProps {
|
|
342
|
+
isOpen: boolean;
|
|
343
|
+
onClose: () => void;
|
|
344
|
+
onSubmit: (amount: string) => Promise<void>;
|
|
345
|
+
}
|
|
346
|
+
declare const FundCardDialog: React.FC<FundCardDialogProps>;
|
|
331
347
|
|
|
332
348
|
interface UniversalProfilePageProps {
|
|
333
349
|
avatarSrc?: string;
|
|
@@ -905,4 +921,4 @@ interface PinDialerBottomSheetProps {
|
|
|
905
921
|
}
|
|
906
922
|
declare const PinDialerBottomSheet: React.FC<PinDialerBottomSheetProps>;
|
|
907
923
|
|
|
908
|
-
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, PinDialerBottomSheet, type PinDialerBottomSheetProps, 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 };
|
|
924
|
+
export { AppBento2, type AppBento2Props, type BannerProps, type BentoFeature, type BoardMember, type CardData, CardInfoDialog, type CardInfoDialogProps, 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, FundCardDialog, type FundCardDialogProps, 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, PinDialerBottomSheet, type PinDialerBottomSheetProps, 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
|
@@ -32,11 +32,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var index_exports = {};
|
|
33
33
|
__export(index_exports, {
|
|
34
34
|
AppBento2: () => AppBento2,
|
|
35
|
+
CardInfoDialog: () => CardInfoDialog,
|
|
35
36
|
ConsultantShowcase: () => ConsultantShowcase,
|
|
36
37
|
ContentGridBlock: () => ContentGridBlock,
|
|
37
38
|
Faq: () => Faq,
|
|
38
39
|
FeatureScroll: () => FeatureScroll,
|
|
39
40
|
Footer: () => Footer,
|
|
41
|
+
FundCardDialog: () => FundCardDialog,
|
|
40
42
|
GifFeatureCard: () => GifFeatureCard,
|
|
41
43
|
Header: () => Header,
|
|
42
44
|
HeroSection: () => HeroSection,
|
|
@@ -2195,6 +2197,49 @@ var UniversalCardPage = ({
|
|
|
2195
2197
|
));
|
|
2196
2198
|
};
|
|
2197
2199
|
var MenuRow = ({ icon, title, subtitle, onClick, isLast = false, isToggle = false, toggleState = false, toggleLoading = false, disabled = false }) => /* @__PURE__ */ import_react31.default.createElement("div", { onClick: disabled ? void 0 : onClick, className: `flex items-center p-3 transition-colors ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}` }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon, size: 16, className: "text-black" })), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[13px] truncate text-black" }, title), /* @__PURE__ */ import_react31.default.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)), isToggle ? /* @__PURE__ */ import_react31.default.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ import_react31.default.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Loading03Icon, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.ArrowRight01Icon, size: 18, className: "text-neutral-400 shrink-0 ml-2" }));
|
|
2200
|
+
var CardInfoDialog = ({ isOpen, onClose, cardDetails }) => {
|
|
2201
|
+
if (!isOpen || !cardDetails) return null;
|
|
2202
|
+
const handleCopy = (text, label) => {
|
|
2203
|
+
navigator.clipboard.writeText(text);
|
|
2204
|
+
import_react_hot_toast7.default.success(`${label} copied to clipboard`);
|
|
2205
|
+
};
|
|
2206
|
+
const formattedCardNumber = cardDetails.card_number.replace(/(.{4})/g, "$1 ").trim();
|
|
2207
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: onClose }), /* @__PURE__ */ import_react31.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_react31.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ import_react31.default.createElement("h3", { className: "text-[15px] text-black tracking-tight " }, "Secure Card Details"), /* @__PURE__ */ import_react31.default.createElement("button", { onClick: onClose, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "p-6" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "grid grid-cols-1 gap-y-6 mb-6" }, /* @__PURE__ */ import_react31.default.createElement("div", null, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "Card Number"), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[15px] tracking-widest text-black block" }, formattedCardNumber), /* @__PURE__ */ import_react31.default.createElement("button", { onClick: () => handleCopy(cardDetails.card_number, "Card Number"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-3" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Copy01Icon, size: 16 })))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ import_react31.default.createElement("div", null, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "Expiry Date"), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[14px] text-black block" }, cardDetails.expiry), /* @__PURE__ */ import_react31.default.createElement("button", { onClick: () => handleCopy(cardDetails.expiry, "Expiry Date"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-2" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Copy01Icon, size: 16 })))), /* @__PURE__ */ import_react31.default.createElement("div", null, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "CVV"), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ import_react31.default.createElement("span", { className: "text-[14px] text-black block" }, cardDetails.cvv), /* @__PURE__ */ import_react31.default.createElement("button", { onClick: () => handleCopy(cardDetails.cvv, "CVV"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-2" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.Copy01Icon, size: 16 })))))))));
|
|
2208
|
+
};
|
|
2209
|
+
var FundCardDialog = ({ isOpen, onClose, onSubmit }) => {
|
|
2210
|
+
const [amount, setAmount] = (0, import_react31.useState)("");
|
|
2211
|
+
const [isProcessing, setIsProcessing] = (0, import_react31.useState)(false);
|
|
2212
|
+
(0, import_react31.useEffect)(() => {
|
|
2213
|
+
if (isOpen) {
|
|
2214
|
+
setAmount("");
|
|
2215
|
+
}
|
|
2216
|
+
}, [isOpen]);
|
|
2217
|
+
if (!isOpen) return null;
|
|
2218
|
+
const handleFundCard = async (e) => {
|
|
2219
|
+
e.preventDefault();
|
|
2220
|
+
const numericAmount = parseFloat(amount) || 0;
|
|
2221
|
+
if (numericAmount <= 0) return import_react_hot_toast7.default.error("Please enter a valid amount.");
|
|
2222
|
+
setIsProcessing(true);
|
|
2223
|
+
try {
|
|
2224
|
+
await onSubmit(amount);
|
|
2225
|
+
onClose();
|
|
2226
|
+
} catch (err) {
|
|
2227
|
+
} finally {
|
|
2228
|
+
setIsProcessing(false);
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ import_react31.default.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isProcessing && onClose() }), /* @__PURE__ */ import_react31.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_react31.default.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ import_react31.default.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Fund Card"), /* @__PURE__ */ import_react31.default.createElement("button", { disabled: isProcessing, onClick: onClose, className: "text-neutral-400 hover:text-black outline-none disabled:opacity-50" }, /* @__PURE__ */ import_react31.default.createElement(import_react32.HugeiconsIcon, { icon: import_core_free_icons11.CancelCircleIcon, size: 18 }))), /* @__PURE__ */ import_react31.default.createElement("div", { className: "flex-1 p-6" }, /* @__PURE__ */ import_react31.default.createElement("form", { onSubmit: handleFundCard, className: "flex flex-col gap-6" }, /* @__PURE__ */ import_react31.default.createElement(
|
|
2232
|
+
NumberInput,
|
|
2233
|
+
{
|
|
2234
|
+
label: "Amount to Add",
|
|
2235
|
+
value: amount,
|
|
2236
|
+
onChange: setAmount,
|
|
2237
|
+
placeholder: "0.00",
|
|
2238
|
+
disabled: isProcessing,
|
|
2239
|
+
maxLength: 8
|
|
2240
|
+
}
|
|
2241
|
+
), /* @__PURE__ */ import_react31.default.createElement(ThreeDActionButton, { type: "submit", disabled: isProcessing || !amount, isLoading: isProcessing, className: "w-full" }, "Confirm Funding")))));
|
|
2242
|
+
};
|
|
2198
2243
|
|
|
2199
2244
|
// src/components/UniversalProfilePage.tsx
|
|
2200
2245
|
var import_react33 = __toESM(require("react"));
|
|
@@ -4292,11 +4337,13 @@ var PinDialerBottomSheet = ({
|
|
|
4292
4337
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4293
4338
|
0 && (module.exports = {
|
|
4294
4339
|
AppBento2,
|
|
4340
|
+
CardInfoDialog,
|
|
4295
4341
|
ConsultantShowcase,
|
|
4296
4342
|
ContentGridBlock,
|
|
4297
4343
|
Faq,
|
|
4298
4344
|
FeatureScroll,
|
|
4299
4345
|
Footer,
|
|
4346
|
+
FundCardDialog,
|
|
4300
4347
|
GifFeatureCard,
|
|
4301
4348
|
Header,
|
|
4302
4349
|
HeroSection,
|
package/dist/index.mjs
CHANGED
|
@@ -2171,6 +2171,49 @@ var UniversalCardPage = ({
|
|
|
2171
2171
|
));
|
|
2172
2172
|
};
|
|
2173
2173
|
var MenuRow = ({ icon, title, subtitle, onClick, isLast = false, isToggle = false, toggleState = false, toggleLoading = false, disabled = false }) => /* @__PURE__ */ React19.createElement("div", { onClick: disabled ? void 0 : onClick, className: `flex items-center p-3 transition-colors ${disabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-neutral-50"}` }, /* @__PURE__ */ React19.createElement("div", { className: "w-9 h-9 rounded-full border border-neutral-200 flex items-center justify-center shrink-0 mr-4" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon, size: 16, className: "text-black" })), /* @__PURE__ */ React19.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React19.createElement("p", { className: "text-[13px] truncate text-black" }, title), /* @__PURE__ */ React19.createElement("p", { className: "text-[11px] text-neutral-500 truncate" }, subtitle)), isToggle ? /* @__PURE__ */ React19.createElement("div", { className: `relative w-11 h-6 rounded-full transition-colors duration-300 ml-2 shrink-0 ${toggleState ? "bg-black" : "bg-neutral-100"} ${disabled ? "opacity-50" : ""}` }, /* @__PURE__ */ React19.createElement("div", { className: `absolute top-1 left-1 w-4 h-4 rounded-full bg-white shadow-sm transition-transform duration-300 flex items-center justify-center ${toggleState ? "translate-x-5" : "translate-x-0"}` }, toggleLoading && /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Loading03Icon8, size: 10, className: "animate-spin text-black" }))) : /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: ArrowRight01Icon3, size: 18, className: "text-neutral-400 shrink-0 ml-2" }));
|
|
2174
|
+
var CardInfoDialog = ({ isOpen, onClose, cardDetails }) => {
|
|
2175
|
+
if (!isOpen || !cardDetails) return null;
|
|
2176
|
+
const handleCopy = (text, label) => {
|
|
2177
|
+
navigator.clipboard.writeText(text);
|
|
2178
|
+
toast6.success(`${label} copied to clipboard`);
|
|
2179
|
+
};
|
|
2180
|
+
const formattedCardNumber = cardDetails.card_number.replace(/(.{4})/g, "$1 ").trim();
|
|
2181
|
+
return /* @__PURE__ */ React19.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: onClose }), /* @__PURE__ */ React19.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__ */ React19.createElement("div", { className: "flex items-center justify-between p-5 shrink-0" }, /* @__PURE__ */ React19.createElement("h3", { className: "text-[15px] text-black tracking-tight " }, "Secure Card Details"), /* @__PURE__ */ React19.createElement("button", { onClick: onClose, className: "text-neutral-400 hover:text-black transition-colors outline-none" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: CancelCircleIcon5, size: 18 }))), /* @__PURE__ */ React19.createElement("div", { className: "p-6" }, /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-1 gap-y-6 mb-6" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "Card Number"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ React19.createElement("span", { className: "text-[15px] tracking-widest text-black block" }, formattedCardNumber), /* @__PURE__ */ React19.createElement("button", { onClick: () => handleCopy(cardDetails.card_number, "Card Number"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-3" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Copy01Icon3, size: 16 })))), /* @__PURE__ */ React19.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "Expiry Date"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ React19.createElement("span", { className: "text-[14px] text-black block" }, cardDetails.expiry), /* @__PURE__ */ React19.createElement("button", { onClick: () => handleCopy(cardDetails.expiry, "Expiry Date"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-2" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Copy01Icon3, size: 16 })))), /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("span", { className: "text-[10px] tracking-[0.2em] text-neutral-400 block mb-1.5 " }, "CVV"), /* @__PURE__ */ React19.createElement("div", { className: "flex items-center justify-between p-3 rounded-full border border-neutral-200" }, /* @__PURE__ */ React19.createElement("span", { className: "text-[14px] text-black block" }, cardDetails.cvv), /* @__PURE__ */ React19.createElement("button", { onClick: () => handleCopy(cardDetails.cvv, "CVV"), className: "text-neutral-400 hover:text-black outline-none shrink-0 ml-2" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: Copy01Icon3, size: 16 })))))))));
|
|
2182
|
+
};
|
|
2183
|
+
var FundCardDialog = ({ isOpen, onClose, onSubmit }) => {
|
|
2184
|
+
const [amount, setAmount] = useState12("");
|
|
2185
|
+
const [isProcessing, setIsProcessing] = useState12(false);
|
|
2186
|
+
useEffect8(() => {
|
|
2187
|
+
if (isOpen) {
|
|
2188
|
+
setAmount("");
|
|
2189
|
+
}
|
|
2190
|
+
}, [isOpen]);
|
|
2191
|
+
if (!isOpen) return null;
|
|
2192
|
+
const handleFundCard = async (e) => {
|
|
2193
|
+
e.preventDefault();
|
|
2194
|
+
const numericAmount = parseFloat(amount) || 0;
|
|
2195
|
+
if (numericAmount <= 0) return toast6.error("Please enter a valid amount.");
|
|
2196
|
+
setIsProcessing(true);
|
|
2197
|
+
try {
|
|
2198
|
+
await onSubmit(amount);
|
|
2199
|
+
onClose();
|
|
2200
|
+
} catch (err) {
|
|
2201
|
+
} finally {
|
|
2202
|
+
setIsProcessing(false);
|
|
2203
|
+
}
|
|
2204
|
+
};
|
|
2205
|
+
return /* @__PURE__ */ React19.createElement("div", { className: "fixed inset-0 z-120 flex items-center justify-center p-4 pointer-events-auto" }, /* @__PURE__ */ React19.createElement("div", { className: "absolute inset-0 bg-black/40", onClick: () => !isProcessing && onClose() }), /* @__PURE__ */ React19.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__ */ React19.createElement("div", { className: "flex items-center justify-between p-5 shrink-0 " }, /* @__PURE__ */ React19.createElement("h3", { className: "text-[15px] text-black tracking-tight" }, "Fund Card"), /* @__PURE__ */ React19.createElement("button", { disabled: isProcessing, onClick: onClose, className: "text-neutral-400 hover:text-black outline-none disabled:opacity-50" }, /* @__PURE__ */ React19.createElement(HugeiconsIcon13, { icon: CancelCircleIcon5, size: 18 }))), /* @__PURE__ */ React19.createElement("div", { className: "flex-1 p-6" }, /* @__PURE__ */ React19.createElement("form", { onSubmit: handleFundCard, className: "flex flex-col gap-6" }, /* @__PURE__ */ React19.createElement(
|
|
2206
|
+
NumberInput,
|
|
2207
|
+
{
|
|
2208
|
+
label: "Amount to Add",
|
|
2209
|
+
value: amount,
|
|
2210
|
+
onChange: setAmount,
|
|
2211
|
+
placeholder: "0.00",
|
|
2212
|
+
disabled: isProcessing,
|
|
2213
|
+
maxLength: 8
|
|
2214
|
+
}
|
|
2215
|
+
), /* @__PURE__ */ React19.createElement(ThreeDActionButton, { type: "submit", disabled: isProcessing || !amount, isLoading: isProcessing, className: "w-full" }, "Confirm Funding")))));
|
|
2216
|
+
};
|
|
2174
2217
|
|
|
2175
2218
|
// src/components/UniversalProfilePage.tsx
|
|
2176
2219
|
import React20, { useState as useState13 } from "react";
|
|
@@ -4310,11 +4353,13 @@ var PinDialerBottomSheet = ({
|
|
|
4310
4353
|
};
|
|
4311
4354
|
export {
|
|
4312
4355
|
AppBento2,
|
|
4356
|
+
CardInfoDialog,
|
|
4313
4357
|
ConsultantShowcase,
|
|
4314
4358
|
ContentGridBlock,
|
|
4315
4359
|
Faq,
|
|
4316
4360
|
FeatureScroll,
|
|
4317
4361
|
Footer,
|
|
4362
|
+
FundCardDialog,
|
|
4318
4363
|
GifFeatureCard,
|
|
4319
4364
|
Header,
|
|
4320
4365
|
HeroSection,
|