@planetaexo/design-system 0.44.0 → 0.45.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 +26 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -2
- package/dist/index.d.ts +27 -2
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -490,6 +490,8 @@ interface BookingDetailsLabels {
|
|
|
490
490
|
country?: string;
|
|
491
491
|
/** Default EN: "Passport / ID". Atualmente o componente exibia "Passport / CPF" (PT-BR fixo). */
|
|
492
492
|
document?: string;
|
|
493
|
+
/** Default EN: "Address". Endereço de cobrança da pessoa responsável. */
|
|
494
|
+
address?: string;
|
|
493
495
|
};
|
|
494
496
|
/** Headers das seções do accordion de cada aventura (atualmente PT-BR fixo). */
|
|
495
497
|
adventureSections?: {
|
|
@@ -600,6 +602,13 @@ interface BookingContact {
|
|
|
600
602
|
phone?: string;
|
|
601
603
|
country?: string;
|
|
602
604
|
passport?: string;
|
|
605
|
+
/** Campos crus do endereço de cobrança. O DS formata e oculta partes vazias;
|
|
606
|
+
* quando TODAS as partes estão ausentes, a célula "Address" não é renderizada. */
|
|
607
|
+
addressLine1?: string;
|
|
608
|
+
addressLine2?: string;
|
|
609
|
+
city?: string;
|
|
610
|
+
state?: string;
|
|
611
|
+
postalCode?: string;
|
|
603
612
|
}
|
|
604
613
|
interface BookingDepositInfo {
|
|
605
614
|
depositPercent: number;
|
|
@@ -760,6 +769,8 @@ interface BookingPaymentConfirmationEmailLabels {
|
|
|
760
769
|
adventuresLabel?: string;
|
|
761
770
|
totalTravellersLabel?: string;
|
|
762
771
|
agentLabel?: string;
|
|
772
|
+
/** Label da linha opcional de endereço da pessoa responsável. Default EN: "Address". */
|
|
773
|
+
addressLabel?: string;
|
|
763
774
|
adultsUnit?: string;
|
|
764
775
|
childrenUnit?: string;
|
|
765
776
|
travellersLabel?: string;
|
|
@@ -854,6 +865,12 @@ interface BookingPaymentConfirmationEmailProps {
|
|
|
854
865
|
depositInfo?: ConfirmationDepositInfo;
|
|
855
866
|
/** Nome do agente responsavel */
|
|
856
867
|
agent: string;
|
|
868
|
+
/**
|
|
869
|
+
* Endereço de cobrança da pessoa responsável, já montado como string multi-linha
|
|
870
|
+
* pelo backend (`formatPostalAddress`). Quando ausente/vazio, a row "Address"
|
|
871
|
+
* não é adicionada ao BookingSummary.
|
|
872
|
+
*/
|
|
873
|
+
responsiblePersonAddress?: string;
|
|
857
874
|
/** URL para ver os detalhes completos do booking */
|
|
858
875
|
viewBookingUrl?: string;
|
|
859
876
|
/** Optional label overrides for i18n */
|
|
@@ -869,7 +886,7 @@ interface BookingPaymentConfirmationEmailProps {
|
|
|
869
886
|
*/
|
|
870
887
|
flow?: "auto" | "manual";
|
|
871
888
|
}
|
|
872
|
-
declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
|
|
889
|
+
declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, responsiblePersonAddress, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
|
|
873
890
|
|
|
874
891
|
interface BookingAdventureCardLineItem {
|
|
875
892
|
/** Valor unitário formatado, ex.: "R$ 1.500,00". Opcional quando o caller usa `label` livre. */
|
|
@@ -1032,6 +1049,8 @@ interface BookingCreatedEmailLabels {
|
|
|
1032
1049
|
startingDateLabel?: string;
|
|
1033
1050
|
numberOfPeopleLabel?: string;
|
|
1034
1051
|
hostLabel?: string;
|
|
1052
|
+
/** Label da linha opcional de endereço da pessoa responsável. Default EN: "Address". */
|
|
1053
|
+
addressLabel?: string;
|
|
1035
1054
|
postCtaMessage?: string;
|
|
1036
1055
|
closingMessage?: string;
|
|
1037
1056
|
/** Cabeçalho da seção opcional de próximos passos (ex.: "What you need to do:"). */
|
|
@@ -1071,6 +1090,12 @@ interface BookingCreatedEmailProps {
|
|
|
1071
1090
|
* Apenas renderizado quando `nextSteps` está presente.
|
|
1072
1091
|
*/
|
|
1073
1092
|
nextStepsImportant?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Endereço de cobrança da pessoa responsável, já montado como string multi-linha
|
|
1095
|
+
* pelo backend (`formatPostalAddress`). Quando ausente/vazio, a row "Address"
|
|
1096
|
+
* não é adicionada ao BookingSummary.
|
|
1097
|
+
*/
|
|
1098
|
+
responsiblePersonAddress?: string;
|
|
1074
1099
|
/**
|
|
1075
1100
|
* Label que precede o link puro da reserva renderizado antes do `closingMessage`
|
|
1076
1101
|
* (ex.: "Direct link to your booking:"). Quando informada e `addTravellersUrl` existe,
|
|
@@ -1080,7 +1105,7 @@ interface BookingCreatedEmailProps {
|
|
|
1080
1105
|
*/
|
|
1081
1106
|
directBookingLinkLabel?: string;
|
|
1082
1107
|
}
|
|
1083
|
-
declare function BookingCreatedEmail({ recipientName, addTravellersUrl, logoUrl, bookingNumber, activity, adventure, startingDate, numberOfPeople, host, labels, className, nextSteps, nextStepsImportant, directBookingLinkLabel, }: BookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1108
|
+
declare function BookingCreatedEmail({ recipientName, addTravellersUrl, logoUrl, bookingNumber, activity, adventure, startingDate, numberOfPeople, host, labels, className, nextSteps, nextStepsImportant, responsiblePersonAddress, directBookingLinkLabel, }: BookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1084
1109
|
|
|
1085
1110
|
interface BookingSummaryRow {
|
|
1086
1111
|
/** Label da linha (coluna esquerda, mutedForeground). */
|
package/dist/index.d.ts
CHANGED
|
@@ -490,6 +490,8 @@ interface BookingDetailsLabels {
|
|
|
490
490
|
country?: string;
|
|
491
491
|
/** Default EN: "Passport / ID". Atualmente o componente exibia "Passport / CPF" (PT-BR fixo). */
|
|
492
492
|
document?: string;
|
|
493
|
+
/** Default EN: "Address". Endereço de cobrança da pessoa responsável. */
|
|
494
|
+
address?: string;
|
|
493
495
|
};
|
|
494
496
|
/** Headers das seções do accordion de cada aventura (atualmente PT-BR fixo). */
|
|
495
497
|
adventureSections?: {
|
|
@@ -600,6 +602,13 @@ interface BookingContact {
|
|
|
600
602
|
phone?: string;
|
|
601
603
|
country?: string;
|
|
602
604
|
passport?: string;
|
|
605
|
+
/** Campos crus do endereço de cobrança. O DS formata e oculta partes vazias;
|
|
606
|
+
* quando TODAS as partes estão ausentes, a célula "Address" não é renderizada. */
|
|
607
|
+
addressLine1?: string;
|
|
608
|
+
addressLine2?: string;
|
|
609
|
+
city?: string;
|
|
610
|
+
state?: string;
|
|
611
|
+
postalCode?: string;
|
|
603
612
|
}
|
|
604
613
|
interface BookingDepositInfo {
|
|
605
614
|
depositPercent: number;
|
|
@@ -760,6 +769,8 @@ interface BookingPaymentConfirmationEmailLabels {
|
|
|
760
769
|
adventuresLabel?: string;
|
|
761
770
|
totalTravellersLabel?: string;
|
|
762
771
|
agentLabel?: string;
|
|
772
|
+
/** Label da linha opcional de endereço da pessoa responsável. Default EN: "Address". */
|
|
773
|
+
addressLabel?: string;
|
|
763
774
|
adultsUnit?: string;
|
|
764
775
|
childrenUnit?: string;
|
|
765
776
|
travellersLabel?: string;
|
|
@@ -854,6 +865,12 @@ interface BookingPaymentConfirmationEmailProps {
|
|
|
854
865
|
depositInfo?: ConfirmationDepositInfo;
|
|
855
866
|
/** Nome do agente responsavel */
|
|
856
867
|
agent: string;
|
|
868
|
+
/**
|
|
869
|
+
* Endereço de cobrança da pessoa responsável, já montado como string multi-linha
|
|
870
|
+
* pelo backend (`formatPostalAddress`). Quando ausente/vazio, a row "Address"
|
|
871
|
+
* não é adicionada ao BookingSummary.
|
|
872
|
+
*/
|
|
873
|
+
responsiblePersonAddress?: string;
|
|
857
874
|
/** URL para ver os detalhes completos do booking */
|
|
858
875
|
viewBookingUrl?: string;
|
|
859
876
|
/** Optional label overrides for i18n */
|
|
@@ -869,7 +886,7 @@ interface BookingPaymentConfirmationEmailProps {
|
|
|
869
886
|
*/
|
|
870
887
|
flow?: "auto" | "manual";
|
|
871
888
|
}
|
|
872
|
-
declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
|
|
889
|
+
declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, responsiblePersonAddress, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
|
|
873
890
|
|
|
874
891
|
interface BookingAdventureCardLineItem {
|
|
875
892
|
/** Valor unitário formatado, ex.: "R$ 1.500,00". Opcional quando o caller usa `label` livre. */
|
|
@@ -1032,6 +1049,8 @@ interface BookingCreatedEmailLabels {
|
|
|
1032
1049
|
startingDateLabel?: string;
|
|
1033
1050
|
numberOfPeopleLabel?: string;
|
|
1034
1051
|
hostLabel?: string;
|
|
1052
|
+
/** Label da linha opcional de endereço da pessoa responsável. Default EN: "Address". */
|
|
1053
|
+
addressLabel?: string;
|
|
1035
1054
|
postCtaMessage?: string;
|
|
1036
1055
|
closingMessage?: string;
|
|
1037
1056
|
/** Cabeçalho da seção opcional de próximos passos (ex.: "What you need to do:"). */
|
|
@@ -1071,6 +1090,12 @@ interface BookingCreatedEmailProps {
|
|
|
1071
1090
|
* Apenas renderizado quando `nextSteps` está presente.
|
|
1072
1091
|
*/
|
|
1073
1092
|
nextStepsImportant?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Endereço de cobrança da pessoa responsável, já montado como string multi-linha
|
|
1095
|
+
* pelo backend (`formatPostalAddress`). Quando ausente/vazio, a row "Address"
|
|
1096
|
+
* não é adicionada ao BookingSummary.
|
|
1097
|
+
*/
|
|
1098
|
+
responsiblePersonAddress?: string;
|
|
1074
1099
|
/**
|
|
1075
1100
|
* Label que precede o link puro da reserva renderizado antes do `closingMessage`
|
|
1076
1101
|
* (ex.: "Direct link to your booking:"). Quando informada e `addTravellersUrl` existe,
|
|
@@ -1080,7 +1105,7 @@ interface BookingCreatedEmailProps {
|
|
|
1080
1105
|
*/
|
|
1081
1106
|
directBookingLinkLabel?: string;
|
|
1082
1107
|
}
|
|
1083
|
-
declare function BookingCreatedEmail({ recipientName, addTravellersUrl, logoUrl, bookingNumber, activity, adventure, startingDate, numberOfPeople, host, labels, className, nextSteps, nextStepsImportant, directBookingLinkLabel, }: BookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1108
|
+
declare function BookingCreatedEmail({ recipientName, addTravellersUrl, logoUrl, bookingNumber, activity, adventure, startingDate, numberOfPeople, host, labels, className, nextSteps, nextStepsImportant, responsiblePersonAddress, directBookingLinkLabel, }: BookingCreatedEmailProps): react_jsx_runtime.JSX.Element;
|
|
1084
1109
|
|
|
1085
1110
|
interface BookingSummaryRow {
|
|
1086
1111
|
/** Label da linha (coluna esquerda, mutedForeground). */
|
package/dist/index.js
CHANGED
|
@@ -3778,7 +3778,20 @@ function BookingDetails({
|
|
|
3778
3778
|
contact.passport && /* @__PURE__ */ jsxs("div", { children: [
|
|
3779
3779
|
/* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_E = (_D = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _D.document) != null ? _E : "Passport / ID" }),
|
|
3780
3780
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
|
|
3781
|
-
] })
|
|
3781
|
+
] }),
|
|
3782
|
+
(() => {
|
|
3783
|
+
var _a2, _b2, _c2;
|
|
3784
|
+
const parts = [
|
|
3785
|
+
[contact.addressLine1, contact.addressLine2].map((s) => s == null ? void 0 : s.trim()).filter(Boolean).join(", "),
|
|
3786
|
+
[contact.city, contact.state].map((s) => s == null ? void 0 : s.trim()).filter(Boolean).join(", "),
|
|
3787
|
+
(_a2 = contact.postalCode) == null ? void 0 : _a2.trim()
|
|
3788
|
+
].filter((p) => p && p.length > 0);
|
|
3789
|
+
if (parts.length === 0) return null;
|
|
3790
|
+
return /* @__PURE__ */ jsxs("div", { className: "col-span-2 sm:col-span-3", children: [
|
|
3791
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_c2 = (_b2 = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _b2.address) != null ? _c2 : "Address" }),
|
|
3792
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans whitespace-pre-line", children: parts.join("\n") })
|
|
3793
|
+
] });
|
|
3794
|
+
})()
|
|
3782
3795
|
] })
|
|
3783
3796
|
] }),
|
|
3784
3797
|
(onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
@@ -4634,7 +4647,10 @@ function BookingSummary({ heading, rows, footer, className }) {
|
|
|
4634
4647
|
padding: "12px 20px",
|
|
4635
4648
|
fontWeight: row.valueColor === emailTokens.primary ? 600 : 500,
|
|
4636
4649
|
color: (_a2 = row.valueColor) != null ? _a2 : emailTokens.foreground,
|
|
4637
|
-
verticalAlign: "top"
|
|
4650
|
+
verticalAlign: "top",
|
|
4651
|
+
// Preserva quebras de linha em valores multi-linha (ex.: endereço
|
|
4652
|
+
// montado com "\n"). Inócuo para valores de uma linha.
|
|
4653
|
+
whiteSpace: "pre-line"
|
|
4638
4654
|
},
|
|
4639
4655
|
children: row.value
|
|
4640
4656
|
}
|
|
@@ -4772,6 +4788,7 @@ var DEFAULT_LABELS3 = {
|
|
|
4772
4788
|
adventuresLabel: "Adventures",
|
|
4773
4789
|
totalTravellersLabel: "Total Travellers",
|
|
4774
4790
|
agentLabel: "Agent",
|
|
4791
|
+
addressLabel: "Address",
|
|
4775
4792
|
adultsUnit: "adult(s)",
|
|
4776
4793
|
childrenUnit: "child(ren)",
|
|
4777
4794
|
travellersLabel: "Travellers",
|
|
@@ -4802,6 +4819,7 @@ function BookingPaymentConfirmationEmail({
|
|
|
4802
4819
|
total,
|
|
4803
4820
|
depositInfo,
|
|
4804
4821
|
agent,
|
|
4822
|
+
responsiblePersonAddress,
|
|
4805
4823
|
viewBookingUrl,
|
|
4806
4824
|
labels,
|
|
4807
4825
|
className,
|
|
@@ -4880,7 +4898,8 @@ function BookingPaymentConfirmationEmail({
|
|
|
4880
4898
|
{ label: l.bookingNumberLabel, value: bookingReference, valueColor: emailTokens.primary },
|
|
4881
4899
|
{ label: l.adventuresLabel, value: adventures.length },
|
|
4882
4900
|
{ label: l.totalTravellersLabel, value: allTravellers.length },
|
|
4883
|
-
{ label: l.agentLabel, value: agent }
|
|
4901
|
+
{ label: l.agentLabel, value: agent },
|
|
4902
|
+
...responsiblePersonAddress && responsiblePersonAddress.trim().length > 0 ? [{ label: l.addressLabel, value: responsiblePersonAddress }] : []
|
|
4884
4903
|
]
|
|
4885
4904
|
}
|
|
4886
4905
|
) }),
|
|
@@ -5016,6 +5035,7 @@ var DEFAULT_LABELS4 = {
|
|
|
5016
5035
|
startingDateLabel: "Starting Date:",
|
|
5017
5036
|
numberOfPeopleLabel: "Number of People:",
|
|
5018
5037
|
hostLabel: "Host:",
|
|
5038
|
+
addressLabel: "Address:",
|
|
5019
5039
|
postCtaMessage: "After adding everyone, you will also receive your own registration email, just like the other travellers. Please make sure everyone completes this step so we can organise everything properly.",
|
|
5020
5040
|
closingMessage: "If you have any questions, just reply to this email \u2014 happy to help.",
|
|
5021
5041
|
nextStepsHeading: "Next steps:"
|
|
@@ -5034,6 +5054,7 @@ function BookingCreatedEmail({
|
|
|
5034
5054
|
className,
|
|
5035
5055
|
nextSteps,
|
|
5036
5056
|
nextStepsImportant,
|
|
5057
|
+
responsiblePersonAddress,
|
|
5037
5058
|
directBookingLinkLabel
|
|
5038
5059
|
}) {
|
|
5039
5060
|
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS4), labels);
|
|
@@ -5055,7 +5076,8 @@ function BookingCreatedEmail({
|
|
|
5055
5076
|
{ label: l.adventureLabel, value: adventure },
|
|
5056
5077
|
{ label: l.startingDateLabel, value: startingDate },
|
|
5057
5078
|
{ label: l.numberOfPeopleLabel, value: String(numberOfPeople) },
|
|
5058
|
-
{ label: l.hostLabel, value: host }
|
|
5079
|
+
{ label: l.hostLabel, value: host },
|
|
5080
|
+
...responsiblePersonAddress && responsiblePersonAddress.trim().length > 0 ? [{ label: l.addressLabel, value: responsiblePersonAddress }] : []
|
|
5059
5081
|
];
|
|
5060
5082
|
const showNextSteps = Array.isArray(nextSteps) && nextSteps.length > 0;
|
|
5061
5083
|
return /* @__PURE__ */ jsxs(
|