@planetaexo/design-system 0.30.0 → 0.31.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 CHANGED
@@ -4599,7 +4599,7 @@ var DEFAULT_LABELS3 = {
4599
4599
  footerContact: (agent) => `If you have any questions, just reply to this email or contact ${agent} \u2014 happy to help.`,
4600
4600
  closingMessage: "You can access your booking at any time through the link below."
4601
4601
  };
4602
- function BookingConfirmation({
4602
+ function BookingPaymentConfirmationEmail({
4603
4603
  recipientName,
4604
4604
  logoUrl,
4605
4605
  bookingReference,
@@ -4819,32 +4819,93 @@ function BookingConfirmation({
4819
4819
  }
4820
4820
  );
4821
4821
  }
4822
- function BookingSummary({ heading, rows, className }) {
4823
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: { marginBottom: "32px" }, children: [
4822
+ function BookingSummary({ heading, rows, footer, className }) {
4823
+ var _a, _b;
4824
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, style: { marginBottom: "24px" }, children: [
4824
4825
  /* @__PURE__ */ jsxRuntime.jsx(
4825
4826
  "p",
4826
4827
  {
4827
4828
  style: {
4828
- marginBottom: "16px",
4829
- fontWeight: "700",
4829
+ marginBottom: "12px",
4830
+ fontWeight: 700,
4830
4831
  color: emailTokens.foreground,
4832
+ fontSize: "16px",
4831
4833
  fontFamily: emailTokens.fontFamily
4832
4834
  },
4833
4835
  children: heading
4834
4836
  }
4835
4837
  ),
4836
4838
  /* @__PURE__ */ jsxRuntime.jsx(
4837
- "table",
4839
+ "div",
4838
4840
  {
4839
4841
  style: {
4840
- width: "100%",
4841
- fontSize: "14px",
4842
- borderCollapse: "collapse"
4842
+ borderRadius: "12px",
4843
+ border: `1px solid ${emailTokens.border}`,
4844
+ overflow: "hidden"
4843
4845
  },
4844
- children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: i > 0 ? { borderTop: `1px solid ${emailTokens.border}` } : {}, children: [
4845
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "4px 16px 4px 0", color: emailTokens.mutedForeground }, children: row.label }),
4846
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "4px 0", fontWeight: "500", color: emailTokens.foreground }, children: row.value })
4847
- ] }, i)) })
4846
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4847
+ "table",
4848
+ {
4849
+ style: {
4850
+ width: "100%",
4851
+ fontSize: "14px",
4852
+ borderCollapse: "collapse"
4853
+ },
4854
+ children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
4855
+ rows.map((row, i) => {
4856
+ var _a2;
4857
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4858
+ "tr",
4859
+ {
4860
+ style: i > 0 ? { borderTop: `1px solid ${emailTokens.border}` } : {},
4861
+ children: [
4862
+ /* @__PURE__ */ jsxRuntime.jsx(
4863
+ "td",
4864
+ {
4865
+ style: {
4866
+ padding: "10px 16px",
4867
+ color: emailTokens.mutedForeground,
4868
+ verticalAlign: "top"
4869
+ },
4870
+ children: row.label
4871
+ }
4872
+ ),
4873
+ /* @__PURE__ */ jsxRuntime.jsx(
4874
+ "td",
4875
+ {
4876
+ style: {
4877
+ padding: "10px 16px",
4878
+ textAlign: "right",
4879
+ fontWeight: 500,
4880
+ color: (_a2 = row.valueColor) != null ? _a2 : emailTokens.foreground,
4881
+ whiteSpace: "nowrap"
4882
+ },
4883
+ children: row.value
4884
+ }
4885
+ )
4886
+ ]
4887
+ },
4888
+ i
4889
+ );
4890
+ }),
4891
+ footer && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
4892
+ "td",
4893
+ {
4894
+ colSpan: 2,
4895
+ style: {
4896
+ padding: "12px 16px",
4897
+ textAlign: "center",
4898
+ fontWeight: (_a = footer.fontWeight) != null ? _a : 600,
4899
+ color: (_b = footer.color) != null ? _b : emailTokens.foreground,
4900
+ backgroundColor: footer.backgroundColor,
4901
+ borderTop: `1px solid ${emailTokens.border}`
4902
+ },
4903
+ children: footer.text
4904
+ }
4905
+ ) })
4906
+ ] })
4907
+ }
4908
+ )
4848
4909
  }
