@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 CHANGED
@@ -13,7 +13,7 @@ var walletAdapterTrust = require('@solana/wallet-adapter-trust');
13
13
  var walletAdapterCoinbase = require('@solana/wallet-adapter-coinbase');
14
14
  var DialogPrimitive = require('@radix-ui/react-dialog');
15
15
  var lucideReact = require('lucide-react');
16
- var clsx = require('clsx');
16
+ var clsx2 = require('clsx');
17
17
  var tailwindMerge = require('tailwind-merge');
18
18
  var jsxRuntime = require('react/jsx-runtime');
19
19
  var countryList = require('country-list');
@@ -50,6 +50,7 @@ function _interopNamespace(e) {
50
50
 
51
51
  var React17__namespace = /*#__PURE__*/_interopNamespace(React17);
52
52
  var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
53
+ var clsx2__default = /*#__PURE__*/_interopDefault(clsx2);
53
54
  var countryList__default = /*#__PURE__*/_interopDefault(countryList);
54
55
  var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
55
56
  var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
@@ -292,7 +293,7 @@ var createClient = (config) => {
292
293
  };
293
294
  };
294
295
  function cn(...inputs) {
295
- return tailwindMerge.twMerge(clsx.clsx(inputs));
296
+ return tailwindMerge.twMerge(clsx2.clsx(inputs));
296
297
  }
297
298
  var Dialog = DialogPrimitive__namespace.Root;
298
299
  var DialogPortal = DialogPrimitive__namespace.Portal;
@@ -715,7 +716,7 @@ var CardDetailsForm = ({
715
716
  window.CollectJS.startPaymentRequest();
716
717
  };
717
718
  const errorMessage = localError ?? externalError;
718
- const collectFieldClass = "flex h-11 w-full items-center rounded-md border border-white/10 bg-white/5 px-3 text-sm text-white";
719
+ const collectFieldClass = "flex h-11 w-full items-center rounded-md border bg-white/5 px-3 text-sm text-white";
719
720
  return /* @__PURE__ */ jsxRuntime.jsxs(
720
721
  "form",
721
722
  {
@@ -963,22 +964,13 @@ var StoredPaymentMethods = ({
963
964
  onMethodSelect,
964
965
  showAddButton = true
965
966
  }) => {
966
- const { listQuery, createMutation, deleteMutation } = usePaymentMethods();
967
967
  const [isModalOpen, setIsModalOpen] = React17.useState(false);
968
968
  const [deletingId, setDeletingId] = React17.useState(null);
969
+ const { listQuery, createMutation, deleteMutation } = usePaymentMethods();
969
970
  const payments = React17.useMemo(() => listQuery.data?.data ?? [], [listQuery.data]);
970
971
  const handleCardTokenize = (token, billing) => {
971
972
  createMutation.mutate({ token, billing });
972
973
  };
973
- const handleDelete = (method) => {
974
- setDeletingId(method.id);
975
- deleteMutation.mutate(
976
- { id: method.id },
977
- {
978
- onSettled: () => setDeletingId(null)
979
- }
980
- );
981
- };
982
974
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
983
975
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-between gap-4", children: showAddButton && /* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", variant: "ghost", onClick: () => setIsModalOpen(true), children: "Add card" }) }),
984
976
  listQuery.isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center py-4 text-sm text-muted-foreground", children: [
@@ -990,50 +982,24 @@ var StoredPaymentMethods = ({
990
982
  "div",
991
983
  {
992
984
  className: cn(
993
- "flex flex-col gap-3 rounded-md px-4 py-3 transition-colors md:flex-row md:items-center md:justify-between",
994
- isSelected ? "ring-1 ring-primary/70 bg-primary/5" : "ring-1 ring-border/40 bg-transparent"
985
+ "flex border border-border rounded-md px-4 py-3 flex-row items-center justify-between",
986
+ {
987
+ "bg-primary/5": isSelected
988
+ }
995
989
  ),
996
990
  children: [
997
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
998
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: formatCardLabel(method) }),
999
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", children: [
1000
- "Added on",
1001
- " ",
1002
- method.created_at ? new Date(method.created_at).toLocaleDateString() : "unknown"
1003
- ] })
1004
- ] }),
991
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-foreground", children: formatCardLabel(method) }),
1005
992
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
1006
- /* @__PURE__ */ jsxRuntime.jsx(
1007
- Badge,
1008
- {
1009
- variant: method.is_active ? "default" : "secondary",
1010
- className: cn(
1011
- method.is_active ? "bg-primary/20 text-primary" : "bg-muted text-muted-foreground"
1012
- ),
1013
- children: method.is_active ? "Active" : "Inactive"
1014
- }
1015
- ),
1016
993
  method.failure_reason && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "destructive", children: method.failure_reason }),
