@doujins/payments-ui 0.1.7 → 0.1.8
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.cjs +48 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -65
- package/dist/index.d.ts +37 -65
- package/dist/index.js +48 -124
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/dist/styles.css +0 -2
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ import { SolflareWalletAdapter } from '@solana/wallet-adapter-solflare';
|
|
|
11
11
|
import { TrustWalletAdapter } from '@solana/wallet-adapter-trust';
|
|
12
12
|
import { CoinbaseWalletAdapter } from '@solana/wallet-adapter-coinbase';
|
|
13
13
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
14
|
-
import { X, ChevronDown, ChevronUp, Check, Loader2, CheckCircle, AlertCircle, Wallet, Ban, TriangleAlert, WalletCards, CreditCard, Trash2, Shield, UserRound, Calendar, KeyRound,
|
|
15
|
-
import { clsx } from 'clsx';
|
|
14
|
+
import { X, ChevronDown, ChevronUp, Check, Loader2, CheckCircle, AlertCircle, Wallet, Ban, TriangleAlert, WalletCards, CreditCard, Trash2, Shield, UserRound, Calendar, KeyRound, XCircle, RotateCcw, RefreshCw } from 'lucide-react';
|
|
15
|
+
import clsx2, { clsx } from 'clsx';
|
|
16
16
|
import { twMerge } from 'tailwind-merge';
|
|
17
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
18
|
import countryList from 'country-list';
|
|
@@ -683,7 +683,7 @@ var CardDetailsForm = ({
|
|
|
683
683
|
window.CollectJS.startPaymentRequest();
|
|
684
684
|
};
|
|
685
685
|
const errorMessage = localError ?? externalError;
|
|
686
|
-
const collectFieldClass = "flex h-11 w-full items-center rounded-md border
|
|
686
|
+
const collectFieldClass = "flex h-11 w-full items-center rounded-md border bg-white/5 px-3 text-sm text-white";
|
|
687
687
|
return /* @__PURE__ */ jsxs(
|
|
688
688
|
"form",
|
|
689
689
|
{
|
|
@@ -931,22 +931,13 @@ var StoredPaymentMethods = ({
|
|
|
931
931
|
onMethodSelect,
|
|
932
932
|
showAddButton = true
|
|
933
933
|
}) => {
|
|
934
|
-
const { listQuery, createMutation, deleteMutation } = usePaymentMethods();
|
|
935
934
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
936
935
|
const [deletingId, setDeletingId] = useState(null);
|
|
936
|
+
const { listQuery, createMutation, deleteMutation } = usePaymentMethods();
|
|
937
937
|
const payments = useMemo(() => listQuery.data?.data ?? [], [listQuery.data]);
|
|
938
938
|
const handleCardTokenize = (token, billing) => {
|
|
939
939
|
createMutation.mutate({ token, billing });
|
|
940
940
|
};
|
|
941
|
-
const handleDelete = (method) => {
|
|
942
|
-
setDeletingId(method.id);
|
|
943
|
-
deleteMutation.mutate(
|
|
944
|
-
{ id: method.id },
|
|
945
|
-
{
|
|
946
|
-
onSettled: () => setDeletingId(null)
|
|
947
|
-
}
|
|
948
|
-
);
|
|
949
|
-
};
|
|
950
941
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
951
942
|
/* @__PURE__ */ jsx("div", { className: "flex items-start justify-between gap-4", children: showAddButton && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", onClick: () => setIsModalOpen(true), children: "Add card" }) }),
|
|
952
943
|
listQuery.isLoading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center py-4 text-sm text-muted-foreground", children: [
|
|
@@ -958,50 +949,24 @@ var StoredPaymentMethods = ({
|
|
|
958
949
|
"div",
|
|
959
950
|
{
|
|
960
951
|
className: cn(
|
|
961
|
-
"flex
|
|
962
|
-
|
|
952
|
+
"flex border border-border rounded-md px-4 py-3 flex-row items-center justify-between",
|
|
953
|
+
{
|
|
954
|
+
"bg-primary/5": isSelected
|
|
955
|
+
}
|
|
963
956
|
),
|
|
964
957
|
children: [
|
|
965
|
-
/* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: formatCardLabel(method) }),
|
|
967
|
-
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
968
|
-
"Added on",
|
|
969
|
-
" ",
|
|
970
|
-
method.created_at ? new Date(method.created_at).toLocaleDateString() : "unknown"
|
|
971
|
-
] })
|
|
972
|
-
] }),
|
|
958
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-foreground", children: formatCardLabel(method) }),
|
|
973
959
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
974
|
-
/* @__PURE__ */ jsx(
|
|
975
|
-
Badge,
|
|
976
|
-
{
|
|
977
|
-
variant: method.is_active ? "default" : "secondary",
|
|
978
|
-
className: cn(
|
|
979
|
-
method.is_active ? "bg-primary/20 text-primary" : "bg-muted text-muted-foreground"
|
|
980
|
-
),
|
|
981
|
-
children: method.is_active ? "Active" : "Inactive"
|
|
982
|
-
}
|
|
983
|
-
),
|
|
984
960
|
method.failure_reason && /* @__PURE__ */ jsx(Badge, { variant: "destructive", children: method.failure_reason }),
|
|
985
961
|
onMethodSelect && /* @__PURE__ */ jsx(
|
|
986
962
|
Button,
|
|
987
963
|
{
|
|
988
964
|
size: "sm",
|
|
989
965
|
variant: "ghost",
|
|
990
|
-
className: "px-3",
|
|
991
966
|
onClick: () => onMethodSelect(method),
|
|
967
|
+
className: clsx2("px-3", { "bg-muted/90": !isSelected, "bg-background": isSelected }),
|
|
992
968
|
children: isSelected ? "Selected" : "Use card"
|
|
993
969
|
}
|
|
994
|
-
),
|
|
995
|
-
/* @__PURE__ */ jsx(
|
|
996
|
-
Button,
|
|
997
|
-
{
|
|
998
|
-
size: "sm",
|
|
999
|
-
variant: "ghost",
|
|
1000
|
-
className: "px-3 text-destructive",
|
|
1001
|
-
onClick: () => handleDelete(method),
|
|
1002
|
-
disabled: deletingId === method.id && deleteMutation.isPending,
|
|
1003
|
-
children: deletingId === method.id && deleteMutation.isPending ? "Removing\u2026" : "Remove"
|
|
1004
|
-
}
|
|
1005
970
|
)
|
|
1006
971
|
] })
|
|
1007
972
|
]
|
|
@@ -1366,9 +1331,9 @@ var QRCodePayment = ({
|
|
|
1366
1331
|
onSuccess: handleQrSuccess
|
|
1367
1332
|
});
|
|
1368
1333
|
if (!selectedToken) {
|
|
1369
|
-
return /* @__PURE__ */ jsx("div", { className: "rounded-md border border-dashed
|
|
1334
|
+
return /* @__PURE__ */ jsx("div", { className: "rounded-md border border-dashed bg-muted/10 px-4 py-6 text-center text-sm text-muted-foreground", children: "Select a token to continue." });
|
|
1370
1335
|
}
|
|
1371
|
-
return /* @__PURE__ */ jsxs(Card, { className: "space-y-4 border
|
|
1336
|
+
return /* @__PURE__ */ jsxs(Card, { className: "space-y-4 border bg-background/80 p-6 shadow-none rounded-md", children: [
|
|
1372
1337
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
|
|
1373
1338
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1374
1339
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground", children: "Scan with Solana Pay" }),
|
|
@@ -1387,7 +1352,7 @@ var QRCodePayment = ({
|
|
|
1387
1352
|
)
|
|
1388
1353
|
] }),
|
|
1389
1354
|
error && /* @__PURE__ */ jsx("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-2 text-sm text-destructive", children: error }),
|
|
1390
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center rounded-2xl border border-dashed
|
|
1355
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center rounded-2xl border border-dashed bg-muted/5 p-6", children: qrDataUri ? /* @__PURE__ */ jsx("img", { src: qrDataUri, alt: "Solana Pay QR", className: "h-72 w-72 rounded-lg border bg-card" }) : /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1391
1356
|
/* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin" }),
|
|
1392
1357
|
" Generating QR code\u2026"
|
|
1393
1358
|
] }) : "QR code unavailable" }) }),
|
|
@@ -1739,7 +1704,7 @@ var SolanaPaymentView = ({
|
|
|
1739
1704
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
1740
1705
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: "Select token" }),
|
|
1741
1706
|
/* @__PURE__ */ jsxs(Select, { value: selectedToken?.symbol ?? "", onValueChange: handleTokenChange, children: [
|
|
1742
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "border
|
|
1707
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "border bg-transparent", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select token" }) }),
|
|
1743
1708
|
/* @__PURE__ */ jsx(SelectContent, { className: "max-h-64", children: tokens.map((token) => /* @__PURE__ */ jsxs(SelectItem, { value: token.symbol, children: [
|
|
1744
1709
|
token.name,
|
|
1745
1710
|
" (",
|
|
@@ -1806,7 +1771,7 @@ var PaymentExperience = ({
|
|
|
1806
1771
|
const [savedError, setSavedError] = useState(null);
|
|
1807
1772
|
const [newCardStatus, setNewCardStatus] = useState("idle");
|
|
1808
1773
|
const [newCardError, setNewCardError] = useState(null);
|
|
1809
|
-
const { notifyStatus,
|
|
1774
|
+
const { notifyStatus, notifyError } = usePaymentNotifications();
|
|
1810
1775
|
useEffect(() => {
|
|
1811
1776
|
setActiveTab(showStored ? "saved" : "new");
|
|
1812
1777
|
}, [showStored]);
|
|
@@ -1866,7 +1831,7 @@ var PaymentExperience = ({
|
|
|
1866
1831
|
},
|
|
1867
1832
|
[notifyError, notifyStatus, onNewCardPayment]
|
|
1868
1833
|
);
|
|
1869
|
-
|
|
1834
|
+
useCallback(() => {
|
|
1870
1835
|
if (!enableSolanaPay) return;
|
|
1871
1836
|
setMode("solana");
|
|
1872
1837
|
}, [enableSolanaPay]);
|
|
@@ -1926,28 +1891,21 @@ var PaymentExperience = ({
|
|
|
1926
1891
|
}
|
|
1927
1892
|
);
|
|
1928
1893
|
};
|
|
1929
|
-
const renderCardExperience = () => /* @__PURE__ */ jsxs(
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
className: "
|
|
1936
|
-
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
}
|
|
1945
|
-
),
|
|
1946
|
-
enableSolanaPay && /* @__PURE__ */ jsxs(Button, { className: "w-full", variant: "secondary", onClick: showSolanaView, children: [
|
|
1947
|
-
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
1948
|
-
" Pay with Solana"
|
|
1949
|
-
] })
|
|
1950
|
-
] });
|
|
1894
|
+
const renderCardExperience = () => /* @__PURE__ */ jsxs(
|
|
1895
|
+
Tabs,
|
|
1896
|
+
{
|
|
1897
|
+
value: activeTab,
|
|
1898
|
+
onValueChange: (value) => setActiveTab(value),
|
|
1899
|
+
children: [
|
|
1900
|
+
/* @__PURE__ */ jsxs(TabsList, { className: "grid w-full grid-cols-2", children: [
|
|
1901
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "saved", disabled: !showStored, children: "Use saved card" }),
|
|
1902
|
+
/* @__PURE__ */ jsx(TabsTrigger, { value: "new", disabled: !showNewCard, children: "Add new card" })
|
|
1903
|
+
] }),
|
|
1904
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "saved", children: renderSavedTab() }),
|
|
1905
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "new", children: renderNewTab() })
|
|
1906
|
+
]
|
|
1907
|
+
}
|
|
1908
|
+
);
|
|
1951
1909
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-6 pt-4", children: [
|
|
1952
1910
|
mode === "cards" && renderCardExperience(),
|
|
1953
1911
|
mode === "solana" && enableSolanaPay && /* @__PURE__ */ jsx(
|
|
@@ -1971,7 +1929,7 @@ var SubscriptionSuccessDialog = ({
|
|
|
1971
1929
|
}) => {
|
|
1972
1930
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (value) => {
|
|
1973
1931
|
if (!value) onClose();
|
|
1974
|
-
}, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border
|
|
1932
|
+
}, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border bg-background/95 p-0 shadow-2xl", children: [
|
|
1975
1933
|
/* @__PURE__ */ jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-background px-6 py-8 text-center", children: [
|
|
1976
1934
|
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-background/60", children: /* @__PURE__ */ jsx(CheckCircle, { className: "h-10 w-10 text-primary" }) }),
|
|
1977
1935
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
@@ -2159,9 +2117,9 @@ var SubscriptionCheckoutModal = ({
|
|
|
2159
2117
|
/* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsx(
|
|
2160
2118
|
DialogContent,
|
|
2161
2119
|
{
|
|
2162
|
-
className: "max-w-3xl max-h-[90vh] overflow-y-auto
|
|
2120
|
+
className: "max-w-3xl max-h-[90vh] overflow-y-auto [&::-webkit-scrollbar]:hidden",
|
|
2163
2121
|
children: /* @__PURE__ */ jsxs("div", { className: "p-6 space-y-6", children: [
|
|
2164
|
-
!priceId && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg
|
|
2122
|
+
!priceId && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm text-destructive", children: [
|
|
2165
2123
|
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
2166
2124
|
" Select a subscription plan to continue."
|
|
2167
2125
|
] }),
|
|
@@ -2209,8 +2167,8 @@ var wallets = [
|
|
|
2209
2167
|
];
|
|
2210
2168
|
var WalletModal = ({ open, onOpenChange }) => {
|
|
2211
2169
|
const [expandedWallet, setExpandedWallet] = useState(null);
|
|
2212
|
-
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border
|
|
2213
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className: "border-b
|
|
2170
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: [
|
|
2171
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "border-b bg-gradient-to-r from-primary/10 via-background to-background px-6 py-5 text-left", children: [
|
|
2214
2172
|
/* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: [
|
|
2215
2173
|
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 text-primary" }),
|
|
2216
2174
|
" Connect a Solana wallet"
|
|
@@ -2221,7 +2179,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2221
2179
|
wallets.map((wallet) => /* @__PURE__ */ jsxs(
|
|
2222
2180
|
"div",
|
|
2223
2181
|
{
|
|
2224
|
-
className: "rounded-2xl border
|
|
2182
|
+
className: "rounded-2xl border bg-background/80 p-4 shadow-sm",
|
|
2225
2183
|
children: [
|
|
2226
2184
|
/* @__PURE__ */ jsxs(
|
|
2227
2185
|
"button",
|
|
@@ -2256,7 +2214,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2256
2214
|
},
|
|
2257
2215
|
wallet.id
|
|
2258
2216
|
)),
|
|
2259
|
-
/* @__PURE__ */ jsx("div", { className: "rounded-2xl border
|
|
2217
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-2xl border bg-muted/10 p-4 text-xs text-muted-foreground", children: "Don\u2019t see your wallet? Additional providers will be added soon. Contact support if you need manual verification." })
|
|
2260
2218
|
] })
|
|
2261
2219
|
] }) });
|
|
2262
2220
|
};
|
|
@@ -2415,46 +2373,12 @@ var usePaymentContext = () => {
|
|
|
2415
2373
|
}
|
|
2416
2374
|
return context;
|
|
2417
2375
|
};
|
|
2418
|
-
var BillingThemeProvider = ({
|
|
2419
|
-
children,
|
|
2420
|
-
className,
|
|
2421
|
-
dark = false
|
|
2422
|
-
}) => {
|
|
2423
|
-
return /* @__PURE__ */ jsx(
|
|
2424
|
-
"div",
|
|
2425
|
-
{
|
|
2426
|
-
className: cn(
|
|
2427
|
-
"payments-ui-root",
|
|
2428
|
-
dark && "dark",
|
|
2429
|
-
className
|
|
2430
|
-
),
|
|
2431
|
-
children
|
|
2432
|
-
}
|
|
2433
|
-
);
|
|
2434
|
-
};
|
|
2435
|
-
var BillingThemePortal = ({
|
|
2436
|
-
children,
|
|
2437
|
-
className,
|
|
2438
|
-
dark = false
|
|
2439
|
-
}) => {
|
|
2440
|
-
return /* @__PURE__ */ jsx(
|
|
2441
|
-
"div",
|
|
2442
|
-
{
|
|
2443
|
-
className: cn(
|
|
2444
|
-
"payments-ui-portal",
|
|
2445
|
-
dark && "dark",
|
|
2446
|
-
className
|
|
2447
|
-
),
|
|
2448
|
-
children
|
|
2449
|
-
}
|
|
2450
|
-
);
|
|
2451
|
-
};
|
|
2452
2376
|
var SolanaPaymentSelector = ({
|
|
2453
2377
|
isOpen,
|
|
2454
2378
|
onClose,
|
|
2455
2379
|
...props
|
|
2456
2380
|
}) => {
|
|
2457
|
-
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (value) => value ? void 0 : onClose(), children: /* @__PURE__ */ jsx(DialogContent, { className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-md border
|
|
2381
|
+
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (value) => value ? void 0 : onClose(), children: /* @__PURE__ */ jsx(DialogContent, { className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-md border bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ jsx(SolanaPaymentView, { ...props, onClose }) }) });
|
|
2458
2382
|
};
|
|
2459
2383
|
var Table = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
2460
2384
|
"table",
|
|
@@ -2894,8 +2818,8 @@ var BillingHistory = ({
|
|
|
2894
2818
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t.reviewActivity }),
|
|
2895
2819
|
enableCancel && /* @__PURE__ */ jsx(CancelMembershipDialog, { onNotify: notify })
|
|
2896
2820
|
] }),
|
|
2897
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-[300px] overflow-y-auto rounded-lg border
|
|
2898
|
-
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { className: "
|
|
2821
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-[300px] overflow-y-auto rounded-lg border ", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: historyQuery.isLoading ? /* @__PURE__ */ jsx("p", { className: "p-4 text-center text-sm text-muted-foreground", children: t.loading }) : historyQuery.isError ? /* @__PURE__ */ jsx("p", { className: "p-4 text-center text-sm text-destructive", children: t.error }) : /* @__PURE__ */ jsxs(Table, { children: [
|
|
2822
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, { className: "", children: [
|
|
2899
2823
|
/* @__PURE__ */ jsx(TableHead, { children: t.reference }),
|
|
2900
2824
|
/* @__PURE__ */ jsx(TableHead, { children: t.date }),
|
|
2901
2825
|
/* @__PURE__ */ jsx(TableHead, { children: t.amount }),
|
|
@@ -2903,7 +2827,7 @@ var BillingHistory = ({
|
|
|
2903
2827
|
/* @__PURE__ */ jsx(TableHead, { children: t.status })
|
|
2904
2828
|
] }) }),
|
|
2905
2829
|
/* @__PURE__ */ jsx(TableBody, { children: payments.map(
|
|
2906
|
-
(page) => page.data.map((payment) => /* @__PURE__ */ jsxs(TableRow, { className: "
|
|
2830
|
+
(page) => page.data.map((payment) => /* @__PURE__ */ jsxs(TableRow, { className: "", children: [
|
|
2907
2831
|
/* @__PURE__ */ jsx(TableCell, { className: "font-mono text-sm", children: payment.id.slice(0, 7).toUpperCase() }),
|
|
2908
2832
|
/* @__PURE__ */ jsx(TableCell, { children: formatDate(payment.purchased_at) }),
|
|
2909
2833
|
/* @__PURE__ */ jsx(TableCell, { children: formatAmount(payment.amount, payment.currency) }),
|
|
@@ -3094,7 +3018,7 @@ var PaymentMethodsSection = ({
|
|
|
3094
3018
|
] }) : payments.length === 0 ? /* @__PURE__ */ jsx("div", { className: "p-6 text-sm text-center", children: t.noPaymentMethods }) : /* @__PURE__ */ jsx("div", { className: "space-y-3", children: payments.map((method) => /* @__PURE__ */ jsxs(
|
|
3095
3019
|
"div",
|
|
3096
3020
|
{
|
|
3097
|
-
className: "rounded-lg border
|
|
3021
|
+
className: "rounded-lg border bg-white/5 p-4 shadow-sm",
|
|
3098
3022
|
children: [
|
|
3099
3023
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 md:flex-row md:items-center md:justify-between", children: [
|
|
3100
3024
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -3179,7 +3103,7 @@ var PaymentMethodsSection = ({
|
|
|
3179
3103
|
},
|
|
3180
3104
|
externalError: createMutation.error?.message ?? null,
|
|
3181
3105
|
onTokenize: handleCardTokenize,
|
|
3182
|
-
className: "rounded-2xl border
|
|
3106
|
+
className: "rounded-2xl border bg-white/5 p-6"
|
|
3183
3107
|
}
|
|
3184
3108
|
)
|
|
3185
3109
|
] }) }),
|
|
@@ -3202,7 +3126,7 @@ var PaymentMethodsSection = ({
|
|
|
3202
3126
|
},
|
|
3203
3127
|
externalError: replaceMutation.error?.message ?? null,
|
|
3204
3128
|
onTokenize: handleReplaceTokenize,
|
|
3205
|
-
className: "rounded-2xl border
|
|
3129
|
+
className: "rounded-2xl border bg-white/5 p-6"
|
|
3206
3130
|
}
|
|
3207
3131
|
)
|
|
3208
3132
|
] }) })
|
|
@@ -3271,7 +3195,7 @@ var WalletDialog = ({ open, onOpenChange }) => {
|
|
|
3271
3195
|
setForm(initialState);
|
|
3272
3196
|
};
|
|
3273
3197
|
return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialogContent, { className: "max-h-[95vh] max-w-lg overflow-y-auto rounded-2xl border border-border bg-background", children: [
|
|
3274
|
-
/* @__PURE__ */ jsxs(AlertDialogHeader, { className: "border-b
|
|
3198
|
+
/* @__PURE__ */ jsxs(AlertDialogHeader, { className: "border-b pb-4", children: [
|
|
3275
3199
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3276
3200
|
/* @__PURE__ */ jsx(Shield, { className: "h-5 w-5 text-primary" }),
|
|
3277
3201
|
/* @__PURE__ */ jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide", children: "Secure Payment via Mobius Pay" })
|
|
@@ -3315,7 +3239,7 @@ var WalletDialog = ({ open, onOpenChange }) => {
|
|
|
3315
3239
|
] })
|
|
3316
3240
|
] })
|
|
3317
3241
|
] }),
|
|
3318
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-md border
|
|
3242
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-muted/10 p-4", children: [
|
|
3319
3243
|
/* @__PURE__ */ jsx(Checkbox, { id: "terms-agree", checked: form.termsAccepted, onCheckedChange: (checked) => updateField("termsAccepted", Boolean(checked)) }),
|
|
3320
3244
|
/* @__PURE__ */ jsx(Label, { htmlFor: "terms-agree", className: "text-sm text-muted-foreground", children: "By completing this order, I confirm that I am 18 years or older and agree to your privacy policy and terms." })
|
|
3321
3245
|
] }),
|
|
@@ -3723,6 +3647,6 @@ var usePaymentStatus = (options = {}) => {
|
|
|
3723
3647
|
};
|
|
3724
3648
|
};
|
|
3725
3649
|
|
|
3726
|
-
export { BillingHistory,
|
|
3650
|
+
export { BillingHistory, CancelMembershipDialog, CardDetailsForm, ClientApiError, PaymentContext, PaymentExperience, PaymentMethodsSection, PaymentProvider, PaymentsDialogProvider, SolanaPaymentSelector, SolanaPaymentView, StoredPaymentMethods, SubscriptionCheckoutModal, SubscriptionSuccessDialog, WalletDialog, WalletModal, createClient, usePaymentContext, usePaymentDialogs, usePaymentMethods, usePaymentNotifications, usePaymentStatus, useSolanaQrPayment, useSubscriptionActions, useSupportedTokens, useTokenBalance };
|
|
3727
3651
|
//# sourceMappingURL=index.js.map
|
|
3728
3652
|
//# sourceMappingURL=index.js.map
|