@doujins/payments-ui 0.1.15 → 0.1.16

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.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as React15 from 'react';
2
- import React15__default, { createContext, useMemo, useState, useEffect, useCallback, useRef, useContext } from 'react';
1
+ import * as React4 from 'react';
2
+ import React4__default, { createContext, useMemo, useState, useEffect, useCallback, useRef, useContext } from 'react';
3
3
  import { useQueryClient, useQuery, useMutation, QueryClient, QueryClientProvider, useInfiniteQuery } from '@tanstack/react-query';
4
4
  import { ConnectionProvider, WalletProvider, useWallet, useConnection } from '@solana/wallet-adapter-react';
5
5
  import { WalletModalProvider } from '@solana/wallet-adapter-react-ui';
@@ -11,7 +11,7 @@ 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 { ChevronDown, ChevronUp, Check, Loader2, CheckCircle, AlertCircle, Wallet, Ban, TriangleAlert, CreditCard, Trash2, Shield, UserRound, Calendar, KeyRound, XIcon, XCircle, RotateCcw, RefreshCw } from 'lucide-react';
14
+ import { ChevronDown, ChevronUp, Check, Pencil, Loader2, CheckCircle, AlertCircle, Wallet, Ban, TriangleAlert, CreditCard, Trash2, Shield, UserRound, Calendar, KeyRound, XIcon, XCircle, RotateCcw, RefreshCw } from 'lucide-react';
15
15
  import clsx2, { clsx } from 'clsx';
16
16
  import { twMerge } from 'tailwind-merge';
17
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -488,7 +488,7 @@ var buttonVariants = cva(
488
488
  }
489
489
  }
490
490
  );
491
- var Button = React15.forwardRef(
491
+ var Button = React4.forwardRef(
492
492
  ({ className, variant, size, asChild = false, ...props }, ref) => {
493
493
  const Comp = asChild ? Slot : "button";
494
494
  return /* @__PURE__ */ jsx(
@@ -502,7 +502,7 @@ var Button = React15.forwardRef(
502
502
  }
503
503
  );
504
504
  Button.displayName = "Button";
505
- var Input = React15.forwardRef(
505
+ var Input = React4.forwardRef(
506
506
  ({ className, type, ...props }, ref) => {
507
507
  return /* @__PURE__ */ jsx(
508
508
  "input",
@@ -522,7 +522,7 @@ Input.displayName = "Input";
522
522
  var labelVariants = cva(
523
523
  "text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
524
524
  );
525
- var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
525
+ var Label = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
526
526
  LabelPrimitive.Root,
527
527
  {
528
528
  ref,
@@ -531,9 +531,9 @@ var Label = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
531
531
  }
532
532
  ));
533
533
  Label.displayName = LabelPrimitive.Root.displayName;
534
- var Select = ({ children, ...props }) => /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(SelectPrimitive.Root, { ...props, children }) });
534
+ var Select = SelectPrimitive.Root;
535
535
  var SelectValue = SelectPrimitive.Value;
536
- var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
536
+ var SelectTrigger = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
537
537
  SelectPrimitive.Trigger,
538
538
  {
539
539
  ref,
@@ -549,7 +549,7 @@ var SelectTrigger = React15.forwardRef(({ className, children, ...props }, ref)
549
549
  }
550
550
  ));
551
551
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
552
- var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
552
+ var SelectScrollUpButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
553
553
  SelectPrimitive.ScrollUpButton,
554
554
  {
555
555
  ref,
@@ -562,7 +562,7 @@ var SelectScrollUpButton = React15.forwardRef(({ className, ...props }, ref) =>
562
562
  }
563
563
  ));
564
564
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
565
- var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
565
+ var SelectScrollDownButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
566
566
  SelectPrimitive.ScrollDownButton,
567
567
  {
568
568
  ref,
@@ -575,39 +575,61 @@ var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) =
575
575
  }
576
576
  ));
