@doujins/payments-ui 0.1.14 → 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.cjs +320 -242
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +160 -82
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
534
|
+
var Select = SelectPrimitive.Root;
|
|
535
535
|
var SelectValue = SelectPrimitive.Value;
|
|
536
|
-
var SelectTrigger =
|
|
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 =
|
|
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 =
|
|
565
|
+
var SelectScrollDownButton = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
566
566
|
SelectPrimitive.ScrollDownButton,
|
|
567
567
|
{
|
|
568
568
|
ref,
|
|
@@ -575,33 +575,61 @@ var SelectScrollDownButton = React15.forwardRef(({ className, ...props }, ref) =
|
|
|
575
575
|
}
|
|
576
576
|
));
|
|
577
577
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
578
|
-
var SelectContent =
|
|
579
|
-
|
|
580
|
-
{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
602
|
-
|
|
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");
|
|
586
|
+
}
|
|
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
|
+
});
|
|
603
631
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
604
|
-
var SelectLabel =
|
|
632
|
+
var SelectLabel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
605
633
|
SelectPrimitive.Label,
|
|
606
634
|
{
|
|
607
635
|
ref,
|
|
@@ -610,7 +638,7 @@ var SelectLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
610
638
|
}
|
|
611
639
|
));
|
|
612
640
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
613
|
-
var SelectItem =
|
|
641
|
+
var SelectItem = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
614
642
|
SelectPrimitive.Item,
|
|
615
643
|
{
|
|
616
644
|
ref,
|
|
@@ -626,7 +654,7 @@ var SelectItem = React15.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
626
654
|
}
|
|
627
655
|
));
|
|
628
656
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
629
|
-
var SelectSeparator =
|
|
657
|
+
var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
630
658
|
SelectPrimitive.Separator,
|
|
631
659
|
{
|
|
632
660
|
ref,
|
|
@@ -679,6 +707,7 @@ var CardDetailsForm = ({
|
|
|
679
707
|
const [postalCode, setPostalCode] = useState(mergedDefaults.postalCode);
|
|
680
708
|
const [country, setCountry] = useState(mergedDefaults.country);
|
|
681
709
|
const [email, setEmail] = useState(mergedDefaults.email ?? "");
|
|
710
|
+
const [isEditingEmail, setIsEditingEmail] = useState(false);
|
|
682
711
|
const [localError, setLocalError] = useState(null);
|
|
683
712
|
const [isTokenizing, setIsTokenizing] = useState(false);
|
|
684
713
|
const [collectReady, setCollectReady] = useState(
|
|
@@ -812,8 +841,7 @@ var CardDetailsForm = ({
|
|
|
812
841
|
visible
|
|
813
842
|
]);
|
|
814
843
|
const validate = () => {
|
|
815
|
-
|
|
816
|
-
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()) {
|
|
817
845
|
setLocalError("Please complete all required billing fields.");
|
|
818
846
|
return false;
|
|
819
847
|
}
|
|
@@ -832,7 +860,8 @@ var CardDetailsForm = ({
|
|
|
832
860
|
};
|
|
833
861
|
const errorMessage = localError ?? externalError;
|
|
834
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";
|
|
835
|
-
const
|
|
863
|
+
const hasDefaultEmail = Boolean(defaultValues?.email || config.defaultUser?.email);
|
|
864
|
+
const showEmailInput = !hasDefaultEmail || isEditingEmail;
|
|
836
865
|
return /* @__PURE__ */ jsxs(
|
|
837
866
|
"form",
|
|
838
867
|
{
|
|
@@ -867,18 +896,47 @@ var CardDetailsForm = ({
|
|
|
867
896
|
)
|
|
868
897
|
] })
|
|
869
898
|
] }),
|
|
870
|
-
|
|
899
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
871
900
|
/* @__PURE__ */ jsx(Label, { htmlFor: "email", children: "Email" }),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
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
|
+
] })
|
|
882
940
|
] }),
|
|
883
941
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
884
942
|
/* @__PURE__ */ jsx(Label, { htmlFor: "address1", children: "Address" }),
|
|
@@ -934,7 +992,7 @@ var CardDetailsForm = ({
|
|
|
934
992
|
/* @__PURE__ */ jsx(Label, { children: "Country" }),
|
|
935
993
|
/* @__PURE__ */ jsxs(Select, { value: country, onValueChange: setCountry, children: [
|
|
936
994
|
/* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select a country" }) }),
|
|
937
|
-
/* @__PURE__ */ jsx(SelectContent, {
|
|
995
|
+
/* @__PURE__ */ jsx(SelectContent, { children: countries.map((option) => /* @__PURE__ */ jsx(SelectItem, { value: option.code, children: option.name }, option.code)) })
|
|
938
996
|
] })
|
|
939
997
|
] })
|
|
940
998
|
] }),
|
|
@@ -1040,7 +1098,7 @@ var badgeVariants = cva(
|
|
|
1040
1098
|
function Badge({ className, variant, ...props }) {
|
|
1041
1099
|
return /* @__PURE__ */ jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
1042
1100
|
}
|
|
1043
|
-
var ScrollArea =
|
|
1101
|
+
var ScrollArea = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
1044
1102
|
ScrollAreaPrimitive.Root,
|
|
1045
1103
|
{
|
|
1046
1104
|
ref,
|
|
@@ -1054,7 +1112,7 @@ var ScrollArea = React15.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
1054
1112
|
}
|
|
1055
1113
|
));
|
|
1056
1114
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
1057
|
-
var ScrollBar =
|
|
1115
|
+
var ScrollBar = React4.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1058
1116
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1059
1117
|
{
|
|
1060
1118
|
ref,
|
|
@@ -1139,7 +1197,7 @@ function TabsList({
|
|
|
1139
1197
|
{
|
|
1140
1198
|
"data-slot": "tabs-list",
|
|
1141
1199
|
className: cn(
|
|
1142
|
-
"bg-
|
|
1200
|
+
"bg-transparent border border-white/30 text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",
|
|
1143
1201
|
className
|
|
1144
1202
|
),
|
|
1145
1203
|
...props
|
|
@@ -1150,12 +1208,32 @@ function TabsTrigger({
|
|
|
1150
1208
|
className,
|
|
1151
1209
|
...props
|
|
1152
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
|
+
}, []);
|
|
1153
1230
|
return /* @__PURE__ */ jsx(
|
|
1154
1231
|
TabsPrimitive.Trigger,
|
|
1155
1232
|
{
|
|
1233
|
+
ref: triggerRef,
|
|
1156
1234
|
"data-slot": "tabs-trigger",
|
|
1157
1235
|
className: cn(
|
|
1158
|
-
"data-[state=active]:
|
|
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",
|
|
1159
1237
|
className
|
|
1160
1238
|
),
|
|
1161
1239
|
...props
|
|
@@ -1399,7 +1477,7 @@ var useSolanaQrPayment = (options) => {
|
|
|
1399
1477
|
refresh
|
|
1400
1478
|
};
|
|
1401
1479
|
};
|
|
1402
|
-
var Card =
|
|
1480
|
+
var Card = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1403
1481
|
"div",
|
|
1404
1482
|
{
|
|
1405
1483
|
ref,
|
|
@@ -1411,7 +1489,7 @@ var Card = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1411
1489
|
}
|
|
1412
1490
|
));
|
|
1413
1491
|
Card.displayName = "Card";
|
|
1414
|
-
var CardHeader =
|
|
1492
|
+
var CardHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1415
1493
|
"div",
|
|
1416
1494
|
{
|
|
1417
1495
|
ref,
|
|
@@ -1420,7 +1498,7 @@ var CardHeader = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1420
1498
|
}
|
|
1421
1499
|
));
|
|
1422
1500
|
CardHeader.displayName = "CardHeader";
|
|
1423
|
-
var CardTitle =
|
|
1501
|
+
var CardTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1424
1502
|
"div",
|
|
1425
1503
|
{
|
|
1426
1504
|
ref,
|
|
@@ -1432,7 +1510,7 @@ var CardTitle = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
1432
1510
|
}
|
|
1433
1511
|
));
|
|
1434
1512
|
CardTitle.displayName = "CardTitle";
|
|
1435
|
-
var CardDescription =
|
|
1513
|
+
var CardDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1436
1514
|
"div",
|
|
1437
1515
|
{
|
|
1438
1516
|
ref,
|
|
@@ -1441,9 +1519,9 @@ var CardDescription = React15.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1441
1519
|
}
|
|
1442
1520
|
));
|
|
1443
1521
|
CardDescription.displayName = "CardDescription";
|
|
1444
|
-
var CardContent =
|
|
1522
|
+
var CardContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
1445
1523
|
CardContent.displayName = "CardContent";
|
|
1446
|
-
var CardFooter =
|
|
1524
|
+
var CardFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1447
1525
|
"div",
|
|
1448
1526
|
{
|
|
1449
1527
|
ref,
|
|
@@ -1458,7 +1536,7 @@ var QRCodePayment = ({
|
|
|
1458
1536
|
onPaymentError,
|
|
1459
1537
|
onPaymentSuccess
|
|
1460
1538
|
}) => {
|
|
1461
|
-
const handleQrSuccess =
|
|
1539
|
+
const handleQrSuccess = React4__default.useCallback(
|
|
1462
1540
|
(paymentId, txId) => {
|
|
1463
1541
|
if (!paymentId && !txId) {
|
|
1464
1542
|
onPaymentError("Missing payment confirmation details");
|
|
@@ -2037,8 +2115,8 @@ var PaymentExperience = ({
|
|
|
2037
2115
|
};
|
|
2038
2116
|
const renderCardExperience = () => /* @__PURE__ */ jsxs(Tabs, { value: activeTab, onValueChange: setActiveTab, children: [
|
|
2039
2117
|
/* @__PURE__ */ jsxs(TabsList, { className: "w-full rounded-md mb-4", children: [
|
|
2040
|
-
/* @__PURE__ */ jsx(TabsTrigger, { className:
|
|
2041
|
-
/* @__PURE__ */ jsx(TabsTrigger, { className:
|
|
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" })
|
|
2042
2120
|
] }),
|
|
2043
2121
|
/* @__PURE__ */ jsx(TabsContent, { value: "saved", children: renderSavedTab() }),
|
|
2044
2122
|
/* @__PURE__ */ jsx(TabsContent, { value: "new", children: renderNewTab() })
|
|
@@ -2518,7 +2596,7 @@ var SolanaPaymentSelector = ({
|
|
|
2518
2596
|
}) => {
|
|
2519
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 }) }) });
|
|
2520
2598
|
};
|
|
2521
|
-
var Table =
|
|
2599
|
+
var Table = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx(
|
|
2522
2600
|
"table",
|
|
2523
2601
|
{
|
|
2524
2602
|
ref,
|
|
@@ -2527,9 +2605,9 @@ var Table = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2527
2605
|
}
|
|
2528
2606
|
) }));
|
|
2529
2607
|
Table.displayName = "Table";
|
|
2530
|
-
var TableHeader =
|
|
2608
|
+
var TableHeader = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2531
2609
|
TableHeader.displayName = "TableHeader";
|
|
2532
|
-
var TableBody =
|
|
2610
|
+
var TableBody = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2533
2611
|
"tbody",
|
|
2534
2612
|
{
|
|
2535
2613
|
ref,
|
|
@@ -2538,7 +2616,7 @@ var TableBody = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2538
2616
|
}
|
|
2539
2617
|
));
|
|
2540
2618
|
TableBody.displayName = "TableBody";
|
|
2541
|
-
var TableFooter =
|
|
2619
|
+
var TableFooter = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2542
2620
|
"tfoot",
|
|
2543
2621
|
{
|
|
2544
2622
|
ref,
|
|
@@ -2550,7 +2628,7 @@ var TableFooter = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2550
2628
|
}
|
|
2551
2629
|
));
|
|
2552
2630
|
TableFooter.displayName = "TableFooter";
|
|
2553
|
-
var TableRow =
|
|
2631
|
+
var TableRow = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2554
2632
|
"tr",
|
|
2555
2633
|
{
|
|
2556
2634
|
ref,
|
|
@@ -2562,7 +2640,7 @@ var TableRow = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
2562
2640
|
}
|
|
2563
2641
|
));
|
|
2564
2642
|
TableRow.displayName = "TableRow";
|
|
2565
|
-
var TableHead =
|
|
2643
|
+
var TableHead = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2566
2644
|
"th",
|
|
2567
2645
|
{
|
|
2568
2646
|
ref,
|
|
@@ -2574,7 +2652,7 @@ var TableHead = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2574
2652
|
}
|
|
2575
2653
|
));
|
|
2576
2654
|
TableHead.displayName = "TableHead";
|
|
2577
|
-
var TableCell =
|
|
2655
|
+
var TableCell = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2578
2656
|
"td",
|
|
2579
2657
|
{
|
|
2580
2658
|
ref,
|
|
@@ -2583,7 +2661,7 @@ var TableCell = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2583
2661
|
}
|
|
2584
2662
|
));
|
|
2585
2663
|
TableCell.displayName = "TableCell";
|
|
2586
|
-
var TableCaption =
|
|
2664
|
+
var TableCaption = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2587
2665
|
"caption",
|
|
2588
2666
|
{
|
|
2589
2667
|
ref,
|
|
@@ -2595,7 +2673,7 @@ TableCaption.displayName = "TableCaption";
|
|
|
2595
2673
|
var AlertDialog = AlertDialogPrimitive.Root;
|
|
2596
2674
|
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
2597
2675
|
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
2598
|
-
var AlertDialogOverlay =
|
|
2676
|
+
var AlertDialogOverlay = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2599
2677
|
AlertDialogPrimitive.Overlay,
|
|
2600
2678
|
{
|
|
2601
2679
|
className: cn(
|
|
@@ -2607,7 +2685,7 @@ var AlertDialogOverlay = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2607
2685
|
}
|
|
2608
2686
|
));
|
|
2609
2687
|
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
2610
|
-
var AlertDialogContent =
|
|
2688
|
+
var AlertDialogContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
2611
2689
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
2612
2690
|
/* @__PURE__ */ jsx(
|
|
2613
2691
|
AlertDialogPrimitive.Content,
|
|
@@ -2650,7 +2728,7 @@ var AlertDialogFooter = ({
|
|
|
2650
2728
|
}
|
|
2651
2729
|
);
|
|
2652
2730
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
2653
|
-
var AlertDialogTitle =
|
|
2731
|
+
var AlertDialogTitle = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2654
2732
|
AlertDialogPrimitive.Title,
|
|
2655
2733
|
{
|
|
2656
2734
|
ref,
|
|
@@ -2659,7 +2737,7 @@ var AlertDialogTitle = React15.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2659
2737
|
}
|
|
2660
2738
|
));
|
|
2661
2739
|
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
2662
|
-
var AlertDialogDescription =
|
|
2740
|
+
var AlertDialogDescription = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2663
2741
|
AlertDialogPrimitive.Description,
|
|
2664
2742
|
{
|
|
2665
2743
|
ref,
|
|
@@ -2668,7 +2746,7 @@ var AlertDialogDescription = React15.forwardRef(({ className, ...props }, ref) =
|
|
|
2668
2746
|
}
|
|
2669
2747
|
));
|
|
2670
2748
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
2671
|
-
var AlertDialogAction =
|
|
2749
|
+
var AlertDialogAction = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2672
2750
|
AlertDialogPrimitive.Action,
|
|
2673
2751
|
{
|
|
2674
2752
|
ref,
|
|
@@ -2677,7 +2755,7 @@ var AlertDialogAction = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2677
2755
|
}
|
|
2678
2756
|
));
|
|
2679
2757
|
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
2680
|
-
var AlertDialogCancel =
|
|
2758
|
+
var AlertDialogCancel = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2681
2759
|
AlertDialogPrimitive.Cancel,
|
|
2682
2760
|
{
|
|
2683
2761
|
ref,
|
|
@@ -2690,7 +2768,7 @@ var AlertDialogCancel = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2690
2768
|
}
|
|
2691
2769
|
));
|
|
2692
2770
|
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
2693
|
-
var Textarea =
|
|
2771
|
+
var Textarea = React4.forwardRef(({ className, ...props }, ref) => {
|
|
2694
2772
|
return /* @__PURE__ */ jsx(
|
|
2695
2773
|
"textarea",
|
|
2696
2774
|
{
|
|
@@ -3198,7 +3276,7 @@ var PaymentMethodsSection = ({
|
|
|
3198
3276
|
) })
|
|
3199
3277
|
] });
|
|
3200
3278
|
};
|
|
3201
|
-
var Checkbox =
|
|
3279
|
+
var Checkbox = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3202
3280
|
CheckboxPrimitive.Root,
|
|
3203
3281
|
{
|
|
3204
3282
|
ref,
|