@planetaexo/design-system 0.44.0 → 0.46.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.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,18 @@ interface BookingPaymentConfirmationEmailLabels {
760
769
  adventuresLabel?: string;
761
770
  totalTravellersLabel?: string;
762
771
  agentLabel?: string;
772
+ /** Heading do card "Booking person" (espelha o bloco do /o e /b). Default EN: "Booking person". */
773
+ bookingPersonHeading?: string;
774
+ /** Rótulo do campo nome no card "Booking person". Default EN: "Name". */
775
+ nameLabel?: string;
776
+ /** Rótulo do campo e-mail no card "Booking person". Default EN: "Email". */
777
+ emailLabel?: string;
778
+ /** Rótulo do campo telefone no card "Booking person". Default EN: "Phone". */
779
+ phoneLabel?: string;
780
+ /** Rótulo do campo país no card "Booking person". Default EN: "Country". */
781
+ countryLabel?: string;
782
+ /** Rótulo do campo de endereço de cobrança no card "Booking person". Default EN: "Billing address". */
783
+ addressLabel?: string;
763
784
  adultsUnit?: string;
764
785
  childrenUnit?: string;
765
786
  travellersLabel?: string;
@@ -854,6 +875,18 @@ interface BookingPaymentConfirmationEmailProps {
854
875
  depositInfo?: ConfirmationDepositInfo;
855
876
  /** Nome do agente responsavel */
856
877
  agent: string;
878
+ /**
879
+ * Endereço de cobrança da pessoa responsável, já montado como string multi-linha
880
+ * pelo backend (`formatPostalAddress`). Quando ausente/vazio, o bloco dedicado
881
+ * "Billing address" não é renderizado.
882
+ */
883
+ responsiblePersonAddress?: string;
884
+ /** E-mail da pessoa responsável (campo do card "Booking person"). */
885
+ responsiblePersonEmail?: string;
886
+ /** Telefone da pessoa responsável (campo do card "Booking person"). */
887
+ responsiblePersonPhone?: string;
888
+ /** País da pessoa responsável — JÁ SANITIZADO pelo backend (só ISO-2 válido / nome; vazio = campo oculto). */
889
+ responsiblePersonCountry?: string;
857
890
  /** URL para ver os detalhes completos do booking */
858
891
  viewBookingUrl?: string;
859
892
  /** Optional label overrides for i18n */
@@ -869,7 +902,7 @@ interface BookingPaymentConfirmationEmailProps {
869
902
  */
870
903
  flow?: "auto" | "manual";
871
904
  }
872
- declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
905
+ declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, responsiblePersonAddress, responsiblePersonEmail, responsiblePersonPhone, responsiblePersonCountry, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
873
906
 
874
907
  interface BookingAdventureCardLineItem {
875
908
  /** Valor unitário formatado, ex.: "R$ 1.500,00". Opcional quando o caller usa `label` livre. */
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,18 @@ interface BookingPaymentConfirmationEmailLabels {
760
769
  adventuresLabel?: string;
761
770
  totalTravellersLabel?: string;
762
771
  agentLabel?: string;
772
+ /** Heading do card "Booking person" (espelha o bloco do /o e /b). Default EN: "Booking person". */
773
+ bookingPersonHeading?: string;
774
+ /** Rótulo do campo nome no card "Booking person". Default EN: "Name". */
775
+ nameLabel?: string;
776
+ /** Rótulo do campo e-mail no card "Booking person". Default EN: "Email". */
777
+ emailLabel?: string;
778
+ /** Rótulo do campo telefone no card "Booking person". Default EN: "Phone". */
779
+ phoneLabel?: string;
780
+ /** Rótulo do campo país no card "Booking person". Default EN: "Country". */
781
+ countryLabel?: string;
782
+ /** Rótulo do campo de endereço de cobrança no card "Booking person". Default EN: "Billing address". */
783
+ addressLabel?: string;
763
784
  adultsUnit?: string;
764
785
  childrenUnit?: string;
765
786
  travellersLabel?: string;
@@ -854,6 +875,18 @@ interface BookingPaymentConfirmationEmailProps {
854
875
  depositInfo?: ConfirmationDepositInfo;
855
876
  /** Nome do agente responsavel */
856
877
  agent: string;
878
+ /**
879
+ * Endereço de cobrança da pessoa responsável, já montado como string multi-linha
880
+ * pelo backend (`formatPostalAddress`). Quando ausente/vazio, o bloco dedicado
881
+ * "Billing address" não é renderizado.
882
+ */
883
+ responsiblePersonAddress?: string;
884
+ /** E-mail da pessoa responsável (campo do card "Booking person"). */
885
+ responsiblePersonEmail?: string;
886
+ /** Telefone da pessoa responsável (campo do card "Booking person"). */
887
+ responsiblePersonPhone?: string;
888
+ /** País da pessoa responsável — JÁ SANITIZADO pelo backend (só ISO-2 válido / nome; vazio = campo oculto). */
889
+ responsiblePersonCountry?: string;
857
890
  /** URL para ver os detalhes completos do booking */
858
891
  viewBookingUrl?: string;
859
892
  /** Optional label overrides for i18n */
@@ -869,7 +902,7 @@ interface BookingPaymentConfirmationEmailProps {
869
902
  */
870
903
  flow?: "auto" | "manual";
871
904
  }
872
- declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
905
+ declare function BookingPaymentConfirmationEmail({ recipientName, logoUrl, bookingReference, adventures, summaryLineItems, subtotal, total, depositInfo, agent, responsiblePersonAddress, responsiblePersonEmail, responsiblePersonPhone, responsiblePersonCountry, viewBookingUrl, labels, className, flow, }: BookingPaymentConfirmationEmailProps): react_jsx_runtime.JSX.Element;
873
906
 
874
907
  interface BookingAdventureCardLineItem {
875
908
  /** Valor unitário formatado, ex.: "R$ 1.500,00". Opcional quando o caller usa `label` livre. */
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,12 @@ var DEFAULT_LABELS3 = {
4772
4788
  adventuresLabel: "Adventures",
4773
4789
  totalTravellersLabel: "Total Travellers",
4774
4790
  agentLabel: "Agent",
4791
+ bookingPersonHeading: "Booking person",
4792
+ nameLabel: "Name",
4793
+ emailLabel: "Email",
4794
+ phoneLabel: "Phone",
4795
+ countryLabel: "Country",
4796
+ addressLabel: "Billing address",
4775
4797
  adultsUnit: "adult(s)",
4776
4798
  childrenUnit: "child(ren)",
4777
4799
  travellersLabel: "Travellers",
@@ -4802,6 +4824,10 @@ function BookingPaymentConfirmationEmail({
4802
4824
  total,
4803
4825
  depositInfo,
4804
4826
  agent,
4827
+ responsiblePersonAddress,
4828
+ responsiblePersonEmail,
4829
+ responsiblePersonPhone,
4830
+ responsiblePersonCountry,
4805
4831
  viewBookingUrl,
4806
4832
  labels,
4807
4833
  className,
@@ -4813,6 +4839,26 @@ function BookingPaymentConfirmationEmail({
4813
4839
  return (_a = a.travellers) != null ? _a : [];
4814
4840
  });
4815
4841
  const isManualFlow = flow === "manual";
4842
+ const personFieldLabel = {
4843
+ margin: "0 0 2px 0",
4844
+ fontSize: "11px",
4845
+ fontWeight: 700,
4846
+ color: emailTokens.mutedForeground,
4847
+ textTransform: "uppercase",
4848
+ letterSpacing: "0.08em",
4849
+ fontFamily: emailTokens.fontFamily
4850
+ };
4851
+ const personFieldValue = {
4852
+ margin: 0,
4853
+ fontSize: "14px",
4854
+ color: emailTokens.foreground,
4855
+ lineHeight: "1.5"
4856
+ };
4857
+ const personFieldCell = {
4858
+ verticalAlign: "top",
4859
+ padding: "0 12px 14px 0",
4860
+ width: "50%"
4861
+ };
4816
4862
  const ctaStyle = {
4817
4863
  display: "inline-block",
4818
4864
  backgroundColor: emailTokens.primary,
@@ -4989,6 +5035,50 @@ function BookingPaymentConfirmationEmail({
4989
5035
  ) })
4990
5036
  ] }),
4991
5037
  /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
5038
+ /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: /* @__PURE__ */ jsxs("div", { style: { borderRadius: "16px", border: `1px solid ${emailTokens.border}`, padding: "20px" }, children: [
5039
+ /* @__PURE__ */ jsx(
5040
+ "p",
5041
+ {
5042
+ style: {
5043
+ margin: "0 0 16px 0",
5044
+ fontSize: "12px",
5045
+ fontWeight: 700,
5046
+ color: emailTokens.mutedForeground,
5047
+ textTransform: "uppercase",
5048
+ letterSpacing: "0.1em",
5049
+ fontFamily: emailTokens.fontFamily
5050
+ },
5051
+ children: l.bookingPersonHeading
5052
+ }
5053
+ ),
5054
+ /* @__PURE__ */ jsx("table", { cellPadding: 0, cellSpacing: 0, style: { width: "100%", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxs("tbody", { children: [
5055
+ /* @__PURE__ */ jsxs("tr", { children: [
5056
+ /* @__PURE__ */ jsxs("td", { style: personFieldCell, children: [
5057
+ /* @__PURE__ */ jsx("p", { style: personFieldLabel, children: l.nameLabel }),
5058
+ /* @__PURE__ */ jsx("p", { style: __spreadProps(__spreadValues({}, personFieldValue), { fontWeight: 600 }), children: recipientName })
5059
+ ] }),
5060
+ /* @__PURE__ */ jsxs("td", { style: personFieldCell, children: [
5061
+ /* @__PURE__ */ jsx("p", { style: personFieldLabel, children: l.emailLabel }),
5062
+ /* @__PURE__ */ jsx("p", { style: personFieldValue, children: responsiblePersonEmail || "\u2014" })
5063
+ ] })
5064
+ ] }),
5065
+ /* @__PURE__ */ jsxs("tr", { children: [
5066
+ /* @__PURE__ */ jsxs("td", { style: personFieldCell, children: [
5067
+ /* @__PURE__ */ jsx("p", { style: personFieldLabel, children: l.phoneLabel }),
5068
+ /* @__PURE__ */ jsx("p", { style: personFieldValue, children: responsiblePersonPhone || "\u2014" })
5069
+ ] }),
5070
+ /* @__PURE__ */ jsx("td", { style: personFieldCell, children: responsiblePersonCountry && responsiblePersonCountry.trim().length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
5071
+ /* @__PURE__ */ jsx("p", { style: personFieldLabel, children: l.countryLabel }),
5072
+ /* @__PURE__ */ jsx("p", { style: personFieldValue, children: responsiblePersonCountry })
5073
+ ] }) : null })
5074
+ ] }),
5075
+ responsiblePersonAddress && responsiblePersonAddress.trim().length > 0 && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { colSpan: 2, style: __spreadProps(__spreadValues({}, personFieldCell), { width: "auto", paddingRight: 0, paddingBottom: 0 }), children: [
5076
+ /* @__PURE__ */ jsx("p", { style: personFieldLabel, children: l.addressLabel }),
5077
+ /* @__PURE__ */ jsx("p", { style: __spreadProps(__spreadValues({}, personFieldValue), { whiteSpace: "pre-line" }), children: responsiblePersonAddress })
5078
+ ] }) })
5079
+ ] }) })
5080
+ ] }) }),
5081
+ /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
4992
5082
  /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "40px" }, children: isManualFlow ? (
4993
5083
  // Manual flow: closing message + CTA no rodapé (substitui footerMessage/footerContact).
4994
5084
  /* @__PURE__ */ jsxs(Fragment, { children: [