4849
4910
  )
4850
4911
  ] });
@@ -4855,7 +4916,7 @@ var DEFAULT_LABELS4 = {
4855
4916
  greeting: (recipientName) => `Hi ${recipientName},`,
4856
4917
  thankYouMessage: "Thank you for booking your adventure with PlanetaEXO \u2014 we\u2019re really looking forward to your adventure.",
4857
4918
  addTravellersInstruction: "To move forward, the first step is to add all travellers included in your booking. Once you do this, each person \u2014 including you \u2014 will receive an email with a link to complete their individual registration.",
4858
- summaryHeading: "\u{1F4DD} Here\u2019s a quick summary of your booking:",
4919
+ summaryHeading: "\u{1F4DD} Booking Summary",
4859
4920
  bookingNumberLabel: "Booking Number:",
4860
4921
  activityLabel: "Activity:",
4861
4922
  adventureLabel: "Adventure:",
@@ -4866,7 +4927,7 @@ var DEFAULT_LABELS4 = {
4866
4927
  closingMessage: "If you have any questions, just reply to this email \u2014 happy to help.",
4867
4928
  nextStepsHeading: "Next steps:"
4868
4929
  };
4869
- function BookingConfirmationEmail({
4930
+ function BookingCreatedEmail({
4870
4931
  recipientName,
4871
4932
  addTravellersUrl,
4872
4933
  logoUrl,
@@ -4896,7 +4957,7 @@ function BookingConfirmationEmail({
4896
4957
  };
4897
4958
  const AddTravellersCta = addTravellersUrl ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: addTravellersUrl, style: ctaStyle, children: l.ctaButton }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: ctaStyle, role: "presentation", children: l.ctaButton });
4898
4959
  const tableRows = [
4899
- { label: l.bookingNumberLabel, value: bookingNumber },
4960
+ { label: l.bookingNumberLabel, value: bookingNumber, valueColor: emailTokens.primary },
4900
4961
  ...activity && activity.trim().length > 0 ? [{ label: l.activityLabel, value: activity }] : [],
4901
4962
  { label: l.adventureLabel, value: adventure },
4902
4963
  { label: l.startingDateLabel, value: startingDate },
@@ -5047,12 +5108,12 @@ var DEFAULT_LABELS5 = {
5047
5108
  logoAlt: "PlanetaEXO",
5048
5109
  greeting: (n) => `Hi ${n},`,
5049
5110
  intermediateHello: "Hope you're doing well.",
5050
- bookingSummaryHeader: "Booking summary",
5051
- bookingNumberLabel: "Booking number",
5052
- adventuresCountLabel: (c) => `${c} adventure${c === 1 ? "" : "s"}`,
5053
- travellersCountLabel: (c) => `${c} traveller${c === 1 ? "" : "s"}`,
5111
+ bookingSummaryHeader: "\u{1F4DD} Booking Summary",
5112
+ bookingNumberLabel: "Booking Number",
5113
+ adventuresCountLabel: (c) => String(c),
5114
+ travellersCountLabel: (c) => String(c),
5054
5115
  adventuresRowLabel: "Adventures",
5055
- travellersRowLabel: "Total travellers",
5116
+ travellersRowLabel: "Total Travellers",
5056
5117
  agentRowLabel: "Agent",
5057
5118
  progressHeader: "Registration progress",
5058
5119
  startsLabel: "Starts",
@@ -5111,7 +5172,7 @@ var DEFAULT_LABELS5 = {
5111
5172
  contextNote: "Please ensure all pending registrations are completed as soon as possible.",
5112
5173
  importantNote: "Important: Registration is mandatory and required for participation in the adventure.",
5113
5174
  progressIntro: "Review your booking page to complete missing information:",
5114
- multiTravellerNote: "If your booking includes multiple travellers, please ensure every traveller completes their registration before departure.",
5175
+ multiTravellerNote: "",
5115
5176
  pleaseNoteHeader: "",
5116
5177
  pleaseNoteBullets: [],
5117
5178
  bookerCoordinationNote: "",
@@ -5126,7 +5187,7 @@ var DEFAULT_LABELS5 = {
5126
5187
  finalReminderTagline: "This is a final reminder.",
5127
5188
  importantNote: "Traveller registration is mandatory. Without completed registration forms, we may be unable to confirm logistics and travellers may not be allowed to board transfers, flights, boats, or participate in activities.",
5128
5189
  progressIntro: "Please complete all pending registrations immediately through your booking page:",
5129
- disregardIfCompleted: "If registrations have already been completed, please disregard this email.",
5190
+ disregardIfCompleted: "",
5130
5191
  closingThanks: "We look forward to welcoming you soon.",
5131
5192
  contextNote: "",
5132
5193
  pleaseNoteHeader: "",
@@ -5178,7 +5239,7 @@ function RegistrationReminderEmail({
5178
5239
  fontFamily: emailTokens.fontFamily
5179
5240
  };
5180
5241
  const summaryRows = [
5181
- { label: l.bookingNumberLabel, value: `#${bookingNumber}` },
5242
+ { label: l.bookingNumberLabel, value: bookingNumber, valueColor: emailTokens.primary },
5182
5243
  { label: l.adventuresRowLabel, value: l.adventuresCountLabel(totalAdventures) },
5183
5244
  { label: l.travellersRowLabel, value: l.travellersCountLabel(totalTravellers) },
5184
5245
  ...(agent == null ? void 0 : agent.name) ? [{ label: l.agentRowLabel, value: agent.name }] : []
@@ -5188,9 +5249,24 @@ function RegistrationReminderEmail({
5188
5249
  const showEarlyBenefit = hasText(v.earlyCompletionBenefit);
5189
5250
  const showImportant = hasText(v.importantNote);
5190
5251
  const showFinalTagline = hasText(v.finalReminderTagline);
5191
- const showMultiTraveller = hasText(v.multiTravellerNote);
5252
+ hasText(v.multiTravellerNote);
5192
5253
  const showDisregard = hasText(v.disregardIfCompleted);
5193
5254
  const showClosingThanks = hasText(v.closingThanks);
5255
+ const sectionDivider = /* @__PURE__ */ jsxRuntime.jsx(
5256
+ "hr",
5257
+ {
5258
+ style: {
5259
+ border: "none",
5260
+ borderTop: `1px solid ${emailTokens.border}`,
5261
+ marginTop: 0,
5262
+ marginBottom: "24px"
5263
+ }
5264
+ }
5265
+ );
5266
+ const hasIntroBlock = hasText(v.intro) || hasText(v.contextNote);
5267
+ const hasPleaseNote = showPleaseNote;
5268
+ const hasD7Highlight = showImportant && slug === "d_minus_7";
5269
+ const hasD2Highlight = showFinalTagline || showImportant && slug === "d_minus_2";
5194
5270
  return /* @__PURE__ */ jsxRuntime.jsxs(
5195
5271
  "div",
5196
5272
  {
@@ -5214,45 +5290,18 @@ function RegistrationReminderEmail({
5214
5290
  hasText(l.intermediateHello) && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: l.intermediateHello }),
5215
5291
  hasText(v.intro) && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: v.intro }),
5216
5292
  hasText(v.contextNote) && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: v.contextNote }),
5217
- showPleaseNote && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: "24px" }, children: [
5218
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "8px", fontWeight: 700, color: emailTokens.foreground }, children: v.pleaseNoteHeader }),
5219
- /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { paddingLeft: "20px", margin: 0 }, children: v.pleaseNoteBullets.map((b, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: "6px", color: emailTokens.bodyText }, children: b }, i)) })
5220
- ] }),
5221
- showBookerCoord && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: v.bookerCoordinationNote }),
5222
- /* @__PURE__ */ jsxRuntime.jsx(
5223
- "hr",
5224
- {
5225
- style: {
5226
- border: "none",
5227
- borderTop: `1px solid ${emailTokens.border}`,
5228
- marginBottom: "24px"
5229
- }
5230
- }
5231
- ),
5232
- /* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.bookingSummaryHeader, rows: summaryRows }),
5233
- showImportant && slug === "d_minus_7" && /* @__PURE__ */ jsxRuntime.jsx(
5234
- "p",
5235
- {
5236
- style: {
5237
- marginBottom: "20px",
5238
- padding: "12px 16px",
5239
- borderRadius: "8px",
5240
- backgroundColor: "#fef3c7",
5241
- color: "#78350f",
5242
- fontWeight: 600
5243
- },
5244
- children: v.importantNote
5245
- }
5246
- ),
5293
+ hasIntroBlock && sectionDivider,
5294
+ slug === "d_minus_30" && /* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.bookingSummaryHeader, rows: summaryRows }),
5295
+ slug === "d_minus_15" && showBookerCoord && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: v.bookerCoordinationNote }),
5247
5296
  hasItems(adventures) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5248
5297
  /* @__PURE__ */ jsxRuntime.jsx(
5249
5298
  "p",
5250
5299
  {
5251
5300
  style: {
5252
- marginTop: "8px",
5301
+ marginTop: 0,
5253
5302
  marginBottom: "12px",
5254
5303
  fontWeight: 700,
5255
- fontSize: "15px",
5304
+ fontSize: "16px",
5256
5305
  color: emailTokens.foreground
5257
5306
  },
5258
5307
  children: l.progressHeader
@@ -5318,8 +5367,8 @@ function RegistrationReminderEmail({
5318
5367
  `${adv.name}-${i}`
5319
5368
  ))
5320
5369
  ] }),
