@djangocfg/ext-payments 1.0.7 → 1.0.9

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/hooks.cjs CHANGED
@@ -5,13 +5,14 @@ var pRetry = require('p-retry');
5
5
  var zod = require('zod');
6
6
  var api = require('@djangocfg/ext-base/api');
7
7
  var lucideReact = require('lucide-react');
8
- var uiNextjs = require('@djangocfg/ui-nextjs');
8
+ var uiCore = require('@djangocfg/ui-core');
9
9
  var react = require('react');
10
10
  var useSWR = require('swr');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var reactHookForm = require('react-hook-form');
13
13
  var zod$1 = require('@hookform/resolvers/zod');
14
14
  var moment = require('moment');
15
+ var components = require('@djangocfg/ui-nextjs/components');
15
16
  var extBase = require('@djangocfg/ext-base');
16
17
 
17
18
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -1752,21 +1753,21 @@ var CreatePaymentDialog = () => {
1752
1753
  setIsSubmitting(false);
1753
1754
  }
1754
1755
  };
1755
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-md", children: [
1756
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1757
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Create Payment" }),
1758
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Create a new payment to add funds to your account." })
1756
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-md", children: [
1757
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1758
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Create Payment" }),
1759
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Create a new payment to add funds to your account." })
1759
1760
  ] }),
1760
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
1761
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Form, { ...form, children: /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(handleSubmit), className: "space-y-4", children: [
1761
1762
  /* @__PURE__ */ jsxRuntime.jsx(
1762
- uiNextjs.FormField,
1763
+ uiCore.FormField,
1763
1764
  {
1764
1765
  control: form.control,
1765
1766
  name: "amount_usd",
1766
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
1767
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Amount (USD)" }),
1768
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
1769
- uiNextjs.Input,
1767
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
1768
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Amount (USD)" }),
1769
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(
1770
+ uiCore.Input,
1770
1771
  {
1771
1772
  type: "number",
1772
1773
  step: "0.01",
@@ -1776,28 +1777,28 @@ var CreatePaymentDialog = () => {
1776
1777
  onChange: (e) => field.onChange(parseFloat(e.target.value) || 0)
1777
1778
  }
1778
1779
  ) }),
1779
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormDescription, { children: "The amount you want to pay in USD." }),
1780
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
1780
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The amount you want to pay in USD." }),
1781
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
1781
1782
  ] })
1782
1783
  }
1783
1784
  ),
1784
1785
  /* @__PURE__ */ jsxRuntime.jsx(
1785
- uiNextjs.FormField,
1786
+ uiCore.FormField,
1786
1787
  {
1787
1788
  control: form.control,
1788
1789
  name: "currency_code",
1789
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.FormItem, { children: [
1790
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormLabel, { children: "Currency" }),
1790
+ render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.FormItem, { children: [
1791
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormLabel, { children: "Currency" }),
1791
1792
  /* @__PURE__ */ jsxRuntime.jsxs(
1792
- uiNextjs.Select,
1793
+ uiCore.Select,
1793
1794
  {
1794
1795
  onValueChange: field.onChange,
1795
1796
  defaultValue: field.value,
1796
1797
  disabled: isLoadingCurrencies,
1797
1798
  children: [
1798
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Select currency..." }) }) }),
1799
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectContent, { children: currencyOptions.map((curr) => /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: curr.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1800
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: curr.code, size: 16 }),
1799
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormControl, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Select currency..." }) }) }),
1800
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectContent, { children: currencyOptions.map((curr) => /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: curr.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1801
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: curr.code, size: 16 }),
1801
1802
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: curr.code }),
1802
1803
  curr.network && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
1803
1804
  "(",
@@ -1808,8 +1809,8 @@ var CreatePaymentDialog = () => {
1808
1809
  ]
1809
1810
  }
1810
1811
  ),
1811
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormDescription, { children: "The cryptocurrency to use for payment." }),
1812
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.FormMessage, {})
1812
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormDescription, { children: "The cryptocurrency to use for payment." }),
1813
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.FormMessage, {})
1813
1814
  ] })
1814
1815
  }
1815
1816
  ),