1017
994
  onMethodSelect && /* @__PURE__ */ jsxRuntime.jsx(
1018
995
  Button,
1019
996
  {
1020
997
  size: "sm",
1021
998
  variant: "ghost",
1022
- className: "px-3",
1023
999
  onClick: () => onMethodSelect(method),
1000
+ className: clsx2__default.default("px-3", { "bg-muted/90": !isSelected, "bg-background": isSelected }),
1024
1001
  children: isSelected ? "Selected" : "Use card"
1025
1002
  }
1026
- ),
1027
- /* @__PURE__ */ jsxRuntime.jsx(
1028
- Button,
1029
- {
1030
- size: "sm",
1031
- variant: "ghost",
1032
- className: "px-3 text-destructive",
1033
- onClick: () => handleDelete(method),
1034
- disabled: deletingId === method.id && deleteMutation.isPending,
1035
- children: deletingId === method.id && deleteMutation.isPending ? "Removing\u2026" : "Remove"
1036
- }
1037
1003
  )
1038
1004
  ] })
1039
1005
  ]
@@ -1398,9 +1364,9 @@ var QRCodePayment = ({
1398
1364
  onSuccess: handleQrSuccess
1399
1365
  });
1400
1366
  if (!selectedToken) {
1401
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-dashed border-border/60 bg-muted/10 px-4 py-6 text-center text-sm text-muted-foreground", children: "Select a token to continue." });
1367
+ return /* @__PURE__ */ jsxRuntime.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." });
1402
1368
  }
1403
- return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "space-y-4 border border-border/60 bg-background/80 p-6 shadow-none rounded-md", children: [
1369
+ return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "space-y-4 border bg-background/80 p-6 shadow-none rounded-md", children: [
1404
1370
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between", children: [
1405
1371
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1406
1372
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground", children: "Scan with Solana Pay" }),
@@ -1419,7 +1385,7 @@ var QRCodePayment = ({
1419
1385
  )
1420
1386
  ] }),
1421
1387
  error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-destructive/40 bg-destructive/10 px-4 py-2 text-sm text-destructive", children: error }),
1422
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center rounded-2xl border border-dashed border-border/70 bg-muted/5 p-6", children: qrDataUri ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: qrDataUri, alt: "Solana Pay QR", className: "h-72 w-72 rounded-lg border border-border/40 bg-card" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1388
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center rounded-2xl border border-dashed bg-muted/5 p-6", children: qrDataUri ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: qrDataUri, alt: "Solana Pay QR", className: "h-72 w-72 rounded-lg border bg-card" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", children: isLoading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1423
1389
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-5 w-5 animate-spin" }),
1424
1390
  " Generating QR code\u2026"
1425
1391
  ] }) : "QR code unavailable" }) }),
