@voyantjs/checkout-ui 0.54.0 → 0.55.1

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.
@@ -35,6 +35,18 @@ export interface PaymentLinkLandingPageProps {
35
35
  * itself doesn't carry a description today).
36
36
  */
37
37
  description?: string;
38
+ /**
39
+ * Optional structured summary slot rendered above the payment methods.
40
+ * Templates use this to surface vertical-specific context (itinerary
41
+ * cards with thumbnails for trips, line items for invoices, etc.).
42
+ */
43
+ summary?: ReactNode;
44
+ /**
45
+ * Hide the raw `session.notes` paragraph in the header. Templates set this
46
+ * when the `summary` slot already conveys the same content in a
47
+ * structured form (so customers don't see the same data twice).
48
+ */
49
+ suppressNotes?: boolean;
38
50
  /**
39
51
  * Fired when the customer clicks "Try again" on a failed payment.
40
52
  * Should create a fresh `payment_session` (the original one is dead)
@@ -60,5 +72,5 @@ export interface BankTransferInstructions {
60
72
  /** Free-text notes — surfaced under the IBAN block. */
61
73
  notes?: string;
62
74
  }
63
- export declare function PaymentLinkLandingPage({ session, bankTransferInstructions, brandHeader, brandFooter, onPayByCard, onRetry, description, }: PaymentLinkLandingPageProps): import("react/jsx-runtime").JSX.Element;
75
+ export declare function PaymentLinkLandingPage({ session, bankTransferInstructions, brandHeader, brandFooter, onPayByCard, onRetry, description, summary, suppressNotes, }: PaymentLinkLandingPageProps): import("react/jsx-runtime").JSX.Element;
64
76
  //# sourceMappingURL=payment-link-landing-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment-link-landing-page.d.ts","sourceRoot":"","sources":["../../src/components/payment-link-landing-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAc/E,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAUhD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,oBAAoB,CAAA;IAC7B,2EAA2E;IAC3E,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,gEAAgE;IAChE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,yDAAyD;IACzD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACrC;AAED,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,WAAW,EACX,OAAO,EACP,WAAW,GACZ,EAAE,2BAA2B,2CAc7B"}
