@doujins/payments-ui 0.1.10 → 0.1.11
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 +35 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +35 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2066,8 +2066,8 @@ var SubscriptionSuccessDialog = ({
|
|
|
2066
2066
|
}) => {
|
|
2067
2067
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (value) => {
|
|
2068
2068
|
if (!value) onClose();
|
|
2069
|
-
}, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border
|
|
2070
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-
|
|
2069
|
+
}, children: /* @__PURE__ */ 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: [
|
|
2070
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-transparent px-6 py-8 text-center", children: [
|
|
2071
2071
|
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-background/60", children: /* @__PURE__ */ jsx(CheckCircle, { className: "h-10 w-10 text-primary" }) }),
|
|
2072
2072
|
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
2073
2073
|
/* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl font-semibold text-foreground", children: "Subscription activated" }),
|
|
@@ -2082,7 +2082,7 @@ var SubscriptionSuccessDialog = ({
|
|
|
2082
2082
|
] })
|
|
2083
2083
|
] })
|
|
2084
2084
|
] }),
|
|
2085
|
-
/* @__PURE__ */ jsx("div", { className: "px-6 py-6", children: /* @__PURE__ */ jsx(Button, { className: "w-full", onClick: onClose, children: "Continue exploring" }) })
|
|
2085
|
+
/* @__PURE__ */ jsx("div", { className: "px-6 py-6", children: /* @__PURE__ */ jsx(Button, { className: "w-full border-0 bg-emerald-600 text-white hover:bg-emerald-500", onClick: onClose, children: "Continue exploring" }) })
|
|
2086
2086
|
] }) });
|
|
2087
2087
|
};
|
|
2088
2088
|
var useSubscriptionActions = () => {
|
|
@@ -2254,9 +2254,9 @@ var SubscriptionCheckoutModal = ({
|
|
|
2254
2254
|
/* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxs(
|
|
2255
2255
|
DialogContent,
|
|
2256
2256
|
{
|
|
2257
|
-
className: "max-w-3xl max-h-[90vh] overflow-y-auto border-
|
|
2257
|
+
className: "z-[100] max-w-3xl max-h-[90vh] overflow-y-auto border border-white/20 p-6 backdrop-blur-xl bg-background-regular rounded-md [&::-webkit-scrollbar]:hidden",
|
|
2258
2258
|
children: [
|
|
2259
|
-
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { children: "Checkout" }) }),
|
|
2259
|
+
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: "Checkout" }) }),
|
|
2260
2260
|
/* @__PURE__ */ jsx("div", { className: "space-y-4", children: !priceId ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-center px-3 py-2 text-sm text-destructive", children: [
|
|
2261
2261
|
/* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
|
|
2262
2262
|
" ",
|
|
@@ -2305,8 +2305,8 @@ var wallets = [
|
|
|
2305
2305
|
];
|
|
2306
2306
|
var WalletModal = ({ open, onOpenChange }) => {
|
|
2307
2307
|
const [expandedWallet, setExpandedWallet] = useState(null);
|
|
2308
|
-
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-lg max-h-[90vh] overflow-y-auto rounded-md border
|
|
2309
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className: "border-b bg-gradient-to-r from-primary/10 via-
|
|
2308
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ 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: [
|
|
2309
|
+
/* @__PURE__ */ 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: [
|
|
2310
2310
|
/* @__PURE__ */ jsxs(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: [
|
|
2311
2311
|
/* @__PURE__ */ jsx(Wallet, { className: "h-5 w-5 text-primary" }),
|
|
2312
2312
|
" Connect a Solana wallet"
|
|
@@ -2317,7 +2317,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2317
2317
|
wallets.map((wallet) => /* @__PURE__ */ jsxs(
|
|
2318
2318
|
"div",
|
|
2319
2319
|
{
|
|
2320
|
-
className: "rounded-2xl border bg-
|
|
2320
|
+
className: "rounded-2xl border border-white/20 bg-foreground/5 p-4 shadow-sm",
|
|
2321
2321
|
children: [
|
|
2322
2322
|
/* @__PURE__ */ jsxs(
|
|
2323
2323
|
"button",
|
|
@@ -2342,7 +2342,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2342
2342
|
wallet.name,
|
|
2343
2343
|
" wallet, approve the connection request, and confirm the signature prompt to finish linking."
|
|
2344
2344
|
] }),
|
|
2345
|
-
/* @__PURE__ */ jsxs(Button, { className: "w-full", variant: "outline", disabled: true, children: [
|
|
2345
|
+
/* @__PURE__ */ jsxs(Button, { className: "w-full border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", variant: "outline", disabled: true, children: [
|
|
2346
2346
|
"Connect with ",
|
|
2347
2347
|
wallet.name,
|
|
2348
2348
|
" (coming soon)"
|
|
@@ -2352,7 +2352,7 @@ var WalletModal = ({ open, onOpenChange }) => {
|
|
|
2352
2352
|
},
|
|
2353
2353
|
wallet.id
|
|
2354
2354
|
)),
|
|
2355
|
-
/* @__PURE__ */ jsx("div", { className: "rounded-2xl border bg-
|
|
2355
|
+
/* @__PURE__ */ 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." })
|
|
2356
2356
|
] })
|
|
2357
2357
|
] }) });
|
|
2358
2358
|
};
|
|
@@ -2788,9 +2788,9 @@ var CancelMembershipDialog = ({
|
|
|
2788
2788
|
" ",
|
|
2789
2789
|
t.buttonLabel
|
|
2790
2790
|
] }) }),
|
|
2791
|
-
/* @__PURE__ */ jsxs(AlertDialogContent, { className: "max-h-[90vh] overflow-y-auto rounded-md border border-
|
|
2791
|
+
/* @__PURE__ */ 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: [
|
|
2792
2792
|
/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [
|
|
2793
|
-
/* @__PURE__ */ jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold", children: [
|
|
2793
|
+
/* @__PURE__ */ jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold text-foreground", children: [
|
|
2794
2794
|
/* @__PURE__ */ jsx(TriangleAlert, { className: "h-5 w-5 text-destructive" }),
|
|
2795
2795
|
" ",
|
|
2796
2796
|
t.title
|
|
@@ -2805,7 +2805,7 @@ var CancelMembershipDialog = ({
|
|
|
2805
2805
|
] })
|
|
2806
2806
|
] }),
|
|
2807
2807
|
/* @__PURE__ */ jsxs("div", { className: "my-4 space-y-2 py-2", children: [
|
|
2808
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "cancelReason", className: "text-sm font-medium", children: t.reasonLabel }),
|
|
2808
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "cancelReason", className: "text-sm font-medium text-foreground", children: t.reasonLabel }),
|
|
2809
2809
|
/* @__PURE__ */ jsx(
|
|
2810
2810
|
Textarea,
|
|
2811
2811
|
{
|
|
@@ -2814,7 +2814,7 @@ var CancelMembershipDialog = ({
|
|
|
2814
2814
|
onChange: handleReasonChange,
|
|
2815
2815
|
placeholder: t.reasonPlaceholder,
|
|
2816
2816
|
className: cn(
|
|
2817
|
-
"w-full resize-none border-
|
|
2817
|
+
"w-full resize-none border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground",
|
|
2818
2818
|
showError && "border-destructive"
|
|
2819
2819
|
),
|
|
2820
2820
|
rows: 4,
|
|
@@ -2832,11 +2832,11 @@ var CancelMembershipDialog = ({
|
|
|
2832
2832
|
)
|
|
2833
2833
|
] }),
|
|
2834
2834
|
/* @__PURE__ */ jsxs(AlertDialogFooter, { className: "mt-6 gap-2", children: [
|
|
2835
|
-
/* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "border-
|
|
2835
|
+
/* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", children: t.keepMembership }) }),
|
|
2836
2836
|
/* @__PURE__ */ jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
2837
2837
|
Button,
|
|
2838
2838
|
{
|
|
2839
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
2839
|
+
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",
|
|
2840
2840
|
onClick: handleConfirm,
|
|
2841
2841
|
disabled: !isReasonValid || isSubmitting,
|
|
2842
2842
|
children: isSubmitting ? t.cancelling : t.confirmCancellation
|
|
@@ -3171,9 +3171,12 @@ var PaymentMethodsSection = ({
|
|
|
3171
3171
|
/* @__PURE__ */ jsx(Dialog, { open: isModalOpen, onOpenChange: setIsModalOpen, children: /* @__PURE__ */ jsxs(
|
|
3172
3172
|
DialogContent,
|
|
3173
3173
|
{
|
|
3174
|
-
className: "max-w-3xl max-h-[90vh] overflow-y-auto border-
|
|
3174
|
+
className: "z-[100] max-w-3xl max-h-[90vh] overflow-y-auto border border-white/20 p-6 backdrop-blur-xl bg-background-regular rounded-md [&::-webkit-scrollbar]:hidden",
|
|
3175
3175
|
children: [
|
|
3176
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
3177
|
+
/* @__PURE__ */ jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: t.addNewCard }),
|
|
3178
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: "text-muted-foreground", children: t.addNewCardDescription })
|
|
3179
|
+
] }),
|
|
3177
3180
|
/* @__PURE__ */ jsx(
|
|
3178
3181
|
CardDetailsForm,
|
|
3179
3182
|
{
|
|
@@ -3257,59 +3260,59 @@ var WalletDialog = ({ open, onOpenChange }) => {
|
|
|
3257
3260
|
onOpenChange(false);
|
|
3258
3261
|
setForm(initialState);
|
|
3259
3262
|
};
|
|
3260
|
-
return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(AlertDialogContent, { className: "max-h-[95vh] max-w-lg overflow-y-auto rounded-2xl border border-
|
|
3261
|
-
/* @__PURE__ */ jsxs(AlertDialogHeader, { className: "border-b pb-4", children: [
|
|
3263
|
+
return /* @__PURE__ */ jsx(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ 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: [
|
|
3264
|
+
/* @__PURE__ */ jsxs(AlertDialogHeader, { className: "border-b border-white/10 pb-4", children: [
|
|
3262
3265
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3263
3266
|
/* @__PURE__ */ jsx(Shield, { className: "h-5 w-5 text-primary" }),
|
|
3264
|
-
/* @__PURE__ */ jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide", children: "Secure Payment via Mobius Pay" })
|
|
3267
|
+
/* @__PURE__ */ jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide text-foreground", children: "Secure Payment via Mobius Pay" })
|
|
3265
3268
|
] }),
|
|
3266
3269
|
/* @__PURE__ */ jsx("p", { className: "mt-2 text-center text-sm text-muted-foreground", children: "$23 USD per month, cancel at any time." })
|
|
3267
3270
|
] }),
|
|
3268
3271
|
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-5 px-2 py-4 sm:px-4", children: [
|
|
3269
3272
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3270
3273
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3271
|
-
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-
|
|
3274
|
+
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Name on Card" }),
|
|
3272
3275
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3273
3276
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsx(UserRound, { className: "h-4 w-4" }) }),
|
|
3274
|
-
/* @__PURE__ */ jsx(Input, { value: form.nameOnCard, onChange: (e) => updateField("nameOnCard", e.target.value), className: "pl-10" })
|
|
3277
|
+
/* @__PURE__ */ 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" })
|
|
3275
3278
|
] }),
|
|
3276
3279
|
errors.nameOnCard && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.nameOnCard })
|
|
3277
3280
|
] }),
|
|
3278
3281
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3279
|
-
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-
|
|
3282
|
+
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Credit Card Number" }),
|
|
3280
3283
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3281
3284
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsx(CreditCard, { className: "h-4 w-4" }) }),
|
|
3282
|
-
/* @__PURE__ */ jsx(Input, { value: form.cardNumber, onChange: (e) => updateField("cardNumber", e.target.value), className: "pl-10" })
|
|
3285
|
+
/* @__PURE__ */ 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" })
|
|
3283
3286
|
] }),
|
|
3284
3287
|
errors.cardNumber && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cardNumber })
|
|
3285
3288
|
] }),
|
|
3286
3289
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
3287
3290
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
3288
|
-
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-
|
|
3291
|
+
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Expiration" }),
|
|
3289
3292
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3290
3293
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4" }) }),
|
|
3291
|
-
/* @__PURE__ */ jsx(Input, { value: form.expiration, onChange: (e) => updateField("expiration", e.target.value), className: "pl-10", placeholder: "MM/YY" })
|
|
3294
|
+
/* @__PURE__ */ 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" })
|
|
3292
3295
|
] }),
|
|
3293
3296
|
errors.expiration && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.expiration })
|
|
3294
3297
|
] }),
|
|
3295
3298
|
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
3296
|
-
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-
|
|
3299
|
+
/* @__PURE__ */ jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "CVV" }),
|
|
3297
3300
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3298
3301
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsx(KeyRound, { className: "h-4 w-4" }) }),
|
|
3299
|
-
/* @__PURE__ */ jsx(Input, { value: form.cvv, onChange: (e) => updateField("cvv", e.target.value), className: "pl-10" })
|
|
3302
|
+
/* @__PURE__ */ 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" })
|
|
3300
3303
|
] }),
|
|
3301
3304
|
errors.cvv && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cvv })
|
|
3302
3305
|
] })
|
|
3303
3306
|
] })
|
|
3304
3307
|
] }),
|
|
3305
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-
|
|
3308
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-md border border-white/20 bg-foreground/5 p-4", children: [
|
|
3306
3309
|
/* @__PURE__ */ jsx(Checkbox, { id: "terms-agree", checked: form.termsAccepted, onCheckedChange: (checked) => updateField("termsAccepted", Boolean(checked)) }),
|
|
3307
3310
|
/* @__PURE__ */ 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." })
|
|
3308
3311
|
] }),
|
|
3309
3312
|
errors.termsAccepted && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: errors.termsAccepted }),
|
|
3310
3313
|
/* @__PURE__ */ jsxs(AlertDialogFooter, { className: "flex gap-2", children: [
|
|
3311
|
-
/* @__PURE__ */ jsx(Button, { type: "submit", className: "flex-1", children: "Subscribe" }),
|
|
3312
|
-
/* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "flex-1", children: "Close" }) })
|
|
3314
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", className: "flex-1 border-0 bg-emerald-600 text-white hover:bg-emerald-500 disabled:opacity-50", children: "Subscribe" }),
|
|
3315
|
+
/* @__PURE__ */ jsx(AlertDialogCancel, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "flex-1 border-white/20 bg-transparent text-foreground hover:bg-foreground/10 hover:text-foreground", children: "Close" }) })
|
|
3313
3316
|
] })
|
|
3314
3317
|
] })
|
|
3315
3318
|
] }) });
|