@@ -1771,7 +1737,7 @@ var SolanaPaymentView = ({
1771
1737
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
1772
1738
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-foreground", children: "Select token" }),
1773
1739
  /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: selectedToken?.symbol ?? "", onValueChange: handleTokenChange, children: [
1774
- /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "border border-border/60 bg-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select token" }) }),
1740
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "border bg-transparent", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: "Select token" }) }),
1775
1741
  /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { className: "max-h-64", children: tokens.map((token) => /* @__PURE__ */ jsxRuntime.jsxs(SelectItem, { value: token.symbol, children: [
1776
1742
  token.name,
1777
1743
  " (",
@@ -1838,7 +1804,7 @@ var PaymentExperience = ({
1838
1804
  const [savedError, setSavedError] = React17.useState(null);
1839
1805
  const [newCardStatus, setNewCardStatus] = React17.useState("idle");
1840
1806
  const [newCardError, setNewCardError] = React17.useState(null);
1841
- const { notifyStatus, notifySuccess, notifyError } = usePaymentNotifications();
1807
+ const { notifyStatus, notifyError } = usePaymentNotifications();
1842
1808
  React17.useEffect(() => {
1843
1809
  setActiveTab(showStored ? "saved" : "new");
1844
1810
  }, [showStored]);
@@ -1898,7 +1864,7 @@ var PaymentExperience = ({
1898
1864
  },
1899
1865
  [notifyError, notifyStatus, onNewCardPayment]
1900
1866
  );
1901
- const showSolanaView = React17.useCallback(() => {
1867
+ React17.useCallback(() => {
1902
1868
  if (!enableSolanaPay) return;
1903
1869
  setMode("solana");
1904
1870
  }, [enableSolanaPay]);
@@ -1958,28 +1924,21 @@ var PaymentExperience = ({
1958
1924
  }
1959
1925
  );
1960
1926
  };
1961
- const renderCardExperience = () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1962
- /* @__PURE__ */ jsxRuntime.jsxs(
1963
- Tabs,
1964
- {
1965
- value: activeTab,
1966
- onValueChange: (value) => setActiveTab(value),
1967
- className: "space-y-3",
1968
- children: [
1969
- /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "grid w-full grid-cols-2 border border-border/60", children: [
1970
- /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "saved", disabled: !showStored, children: "Use saved card" }),
1971
- /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "new", disabled: !showNewCard, children: "Add new card" })
1972
- ] }),
1973
- /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "saved", children: renderSavedTab() }),
1974
- /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "new", children: renderNewTab() })
1975
- ]
1976
- }
1977
- ),
1978
- enableSolanaPay && /* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "w-full", variant: "secondary", onClick: showSolanaView, children: [
1979
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "mr-2 h-4 w-4" }),
1980
- " Pay with Solana"
1981
- ] })
1982
- ] });
1927
+ const renderCardExperience = () => /* @__PURE__ */ jsxRuntime.jsxs(
1928
+ Tabs,
1929
+ {
1930
+ value: activeTab,
1931
+ onValueChange: (value) => setActiveTab(value),
1932
+ children: [
1933
+ /* @__PURE__ */ jsxRuntime.jsxs(TabsList, { className: "grid w-full grid-cols-2", children: [
1934
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "saved", disabled: !showStored, children: "Use saved card" }),
1935
+ /* @__PURE__ */ jsxRuntime.jsx(TabsTrigger, { value: "new", disabled: !showNewCard, children: "Add new card" })
1936
+ ] }),
1937
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "saved", children: renderSavedTab() }),
1938
+ /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: "new", children: renderNewTab() })
1939
+ ]
1940
+ }
1941
+ );
1983
1942
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6 pt-4", children: [
1984
1943
  mode === "cards" && renderCardExperience(),