1
+ {"version":3,"file":"payment-link-landing-page.d.ts","sourceRoot":"","sources":["../../src/components/payment-link-landing-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAc/E,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAA;AAUhD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,oBAAoB,CAAA;IAC7B,2EAA2E;IAC3E,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;IACnD,gEAAgE;IAChE,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,yDAAyD;IACzD,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CACrC;AAED,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,WAAW,EACX,OAAO,EACP,WAAW,EACX,OAAO,EACP,aAAa,GACd,EAAE,2BAA2B,2CAe7B"}
@@ -7,14 +7,14 @@ import { cn } from "@voyantjs/ui/lib/utils";
7
7
  import { Building2, CheckCircle2, CircleAlert, Copy, CreditCard, ExternalLink, Loader2, } from "lucide-react";
8
8
  import { useState } from "react";
9
9
  import { useCheckoutUiI18nOrDefault, useCheckoutUiMessagesOrDefault } from "../i18n/provider.js";
10
- export function PaymentLinkLandingPage({ session, bankTransferInstructions, brandHeader, brandFooter, onPayByCard, onRetry, description, }) {
11
- return (_jsxs("div", { className: "mx-auto flex min-h-screen w-full max-w-2xl flex-col gap-6 px-4 py-8", children: [brandHeader, _jsx(Header, { session: session, description: description }), _jsx(Body, { session: session, bankTransferInstructions: bankTransferInstructions, onPayByCard: onPayByCard, onRetry: onRetry }), brandFooter] }));
10
+ export function PaymentLinkLandingPage({ session, bankTransferInstructions, brandHeader, brandFooter, onPayByCard, onRetry, description, summary, suppressNotes, }) {
11
+ return (_jsxs("div", { className: "mx-auto flex min-h-screen w-full max-w-2xl flex-col gap-6 px-4 py-8", children: [brandHeader, _jsx(Header, { session: session, description: description, suppressNotes: suppressNotes }), summary ? _jsx("div", { children: summary }) : null, _jsx(Body, { session: session, bankTransferInstructions: bankTransferInstructions, onPayByCard: onPayByCard, onRetry: onRetry }), brandFooter] }));
12
12
  }
13
13
  // ─────────────────────────────────────────────────────────────────────────────
14
- function Header({ session, description }) {
14
+ function Header({ session, description, suppressNotes, }) {
15
15
  const i18n = useCheckoutUiI18nOrDefault();
16
16
  const messages = i18n.messages.paymentLinkLandingPage;
17
- return (_jsxs("header", { className: "flex flex-col gap-2 border-b pb-4", children: [_jsx("h1", { className: "font-semibold text-2xl", children: description ?? defaultDescription(session, messages) }), session.notes && _jsx("p", { className: "text-muted-foreground text-sm", children: session.notes }), _jsxs("div", { className: "flex items-baseline gap-3", children: [_jsx("span", { className: "font-semibold text-3xl tabular-nums", children: i18n.formatCurrency(session.amountCents / 100, session.currency) }), session.expiresAt && session.status !== "paid" && (_jsx("span", { className: "text-muted-foreground text-sm", children: formatMessage(messages.expires, {
17
+ return (_jsxs("header", { className: "flex flex-col gap-2 border-b pb-4", children: [_jsx("h1", { className: "font-semibold text-2xl", children: description ?? defaultDescription(session, messages) }), !suppressNotes && session.notes ? (_jsx("p", { className: "whitespace-pre-line text-muted-foreground text-sm", children: session.notes })) : null, _jsxs("div", { className: "flex items-baseline gap-3", children: [_jsx("span", { className: "font-semibold text-3xl tabular-nums", children: i18n.formatCurrency(session.amountCents / 100, session.currency) }), session.expiresAt && session.status !== "paid" && (_jsx("span", { className: "text-muted-foreground text-sm", children: formatMessage(messages.expires, {
18
18
  date: i18n.formatDateTime(session.expiresAt, {
19
19
  day: "numeric",
20
20
  month: "short",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/checkout-ui",
3
- "version": "0.54.0",
3
+ "version": "0.55.1",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,12 +44,12 @@
44
44
  "react": "^19.0.0",
45
45
  "react-dom": "^19.0.0",
46
46
  "sonner": "^2.0.0",
47
- "@voyantjs/checkout": "0.54.0",
48
- "@voyantjs/checkout-react": "0.54.0",
49
- "@voyantjs/finance": "0.54.0",
50
- "@voyantjs/finance-react": "0.54.0",
51
- "@voyantjs/i18n": "0.54.0",
52
- "@voyantjs/ui": "0.54.0"
47
+ "@voyantjs/checkout": "0.55.1",
48
+ "@voyantjs/checkout-react": "0.55.1",
49
+ "@voyantjs/finance": "0.55.1",
50
+ "@voyantjs/finance-react": "0.55.1",
51
+ "@voyantjs/i18n": "0.55.1",
52
+ "@voyantjs/ui": "0.55.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@tanstack/react-query": "^5.96.2",
@@ -61,12 +61,12 @@
61
61
  "sonner": "^2.0.7",
62
62
  "typescript": "^6.0.2",
63
63
  "vitest": "^4.1.2",
64
- "@voyantjs/checkout": "0.54.0",
65
- "@voyantjs/checkout-react": "0.54.0",
66
- "@voyantjs/finance": "0.54.0",
67
- "@voyantjs/finance-react": "0.54.0",
68
- "@voyantjs/i18n": "0.54.0",
69
- "@voyantjs/ui": "0.54.0",
64
+ "@voyantjs/checkout": "0.55.1",
65
+ "@voyantjs/checkout-react": "0.55.1",
66
+ "@voyantjs/finance": "0.55.1",
67
+ "@voyantjs/finance-react": "0.55.1",
68
+ "@voyantjs/i18n": "0.55.1",
69
+ "@voyantjs/ui": "0.55.1",
70
70
  "@voyantjs/voyant-typescript-config": "0.1.0"
71
71
  },
72
72
  "files": [