@planetaexo/design-system 0.96.0 → 0.97.0
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 +54 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.js +54 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -488,6 +488,18 @@ interface OfferProps {
|
|
|
488
488
|
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
489
489
|
*/
|
|
490
490
|
internalDemoCheckout?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Quando true, oculta a seção "Included Adventures" (header + cards de aventura).
|
|
493
|
+
* O host renderiza os detalhes por conta própria (ex.: um acordeão "Trip details"
|
|
494
|
+
* dentro do `checkoutSlot`).
|
|
495
|
+
*/
|
|
496
|
+
hideAdventures?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Quando true, oculta a sidebar de compra (card "Booking Total" + CTA) E o rodapé
|
|
499
|
+
* flutuante mobile, colapsando o layout para coluna única. Use quando o pagamento/CTA
|
|
500
|
+
* não acontece nesta página (ex.: criação de grupo, em que o sinal é pago depois).
|
|
501
|
+
*/
|
|
502
|
+
hideSidebar?: boolean;
|
|
491
503
|
className?: string;
|
|
492
504
|
}
|
|
493
505
|
interface BookingShellProps {
|
|
@@ -592,7 +604,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
592
604
|
declare function OfferAdventureCard({ adventure }: {
|
|
593
605
|
adventure: OfferAdventureItem;
|
|
594
606
|
}): react_jsx_runtime.JSX.Element;
|
|
595
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
607
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, hideAdventures, hideSidebar, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
596
608
|
|
|
597
609
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
598
610
|
interface BookingTraveller {
|
|
@@ -1894,6 +1906,16 @@ interface PartnerBookingCreatedEmailProps {
|
|
|
1894
1906
|
name: string;
|
|
1895
1907
|
country?: string | null;
|
|
1896
1908
|
};
|
|
1909
|
+
/**
|
|
1910
|
+
* Notas marcadas como visíveis ao parceiro (visibleToPartner=true), já filtradas
|
|
1911
|
+
* e formatadas pelo backend: `body` é texto puro; `meta` é "Autor · Data" já
|
|
1912
|
+
* montada (pode ser ""). Quando presente e não-vazia, renderiza a seção "Notes
|
|
1913
|
+
* from the team"; ausente/vazia = nada renderizado. Spec offer-notes.
|
|
1914
|
+
*/
|
|
1915
|
+
partnerNotes?: {
|
|
1916
|
+
body: string;
|
|
1917
|
+
meta: string;
|
|
1918
|
+
}[];
|
|
1897
1919
|
agent: {
|
|
1898
1920
|
name: string;
|
|
1899
1921
|
whatsappUrl?: string;
|
|
@@ -1934,13 +1956,15 @@ interface PartnerBookingCreatedEmailLabels {
|
|
|
1934
1956
|
registrationPendingNotice?: string;
|
|
1935
1957
|
/** Aviso (linha 2, enfatizado) antes do closing — sempre visível. */
|
|
1936
1958
|
mustReplyToConfirm?: string;
|
|
1959
|
+
/** Heading da seção de notas visíveis ao parceiro (Spec offer-notes). */
|
|
1960
|
+
partnerNotesHeading?: string;
|
|
1937
1961
|
/** Closing principal quando há agente. Recebe nome + URLs e retorna JSX. */
|
|
1938
1962
|
closingAgent?: (agentName: string, contact: PartnerBookingCreatedAgentContactLinks) => React.ReactNode;
|
|
1939
1963
|
/** Closing alternativo sem agente. */
|
|
1940
1964
|
closingNoAgent?: string;
|
|
1941
1965
|
teamSignature?: string;
|
|
1942
1966
|
}
|
|
1943
|
-
declare function PartnerBookingCreatedEmail({ topNotice, partnerName, bookingNumber, adventureName, dateRange, travellersCount, optionals, rooms, booker, agent, logoUrl, labels, className, }: PartnerBookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1967
|
+
declare function PartnerBookingCreatedEmail({ topNotice, partnerName, bookingNumber, adventureName, dateRange, travellersCount, optionals, rooms, booker, partnerNotes, agent, logoUrl, labels, className, }: PartnerBookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1944
1968
|
|
|
1945
1969
|
interface PaymentReceiptEmailLabels {
|
|
1946
1970
|
logoAlt?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -488,6 +488,18 @@ interface OfferProps {
|
|
|
488
488
|
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
489
489
|
*/
|
|
490
490
|
internalDemoCheckout?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Quando true, oculta a seção "Included Adventures" (header + cards de aventura).
|
|
493
|
+
* O host renderiza os detalhes por conta própria (ex.: um acordeão "Trip details"
|
|
494
|
+
* dentro do `checkoutSlot`).
|
|
495
|
+
*/
|
|
496
|
+
hideAdventures?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Quando true, oculta a sidebar de compra (card "Booking Total" + CTA) E o rodapé
|
|
499
|
+
* flutuante mobile, colapsando o layout para coluna única. Use quando o pagamento/CTA
|
|
500
|
+
* não acontece nesta página (ex.: criação de grupo, em que o sinal é pago depois).
|
|
501
|
+
*/
|
|
502
|
+
hideSidebar?: boolean;
|
|
491
503
|
className?: string;
|
|
492
504
|
}
|
|
493
505
|
interface BookingShellProps {
|
|
@@ -592,7 +604,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
592
604
|
declare function OfferAdventureCard({ adventure }: {
|
|
593
605
|
adventure: OfferAdventureItem;
|
|
594
606
|
}): react_jsx_runtime.JSX.Element;
|
|
595
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
607
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, hideAdventures, hideSidebar, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
596
608
|
|
|
597
609
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
598
610
|
interface BookingTraveller {
|
|
@@ -1894,6 +1906,16 @@ interface PartnerBookingCreatedEmailProps {
|
|
|
1894
1906
|
name: string;
|
|
1895
1907
|
country?: string | null;
|
|
1896
1908
|
};
|
|
1909
|
+
/**
|
|
1910
|
+
* Notas marcadas como visíveis ao parceiro (visibleToPartner=true), já filtradas
|
|
1911
|
+
* e formatadas pelo backend: `body` é texto puro; `meta` é "Autor · Data" já
|
|
1912
|
+
* montada (pode ser ""). Quando presente e não-vazia, renderiza a seção "Notes
|
|
1913
|
+
* from the team"; ausente/vazia = nada renderizado. Spec offer-notes.
|
|
1914
|
+
*/
|
|
1915
|
+
partnerNotes?: {
|
|
1916
|
+
body: string;
|
|
1917
|
+
meta: string;
|
|
1918
|
+
}[];
|
|
1897
1919
|
agent: {
|
|
1898
1920
|
name: string;
|
|
1899
1921
|
whatsappUrl?: string;
|
|
@@ -1934,13 +1956,15 @@ interface PartnerBookingCreatedEmailLabels {
|
|
|
1934
1956
|
registrationPendingNotice?: string;
|
|
1935
1957
|
/** Aviso (linha 2, enfatizado) antes do closing — sempre visível. */
|
|
1936
1958
|
mustReplyToConfirm?: string;
|
|
1959
|
+
/** Heading da seção de notas visíveis ao parceiro (Spec offer-notes). */
|
|
1960
|
+
partnerNotesHeading?: string;
|
|
1937
1961
|
/** Closing principal quando há agente. Recebe nome + URLs e retorna JSX. */
|
|
1938
1962
|
closingAgent?: (agentName: string, contact: PartnerBookingCreatedAgentContactLinks) => React.ReactNode;
|
|
1939
1963
|
/** Closing alternativo sem agente. */
|
|
1940
1964
|
closingNoAgent?: string;
|
|
1941
1965
|
teamSignature?: string;
|
|
1942
1966
|
}
|
|
1943
|
-
declare function PartnerBookingCreatedEmail({ topNotice, partnerName, bookingNumber, adventureName, dateRange, travellersCount, optionals, rooms, booker, agent, logoUrl, labels, className, }: PartnerBookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1967
|
+
declare function PartnerBookingCreatedEmail({ topNotice, partnerName, bookingNumber, adventureName, dateRange, travellersCount, optionals, rooms, booker, partnerNotes, agent, logoUrl, labels, className, }: PartnerBookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1944
1968
|
|
|
1945
1969
|
interface PaymentReceiptEmailLabels {
|
|
1946
1970
|
logoAlt?: string;
|
package/dist/index.js
CHANGED
|
@@ -2384,6 +2384,8 @@ function Offer({
|
|
|
2384
2384
|
confirmedState,
|
|
2385
2385
|
interactionsDisabled,
|
|
2386
2386
|
internalDemoCheckout = false,
|
|
2387
|
+
hideAdventures = false,
|
|
2388
|
+
hideSidebar = false,
|
|
2387
2389
|
className
|
|
2388
2390
|
}) {
|
|
2389
2391
|
var _a, _b, _c;
|
|
@@ -2399,7 +2401,7 @@ function Offer({
|
|
|
2399
2401
|
/* @__PURE__ */ jsx("img", { src: logo, alt: logoAlt, className: "w-[150px] h-auto object-contain mx-auto block" }),
|
|
2400
2402
|
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
2401
2403
|
subtitle && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
|
|
2402
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1
|
|
2404
|
+
/* @__PURE__ */ jsxs("div", { className: cn("grid grid-cols-1 gap-6 lg:gap-8 items-start", !hideSidebar && "lg:grid-cols-[1fr_280px]"), children: [
|
|
2403
2405
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2404
2406
|
/* @__PURE__ */ jsx(
|
|
2405
2407
|
BookingConfirmedCard,
|
|
@@ -2415,7 +2417,7 @@ function Offer({
|
|
|
2415
2417
|
),
|
|
2416
2418
|
confirmedState.belowSlot
|
|
2417
2419
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2418
|
-
/* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2420
|
+
!hideAdventures && /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2419
2421
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2420
2422
|
/* @__PURE__ */ jsx(MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2421
2423
|
/* @__PURE__ */ jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (_b = labels == null ? void 0 : labels.includedAdventures) != null ? _b : "Included Adventures" })
|
|
@@ -2448,7 +2450,7 @@ function Offer({
|
|
|
2448
2450
|
}
|
|
2449
2451
|
) : null)
|
|
2450
2452
|
] }) }),
|
|
2451
|
-
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2453
|
+
!hideSidebar && /* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2452
2454
|
OfferSidebar,
|
|
2453
2455
|
{
|
|
2454
2456
|
total,
|
|
@@ -2461,7 +2463,7 @@ function Offer({
|
|
|
2461
2463
|
}
|
|
2462
2464
|
) })
|
|
2463
2465
|
] }),
|
|
2464
|
-
!isShowingCheckout && !confirmedState && /* @__PURE__ */ jsx("div", { className: "fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm px-4 py-3 lg:hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2466
|
+
!isShowingCheckout && !confirmedState && !hideSidebar && /* @__PURE__ */ jsx("div", { className: "fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm px-4 py-3 lg:hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2465
2467
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
2466
2468
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (_c = labels == null ? void 0 : labels.total) != null ? _c : "Total" }),
|
|
2467
2469
|
/* @__PURE__ */ jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|
|
@@ -7401,6 +7403,7 @@ var DEFAULT_LABELS11 = {
|
|
|
7401
7403
|
},
|
|
7402
7404
|
registrationPendingNotice: "The travellers' registration details will be sent to you as soon as all travellers have completed their forms.",
|
|
7403
7405
|
mustReplyToConfirm: "Please reply to this email to confirm the booking.",
|
|
7406
|
+
partnerNotesHeading: "Notes from the team",
|
|
7404
7407
|
closingAgent: (agentName, contact) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7405
7408
|
"If you have any questions, your contact ",
|
|
7406
7409
|
agentName,
|
|
@@ -7424,6 +7427,7 @@ function PartnerBookingCreatedEmail({
|
|
|
7424
7427
|
optionals,
|
|
7425
7428
|
rooms,
|
|
7426
7429
|
booker,
|
|
7430
|
+
partnerNotes,
|
|
7427
7431
|
agent,
|
|
7428
7432
|
logoUrl,
|
|
7429
7433
|
labels,
|
|
@@ -7497,6 +7501,52 @@ function PartnerBookingCreatedEmail({
|
|
|
7497
7501
|
bedArrangementLabels: l.bedArrangementLabels
|
|
7498
7502
|
}
|
|
7499
7503
|
),
|
|
7504
|
+
Array.isArray(partnerNotes) && partnerNotes.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7505
|
+
sectionDivider,
|
|
7506
|
+
/* @__PURE__ */ jsx(
|
|
7507
|
+
"p",
|
|
7508
|
+
{
|
|
7509
|
+
style: {
|
|
7510
|
+
marginTop: 0,
|
|
7511
|
+
marginBottom: "16px",
|
|
7512
|
+
paddingBottom: "8px",
|
|
7513
|
+
borderBottom: `2px solid ${emailTokens.primary}`,
|
|
7514
|
+
fontWeight: 700,
|
|
7515
|
+
fontSize: "18px",
|
|
7516
|
+
color: emailTokens.foreground,
|
|
7517
|
+
fontFamily: emailTokens.fontFamily
|
|
7518
|
+
},
|
|
7519
|
+
children: l.partnerNotesHeading
|
|
7520
|
+
}
|
|
7521
|
+
),
|
|
7522
|
+
/* @__PURE__ */ jsx(
|
|
7523
|
+
"table",
|
|
7524
|
+
{
|
|
7525
|
+
role: "presentation",
|
|
7526
|
+
style: {
|
|
7527
|
+
width: "100%",
|
|
7528
|
+
borderCollapse: "collapse",
|
|
7529
|
+
fontSize: "14px",
|
|
7530
|
+
marginBottom: "24px"
|
|
7531
|
+
},
|
|
7532
|
+
children: /* @__PURE__ */ jsx("tbody", { children: partnerNotes.map((note, i) => /* @__PURE__ */ jsx("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: /* @__PURE__ */ jsxs("td", { style: { padding: "10px 0", color: emailTokens.bodyText, verticalAlign: "top" }, children: [
|
|
7533
|
+
hasText7(note.meta) && /* @__PURE__ */ jsx(
|
|
7534
|
+
"div",
|
|
7535
|
+
{
|
|
7536
|
+
style: {
|
|
7537
|
+
fontSize: "12px",
|
|
7538
|
+
fontWeight: 600,
|
|
7539
|
+
color: emailTokens.foreground,
|
|
7540
|
+
marginBottom: "4px"
|
|
7541
|
+
},
|
|
7542
|
+
children: note.meta
|
|
7543
|
+
}
|
|
7544
|
+
),
|
|
7545
|
+
/* @__PURE__ */ jsx("div", { style: { whiteSpace: "pre-wrap" }, children: note.body })
|
|
7546
|
+
] }) }, i)) })
|
|
7547
|
+
}
|
|
7548
|
+
)
|
|
7549
|
+
] }),
|
|
7500
7550
|
sectionDivider,
|
|
7501
7551
|
/* @__PURE__ */ jsxs(
|
|
7502
7552
|
"div",
|