5321
- showEarlyBenefit && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", color: emailTokens.bodyText }, children: v.earlyCompletionBenefit }),
5322
- (showFinalTagline || showImportant && slug === "d_minus_2") && /* @__PURE__ */ jsxRuntime.jsxs(
5370
+ slug === "d_minus_15" && showEarlyBenefit && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", color: emailTokens.bodyText }, children: v.earlyCompletionBenefit }),
5371
+ slug === "d_minus_2" && hasD2Highlight && /* @__PURE__ */ jsxRuntime.jsxs(
5323
5372
  "div",
5324
5373
  {
5325
5374
  style: {
@@ -5332,12 +5381,47 @@ function RegistrationReminderEmail({
5332
5381
  },
5333
5382
  children: [
5334
5383
  showFinalTagline && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, marginBottom: showImportant ? "8px" : 0, fontWeight: 700 }, children: v.finalReminderTagline }),
5335
- showImportant && slug === "d_minus_2" && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0 }, children: v.importantNote })
5384
+ showImportant && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0 }, children: v.importantNote })
5336
5385
  ]
5337
5386
  }
5338
5387
  ),
5339
- showMultiTraveller && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", color: emailTokens.bodyText }, children: v.multiTravellerNote }),
5340
5388
  /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "24px", textAlign: "left" }, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: ctaUrl, style: ctaStyle, children: l.ctaLabel }) }),
