@doujins/payments-ui 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +48 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -542,7 +542,7 @@ var Input = React15__namespace.forwardRef(
|
|
|
542
542
|
{
|
|
543
543
|
type,
|
|
544
544
|
className: cn(
|
|
545
|
-
"flex h-
|
|
545
|
+
"placeholder:text-white/30 flex h-9 w-full rounded-md border border-white/30 bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium font-light file:text-foreground text-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
546
546
|
className
|
|
547
547
|
),
|
|
548
548
|
ref,
|
|
@@ -553,7 +553,7 @@ var Input = React15__namespace.forwardRef(
|
|
|
553
553
|
);
|
|
554
554
|
Input.displayName = "Input";
|
|
555
555
|
var labelVariants = classVarianceAuthority.cva(
|
|
556
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
556
|
+
"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
557
557
|
);
|
|
558
558
|
var Label = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
559
559
|
LabelPrimitive__namespace.Root,
|
|
@@ -571,7 +571,7 @@ var SelectTrigger = React15__namespace.forwardRef(({ className, children, ...pro
|
|
|
571
571
|
{
|
|
572
572
|
ref,
|
|
573
573
|
className: cn(
|
|
574
|
-
"flex h-
|
|
574
|
+
"flex h-9 w-full cursor-pointer items-center justify-between rounded-md border border-white/30 bg-transparent px-3 py-1 text-sm placeholder:text-white/30 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-current",
|
|
575
575
|
className
|
|
576
576
|
),
|
|
577
577
|
...props,
|
|
@@ -613,7 +613,7 @@ var SelectContent = React15__namespace.forwardRef(({ className, children, positi
|
|
|
613
613
|
{
|
|
614
614
|
ref,
|
|
615
615
|
className: cn(
|
|
616
|
-
"relative z-
|
|
616
|
+
"relative z-[200] max-h-64 min-w-[8rem] 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 origin-[--radix-select-content-transform-origin]",
|
|
617
617
|
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",
|
|
618
618
|
className
|
|
619
619
|
),
|
|
@@ -650,13 +650,13 @@ var SelectItem = React15__namespace.forwardRef(({ className, children, ...props
|
|
|
650
650
|
{
|
|
651
651
|
ref,
|
|
652
652
|
className: cn(
|
|
653
|
-
"relative flex w-full cursor-
|
|
653
|
+
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none hover:bg-foreground/10 focus:bg-foreground/10 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
654
654
|
className
|
|
655
655
|
),
|
|
656
656
|
...props,
|
|
657
657
|
children: [
|
|
658
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
659
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.
|
|
658
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }),
|
|
659
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" }) }) })
|
|
660
660
|
]
|
|
661
661
|
}
|
|
662
662
|
));
|
|
@@ -847,7 +847,8 @@ var CardDetailsForm = ({
|
|
|
847
847
|
visible
|
|
848
848
|
]);
|
|
849
849
|
const validate = () => {
|
|
850
|
-
|
|
850
|
+
const emailRequired = !defaultValues?.email && !config.defaultUser?.email;
|
|
851
|
+
if (!firstName.trim() || !lastName.trim() || !address1.trim() || !city.trim() || !postalCode.trim() || !country.trim() || emailRequired && !email.trim()) {
|
|
851
852
|
setLocalError("Please complete all required billing fields.");
|
|
852
853
|
return false;
|
|
853
854
|
}
|
|
@@ -865,7 +866,8 @@ var CardDetailsForm = ({
|
|
|
865
866
|
window.CollectJS.startPaymentRequest();
|
|
866
867
|
};
|
|
867
868
|
const errorMessage = localError ?? externalError;
|
|
868
|
-
const collectFieldClass = "relative flex h-
|
|
869
|
+
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";
|
|
870
|
+
const showEmailField = !defaultValues?.email && !config.defaultUser?.email;
|
|
869
871
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
870
872
|
"form",
|
|
871
873
|
{
|
|
@@ -900,7 +902,7 @@ var CardDetailsForm = ({
|
|
|
900
902
|
)
|
|
901
903
|
] })
|
|
902
904
|
] }),
|
|
903
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
905
|
+
showEmailField && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
904
906
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "email", children: "Email" }),
|
|
905
907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
906
908
|
Input,
|
|
@@ -989,7 +991,7 @@ var CardDetailsForm = ({
|
|
|
989
991
|
Button,
|
|
990
992
|
{
|
|
991
993
|
type: "submit",
|
|
992
|
-
className: "w-full",
|
|
994
|
+
className: "w-full border-0 bg-emerald-600 text-white hover:bg-emerald-500 disabled:opacity-50",
|
|
993
995
|
disabled: submitting || submitDisabled || isTokenizing,
|
|
994
996
|
children: submitting || isTokenizing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
995
997
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
@@ -2099,8 +2101,8 @@ var SubscriptionSuccessDialog = ({
|
|
|
2099
2101
|
}) => {
|
|
2100
2102
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: (value) => {
|
|
2101
2103
|
if (!value) onClose();
|
|
2102
|
-
}, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border
|
|
2103
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-
|
|
2104
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "z-[100] w-full max-w-md overflow-hidden border border-white/20 p-0 backdrop-blur-xl bg-background-regular shadow-2xl", children: [
|
|
2105
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-transparent px-6 py-8 text-center", children: [
|
|
2104
2106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-background/60", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-10 w-10 text-primary" }) }),
|
|
2105
2107
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
2106
2108
|
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-2xl font-semibold text-foreground", children: "Subscription activated" }),
|
|
@@ -2115,7 +2117,7 @@ var SubscriptionSuccessDialog = ({
|
|
|
2115
2117
|
] })
|
|
2116
2118
|
] })
|
|
2117
2119
|
] }),
|
|
2118
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-6", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "w-full", onClick: onClose, children: "Continue exploring" }) })
|
|
2120
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-6", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "w-full border-0 bg-emerald-600 text-white hover:bg-emerald-500", onClick: onClose, children: "Continue exploring" }) })
|
|
2119
2121
|
] }) });
|
|
2120
2122
|
};
|
|
2121
2123
|
var useSubscriptionActions = () => {
|
|
@@ -2287,9 +2289,9 @@ var SubscriptionCheckoutModal = ({
|
|
|
2287
2289
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2288
2290
|
DialogContent,
|
|
2289
2291
|
{
|
|
2290
|
-
className: "max-w-
|
|
2292
|
+
className: "z-[100] max-w-xl max-h-[90vh] overflow-y-auto border border-white/20 p-6 backdrop-blur-xl bg-background-regular rounded-md [&::-webkit-scrollbar]:hidden",
|
|
2291
2293
|
children: [
|
|
2292
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Checkout" }) }),
|
|
2294
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: "Checkout" }) }),
|
|
2293
2295
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: !priceId ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-center px-3 py-2 text-sm text-destructive", children: [
|
|
2294
2296
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4" }),
|
|
2295
2297
|
" ",
|
|
@@ -2338,8 +2340,8 @@ var wallets = [
|
|
|
2338
2340
|
];
|
|
2339
2341
|
var WalletModal = ({ open, onOpenChange }) => {
|
|
2340
2342
|
const [expandedWallet, setExpandedWallet] = React15.useState(null);
|
|
2341
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border
|
|
2342
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "border-b bg-gradient-to-r from-primary/10 via-
|
|
2343
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "z-[100] w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border border-white/20 p-0 backdrop-blur-xl bg-background-regular shadow-2xl [&::-webkit-scrollbar]:hidden", children: [
|
|
2344
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "border-b border-white/10 bg-gradient-to-r from-primary/10 via-transparent to-transparent px-6 py-5 text-left", children: [
|
|
2343
2345
|
/* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: [
|
|
2344
2346
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 text-primary" }),
|
|
2345
2347
|
" Connect a Solana wallet"
|
|
@@ -2350,7 +2352,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2350
2352
|
wallets.map((wallet) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2351
2353
|
"div",
|
|
2352
2354
|
{
|
|
2353
|
-
className: "rounded-2xl border bg-
|
|
2355
|
+
className: "rounded-2xl border border-white/20 bg-foreground/5 p-4 shadow-sm",
|
|
2354
2356
|
children: [
|
|
2355
2357
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2356
2358
|
"button",
|
|
@@ -2375,7 +2377,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2375
2377
|
wallet.name,
|
|
2376
2378
|
" wallet, approve the connection request, and confirm the signature prompt to finish linking."
|
|
2377
2379
|
] }),
|
|
2378
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "w-full", variant: "outline", disabled: true, children: [
|
|
2380
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "w-full border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", variant: "outline", disabled: true, children: [
|
|
2379
2381
|
"Connect with ",
|
|
2380
2382
|
wallet.name,
|
|
2381
2383
|
" (coming soon)"
|
|
@@ -2385,7 +2387,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2385
2387
|
},
|
|
2386
2388
|
wallet.id
|
|
2387
2389
|
)),
|
|
2388
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border bg-
|
|
2390
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border border-white/20 bg-foreground/5 p-4 text-xs text-muted-foreground", children: "Don't see your wallet? Additional providers will be added soon. Contact support if you need manual verification." })
|
|
2389
2391
|
] })
|
|
2390
2392
|
] }) });
|
|
2391
2393
|
};
|
|
@@ -2821,9 +2823,9 @@ var CancelMembershipDialog = ({
|
|
|
2821
2823
|
" ",
|
|
2822
2824
|
t.buttonLabel
|
|
2823
2825
|
] }) }),
|
|
2824
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "max-h-[90vh] overflow-y-auto rounded-md border border-
|
|
2826
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "z-[100] max-h-[90vh] overflow-y-auto rounded-md border border-white/20 p-6 backdrop-blur-xl bg-background-regular", children: [
|
|
2825
2827
|
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { children: [
|
|
2826
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold", children: [
|
|
2828
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold text-foreground", children: [
|
|
2827
2829
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "h-5 w-5 text-destructive" }),
|
|
2828
2830
|
" ",
|
|
2829
2831
|
t.title
|
|
@@ -2838,7 +2840,7 @@ var CancelMembershipDialog = ({
|
|
|
2838
2840
|
] })
|
|
2839
2841
|
] }),
|
|
2840
2842
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-4 space-y-2 py-2", children: [
|
|
2841
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "cancelReason", className: "text-sm font-medium", children: t.reasonLabel }),
|
|
2843
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "cancelReason", className: "text-sm font-medium text-foreground", children: t.reasonLabel }),
|
|
2842
2844
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2843
2845
|
Textarea,
|
|
2844
2846
|
{
|
|
@@ -2847,7 +2849,7 @@ var CancelMembershipDialog = ({
|
|
|
2847
2849
|
onChange: handleReasonChange,
|
|
2848
2850
|
placeholder: t.reasonPlaceholder,
|
|
2849
2851
|
className: cn(
|
|
2850
|
-
"w-full resize-none border-
|
|
2852
|
+
"w-full resize-none border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground",
|
|
2851
2853
|
showError && "border-destructive"
|
|
2852
2854
|
),
|
|
2853
2855
|
rows: 4,
|
|
@@ -2865,11 +2867,11 @@ var CancelMembershipDialog = ({
|
|
|
2865
2867
|
)
|
|
2866
2868
|
] }),
|
|
2867
2869
|
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogFooter, { className: "mt-6 gap-2", children: [
|
|
2868
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", className: "border-
|
|
2870
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", className: "border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", children: t.keepMembership }) }),
|
|
2869
2871
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2870
2872
|
Button,
|
|
2871
2873
|
{
|
|
2872
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
2874
|
+
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",
|
|
2873
2875
|
onClick: handleConfirm,
|
|
2874
2876
|
disabled: !isReasonValid || isSubmitting,
|
|
2875
2877
|
children: isSubmitting ? t.cancelling : t.confirmCancellation
|
|
@@ -3204,9 +3206,12 @@ var PaymentMethodsSection = ({
|
|
|
3204
3206
|
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isModalOpen, onOpenChange: setIsModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3205
3207
|
DialogContent,
|
|
3206
3208
|
{
|
|
3207
|
-
className: "max-w-
|
|
3209
|
+
className: "z-[100] max-w-xl max-h-[90vh] overflow-y-auto border border-white/20 p-6 backdrop-blur-xl bg-background-regular rounded-md [&::-webkit-scrollbar]:hidden",
|
|
3208
3210
|
children: [
|
|
3209
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3211
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
3212
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: t.addNewCard }),
|
|
3213
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "text-muted-foreground", children: t.addNewCardDescription })
|
|
3214
|
+
] }),
|
|
3210
3215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3211
3216
|
CardDetailsForm,
|
|
3212
3217
|
{
|
|
@@ -3290,59 +3295,59 @@ var WalletDialog = ({ open, onOpenChange }) => {
|
|
|
3290
3295
|
onOpenChange(false);
|
|
3291
3296
|
setForm(initialState);
|
|
3292
3297
|
};
|
|
3293
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "max-h-[95vh] max-w-lg overflow-y-auto rounded-2xl border border-
|
|
3294
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b pb-4", children: [
|
|
3298
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "z-[100] max-h-[95vh] max-w-lg overflow-y-auto rounded-2xl border border-white/20 p-6 backdrop-blur-xl bg-background-regular", children: [
|
|
3299
|
+
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b border-white/10 pb-4", children: [
|
|
3295
3300
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3296
3301
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Shield, { className: "h-5 w-5 text-primary" }),
|
|
3297
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide", children: "Secure Payment via Mobius Pay" })
|
|
3302
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide text-foreground", children: "Secure Payment via Mobius Pay" })
|
|
3298
3303
|
] }),
|
|
3299
3304
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-center text-sm text-muted-foreground", children: "$23 USD per month, cancel at any time." })
|
|
3300
3305
|
] }),
|
|
3301
3306
|
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-5 px-2 py-4 sm:px-4", children: [
|
|
3302
3307
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
3303
3308
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3304
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-
|
|
3309
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Name on Card" }),
|
|
3305
3310
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3306
3311
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserRound, { className: "h-4 w-4" }) }),
|
|
3307
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.nameOnCard, onChange: (e) => updateField("nameOnCard", e.target.value), className: "pl-10" })
|
|
3312
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.nameOnCard, onChange: (e) => updateField("nameOnCard", e.target.value), className: "pl-10 border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground" })
|
|
3308
3313
|
] }),
|
|
3309
3314
|
errors.nameOnCard && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.nameOnCard })
|
|
3310
3315
|
] }),
|
|
3311
3316
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3312
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-
|
|
3317
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Credit Card Number" }),
|
|
3313
3318
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3314
3319
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "h-4 w-4" }) }),
|
|
3315
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.cardNumber, onChange: (e) => updateField("cardNumber", e.target.value), className: "pl-10" })
|
|
3320
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.cardNumber, onChange: (e) => updateField("cardNumber", e.target.value), className: "pl-10 border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground" })
|
|
3316
3321
|
] }),
|
|
3317
3322
|
errors.cardNumber && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cardNumber })
|
|
3318
3323
|
] }),
|
|
3319
3324
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
3320
3325
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
3321
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-
|
|
3326
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Expiration" }),
|
|
3322
3327
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3323
3328
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-4 w-4" }) }),
|
|
3324
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.expiration, onChange: (e) => updateField("expiration", e.target.value), className: "pl-10", placeholder: "MM/YY" })
|
|
3329
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.expiration, onChange: (e) => updateField("expiration", e.target.value), className: "pl-10 border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground", placeholder: "MM/YY" })
|
|
3325
3330
|
] }),
|
|
3326
3331
|
errors.expiration && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.expiration })
|
|
3327
3332
|
] }),
|
|
3328
3333
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
3329
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-
|
|
3334
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "CVV" }),
|
|
3330
3335
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3331
3336
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, { className: "h-4 w-4" }) }),
|
|
3332
|
-
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.cvv, onChange: (e) => updateField("cvv", e.target.value), className: "pl-10" })
|
|
3337
|
+
/* @__PURE__ */ jsxRuntime.jsx(Input, { value: form.cvv, onChange: (e) => updateField("cvv", e.target.value), className: "pl-10 border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground" })
|
|
3333
3338
|
] }),
|
|
3334
3339
|
errors.cvv && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cvv })
|
|
3335
3340
|
] })
|
|
3336
3341
|
] })
|
|
3337
3342
|
] }),
|
|
3338
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-
|
|
3343
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border border-white/20 bg-foreground/5 p-4", children: [
|
|
3339
3344
|
/* @__PURE__ */ jsxRuntime.jsx(Checkbox, { id: "terms-agree", checked: form.termsAccepted, onCheckedChange: (checked) => updateField("termsAccepted", Boolean(checked)) }),
|
|
3340
3345
|
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "terms-agree", className: "text-sm text-muted-foreground", children: "By completing this order, I confirm that I am 18 years or older and agree to your privacy policy and terms." })
|
|
3341
3346
|
] }),
|
|
3342
3347
|
errors.termsAccepted && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: errors.termsAccepted }),
|
|
3343
3348
|
/* @__PURE__ */ jsxRuntime.jsxs(AlertDialogFooter, { className: "flex gap-2", children: [
|
|
3344
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", className: "flex-1", children: "Subscribe" }),
|
|
3345
|
-
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", className: "flex-1", children: "Close" }) })
|
|
3349
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", className: "flex-1 border-0 bg-emerald-600 text-white hover:bg-emerald-500 disabled:opacity-50", children: "Subscribe" }),
|
|
3350
|
+
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", className: "flex-1 border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", children: "Close" }) })
|
|
3346
3351
|
] })
|
|
3347
3352
|
] })
|
|
3348
3353
|
] }) });
|