@planetaexo/design-system 0.31.0 → 0.32.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
@@ -1090,16 +1090,21 @@ interface BookingSummaryProps {
1090
1090
  /**
1091
1091
  * Bloco "Booking summary" reusável entre os e-mails transacionais.
1092
1092
  *
1093
- * Visual: card encaixotado (borderRadius 12px + border 1px) com padding 10px
1094
- * nas células, separadores entre rows, value alinhado à direita com
1095
- * `whiteSpace: nowrap`. Heading em 16px / fontWeight 700, externo ao card.
1093
+ * Visual (canônico, espelhando o markup original do BookingPaymentConfirmationEmail):
1094
+ * - heading 18px / fontWeight 700 / marginBottom 20px
1095
+ * - card encaixotado (borderRadius 12px + border 1px)
1096
+ * - cells com padding 12px 20px
1097
+ * - label com `backgroundColor: t.muted` (coluna esquerda destacada)
1098
+ * - value alinhado à esquerda; `valueColor` opcional por row (ex.: Booking Number em verde)
1099
+ * - quando valueColor === t.primary, fontWeight do value vira 600 (paridade BookingPaymentConfirmation)
1100
+ * - separador entre rows via `borderBottom` (na última row sem footer fica sem borda)
1096
1101
  *
1097
- * Histórico: bloco originalmente inline em `BookingCreatedEmail.tsx`
1098
- * (extraído na v0.29.0 então chamado `BookingConfirmationEmail`) e duplicado
1099
- * também inline em `PaymentReceiptEmail.tsx` com visual ligeiramente diferente.
1100
- * Consolidado num único componente na v0.30.x — todos os e-mails
1101
- * (`BookingCreatedEmail`, `PaymentReceiptEmail`, `RegistrationReminderEmail`)
1102
- * usam exatamente o mesmo markup.
1102
+ * Histórico: bloco originalmente inline em `BookingCreatedEmail.tsx` (extraído na
1103
+ * v0.29.0) e duplicado também inline em `PaymentReceiptEmail.tsx` e
1104
+ * `BookingPaymentConfirmationEmail.tsx`. Consolidado num único componente na
1105
+ * v0.32.x — todos os 4 e-mails (`BookingPaymentConfirmationEmail`,
1106
+ * `BookingCreatedEmail`, `PaymentReceiptEmail`, `RegistrationReminderEmail`)
1107
+ * agora usam exatamente o mesmo markup.
1103
1108
  */
1104
1109
  declare function BookingSummary({ heading, rows, footer, className }: BookingSummaryProps): react_jsx_runtime.JSX.Element;
1105
1110
 
package/dist/index.d.ts CHANGED
@@ -1090,16 +1090,21 @@ interface BookingSummaryProps {
1090
1090
  /**
1091
1091
  * Bloco "Booking summary" reusável entre os e-mails transacionais.
1092
1092
  *
1093
- * Visual: card encaixotado (borderRadius 12px + border 1px) com padding 10px
1094
- * nas células, separadores entre rows, value alinhado à direita com
1095
- * `whiteSpace: nowrap`. Heading em 16px / fontWeight 700, externo ao card.
1093
+ * Visual (canônico, espelhando o markup original do BookingPaymentConfirmationEmail):
1094
+ * - heading 18px / fontWeight 700 / marginBottom 20px
1095
+ * - card encaixotado (borderRadius 12px + border 1px)
1096
+ * - cells com padding 12px 20px
1097
+ * - label com `backgroundColor: t.muted` (coluna esquerda destacada)
1098
+ * - value alinhado à esquerda; `valueColor` opcional por row (ex.: Booking Number em verde)
1099
+ * - quando valueColor === t.primary, fontWeight do value vira 600 (paridade BookingPaymentConfirmation)
1100
+ * - separador entre rows via `borderBottom` (na última row sem footer fica sem borda)
1096
1101
  *
1097
- * Histórico: bloco originalmente inline em `BookingCreatedEmail.tsx`
1098
- * (extraído na v0.29.0 então chamado `BookingConfirmationEmail`) e duplicado
1099
- * também inline em `PaymentReceiptEmail.tsx` com visual ligeiramente diferente.
1100
- * Consolidado num único componente na v0.30.x — todos os e-mails
1101
- * (`BookingCreatedEmail`, `PaymentReceiptEmail`, `RegistrationReminderEmail`)
1102
- * usam exatamente o mesmo markup.
1102
+ * Histórico: bloco originalmente inline em `BookingCreatedEmail.tsx` (extraído na
1103
+ * v0.29.0) e duplicado também inline em `PaymentReceiptEmail.tsx` e
1104
+ * `BookingPaymentConfirmationEmail.tsx`. Consolidado num único componente na
1105
+ * v0.32.x — todos os 4 e-mails (`BookingPaymentConfirmationEmail`,
1106
+ * `BookingCreatedEmail`, `PaymentReceiptEmail`, `RegistrationReminderEmail`)
1107
+ * agora usam exatamente o mesmo markup.
1103
1108
  */
1104
1109
  declare function BookingSummary({ heading, rows, footer, className }: BookingSummaryProps): react_jsx_runtime.JSX.Element;
1105
1110
 
package/dist/index.js CHANGED
@@ -4451,6 +4451,98 @@ function BookingAdventureCard({
4451
4451
  }
4452
4452
  );
4453
4453
  }
4454
+ function BookingSummary({ heading, rows, footer, className }) {
4455
+ var _a, _b;
4456
+ return /* @__PURE__ */ jsxs("div", { className, style: { marginBottom: "24px" }, children: [
4457
+ /* @__PURE__ */ jsx(
4458
+ "p",
4459
+ {
4460
+ style: {
4461
+ marginTop: 0,
4462
+ marginBottom: "20px",
4463
+ fontWeight: 700,
4464
+ color: emailTokens.foreground,
4465
+ fontSize: "18px",
4466
+ fontFamily: emailTokens.fontFamily
4467
+ },
4468
+ children: heading
4469
+ }
4470
+ ),
4471
+ /* @__PURE__ */ jsx(
4472
+ "div",
4473
+ {
4474
+ style: {
4475
+ borderRadius: "12px",
4476
+ border: `1px solid ${emailTokens.border}`,
4477
+ overflow: "hidden"
4478
+ },
4479
+ children: /* @__PURE__ */ jsx(
4480
+ "table",
4481
+ {
4482
+ style: {
4483
+ width: "100%",
4484
+ fontSize: "14px",
4485
+ borderCollapse: "collapse"
4486
+ },
4487
+ children: /* @__PURE__ */ jsxs("tbody", { children: [
4488
+ rows.map((row, i) => {
4489
+ var _a2;
4490
+ const isLastRowWithoutFooter = i === rows.length - 1 && !footer;
4491
+ return /* @__PURE__ */ jsxs(
4492
+ "tr",
4493
+ {
4494
+ style: !isLastRowWithoutFooter ? { borderBottom: `1px solid ${emailTokens.border}` } : {},
4495
+ children: [
4496
+ /* @__PURE__ */ jsx(
4497
+ "td",
4498
+ {
4499
+ style: {
4500
+ padding: "12px 20px",
4501
+ color: emailTokens.mutedForeground,
4502
+ backgroundColor: emailTokens.muted,
4503
+ verticalAlign: "top"
4504
+ },
4505
+ children: row.label
4506
+ }
4507
+ ),
4508
+ /* @__PURE__ */ jsx(
4509
+ "td",
4510
+ {
4511
+ style: {
4512
+ padding: "12px 20px",
4513
+ fontWeight: row.valueColor === emailTokens.primary ? 600 : 500,
4514
+ color: (_a2 = row.valueColor) != null ? _a2 : emailTokens.foreground,
4515
+ verticalAlign: "top"
4516
+ },
4517
+ children: row.value
4518
+ }
4519
+ )
4520
+ ]
4521
+ },
4522
+ i
4523
+ );
4524
+ }),
4525
+ footer && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
4526
+ "td",
4527
+ {
4528
+ colSpan: 2,
4529
+ style: {
4530
+ padding: "12px 20px",
4531
+ textAlign: "center",
4532
+ fontWeight: (_a = footer.fontWeight) != null ? _a : 600,
4533
+ color: (_b = footer.color) != null ? _b : emailTokens.foreground,
4534
+ backgroundColor: footer.backgroundColor
4535
+ },
4536
+ children: footer.text
4537
+ }
4538
+ ) })
4539
+ ] })
4540
+ }
4541
+ )
4542
+ }
4543
+ )
4544
+ ] });
4545
+ }
4454
4546
  var DEFAULT_LABELS2 = {
4455
4547
  heading: "PAYMENT DETAILS"
4456
4548
  };