@@ -1817,7 +1818,7 @@ var CreatePaymentDialog = () => {
1817
1818
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
1818
1819
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "You will send" }),
1819
1820
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1820
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: calculateCryptoAmount.currency, size: 16 }),
1821
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: calculateCryptoAmount.currency, size: 16 }),
1821
1822
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-semibold", children: [
1822
1823
  calculateCryptoAmount.amount.toFixed(8),
1823
1824
  " ",
@@ -1847,9 +1848,9 @@ var CreatePaymentDialog = () => {
1847
1848
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: calculateCryptoAmount.network })
1848
1849
  ] }) })
1849
1850
  ] }),
1850
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogFooter, { children: [
1851
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }),
1852
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { type: "submit", disabled: isSubmitting || currencyOptions.length === 0, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1851
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
1852
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "button", variant: "outline", onClick: handleClose, disabled: isSubmitting, children: "Cancel" }),
1853
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { type: "submit", disabled: isSubmitting || currencyOptions.length === 0, children: isSubmitting ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1853
1854
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2 animate-spin" }),
1854
1855
  "Creating..."
1855
1856
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -1930,34 +1931,34 @@ var PaymentDetailsDialog = () => {
1930
1931
  };
1931
1932
  if (!open) return null;
1932
1933
  if (isLoading) {
1933
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1934
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1935
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1936
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Loading payment information..." })
1934
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1935
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1936
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1937
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Loading payment information..." })
1937
1938
  ] }),
1938
1939
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-8 w-8 animate-spin text-muted-foreground" }) })
1939
1940
  ] }) });
1940
1941
  }
1941
1942
  if (shouldFetch && !isLoading && (error || !payment)) {
1942
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1943
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1944
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1945
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Failed to load payment information" })
1943
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1944
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1945
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1946
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Failed to load payment information" })
1946
1947
  ] }),
1947
1948
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
1948
1949
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XCircle, { className: "h-12 w-12 text-destructive" }),
1949
1950
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: error ? `Error: ${error}` : "Payment not found" }),
1950
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { onClick: () => mutate(), children: "Try Again" })
1951
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { onClick: () => mutate(), children: "Try Again" })
1951
1952
  ] })
1952
1953
  ] }) });
1953
1954
  }
1954
1955
  const statusInfo = getStatusInfo();
1955
1956
  const StatusIcon = statusInfo.icon;
1956
1957
  const qrCodeUrl = payment.pay_address ? `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(payment.pay_address)}` : null;