1985
1944
  mode === "solana" && enableSolanaPay && /* @__PURE__ */ jsxRuntime.jsx(
@@ -2003,7 +1962,7 @@ var SubscriptionSuccessDialog = ({
2003
1962
  }) => {
2004
1963
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: (value) => {
2005
1964
  if (!value) onClose();
2006
- }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border border-border/70 bg-background/95 p-0 shadow-2xl", children: [
1965
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border bg-background/95 p-0 shadow-2xl", children: [
2007
1966
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-background px-6 py-8 text-center", children: [
2008
1967
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-10 w-10 text-primary" }) }),
2009
1968
  /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
@@ -2191,9 +2150,9 @@ var SubscriptionCheckoutModal = ({
2191
2150
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsx(
2192
2151
  DialogContent,
2193
2152
  {
2194
- className: "max-w-3xl max-h-[90vh] overflow-y-auto p-0 [&::-webkit-scrollbar]:hidden",
2153
+ className: "max-w-3xl max-h-[90vh] overflow-y-auto [&::-webkit-scrollbar]:hidden",
2195
2154
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-6 space-y-6", children: [
2196
- !priceId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 rounded-lg border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: [
2155
+ !priceId && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 rounded-lg px-3 py-2 text-sm text-destructive", children: [
2197
2156
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4" }),
2198
2157
  " Select a subscription plan to continue."
2199
2158
  ] }),
@@ -2241,8 +2200,8 @@ var wallets = [
2241
2200
  ];
2242
2201
  var WalletModal = ({ open, onOpenChange }) => {
2243
2202
  const [expandedWallet, setExpandedWallet] = React17.useState(null);
2244
- return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border border-border/70 bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: [
2245
- /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "border-b border-border/40 bg-gradient-to-r from-primary/10 via-background to-background px-6 py-5 text-left", children: [
2203
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.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: [
2204
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "border-b bg-gradient-to-r from-primary/10 via-background to-background px-6 py-5 text-left", children: [
2246
2205
  /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: [
2247
2206
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 text-primary" }),
2248
2207
  " Connect a Solana wallet"
@@ -2253,7 +2212,7 @@ var WalletModal = ({ open, onOpenChange }) => {
2253
2212
  wallets.map((wallet) => /* @__PURE__ */ jsxRuntime.jsxs(
2254
2213
  "div",
2255
2214
  {
2256
- className: "rounded-2xl border border-border/60 bg-background/80 p-4 shadow-sm",
2215
+ className: "rounded-2xl border bg-background/80 p-4 shadow-sm",
2257
2216
  children: [
2258
2217
  /* @__PURE__ */ jsxRuntime.jsxs(
2259
2218
  "button",
@@ -2288,7 +2247,7 @@ var WalletModal = ({ open, onOpenChange }) => {
2288
2247
  },
2289
2248
  wallet.id
2290
2249
  )),
2291
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-border/60 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." })
2250
+ /* @__PURE__ */ jsxRuntime.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." })
2292
2251
  ] })
2293
2252
  ] }) });
2294
2253
  };
@@ -2447,46 +2406,12 @@ var usePaymentContext = () => {
2447
2406
  }
2448
2407
  return context;
2449
2408
  };
2450
- var BillingThemeProvider = ({
2451
- children,
2452
- className,
2453
- dark = false
2454
- }) => {
2455
- return /* @__PURE__ */ jsxRuntime.jsx(
2456
- "div",
2457
- {
2458
- className: cn(
2459
- "payments-ui-root",
2460
- dark && "dark",
2461
- className
2462
- ),
2463
- children
2464
- }
2465
- );
2466
- };
2467
- var BillingThemePortal = ({
2468
- children,
2469
- className,
2470
- dark = false
2471
- }) => {
2472
- return /* @__PURE__ */ jsxRuntime.jsx(
2473
- "div",
2474
- {
2475
- className: cn(
2476
- "payments-ui-portal",
2477
- dark && "dark",
2478
- className
2479
- ),
2480
- children
2481
- }
2482
- );
2483
- };
2484
2409
  var SolanaPaymentSelector = ({
2485
2410
  isOpen,
2486
2411
  onClose,
2487
2412
  ...props
2488
2413
  }) => {
2489
- return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (value) => value ? void 0 : onClose(), children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-md border border-border/70 bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(SolanaPaymentView, { ...props, onClose }) }) });
2414
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (value) => value ? void 0 : onClose(), children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(SolanaPaymentView, { ...props, onClose }) }) });
2490
2415
  };
2491
2416
  var Table = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
2492
2417
  "table",
@@ -2926,8 +2851,8 @@ var BillingHistory = ({
2926
2851
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: t.reviewActivity }),
2927
2852
  enableCancel && /* @__PURE__ */ jsxRuntime.jsx(CancelMembershipDialog, { onNotify: notify })
2928
2853
  ] }),
2929
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[300px] overflow-y-auto rounded-lg border border-border/70", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: historyQuery.isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-center text-sm text-muted-foreground", children: t.loading }) : historyQuery.isError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-center text-sm text-destructive", children: t.error }) : /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
2930
- /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { className: "border-border/60", children: [
2854
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[300px] overflow-y-auto rounded-lg border ", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: historyQuery.isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-center text-sm text-muted-foreground", children: t.loading }) : historyQuery.isError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-center text-sm text-destructive", children: t.error }) : /* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
2855
+ /* @__PURE__ */ jsxRuntime.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { className: "", children: [
2931
2856
  /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: t.reference }),