@@ -4658,27 +4750,18 @@ function BookingPaymentConfirmationEmail({
4658
4750
  ] }),
4659
4751
  /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } })
4660
4752
  ] }),
4661
- /* @__PURE__ */ jsxs("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: [
4662
- /* @__PURE__ */ jsx("p", { style: { marginTop: 0, marginBottom: "20px", fontWeight: "700", color: emailTokens.foreground, fontSize: "18px", fontFamily: emailTokens.fontFamily }, children: l.bookingSummaryHeading }),
4663
- /* @__PURE__ */ jsx("div", { style: { borderRadius: "12px", border: `1px solid ${emailTokens.border}`, overflow: "hidden" }, children: /* @__PURE__ */ jsx("table", { style: { width: "100%", fontSize: "14px", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxs("tbody", { children: [
4664
- /* @__PURE__ */ jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
4665
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", color: emailTokens.mutedForeground, backgroundColor: emailTokens.muted }, children: l.bookingNumberLabel }),
4666
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", fontWeight: "600", color: emailTokens.primary }, children: bookingReference })
4667
- ] }),
4668
- /* @__PURE__ */ jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
4669
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", color: emailTokens.mutedForeground, backgroundColor: emailTokens.muted }, children: l.adventuresLabel }),
4670
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", fontWeight: "500", color: emailTokens.foreground }, children: adventures.length })
4671
- ] }),
4672
- /* @__PURE__ */ jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
4673
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", color: emailTokens.mutedForeground, backgroundColor: emailTokens.muted }, children: l.totalTravellersLabel }),
4674
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", fontWeight: "500", color: emailTokens.foreground }, children: allTravellers.length })
4675
- ] }),
4676
- /* @__PURE__ */ jsxs("tr", { children: [
4677
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", color: emailTokens.mutedForeground, backgroundColor: emailTokens.muted }, children: l.agentLabel }),
4678
- /* @__PURE__ */ jsx("td", { style: { padding: "12px 20px", fontWeight: "500", color: emailTokens.foreground }, children: agent })
4679
- ] })
4680
- ] }) }) })
4681
- ] }),
4753
+ /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: /* @__PURE__ */ jsx(
4754
+ BookingSummary,
4755
+ {
4756
+ heading: l.bookingSummaryHeading,
4757
+ rows: [
4758
+ { label: l.bookingNumberLabel, value: bookingReference, valueColor: emailTokens.primary },
4759
+ { label: l.adventuresLabel, value: adventures.length },
4760
+ { label: l.totalTravellersLabel, value: allTravellers.length },
4761
+ { label: l.agentLabel, value: agent }
4762
+ ]
4763
+ }
4764
+ ) }),
4682
4765
  /* @__PURE__ */ jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