1957
- return /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogContent, { className: "sm:max-w-lg", children: [
1958
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogHeader, { children: [
1959
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogTitle, { children: "Payment Details" }),
1960
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.DialogDescription, { children: "Send cryptocurrency to complete your payment" })
1958
+ return /* @__PURE__ */ jsxRuntime.jsx(uiCore.Dialog, { open, onOpenChange: (isOpen) => !isOpen && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogContent, { className: "sm:max-w-lg", children: [
1959
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogHeader, { children: [
1960
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogTitle, { children: "Payment Details" }),
1961
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.DialogDescription, { children: "Send cryptocurrency to complete your payment" })
1961
1962
  ] }),
1962
1963
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", children: [
1963
1964
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex items-center gap-3 p-4 rounded-sm ${statusInfo.bg}`, children: [
@@ -1974,7 +1975,7 @@ var PaymentDetailsDialog = () => {
1974
1975
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 bg-muted rounded-sm", children: [
1975
1976
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Amount to send" }),
1976
1977
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
1977
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TokenIcon, { symbol: String(payment.currency_code || "BTC"), size: 20 }),
1978
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TokenIcon, { symbol: String(payment.currency_code || "BTC"), size: 20 }),
1978
1979
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono font-bold text-lg", children: [
1979
1980
  payment.pay_amount || "0.00000000",
1980
1981
  " ",
@@ -2004,7 +2005,7 @@ var PaymentDetailsDialog = () => {
2004
2005
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium", children: "Payment Address" }),
2005
2006
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2006
2007
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.pay_address }),
2007
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CopyButton, { value: payment.pay_address, variant: "outline" })
2008
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CopyButton, { value: payment.pay_address, variant: "outline" })
2008
2009
  ] })
2009
2010
  ] }),
2010
2011
  payment.transaction_hash && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
@@ -2012,7 +2013,7 @@ var PaymentDetailsDialog = () => {
2012
2013
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 bg-muted rounded-sm font-mono text-sm break-all", children: payment.transaction_hash })
2013
2014
  ] }),
2014
2015
  payment.payment_url && payment.status === "pending" && /* @__PURE__ */ jsxRuntime.jsxs(
2015
- uiNextjs.Button,
2016
+ uiCore.Button,
2016
2017
  {
2017
2018
  variant: "outline",
2018
2019
  className: "w-full",
@@ -2038,9 +2039,9 @@ var PaymentDetailsDialog = () => {
2038
2039
  ] })
2039
2040
  ] })
2040
2041
  ] }),
2041
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.DialogFooter, { children: [
2042
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { variant: "outline", onClick: handleClose, children: "Close" }),
2043
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: () => mutate(), variant: "ghost", size: "sm", children: [
2042
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.DialogFooter, { children: [
2043
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "outline", onClick: handleClose, children: "Close" }),
2044
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => mutate(), variant: "ghost", size: "sm", children: [
2044
2045
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4 mr-2" }),
2045
2046
  "Refresh"
2046
2047
  ] })
@@ -2070,17 +2071,17 @@ var BalanceCard = () => {
2070
2071
  }
2071
2072
  };
2072
2073
  if (isLoadingBalance) {
2073
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2074
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2074
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2075
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2075
2076
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2076
2077
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
2077
2078
  "Account Balance"
2078
2079
  ] }),
2079
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-8 w-20" })
2080
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-8 w-20" })
2080
2081
  ] }) }),
2081
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2082
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-10 w-32" }),
2083
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-48" })
2082
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2083
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-10 w-32" }),
2084
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-48" })
2084
2085
  ] })
2085
2086
  ] });
2086
2087
  }
@@ -2090,21 +2091,21 @@ var BalanceCard = () => {
2090
2091
  const totalWithdrawn = balanceData?.total_withdrawn ?? 0;
2091
2092
  const lastTransactionAt = balanceData?.last_transaction_at;
2092
2093
  const isEmpty = amountUsd === 0 && totalDeposited === 0;
2093
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2094
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2094
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2095
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2095
2096
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2096
2097
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5" }),
2097
2098
  "Account Balance"
2098
2099
  ] }),
2099
2100
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2100
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Button, { variant: "ghost", size: "sm", onClick: refreshBalance, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" }) }),
2101
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2101
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Button, { variant: "ghost", size: "sm", onClick: refreshBalance, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "h-4 w-4" }) }),
2102
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2102
2103
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2103
2104
  "Add Funds"
2104
2105
  ] })
2105
2106
  ] })
2106
2107
  ] }) }),
2107
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2108
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2108
2109
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2109
2110
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-4xl font-bold", children: formatCurrency(amountUsd) }),
2110
2111
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-1", children: [
@@ -2123,8 +2124,8 @@ var BalanceCard = () => {
2123
2124
  ] })
2124
2125
  ] }),
2125
2126
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2126
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: !isEmpty ? "default" : "secondary", children: !isEmpty ? "Active" : "New Account" }),
2127
- isEmpty && /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: "outline", children: "Empty Balance" })
2127
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: !isEmpty ? "default" : "secondary", children: !isEmpty ? "Active" : "New Account" }),
2128
+ isEmpty && /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: "Empty Balance" })
2128
2129
  ] })
2129
2130
  ] })
2130
2131
  ] });
@@ -2167,33 +2168,33 @@ var RecentPayments = () => {
2167
2168
  }
2168
2169
  };
2169
2170
  if (isLoadingPayments) {
2170
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2171
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center gap-2", children: [
2171
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2172
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
2172
2173
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2173
2174
  "Recent Payments"
2174
2175
  ] }) }),
2175
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border rounded-sm", children: [
2176
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-3 border rounded-sm", children: [
2176
2177
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2177
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2178
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2178
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2179
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2179
2180
  ] }),
2180
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2181
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2181
2182
  ] }, i)) })
2182
2183
  ] });
2183
2184
  }
2184
2185
  const recentPaymentsList = payments?.results?.slice(0, 5) || [];
2185
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2186
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2186
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2187
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2187
2188
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2188
2189
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2189
2190
  "Recent Payments"
2190
2191
  ] }),
2191
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "ghost", size: "sm", children: [
2192
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "ghost", size: "sm", children: [
2192
2193
  "View All",
2193
2194
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "h-4 w-4 ml-2" })
2194
2195
  ] })
2195
2196
  ] }) }),
2196
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { children: recentPaymentsList.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-muted-foreground", children: [
2197
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { children: recentPaymentsList.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-8 text-muted-foreground", children: [
2197
2198
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-12 w-12 mx-auto mb-4 opacity-50" }),
2198
2199
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: "No recent payments" }),
2199
2200
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm mt-2", children: "Create your first payment to get started" })
@@ -2206,7 +2207,7 @@ var RecentPayments = () => {
2206
2207
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
2207
2208
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2208
2209
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: formatCurrency(payment.amount_usd) }),
2209
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusVariant(payment.status), className: "text-xs", children: payment.status })
2210
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), className: "text-xs", children: payment.status })
2210
2211
  ] }),
2211
2212
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground", children: [
2212
2213
  getRelativeTime(payment.created_at),
@@ -2228,7 +2229,7 @@ var OverviewView = () => {
2228
2229
  ] }) });
2229
2230
  };
2230
2231
  var PaymentsList = () => {
2231
- const pagination = uiNextjs.useDRFPagination(1, 20);
2232
+ const pagination = components.useDRFPagination(1, 20);
2232
2233
  const {
2233
2234
  data: payments,
2234
2235
  error,
@@ -2299,26 +2300,26 @@ var PaymentsList = () => {
2299
2300
  relativeTime: getRelativeTime(payment.created_at),
2300
2301
  truncatedId: truncateId(payment.id)
2301
2302
  }));
2302
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2303
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2303
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2304
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2304
2305
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Payment History" }),
2305
2306
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2306
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "outline", size: "sm", onClick: () => refreshPayments(), disabled: isLoadingPayments, children: [
2307
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: () => refreshPayments(), disabled: isLoadingPayments, children: [
2307
2308
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingPayments ? "animate-spin" : ""}` }),
2308
2309
  "Refresh"
2309
2310
  ] }),