2932
2857
  /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: t.date }),
2933
2858
  /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: t.amount }),
@@ -2935,7 +2860,7 @@ var BillingHistory = ({
2935
2860
  /* @__PURE__ */ jsxRuntime.jsx(TableHead, { children: t.status })
2936
2861
  ] }) }),
2937
2862
  /* @__PURE__ */ jsxRuntime.jsx(TableBody, { children: payments.map(
2938
- (page) => page.data.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { className: "border-border/40", children: [
2863
+ (page) => page.data.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(TableRow, { className: "", children: [
2939
2864
  /* @__PURE__ */ jsxRuntime.jsx(TableCell, { className: "font-mono text-sm", children: payment.id.slice(0, 7).toUpperCase() }),
2940
2865
  /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: formatDate(payment.purchased_at) }),
2941
2866
  /* @__PURE__ */ jsxRuntime.jsx(TableCell, { children: formatAmount(payment.amount, payment.currency) }),
@@ -3126,7 +3051,7 @@ var PaymentMethodsSection = ({
3126
3051
  ] }) : payments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6 text-sm text-center", children: t.noPaymentMethods }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: payments.map((method) => /* @__PURE__ */ jsxRuntime.jsxs(
3127
3052
  "div",
3128
3053
  {
3129
- className: "rounded-lg border border-white/10 bg-white/5 p-4 shadow-sm",
3054
+ className: "rounded-lg border bg-white/5 p-4 shadow-sm",
3130
3055
  children: [
3131
3056
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 md:flex-row md:items-center md:justify-between", children: [
3132
3057
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -3211,7 +3136,7 @@ var PaymentMethodsSection = ({
3211
3136
  },
3212
3137
  externalError: createMutation.error?.message ?? null,
3213
3138
  onTokenize: handleCardTokenize,
3214
- className: "rounded-2xl border border-white/10 bg-white/5 p-6"
3139
+ className: "rounded-2xl border bg-white/5 p-6"
3215
3140
  }
3216
3141
  )
3217
3142
  ] }) }),
@@ -3234,7 +3159,7 @@ var PaymentMethodsSection = ({
3234
3159
  },
3235
3160
  externalError: replaceMutation.error?.message ?? null,
3236
3161
  onTokenize: handleReplaceTokenize,
3237
- className: "rounded-2xl border border-white/10 bg-white/5 p-6"
3162
+ className: "rounded-2xl border bg-white/5 p-6"
3238
3163
  }
3239
3164
  )
3240
3165
  ] }) })
@@ -3303,7 +3228,7 @@ var WalletDialog = ({ open, onOpenChange }) => {
3303
3228
  setForm(initialState);
3304
3229
  };
3305
3230
  return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "max-h-[95vh] max-w-lg overflow-y-auto rounded-2xl border border-border bg-background", children: [
3306
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b border-border/60 pb-4", children: [
3231
+ /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b pb-4", children: [
3307
3232
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
3308
3233
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Shield, { className: "h-5 w-5 text-primary" }),
3309
3234
  /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide", children: "Secure Payment via Mobius Pay" })
@@ -3347,7 +3272,7 @@ var WalletDialog = ({ open, onOpenChange }) => {
3347
3272
  ] })
3348
3273
  ] })
3349
3274
  ] }),
3350
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border border-border/70 bg-muted/10 p-4", children: [
3275
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-muted/10 p-4", children: [
3351
3276
  /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { id: "terms-agree", checked: form.termsAccepted, onCheckedChange: (checked) => updateField("termsAccepted", Boolean(checked)) }),
3352
3277
  /* @__PURE__ */ jsxRuntime.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." })
3353
3278
  ] }),
@@ -3756,8 +3681,6 @@ var usePaymentStatus = (options = {}) => {
3756
3681
  };
3757
3682
 
3758
3683
  exports.BillingHistory = BillingHistory;
3759
- exports.BillingThemePortal = BillingThemePortal;
3760
- exports.BillingThemeProvider = BillingThemeProvider;
3761
3684
  exports.CancelMembershipDialog = CancelMembershipDialog;
3762
3685
  exports.CardDetailsForm = CardDetailsForm;
3763
3686
  exports.ClientApiError = ClientApiError;