4683
4766
  /* @__PURE__ */ jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: adventures.map((adventure, adIdx) => {
4684
4767
  var _a, _b, _c, _d;
@@ -4798,97 +4881,6 @@ function BookingPaymentConfirmationEmail({
4798
4881
  }
4799
4882
  );
4800
4883
  }
4801
- function BookingSummary({ heading, rows, footer, className }) {
4802
- var _a, _b;
4803
- return /* @__PURE__ */ jsxs("div", { className, style: { marginBottom: "24px" }, children: [
4804
- /* @__PURE__ */ jsx(
4805
- "p",
4806
- {
4807
- style: {
4808
- marginBottom: "12px",
4809
- fontWeight: 700,
4810
- color: emailTokens.foreground,
4811
- fontSize: "16px",
4812
- fontFamily: emailTokens.fontFamily
4813
- },
4814
- children: heading
4815
- }
4816
- ),
4817
- /* @__PURE__ */ jsx(
4818
- "div",
4819
- {
4820
- style: {
4821
- borderRadius: "12px",
4822
- border: `1px solid ${emailTokens.border}`,
4823
- overflow: "hidden"
4824
- },
4825
- children: /* @__PURE__ */ jsx(
4826
- "table",
4827
- {
4828
- style: {
4829
- width: "100%",
4830
- fontSize: "14px",
4831
- borderCollapse: "collapse"
4832
- },
4833
- children: /* @__PURE__ */ jsxs("tbody", { children: [
4834
- rows.map((row, i) => {
4835
- var _a2;
4836
- return /* @__PURE__ */ jsxs(
4837
- "tr",
4838
- {
4839
- style: i > 0 ? { borderTop: `1px solid ${emailTokens.border}` } : {},
4840
- children: [
4841
- /* @__PURE__ */ jsx(
4842
- "td",
4843
- {
4844
- style: {
4845
- padding: "10px 16px",
4846
- color: emailTokens.mutedForeground,
4847
- verticalAlign: "top"
4848
- },
4849
- children: row.label
4850
- }
4851
- ),
4852
- /* @__PURE__ */ jsx(
4853
- "td",
4854
- {
4855
- style: {
4856
- padding: "10px 16px",
4857
- textAlign: "right",
4858
- fontWeight: 500,
4859
- color: (_a2 = row.valueColor) != null ? _a2 : emailTokens.foreground,
4860
- whiteSpace: "nowrap"
4861
- },
4862
- children: row.value
4863
- }
4864
- )
4865
- ]
4866
- },
4867
- i
4868
- );
4869
- }),
4870
- footer && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx(
4871
- "td",
4872
- {
4873
- colSpan: 2,
4874
- style: {
4875
- padding: "12px 16px",
4876
- textAlign: "center",
4877
- fontWeight: (_a = footer.fontWeight) != null ? _a : 600,
4878
- color: (_b = footer.color) != null ? _b : emailTokens.foreground,
4879
- backgroundColor: footer.backgroundColor,
4880
- borderTop: `1px solid ${emailTokens.border}`
4881
- },
4882
- children: footer.text
4883
- }
4884
- ) })
4885
- ] })
4886
- }
4887
- )
4888
- }
4889
- )
4890
- ] });
4891
- }
4892
4884
  var DEFAULT_LABELS4 = {
4893
4885
  ctaButton: "Add travellers to your booking",
4894
4886
  logoAlt: "PlanetaEXO",