2310
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2311
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { size: "sm", onClick: () => openCreatePaymentDialog(), children: [
2311
2312
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2312
2313
  "New Payment"
2313
2314
  ] })
2314
2315
  ] })
2315
2316
  ] }) }),
2316
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2317
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2317
2318
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
2318
2319
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
2319
2320
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
2320
2321
  /* @__PURE__ */ jsxRuntime.jsx(
2321
- uiNextjs.Input,
2322
+ uiCore.Input,
2322
2323
  {
2323
2324
  placeholder: "Search by ID, status, or currency...",
2324
2325
  value: searchTerm,
@@ -2327,63 +2328,63 @@ var PaymentsList = () => {
2327
2328
  }
2328
2329
  )
2329
2330
  ] }),
2330
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Select, { value: statusFilter, onValueChange: handleStatusFilter, children: [
2331
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectTrigger, { className: "w-full sm:w-48", children: [
2331
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: statusFilter, onValueChange: handleStatusFilter, children: [
2332
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
2332
2333
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
2333
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Filter by status" })
2334
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by status" })
2334
2335
  ] }),
2335
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectContent, { children: [
2336
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "all", children: "All Statuses" }),
2337
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "completed", children: "Completed" }),
2338
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "pending", children: "Pending" }),
2339
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "confirming", children: "Confirming" }),
2340
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "failed", children: "Failed" }),
2341
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "expired", children: "Expired" })
2336
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
2337
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Statuses" }),
2338
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "completed", children: "Completed" }),
2339
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "pending", children: "Pending" }),
2340
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "confirming", children: "Confirming" }),
2341
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "failed", children: "Failed" }),
2342
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "expired", children: "Expired" })
2342
2343
  ] })
2343
2344
  ] })
2344
2345
  ] }),
2345
2346
  isLoadingPayments ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2346
2347
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2347
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2348
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2348
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2349
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2349
2350
  ] }),
2350
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2351
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2351
2352
  ] }, i)) }) : filteredPayments.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center py-12", children: [