577
577
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
578
- var SelectContent = React15.forwardRef(
579
- ({
580
- className,
581
- children,
582
- position = "popper",
583
- side = "bottom",
584
- sideOffset = 4,
585
- align = "start",
586
- ...props
587
- }, ref) => {
588
- const popperProps = position === "popper" ? { side, sideOffset, align } : {};
589
- return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
590
- SelectPrimitive.Content,
591
- {
592
- ref,
593
- className: cn(
594
- "z-[200] max-h-64 w-[var(--radix-select-trigger-width)] overflow-y-auto overflow-x-hidden rounded-md border border-white/20 bg-background-regular text-foreground shadow-lg backdrop-blur-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
595
- className
596
- ),
597
- position,
598
- ...popperProps,
599
- ...props,
600
- children: [
601
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
602
- /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "p-1", children }),
603
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
604
- ]
578
+ var SelectContent = React4.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
579
+ const viewportRef = React4.useRef(null);
580
+ const contentRef = React4.useCallback((node) => {
581
+ if (node) {
582
+ node.style.setProperty("max-height", "40vh", "important");
583
+ const anchorWidth = window.getComputedStyle(node).getPropertyValue("--radix-popper-anchor-width");
584
+ if (anchorWidth) {
585
+ node.style.setProperty("width", anchorWidth, "important");
605
586
  }
606
- ) });
607
- }
608
- );
587
+ }
588
+ }, []);
589
+ const combinedRef = React4.useCallback((node) => {
590
+ contentRef(node);
591
+ if (typeof ref === "function") {
592
+ ref(node);
593
+ } else if (ref) {
594
+ ref.current = node;
595
+ }
596
+ }, [contentRef, ref]);
597
+ React4.useEffect(() => {
598
+ if (viewportRef.current) {
599
+ viewportRef.current.style.setProperty("max-height", "40vh", "important");
600
+ }
601
+ });
602
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
603
+ SelectPrimitive.Content,
604
+ {
605
+ ref: combinedRef,
606
+ className: cn(
607
+ "relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-white/20 bg-background-regular text-foreground shadow-lg backdrop-blur-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
608
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
609
+ className
610
+ ),
611
+ position,
612
+ ...props,
613
+ children: [
614
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
615
+ /* @__PURE__ */ jsx(
616
+ SelectPrimitive.Viewport,
617
+ {
618
+ ref: viewportRef,
619
+ className: cn(
620
+ "p-1 overflow-y-auto",
621
+ position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]"
622
+ ),
623
+ children
624
+ }
625
+ ),
626
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
627
+ ]
628
+ }
629
+ ) });
630
+ });
609
631
  SelectContent.displayName = SelectPrimitive.Content.displayName;
610
- var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
632
+ var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
611
633
  SelectPrimitive.Label,
612
634
  {
613
635
  ref,
@@ -616,7 +638,7 @@ var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
616
638
  }
617
639
  ));
618
640
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
619
- var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
641
+ var SelectItem = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
620
642
  SelectPrimitive.Item,
621
643
  {
622
644
  ref,
@@ -632,7 +654,7 @@ var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) =>
632
654
  }
633
655
  ));
634
656
  SelectItem.displayName = SelectPrimitive.Item.displayName;
635
- var SelectSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
657
+ var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
636
658
  SelectPrimitive.Separator,