5389
+ slug === "d_minus_7" && hasD7Highlight && /* @__PURE__ */ jsxRuntime.jsx(
5390
+ "p",
5391
+ {
5392
+ style: {
5393
+ marginBottom: "20px",
5394
+ padding: "12px 16px",
5395
+ borderRadius: "8px",
5396
+ backgroundColor: "#fef3c7",
5397
+ color: "#78350f",
5398
+ fontWeight: 600
5399
+ },
5400
+ children: v.importantNote
5401
+ }
5402
+ ),
5403
+ slug !== "d_minus_30" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5404
+ sectionDivider,
5405
+ /* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.bookingSummaryHeader, rows: summaryRows })
5406
+ ] }),
5407
+ hasPleaseNote && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5408
+ sectionDivider,
5409
+ /* @__PURE__ */ jsxRuntime.jsx(
5410
+ "p",
5411
+ {
5412
+ style: {
5413
+ marginTop: 0,
5414
+ marginBottom: "12px",
5415
+ fontWeight: 700,
5416
+ fontSize: "16px",
5417
+ color: emailTokens.foreground
5418
+ },
5419
+ children: v.pleaseNoteHeader
5420
+ }
5421
+ ),
5422
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { paddingLeft: "20px", margin: 0, marginBottom: "24px" }, children: v.pleaseNoteBullets.map((b, i) => /* @__PURE__ */ jsxRuntime.jsx("li", { style: { marginBottom: "6px", color: emailTokens.bodyText }, children: b }, i)) })
5423
+ ] }),
5424
+ sectionDivider,
5341
5425
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", fontSize: "14px", fontWeight: 700, color: emailTokens.bodyText }, children: (agent == null ? void 0 : agent.name) ? l.closingAgent(agent.name, {
5342
5426
  whatsappUrl: agent.whatsappUrl,