2352
2353
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "w-8 h-8 text-muted-foreground" }) }),
2353
2354
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Payments Found" }),
2354
2355
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground mb-4", children: searchTerm || statusFilter !== "all" ? "No payments match your current filters" : "You haven't made any payments yet" }),
2355
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { onClick: () => openCreatePaymentDialog(), children: [
2356
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { onClick: () => openCreatePaymentDialog(), children: [
2356
2357
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4 mr-2" }),
2357
2358
  "Create Payment"
2358
2359
  ] })
2359
2360
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2360
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Table, { children: [
2361
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2362
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Date" }),
2363
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Amount" }),
2364
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Currency" }),
2365
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Status" }),
2366
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Provider" }),
2367
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Payment ID" }),
2368
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { className: "text-right", children: "Actions" })
2361
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
2362
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2363
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date" }),
2364
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
2365
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Currency" }),
2366
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Status" }),
2367
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Provider" }),
2368
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Payment ID" }),
2369
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { className: "text-right", children: "Actions" })
2369
2370
  ] }) }),
2370
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableBody, { children: filteredPayments.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(
2371
- uiNextjs.TableRow,
2371
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredPayments.map((payment) => /* @__PURE__ */ jsxRuntime.jsxs(
2372
+ uiCore.TableRow,
2372
2373
  {
2373
2374
  className: "cursor-pointer hover:bg-accent",
2374
2375
  onClick: () => openPaymentDetailsDialog(String(payment.id)),
2375
2376
  children: [
2376
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2377
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2377
2378
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: payment.formattedDate }),
2378
2379
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: payment.relativeTime })
2379
2380
  ] }) }),
2380
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono font-semibold", children: formatCurrency(payment.amount_usd) }),
2381
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: "outline", children: payment.currency_code || "USD" }) }),
2382
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getStatusVariant(payment.status), children: payment.status }) }),
2383
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-sm text-muted-foreground", children: "NowPayments" }),
2384
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono text-sm text-muted-foreground", children: payment.truncatedId }),
2385
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
2386
- uiNextjs.Button,
2381
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: formatCurrency(payment.amount_usd) }),
2382
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: "outline", children: payment.currency_code || "USD" }) }),
2383
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getStatusVariant(payment.status), children: payment.status }) }),
2384
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm text-muted-foreground", children: "NowPayments" }),
2385
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: payment.truncatedId }),
2386
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-right", children: /* @__PURE__ */ jsxRuntime.jsx(
2387
+ uiCore.Button,
2387
2388
  {
2388
2389
  variant: "ghost",
2389
2390
  size: "sm",
@@ -2400,7 +2401,7 @@ var PaymentsList = () => {
2400
2401
  )) })
2401
2402
  ] }) }),
2402
2403
  /* @__PURE__ */ jsxRuntime.jsx(
2403
- uiNextjs.StaticPagination,
2404
+ components.StaticPagination,
2404
2405
  {
2405
2406
  data: payments,
2406
2407
  onPageChange: pagination.setPage,
@@ -2490,37 +2491,37 @@ var TransactionsList = () => {
2490
2491
  truncatedRef: truncateId(transaction.reference || transaction.payment_id)
2491
2492
  }));
2492
2493
  if (isLoadingTransactions) {
2493
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2494
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center gap-2", children: [
2494
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2495
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center gap-2", children: [
2495
2496
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2496
2497
  "Transaction History"
2497
2498
  ] }) }),
2498
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2499
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardContent, { className: "space-y-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between p-4 border rounded-sm", children: [
2499
2500
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2500
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-4 w-32" }),
2501
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-3 w-24" })
2501
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-4 w-32" }),
2502
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-3 w-24" })
2502
2503
  ] }),
2503
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Skeleton, { className: "h-6 w-16" })
2504
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Skeleton, { className: "h-6 w-16" })
2504
2505
  ] }, i)) })
2505
2506
  ] });
2506
2507
  }
2507
- return /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Card, { children: [
2508
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardTitle, { className: "flex items-center justify-between", children: [
2508
+ return /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Card, { children: [
2509
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.CardHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardTitle, { className: "flex items-center justify-between", children: [
2509
2510
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2510
2511
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-5 w-5" }),
2511
2512
  "Transaction History"
2512
2513
  ] }),
2513
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Button, { variant: "outline", size: "sm", onClick: refreshTransactions, disabled: isLoadingTransactions, children: [
2514
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Button, { variant: "outline", size: "sm", onClick: refreshTransactions, disabled: isLoadingTransactions, children: [
2514
2515
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: `h-4 w-4 mr-2 ${isLoadingTransactions ? "animate-spin" : ""}` }),
2515
2516
  "Refresh"
2516
2517
  ] })
2517
2518
  ] }) }),