637
659
  {
638
660
  ref,
@@ -685,6 +707,7 @@ var CardDetailsForm = ({
685
707
  const [postalCode, setPostalCode] = useState(mergedDefaults.postalCode);
686
708
  const [country, setCountry] = useState(mergedDefaults.country);
687
709
  const [email, setEmail] = useState(mergedDefaults.email ?? "");
710
+ const [isEditingEmail, setIsEditingEmail] = useState(false);
688
711
  const [localError, setLocalError] = useState(null);
689
712
  const [isTokenizing, setIsTokenizing] = useState(false);
690
713
  const [collectReady, setCollectReady] = useState(
@@ -818,8 +841,7 @@ var CardDetailsForm = ({
818
841
  visible
819
842
  ]);
820
843
  const validate = () => {
821
- const emailRequired = !defaultValues?.email && !config.defaultUser?.email;
822
- if (!firstName.trim() || !lastName.trim() || !address1.trim() || !city.trim() || !postalCode.trim() || !country.trim() || emailRequired && !email.trim()) {
844
+ if (!firstName.trim() || !lastName.trim() || !address1.trim() || !city.trim() || !postalCode.trim() || !country.trim() || !email.trim()) {
823
845
  setLocalError("Please complete all required billing fields.");
824
846
  return false;
825
847
  }
@@ -838,7 +860,8 @@ var CardDetailsForm = ({
838
860
  };
839
861
  const errorMessage = localError ?? externalError;
840
862
  const collectFieldClass = "relative flex h-9 w-full items-center overflow-hidden rounded-md border border-white/30 bg-transparent px-3 text-sm text-foreground";
841
- const showEmailField = !defaultValues?.email && !config.defaultUser?.email;
863
+ const hasDefaultEmail = Boolean(defaultValues?.email || config.defaultUser?.email);
864
+ const showEmailInput = !hasDefaultEmail || isEditingEmail;
842
865
  return /* @__PURE__ */ jsxs(
843
866
  "form",
844
867
  {
@@ -873,18 +896,47 @@ var CardDetailsForm = ({
873
896
  )
874
897
  ] })
875
898
  ] }),
876
- showEmailField && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
899
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
877
900
  /* @__PURE__ */ jsx(Label, { htmlFor: "email", children: "Email" }),
878
- /* @__PURE__ */ jsx(
879
- Input,
880
- {
881
- id: "email",
882
- type: "email",
883
- value: email,
884
- onChange: (e) => setEmail(e.target.value),
885
- required: true
886
- }
887
- )
901
+ showEmailInput ? /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
902
+ /* @__PURE__ */ jsx(
903
+ Input,
904
+ {
905
+ id: "email",
906
+ type: "email",
907
+ value: email,
908
+ onChange: (e) => setEmail(e.target.value),
909
+ required: true,
910
+ className: "flex-1"
911
+ }
912
+ ),
913
+ hasDefaultEmail && /* @__PURE__ */ jsx(
914
+ Button,
915
+ {
916
+ type: "button",
917
+ variant: "ghost",
918
+ size: "sm",
919
+ onClick: () => {
920
+ setIsEditingEmail(false);
921
+ setEmail(mergedDefaults.email ?? "");
922
+ },
923
+ className: "px-3 text-xs text-muted-foreground hover:text-foreground",
924
+ children: "Cancel"
925
+ }
926
+ )
927
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between h-9 w-full rounded-md border border-white/30 bg-transparent px-3 text-sm text-foreground", children: [
928
+ /* @__PURE__ */ jsx("span", { children: email }),
929
+ /* @__PURE__ */ jsx(
930
+ "button",
931
+ {
932
+ type: "button",
933
+ onClick: () => setIsEditingEmail(true),
934
+ className: "text-muted-foreground hover:text-foreground transition-colors",
935
+ "aria-label": "Edit email",
936
+ children: /* @__PURE__ */ jsx(Pencil, { className: "h-4 w-4" })
937
+ }
938
+ )
939
+ ] })
888
940
  ] }),
889
941
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
890
942
  /* @__PURE__ */ jsx(Label, { htmlFor: "address1", children: "Address" }),
@@ -940,7 +992,7 @@ var CardDetailsForm = ({
940
992
  /* @__PURE__ */ jsx(Label, { children: "Country" }),
941
993
  /* @__PURE__ */ jsxs(Select, { value: country, onValueChange: setCountry, children: [
942
994
  /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a country" }) }),
943
- /* @__PURE__ */ jsx(SelectContent, { className: "max-h-64 w-full", children: countries.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.code, children: option.name }, option.code)) })
995
+ /* @__PURE__ */ jsx(SelectContent, { children: countries.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.code, children: option.name }, option.code)) })
944
996
  ] })
945
997
  ] })
946
998
  ] }),
@@ -1046,7 +1098,7 @@ var badgeVariants = cva(
1046
1098
  function Badge({ className, variant, ...props }) {
1047
1099
  return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
1048
1100
  }
1049
- var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1101
+ var ScrollArea = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1050
1102
  ScrollAreaPrimitive.Root,
1051
1103
  {
1052
1104
  ref,
@@ -1060,7 +1112,7 @@ var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) =>
1060
1112
  }
1061
1113
  ));
1062
1114
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1063
- var ScrollBar = React15.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1115
+ var ScrollBar = React4.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1064
1116
  ScrollAreaPrimitive.ScrollAreaScrollbar,
