@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 CHANGED
@@ -2099,8 +2099,8 @@ var SubscriptionSuccessDialog = ({
2099
2099
  }) => {
2100
2100
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: (value) => {
2101
2101
  if (!value) onClose();
2102
- }, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "w-full max-w-md overflow-hidden border bg-background/95 p-0 shadow-2xl", children: [
2103
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-gradient-to-b from-primary/25 via-primary/10 to-background px-6 py-8 text-center", children: [
2102
+ }, 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: [
2103
+ /* @__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
2104
  /* @__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
2105
  /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
2106
2106
  /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-2xl font-semibold text-foreground", children: "Subscription activated" }),
@@ -2115,7 +2115,7 @@ var SubscriptionSuccessDialog = ({
2115
2115
  ] })
2116
2116
  ] })
2117
2117
  ] }),
2118
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-6 py-6", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { className: "w-full", onClick: onClose, children: "Continue exploring" }) })
2118
+ /* @__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
2119
  ] }) });
2120
2120
  };
2121
2121
  var useSubscriptionActions = () => {
@@ -2287,9 +2287,9 @@ var SubscriptionCheckoutModal = ({
2287
2287
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: handleClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
2288
2288
  DialogContent,
2289
2289
  {
2290
- className: "max-w-3xl max-h-[90vh] overflow-y-auto border-border rounded-md [&::-webkit-scrollbar]:hidden",
2290
+ 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",
2291
2291
  children: [
2292
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: "Checkout" }) }),
2292
+ /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: "Checkout" }) }),
2293
2293
  /* @__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
2294
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircle, { className: "h-4 w-4" }),
2295
2295
  " ",
@@ -2338,8 +2338,8 @@ var wallets = [
2338
2338
  ];
2339
2339
  var WalletModal = ({ open, onOpenChange }) => {
2340
2340
  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 bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: [
2342
- /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "border-b bg-gradient-to-r from-primary/10 via-background to-background px-6 py-5 text-left", children: [
2341
+ 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: [
2342
+ /* @__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
2343
  /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: [
2344
2344
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wallet, { className: "h-5 w-5 text-primary" }),
2345
2345
  " Connect a Solana wallet"
@@ -2350,7 +2350,7 @@ var WalletModal = ({ open, onOpenChange }) => {
2350
2350
  wallets.map((wallet) => /* @__PURE__ */ jsxRuntime.jsxs(
2351
2351
  "div",
2352
2352
  {
2353
- className: "rounded-2xl border bg-background/80 p-4 shadow-sm",
2353
+ className: "rounded-2xl border border-white/20 bg-foreground/5 p-4 shadow-sm",
2354
2354
  children: [
2355
2355
  /* @__PURE__ */ jsxRuntime.jsxs(
2356
2356
  "button",
@@ -2375,7 +2375,7 @@ var WalletModal = ({ open, onOpenChange }) => {
2375
2375
  wallet.name,
2376
2376
  " wallet, approve the connection request, and confirm the signature prompt to finish linking."
2377
2377
  ] }),
2378
- /* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "w-full", variant: "outline", disabled: true, children: [
2378
+ /* @__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
2379
  "Connect with ",
2380
2380
  wallet.name,
2381
2381
  " (coming soon)"
@@ -2385,7 +2385,7 @@ var WalletModal = ({ open, onOpenChange }) => {
2385
2385
  },
2386
2386
  wallet.id
2387
2387
  )),
2388
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl border bg-muted/10 p-4 text-xs text-muted-foreground", children: "Don\u2019t see your wallet? Additional providers will be added soon. Contact support if you need manual verification." })
2388
+ /* @__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
2389
  ] })
2390
2390
  ] }) });
2391
2391
  };
@@ -2821,9 +2821,9 @@ var CancelMembershipDialog = ({
2821
2821
  " ",
2822
2822
  t.buttonLabel
2823
2823
  ] }) }),
2824
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogContent, { className: "max-h-[90vh] overflow-y-auto rounded-md border border-border bg-background", children: [
2824
+ /* @__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
2825
  /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { children: [
2826
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold", children: [
2826
+ /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogTitle, { className: "flex items-center gap-2 text-lg font-semibold text-foreground", children: [
2827
2827
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "h-5 w-5 text-destructive" }),
2828
2828
  " ",
2829
2829
  t.title
@@ -2838,7 +2838,7 @@ var CancelMembershipDialog = ({
2838
2838
  ] })
2839
2839
  ] }),
2840
2840
  /* @__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 }),
2841
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "cancelReason", className: "text-sm font-medium text-foreground", children: t.reasonLabel }),
2842
2842
  /* @__PURE__ */ jsxRuntime.jsx(
2843
2843
  Textarea,
2844
2844
  {
@@ -2847,7 +2847,7 @@ var CancelMembershipDialog = ({
2847
2847
  onChange: handleReasonChange,
2848
2848
  placeholder: t.reasonPlaceholder,
2849
2849
  className: cn(
2850
- "w-full resize-none border-border bg-background",
2850
+ "w-full resize-none border-white/20 bg-foreground/5 text-foreground placeholder:text-muted-foreground",
2851
2851
  showError && "border-destructive"
2852
2852
  ),
2853
2853
  rows: 4,
@@ -2865,11 +2865,11 @@ var CancelMembershipDialog = ({
2865
2865
  )
2866
2866
  ] }),
2867
2867
  /* @__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-border text-muted-foreground", children: t.keepMembership }) }),
2868
+ /* @__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
2869
  /* @__PURE__ */ jsxRuntime.jsx(AlertDialogAction, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2870
2870
  Button,
2871
2871
  {
2872
- className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
2872
+ className: "bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",
2873
2873
  onClick: handleConfirm,
2874
2874
  disabled: !isReasonValid || isSubmitting,
2875
2875
  children: isSubmitting ? t.cancelling : t.confirmCancellation
@@ -3204,9 +3204,12 @@ var PaymentMethodsSection = ({
3204
3204
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isModalOpen, onOpenChange: setIsModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(
3205
3205
  DialogContent,
3206
3206
  {
3207
- className: "max-w-3xl max-h-[90vh] overflow-y-auto border-border rounded-md [&::-webkit-scrollbar]:hidden",
3207
+ 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",
3208
3208
  children: [
3209
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t.addNewCard }) }),
3209
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
3210
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "flex items-center gap-2 text-foreground", children: t.addNewCard }),
3211
+ /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: "text-muted-foreground", children: t.addNewCardDescription })
3212
+ ] }),
3210
3213
  /* @__PURE__ */ jsxRuntime.jsx(
3211
3214
  CardDetailsForm,
3212
3215
  {
@@ -3290,59 +3293,59 @@ var WalletDialog = ({ open, onOpenChange }) => {
3290
3293
  onOpenChange(false);
3291
3294
  setForm(initialState);
3292
3295
  };
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-border bg-background", children: [
3294
- /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b pb-4", children: [
3296
+ 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: [
3297
+ /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogHeader, { className: "border-b border-white/10 pb-4", children: [
3295
3298
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
3296
3299
  /* @__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" })
3300
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDialogTitle, { className: "text-center text-base font-semibold uppercase tracking-wide text-foreground", children: "Secure Payment via Mobius Pay" })
3298
3301
  ] }),
3299
3302
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-center text-sm text-muted-foreground", children: "$23 USD per month, cancel at any time." })
3300
3303
  ] }),
3301
3304
  /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "space-y-5 px-2 py-4 sm:px-4", children: [
3302
3305
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3303
3306
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3304
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-muted-foreground", children: "Name on Card" }),
3307
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Name on Card" }),
3305
3308
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3306
3309
  /* @__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" })
3310
+ /* @__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
3311
  ] }),
3309
3312
  errors.nameOnCard && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.nameOnCard })
3310
3313
  ] }),
3311
3314
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3312
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-muted-foreground", children: "Credit Card Number" }),
3315
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Credit Card Number" }),
3313
3316
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3314
3317
  /* @__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" })
3318
+ /* @__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
3319
  ] }),
3317
3320
  errors.cardNumber && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cardNumber })
3318
3321
  ] }),
3319
3322
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
3320
3323
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
3321
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-muted-foreground", children: "Expiration" }),
3324
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "Expiration" }),
3322
3325
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3323
3326
  /* @__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" })
3327
+ /* @__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
3328
  ] }),
3326
3329
  errors.expiration && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.expiration })
3327
3330
  ] }),
3328
3331
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
3329
- /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-muted-foreground", children: "CVV" }),
3332
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { className: "mb-1 block text-sm text-foreground", children: "CVV" }),
3330
3333
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3331
3334
  /* @__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" })
3335
+ /* @__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
3336
  ] }),
3334
3337
  errors.cvv && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: errors.cvv })
3335
3338
  ] })
3336
3339
  ] })
3337
3340
  ] }),
3338
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border bg-muted/10 p-4", children: [
3341
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3 rounded-md border border-white/20 bg-foreground/5 p-4", children: [
3339
3342
  /* @__PURE__ */ jsxRuntime.jsx(Checkbox, { id: "terms-agree", checked: form.termsAccepted, onCheckedChange: (checked) => updateField("termsAccepted", Boolean(checked)) }),
3340
3343
  /* @__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
3344
  ] }),
3342
3345
  errors.termsAccepted && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-destructive", children: errors.termsAccepted }),
3343
3346
  /* @__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" }) })
3347
+ /* @__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" }),
3348
+ /* @__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
3349
  ] })
3347
3350
  ] })
3348
3351
  ] }) });