2518
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.CardContent, { className: "space-y-4", children: [
2519
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.CardContent, { className: "space-y-4", children: [
2519
2520
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
2520
2521
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
2521
2522
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
2522
2523
  /* @__PURE__ */ jsxRuntime.jsx(
2523
- uiNextjs.Input,
2524
+ uiCore.Input,
2524
2525
  {
2525
2526
  placeholder: "Search by ID, description, or type...",
2526
2527
  value: searchTerm,
@@ -2529,15 +2530,15 @@ var TransactionsList = () => {
2529
2530
  }
2530
2531
  )
2531
2532
  ] }),
2532
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Select, { value: typeFilter, onValueChange: handleTypeFilter, children: [
2533
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectTrigger, { className: "w-full sm:w-48", children: [
2533
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Select, { value: typeFilter, onValueChange: handleTypeFilter, children: [
2534
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectTrigger, { className: "w-full sm:w-48", children: [
2534
2535
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Filter, { className: "h-4 w-4 mr-2" }),
2535
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectValue, { placeholder: "Filter by type" })
2536
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectValue, { placeholder: "Filter by type" })
2536
2537
  ] }),
2537
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.SelectContent, { children: [
2538
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "all", children: "All Types" }),
2539
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "deposit", children: "Deposits" }),
2540
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.SelectItem, { value: "withdrawal", children: "Withdrawals" })
2538
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.SelectContent, { children: [
2539
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "all", children: "All Types" }),
2540
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "deposit", children: "Deposits" }),
2541
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.SelectItem, { value: "withdrawal", children: "Withdrawals" })
2541
2542
  ] })
2542
2543
  ] })
2543
2544
  ] }),
@@ -2545,31 +2546,31 @@ var TransactionsList = () => {
2545
2546
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 mx-auto mb-4 bg-muted rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "w-8 h-8 text-muted-foreground" }) }),
2546
2547
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold mb-2", children: "No Transactions Found" }),
2547
2548
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: searchTerm || typeFilter !== "all" ? "No transactions match your current filters" : "You don't have any transactions yet" })
2548
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Table, { children: [
2549
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2550
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Date & Time" }),
2551
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Type" }),
2552
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Amount" }),
2553
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Balance After" }),
2554
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Description" }),
2555
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableHead, { children: "Reference" })
2549
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Table, { children: [
2550
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2551
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Date & Time" }),
2552
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Type" }),
2553
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Amount" }),
2554
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Balance After" }),
2555
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Description" }),
2556
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableHead, { children: "Reference" })
2556
2557
  ] }) }),
2557
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableBody, { children: filteredTransactions.map((transaction, index) => /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TableRow, { children: [
2558
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2558
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableBody, { children: filteredTransactions.map((transaction, index) => /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TableRow, { children: [
2559
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2559
2560
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-medium", children: transaction.formattedDate }),
2560
2561
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: transaction.relativeTime })
2561
2562
  ] }) }),
2562
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2563
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
2563
2564
  getTypeIcon(transaction.type),
2564
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.Badge, { variant: getTypeVariant(transaction.type), children: transaction.type || "Unknown" })
2565
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.Badge, { variant: getTypeVariant(transaction.type), children: transaction.type || "Unknown" })
2565
2566
  ] }) }),
2566
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono font-semibold", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: transaction.isDeposit ? "text-green-600" : "text-red-600", children: [
2567
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono font-semibold", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: transaction.isDeposit ? "text-green-600" : "text-red-600", children: [
2567
2568
  transaction.isDeposit ? "+" : "-",
2568
2569
  formatCurrency(Math.abs(transaction.amount || transaction.amount_usd || 0))
2569
2570
  ] }) }),