1065
1117
  {
1066
1118
  ref,
@@ -1145,7 +1197,7 @@ function TabsList({
1145
1197
  {
1146
1198
  "data-slot": "tabs-list",
1147
1199
  className: cn(
1148
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
1200
+ "bg-transparent border border-white/30 text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",
1149
1201
  className
1150
1202
  ),
1151
1203
  ...props
@@ -1156,12 +1208,32 @@ function TabsTrigger({
1156
1208
  className,
1157
1209
  ...props
1158
1210
  }) {
1211
+ const triggerRef = React4.useRef(null);
1212
+ React4.useEffect(() => {
1213
+ const element = triggerRef.current;
1214
+ if (!element) return;
1215
+ const updateStyles = () => {
1216
+ const isActive = element.getAttribute("data-state") === "active";
1217
+ if (isActive) {
1218
+ element.style.setProperty("background-color", "rgba(255, 255, 255, 0.3)", "important");
1219
+ element.style.setProperty("border-color", "transparent", "important");
1220
+ } else {
1221
+ element.style.removeProperty("background-color");
1222
+ element.style.removeProperty("border-color");
1223
+ }
1224
+ };
1225
+ updateStyles();
1226
+ const observer = new MutationObserver(updateStyles);
1227
+ observer.observe(element, { attributes: true, attributeFilter: ["data-state"] });
1228
+ return () => observer.disconnect();
1229
+ }, []);
1159
1230
  return /* @__PURE__ */ jsx(
1160
1231
  TabsPrimitive.Trigger,
1161
1232
  {
1233
+ ref: triggerRef,
1162
1234
  "data-slot": "tabs-trigger",
1163
1235
  className: cn(
1164
- "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1236
+ "data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/70 inline-flex h-[calc(100%-0.5rem)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow,background-color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1165
1237
  className
1166
1238
  ),
1167
1239
  ...props
@@ -1405,7 +1477,7 @@ var useSolanaQrPayment = (options) => {
1405
1477
  refresh
1406
1478
  };
1407
1479
  };
1408
- var Card = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1480
+ var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1409
1481
  "div",
1410
1482
  {
1411
1483
  ref,
@@ -1417,7 +1489,7 @@ var Card = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
1417
1489
  }
1418
1490
  ));
1419
1491
  Card.displayName = "Card";
1420
- var CardHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1492
+ var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1421
1493
  "div",
1422
1494
  {
1423
1495
  ref,
@@ -1426,7 +1498,7 @@ var CardHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE
1426
1498
  }
1427
1499
  ));
1428
1500
  CardHeader.displayName = "CardHeader";
1429
- var CardTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1501
+ var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1430
1502
  "div",
1431
1503
  {
1432
1504
  ref,
@@ -1438,7 +1510,7 @@ var CardTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
1438
1510
  }
1439
1511
  ));
1440
1512
  CardTitle.displayName = "CardTitle";
1441
- var CardDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1513
+ var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1442
1514
  "div",
1443
1515
  {
1444
1516
  ref,
@@ -1447,9 +1519,9 @@ var CardDescription = React15.forwardRef(({ className, ...props }, ref) => /* @_
1447
1519
  }
1448
1520
  ));
1449
1521
  CardDescription.displayName = "CardDescription";
1450
- var CardContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
1522
+ var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
1451
1523
  CardContent.displayName = "CardContent";
1452
- var CardFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1524
+ var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
1453
1525
  "div",
1454
1526
  {
1455
1527
  ref,
@@ -1464,7 +1536,7 @@ var QRCodePayment = ({
1464
1536
  onPaymentError,
1465
1537
  onPaymentSuccess
1466
1538
  }) => {
1467
- const handleQrSuccess = React15__default.useCallback(
1539
+ const handleQrSuccess = React4__default.useCallback(
1468
1540
  (paymentId, txId) => {
1469
1541
  if (!paymentId && !txId) {
1470
1542
  onPaymentError("Missing payment confirmation details");
@@ -2043,8 +2115,8 @@ var PaymentExperience = ({
2043
2115
  };
2044
2116
  const renderCardExperience = () => /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, children: [
2045
2117
  /* @__PURE__ */ jsxs(TabsList, { className: "w-full rounded-md mb-4", children: [
2046
- /* @__PURE__ */ jsx(TabsTrigger, { className: clsx("cursor-pointer", { "bg-background": activeTab == "saved" }), value: "saved", children: "Use saved card" }),
2047
- /* @__PURE__ */ jsx(TabsTrigger, { className: clsx("cursor-pointer", { "bg-background": activeTab == "new" }), value: "new", children: "Add new card" })
2118
+ /* @__PURE__ */ jsx(TabsTrigger, { className: "cursor-pointer", value: "saved", children: "Use saved card" }),
2119
+ /* @__PURE__ */ jsx(TabsTrigger, { className: "cursor-pointer", value: "new", children: "Add new card" })
2048
2120
  ] }),
2049
2121
  /* @__PURE__ */ jsx(TabsContent, { value: "saved", children: renderSavedTab() }),
2050
2122
  /* @__PURE__ */ jsx(TabsContent, { value: "new", children: renderNewTab() })
@@ -2524,7 +2596,7 @@ var SolanaPaymentSelector = ({
2524
2596
  }) => {
2525
2597
  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 }) }) });
2526
2598
  };
2527
- var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
2599
+ var Table = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
2528
2600
  "table",