5343
5427
  email: agent.email
@@ -5456,37 +5540,16 @@ function PaymentReceiptEmail({
5456
5540
  ] }) })
5457
5541
  }
5458
5542
  ),
5459
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "12px", fontWeight: 700, color: emailTokens.foreground, fontSize: "16px" }, children: l.summaryHeading }),
5460
5543
  /* @__PURE__ */ jsxRuntime.jsx(
5461
- "div",
5544
+ BookingSummary,
5462
5545
  {
5463
- style: {
5464
- borderRadius: "12px",
5465
- border: `1px solid ${emailTokens.border}`,
5466
- overflow: "hidden",
5467
- marginBottom: "24px"
5468
- },
5469
- children: /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", fontSize: "14px", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
5470
- summaryRows.map((row, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: i > 0 ? { borderTop: `1px solid ${emailTokens.border}` } : {}, children: [
5471
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground, verticalAlign: "top" }, children: row.label }),
5472
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: 500, color: emailTokens.foreground, whiteSpace: "nowrap" }, children: row.value })
5473
- ] }, i)),
5474
- isPaidInFull && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
5475
- "td",
5476
- {
5477
- colSpan: 2,
5478
- style: {
5479
- padding: "12px 16px",
5480
- textAlign: "center",
5481
- fontWeight: 600,
5482
- color: emailTokens.green,
5483
- backgroundColor: emailTokens.greenBg,
5484
- borderTop: `1px solid ${emailTokens.border}`
5485
- },
5486
- children: l.paidInFullMessage
5487
- }
5488
- ) })
5489
- ] }) })
5546
+ heading: l.summaryHeading,
5547
+ rows: summaryRows,
5548
+ footer: isPaidInFull ? {
5549
+ text: l.paidInFullMessage,
5550
+ color: emailTokens.green,
5551
+ backgroundColor: emailTokens.greenBg
5552
+ } : void 0
5490
5553
  }
5491
5554
  ),
5492
5555
  /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: l.closingMessage }),
@@ -5738,6 +5801,17 @@ function PaymentReminderEmail({
5738
5801
  ]
5739
5802
  }
5740
5803
  ) }),
5804
+ /* @__PURE__ */ jsxRuntime.jsx(
5805
+ "hr",
5806
+ {
5807
+ style: {
5808
+ border: "none",
5809
+ borderTop: `1px solid ${emailTokens.border}`,
5810
+ marginTop: 0,
5811
+ marginBottom: "24px"
5812
+ }
5813
+ }
5814
+ ),
5741
5815
  showDisregard && /* @__PURE__ */ jsxRuntime.jsx(
5742
5816
  "p",
5743
5817
  {
@@ -11705,12 +11779,12 @@ exports.AgentContactCard = AgentContactCard;
11705
11779
  exports.Alert = Alert;
11706
11780
  exports.BirthDateField = BirthDateField;
11707
11781
  exports.BookingAdventureCard = BookingAdventureCard;
11708
- exports.BookingConfirmation = BookingConfirmation;
11709
- exports.BookingConfirmationEmail = BookingConfirmationEmail;
11710
11782
  exports.BookingConfirmedCard = BookingConfirmedCard;
11783
+ exports.BookingCreatedEmail = BookingCreatedEmail;
11711
11784
  exports.BookingDetails = BookingDetails;
11712
11785
  exports.BookingForm = BookingForm;
11713
11786
  exports.BookingOtpEmail = BookingOtpEmail;
11787
+ exports.BookingPaymentConfirmationEmail = BookingPaymentConfirmationEmail;
11714
11788
  exports.BookingShell = BookingShell;
11715
11789
  exports.BookingSummary = BookingSummary;
11716
11790
  exports.Button = Button;