2570
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono", children: formatCurrency(transaction.balance_after || 0) }),
2571
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "text-sm", children: transaction.description || transaction.note || "No description" }),
2572
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TableCell, { className: "font-mono text-sm text-muted-foreground", children: transaction.truncatedRef })
2571
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono", children: formatCurrency(transaction.balance_after || 0) }),
2572
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "text-sm", children: transaction.description || transaction.note || "No description" }),
2573
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TableCell, { className: "font-mono text-sm text-muted-foreground", children: transaction.truncatedRef })
2573
2574
  ] }, transaction.id || index)) })
2574
2575
  ] }) })
2575
2576
  ] })
@@ -2584,30 +2585,30 @@ var PaymentsLayout = () => {
2584
2585
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-3xl font-bold tracking-tight", children: "Payments" }),
2585
2586
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-muted-foreground", children: "Manage your payments, balance, and transaction history" })
2586
2587
  ] }),
2587
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.Tabs, { defaultValue: "overview", className: "space-y-6", children: [
2588
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsList, { className: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", children: [
2589
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "overview", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2588
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.Tabs, { defaultValue: "overview", className: "space-y-6", children: [
2589
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsList, { className: "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", children: [
2590
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "overview", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2590
2591
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-4 w-4" }),
2591
2592
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Overview" })
2592
2593
  ] }),
2593
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "payments", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2594
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "payments", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2594
2595
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-4 w-4" }),
2595
2596
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Payments" })
2596
2597
  ] }),
2597
- /* @__PURE__ */ jsxRuntime.jsxs(uiNextjs.TabsTrigger, { value: "transactions", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2598
+ /* @__PURE__ */ jsxRuntime.jsxs(uiCore.TabsTrigger, { value: "transactions", className: "inline-flex items-center gap-2 px-3 py-1.5", children: [
2598
2599
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-4 w-4" }),
2599
2600
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Transactions" })
2600
2601
  ] })
2601
2602
  ] }),
2602
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "overview", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2603
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "overview", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2603
2604
  /* @__PURE__ */ jsxRuntime.jsx(OverviewView, {}),
2604
2605
  /* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
2605
2606
  ] }) }) }),
2606
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "payments", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2607
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "payments", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsxs(PaymentsProvider, { children: [
2607
2608
  /* @__PURE__ */ jsxRuntime.jsx(PaymentsView, {}),
2608
2609
  /* @__PURE__ */ jsxRuntime.jsx(CreatePaymentDialog, {})
2609
2610
  ] }) }),
2610
- /* @__PURE__ */ jsxRuntime.jsx(uiNextjs.TabsContent, { value: "transactions", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TransactionsView, {}) }) })
2611
+ /* @__PURE__ */ jsxRuntime.jsx(uiCore.TabsContent, { value: "transactions", className: "space-y-6", children: /* @__PURE__ */ jsxRuntime.jsx(OverviewProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TransactionsView, {}) }) })
2611
2612
  ] }),
2612
2613
  /* @__PURE__ */ jsxRuntime.jsx(PaymentDetailsDialog, {})
2613
2614
  ] }) });
@@ -2616,7 +2617,7 @@ var PaymentsLayout = () => {
2616
2617
  // package.json
2617
2618
  var package_default = {
2618
2619
  name: "@djangocfg/ext-payments",
2619
- version: "1.0.6",
2620
+ version: "1.0.9",
2620
2621
  description: "Payments system extension for DjangoCFG",
2621
2622
  keywords: [
2622
2623
  "django",
@@ -2677,6 +2678,7 @@ var package_default = {
2677
2678
  peerDependencies: {
2678
2679
  "@djangocfg/api": "workspace:*",
2679
2680
  "@djangocfg/ext-base": "workspace:*",
2681
+ "@djangocfg/ui-core": "workspace:*",
2680
2682
  "@djangocfg/ui-nextjs": "workspace:*",
2681
2683
  consola: "^3.4.2",
2682
2684
  "lucide-react": "^0.545.0",
@@ -2691,6 +2693,7 @@ var package_default = {
2691
2693
  "@djangocfg/api": "workspace:*",
2692
2694
  "@djangocfg/ext-base": "workspace:*",
2693
2695
  "@djangocfg/typescript-config": "workspace:*",
2696
+ "@djangocfg/ui-nextjs": "workspace:*",
2694
2697
  "@types/node": "^24.7.2",
2695
2698
  "@types/react": "^19.0.0",
2696
2699
  consola: "^3.4.2",