2529
2601
  {
2530
2602
  ref,
@@ -2533,9 +2605,9 @@ var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
2533
2605
  }
2534
2606
  ) }));
2535
2607
  Table.displayName = "Table";
2536
- var TableHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
2608
+ var TableHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
2537
2609
  TableHeader.displayName = "TableHeader";
2538
- var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2610
+ var TableBody = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2539
2611
  "tbody",
2540
2612
  {
2541
2613
  ref,
@@ -2544,7 +2616,7 @@ var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
2544
2616
  }
2545
2617
  ));
2546
2618
  TableBody.displayName = "TableBody";
2547
- var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2619
+ var TableFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2548
2620
  "tfoot",
2549
2621
  {
2550
2622
  ref,
@@ -2556,7 +2628,7 @@ var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
2556
2628
  }
2557
2629
  ));
2558
2630
  TableFooter.displayName = "TableFooter";
2559
- var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2631
+ var TableRow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2560
2632
  "tr",
2561
2633
  {
2562
2634
  ref,
@@ -2568,7 +2640,7 @@ var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2568
2640
  }
2569
2641
  ));
2570
2642
  TableRow.displayName = "TableRow";
2571
- var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2643
+ var TableHead = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2572
2644
  "th",
2573
2645
  {
2574
2646
  ref,
@@ -2580,7 +2652,7 @@ var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
2580
2652
  }
2581
2653
  ));
2582
2654
  TableHead.displayName = "TableHead";
2583
- var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2655
+ var TableCell = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2584
2656
  "td",
2585
2657
  {
2586
2658
  ref,
@@ -2589,7 +2661,7 @@ var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
2589
2661
  }
2590
2662
  ));
2591
2663
  TableCell.displayName = "TableCell";
2592
- var TableCaption = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2664
+ var TableCaption = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2593
2665
  "caption",
2594
2666
  {
2595
2667
  ref,
@@ -2601,7 +2673,7 @@ TableCaption.displayName = "TableCaption";
2601
2673
  var AlertDialog = AlertDialogPrimitive.Root;
2602
2674
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
2603
2675
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
2604
- var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2676
+ var AlertDialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2605
2677
  AlertDialogPrimitive.Overlay,
2606
2678
  {
2607
2679
  className: cn(
@@ -2613,7 +2685,7 @@ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /*
2613
2685
  }
2614
2686
  ));
2615
2687
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
2616
- var AlertDialogContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
2688
+ var AlertDialogContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
2617
2689
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
2618
2690
  /* @__PURE__ */ jsx(
2619
2691
  AlertDialogPrimitive.Content,
@@ -2656,7 +2728,7 @@ var AlertDialogFooter = ({
2656
2728
  }
2657
2729
  );
2658
2730
  AlertDialogFooter.displayName = "AlertDialogFooter";
2659
- var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2731
+ var AlertDialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2660
2732
  AlertDialogPrimitive.Title,
2661
2733
  {
2662
2734
  ref,
@@ -2665,7 +2737,7 @@ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @
2665
2737
  }
2666
2738
  ));
2667
2739
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
2668
- var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2740
+ var AlertDialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2669
2741
  AlertDialogPrimitive.Description,
2670
2742
  {
2671
2743
  ref,
@@ -2674,7 +2746,7 @@ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) =
2674
2746
  }
2675
2747
  ));
2676
2748
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
2677
- var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2749
+ var AlertDialogAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2678
2750
  AlertDialogPrimitive.Action,
2679
2751
  {
2680
2752
  ref,
@@ -2683,7 +2755,7 @@ var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /*
2683
2755
  }
2684
2756
  ));
2685
2757
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
2686
- var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2758
+ var AlertDialogCancel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2687
2759
  AlertDialogPrimitive.Cancel,
2688
2760
  {
2689
2761
  ref,
@@ -2696,7 +2768,7 @@ var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /*
2696
2768
  }
2697
2769
  ));
2698
2770
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
2699
- var Textarea = React15.forwardRef(({ className, ...props }, ref) => {
2771
+ var Textarea = React4.forwardRef(({ className, ...props }, ref) => {
2700
2772
  return /* @__PURE__ */ jsx(
2701
2773
  "textarea",
2702
2774
  {
@@ -3204,7 +3276,7 @@ var PaymentMethodsSection = ({
3204
3276
  ) })
3205
3277
  ] });
3206
3278
  };
3207
- var Checkbox = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3279
+ var Checkbox = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3208
3280
  CheckboxPrimitive.Root,
3209
3281
  {
3210
3282
  ref,