@planetaexo/design-system 0.23.3 → 0.24.3

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
@@ -4430,6 +4430,245 @@ function PaymentReceiptEmail({
4430
4430
  }
4431
4431
  );
4432
4432
  }
4433
+ var EMPTY_AGENT_FN = (_agentName) => "";
4434
+ var DEFAULT_LABELS4 = {
4435
+ logoAlt: "PlanetaEXO",
4436
+ greeting: (name) => `Hi ${name},`,
4437
+ intermediateHello: "Hope you're doing well.",
4438
+ bookingSummaryHeader: "Booking summary",
4439
+ amountAlreadyPaidLabel: "Amount already paid",
4440
+ remainingBalanceDueLabel: "Remaining balance due",
4441
+ totalBookingAmountLabel: "Total booking amount",
4442
+ ctaLabel: "Complete Payment",
4443
+ teamSignature: "The PlanetaEXO Team",
4444
+ closingAgent: (agentName) => `If you need any assistance or would like to discuss your payment, feel free to contact your agent ${agentName} via WhatsApp or email.`,
4445
+ closingNoAgent: "If you need any assistance or would like to discuss your payment, feel free to contact us via WhatsApp or email.",
4446
+ variants: {
4447
+ dMinus1: {
4448
+ intro: (b, d) => `This is a friendly reminder that the remaining balance for your booking #${b} with PlanetaEXO is due tomorrow (${d}).`,
4449
+ secureLine: "To secure your booking, please complete the payment through your booking page using the button below:",
4450
+ closingThanks: "Many thanks, and we look forward to helping you experience your next adventure with us.",
4451
+ disregardIfPaid: "",
4452
+ closingAlternative: EMPTY_AGENT_FN
4453
+ },
4454
+ dZero: {
4455
+ intro: (b, d) => `This is a friendly reminder that the remaining balance for your booking #${b} with PlanetaEXO is due today (${d}).`,
4456
+ secureLine: "To keep your booking confirmed, please complete the payment through your booking page using the button below:",
4457
+ closingThanks: "Many thanks, and we look forward to welcoming you soon.",
4458
+ disregardIfPaid: "",
4459
+ closingAlternative: EMPTY_AGENT_FN
4460
+ },
4461
+ dPlus1: {
4462
+ intro: (b, d) => `We noticed that the remaining balance for your booking #${b} with PlanetaEXO was due yesterday (${d}) and is still pending.`,
4463
+ secureLine: "To avoid any impact on your booking confirmation, we kindly ask you to complete the payment as soon as possible through your booking page:",
4464
+ closingThanks: "Thank you, and we hope to welcome you on your upcoming adventure soon.",
4465
+ disregardIfPaid: "If you have already completed the payment, please disregard this message.",
4466
+ closingAlternative: EMPTY_AGENT_FN
4467
+ },
4468
+ dPlus2: {
4469
+ intro: (b, d) => `This is a final reminder regarding the remaining balance for your booking #${b} with PlanetaEXO, which was due on ${d} and is still pending.`,
4470
+ secureLine: "To avoid any impact on your booking status or availability, we kindly ask you to complete the payment as soon as possible through your booking page:",
4471
+ closingThanks: "Thank you for your attention, and we hope to welcome you on this adventure soon.",
4472
+ disregardIfPaid: "If you have already completed the payment, please disregard this message.",
4473
+ closingAlternative: (agentName) => `If you are experiencing any issues with payment or need additional time, please contact your agent ${agentName} via WhatsApp or email. We'll be happy to assist.`
4474
+ }
4475
+ }
4476
+ };
4477
+ function PaymentReminderEmail({
4478
+ variant,
4479
+ recipientName,
4480
+ bookingNumber,
4481
+ balanceDueDate,
4482
+ adventures,
4483
+ amountAlreadyPaid,
4484
+ remainingBalanceDue,
4485
+ totalBookingAmount,
4486
+ viewBookingUrl,
4487
+ agentName,
4488
+ logoUrl,
4489
+ labels,
4490
+ className
4491
+ }) {
4492
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
4493
+ const lOverride = labels != null ? labels : {};
4494
+ const variantDefaults = DEFAULT_LABELS4.variants[variant];
4495
+ const variantOverride = (_b = (_a = lOverride.variants) == null ? void 0 : _a[variant]) != null ? _b : {};
4496
+ const variantLabels = {
4497
+ intro: (_c = variantOverride.intro) != null ? _c : variantDefaults.intro,
4498
+ secureLine: (_d = variantOverride.secureLine) != null ? _d : variantDefaults.secureLine,
4499
+ closingThanks: (_e = variantOverride.closingThanks) != null ? _e : variantDefaults.closingThanks,
4500
+ disregardIfPaid: variantOverride.disregardIfPaid !== void 0 ? variantOverride.disregardIfPaid : variantDefaults.disregardIfPaid,
4501
+ closingAlternative: (_f = variantOverride.closingAlternative) != null ? _f : variantDefaults.closingAlternative
4502
+ };
4503
+ const l = {
4504
+ logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS4.logoAlt,
4505
+ greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS4.greeting,
4506
+ intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS4.intermediateHello,
4507
+ bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS4.bookingSummaryHeader,
4508
+ amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS4.amountAlreadyPaidLabel,
4509
+ remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS4.remainingBalanceDueLabel,
4510
+ totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS4.totalBookingAmountLabel,
4511
+ ctaLabel: (_n = lOverride.ctaLabel) != null ? _n : DEFAULT_LABELS4.ctaLabel,
4512
+ teamSignature: (_o = lOverride.teamSignature) != null ? _o : DEFAULT_LABELS4.teamSignature,
4513
+ closingAgent: (_p = lOverride.closingAgent) != null ? _p : DEFAULT_LABELS4.closingAgent,
4514
+ closingNoAgent: (_q = lOverride.closingNoAgent) != null ? _q : DEFAULT_LABELS4.closingNoAgent
4515
+ };
4516
+ const ctaStyle = {
4517
+ display: "inline-block",
4518
+ backgroundColor: emailTokens.primary,
4519
+ color: emailTokens.primaryForeground,
4520
+ padding: "12px 24px",
4521
+ borderRadius: "8px",
4522
+ fontSize: "14px",
4523
+ fontWeight: 700,
4524
+ textDecoration: "none",
4525
+ fontFamily: emailTokens.fontFamily
4526
+ };
4527
+ const summaryRowStyle = {
4528
+ margin: "0 0 8px",
4529
+ fontSize: "14px",
4530
+ color: emailTokens.foreground
4531
+ };
4532
+ const agentNameTrimmed = agentName == null ? void 0 : agentName.trim();
4533
+ const closingMain = agentNameTrimmed ? l.closingAgent(agentNameTrimmed) : l.closingNoAgent;
4534
+ const showDisregard = typeof variantLabels.disregardIfPaid === "string" && variantLabels.disregardIfPaid.trim().length > 0;
4535
+ const closingAlternativeText = agentNameTrimmed && variantLabels.closingAlternative ? variantLabels.closingAlternative(agentNameTrimmed) : "";
4536
+ const showClosingAlternative = closingAlternativeText.trim().length > 0;
4537
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4538
+ "div",
4539
+ {
4540
+ style: {
4541
+ maxWidth: "576px",
4542
+ margin: "0 auto",
4543
+ backgroundColor: emailTokens.white,
4544
+ color: emailTokens.foreground,
4545
+ fontFamily: emailTokens.fontFamily,
4546
+ fontSize: "16px",
4547
+ lineHeight: "1.6",
4548
+ border: `1px solid ${emailTokens.border}`,
4549
+ borderRadius: "12px",
4550
+ overflow: "hidden",
4551
+ padding: "32px"
4552
+ },
4553
+ className,
4554
+ children: [
4555
+ /* @__PURE__ */ jsxRuntime.jsx(EmailLogo, { src: logoUrl, alt: l.logoAlt }),
4556
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: l.greeting(recipientName) }),
4557
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: l.intermediateHello }),
4558
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "12px" }, children: variantLabels.intro(bookingNumber, balanceDueDate) }),
4559
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "24px" }, children: variantLabels.secureLine }),
4560
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "32px", textAlign: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: viewBookingUrl, style: ctaStyle, children: l.ctaLabel }) }),
4561
+ /* @__PURE__ */ jsxRuntime.jsx(
4562
+ "hr",
4563
+ {
4564
+ style: {
4565
+ border: "none",
4566
+ borderTop: `1px solid ${emailTokens.border}`,
4567
+ marginBottom: "24px"
4568
+ }
4569
+ }
4570
+ ),
4571
+ /* @__PURE__ */ jsxRuntime.jsx(
4572
+ "p",
4573
+ {
4574
+ style: {
4575
+ marginBottom: "16px",
4576
+ fontWeight: 700,
4577
+ color: emailTokens.foreground,
4578
+ fontSize: "16px"
4579
+ },
4580
+ children: l.bookingSummaryHeader
4581
+ }
4582
+ ),
4583
+ adventures.map((adv, advIdx) => /* @__PURE__ */ jsxRuntime.jsxs(
4584
+ "div",
4585
+ {
4586
+ style: {
4587
+ marginBottom: "20px",
4588
+ paddingBottom: "16px",
4589
+ borderBottom: advIdx < adventures.length - 1 ? `1px solid ${emailTokens.border}` : "none"
4590
+ },
4591
+ children: [
4592
+ /* @__PURE__ */ jsxRuntime.jsx(
4593
+ "p",
4594
+ {
4595
+ style: {
4596
+ margin: "0 0 8px",
4597
+ fontSize: "15px",
4598
+ fontWeight: 600,
4599
+ color: emailTokens.foreground
4600
+ },
4601
+ children: adv.name
4602
+ }
4603
+ ),
4604
+ adv.lineItems.map((li, liIdx) => /* @__PURE__ */ jsxRuntime.jsxs("p", { style: summaryRowStyle, children: [
4605
+ li.unitPrice,
4606
+ " \xD7 ",
4607
+ li.quantity,
4608
+ " ",
4609
+ li.categoryLabel,
4610
+ " =",
4611
+ " ",
4612
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { children: li.subtotal })
4613
+ ] }, liIdx))
4614
+ ]
4615
+ },
4616
+ advIdx
4617
+ )),
4618
+ /* @__PURE__ */ jsxRuntime.jsx(
4619
+ "hr",
4620
+ {
4621
+ style: {
4622
+ border: "none",
4623
+ borderTop: `1px solid ${emailTokens.border}`,
4624
+ marginBottom: "16px"
4625
+ }
4626
+ }
4627
+ ),
4628
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: summaryRowStyle, children: [
4629
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
4630
+ l.amountAlreadyPaidLabel,
4631
+ ":"
4632
+ ] }),
4633
+ " ",
4634
+ amountAlreadyPaid
4635
+ ] }),
4636
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: summaryRowStyle, children: [
4637
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
4638
+ l.remainingBalanceDueLabel,
4639
+ ":"
4640
+ ] }),
4641
+ " ",
4642
+ remainingBalanceDue
4643
+ ] }),
4644
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: __spreadProps(__spreadValues({}, summaryRowStyle), { marginBottom: "24px" }), children: [
4645
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
4646
+ l.totalBookingAmountLabel,
4647
+ ":"
4648
+ ] }),
4649
+ " ",
4650
+ totalBookingAmount
4651
+ ] }),
4652
+ showDisregard && /* @__PURE__ */ jsxRuntime.jsx(
4653
+ "p",
4654
+ {
4655
+ style: {
4656
+ marginBottom: "16px",
4657
+ fontSize: "14px",
4658
+ color: emailTokens.mutedForeground,
4659
+ fontStyle: "italic"
4660
+ },
4661
+ children: variantLabels.disregardIfPaid
4662
+ }
4663
+ ),
4664
+ showClosingAlternative && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: closingAlternativeText }),
4665
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: closingMain }),
4666
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", fontSize: "14px", color: emailTokens.bodyText }, children: variantLabels.closingThanks }),
4667
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: 0, fontSize: "14px", color: emailTokens.bodyText }, children: l.teamSignature })
4668
+ ]
4669
+ }
4670
+ );
4671
+ }
4433
4672
  function BookingOtpEmail({
4434
4673
  greeting,
4435
4674
  intro,
@@ -5110,7 +5349,7 @@ function BookingForm({
5110
5349
  }
5111
5350
  );
5112
5351
  }
5113
- var DEFAULT_LABELS4 = {
5352
+ var DEFAULT_LABELS5 = {
5114
5353
  formSubtitle: "To confirm your participation, please complete this short form. It's required for all travellers and helps us coordinate logistics with our local partners and tailor the experience to you.",
5115
5354
  detailsSectionTitle: "Your details",
5116
5355
  tripInfoSectionTitle: "Trip info",
@@ -5775,7 +6014,7 @@ function RegistrationForm({
5775
6014
  }) {
5776
6015
  var _a;
5777
6016
  const L = React25__namespace.useMemo(
5778
- () => __spreadValues(__spreadValues({}, DEFAULT_LABELS4), labels != null ? labels : {}),
6017
+ () => __spreadValues(__spreadValues({}, DEFAULT_LABELS5), labels != null ? labels : {}),
5779
6018
  [labels]
5780
6019
  );
5781
6020
  const sortedFields = React25__namespace.useMemo(
@@ -7559,16 +7798,13 @@ function ItineraryDay({
7559
7798
  specs && specs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-3 sm:gap-2.5", children: specs.map((spec, i) => /* @__PURE__ */ jsxRuntime.jsxs(
7560
7799
  "li",
7561
7800
  {
7562
- className: "flex items-start gap-3 text-base text-foreground font-ui",
7801
+ className: "flex flex-col text-base text-foreground font-ui",
7563
7802
  children: [
7564
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true, children: spec.icon }),
7565
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
7566
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
7567
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
7568
- spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
7569
- ] }),
7570
- spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
7571
- ] })
7803
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
7804
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
7805
+ spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
7806
+ ] }),
7807
+ spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
7572
7808
  ]
7573
7809
  },
7574
7810
  i
@@ -9271,10 +9507,7 @@ function TripPage({
9271
9507
  ] })
9272
9508
  ] }),
9273
9509
  itineraryDays && itineraryDays.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-itinerary", className: "scroll-mt-20", children: [
9274
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-xl font-bold text-foreground font-heading mb-6 flex items-center gap-2", children: [
9275
- (sectionIcons == null ? void 0 : sectionIcons.itinerary) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.itinerary }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClockIcon, { className: "h-5 w-5 text-primary" }),
9276
- "Itinerary"
9277
- ] }),
9510
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "Itinerary" }),
9278
9511
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-12", children: itineraryDays.map((day) => /* @__PURE__ */ jsxRuntime.jsx(
9279
9512
  ItineraryDay,
9280
9513
  __spreadProps(__spreadValues({}, day), {
@@ -9283,10 +9516,7 @@ function TripPage({
9283
9516
  day.dayNumber
9284
9517
  )) })
9285
9518
  ] }) : itinerary && itinerary.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-itinerary", className: "scroll-mt-20", children: [
9286
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-xl font-bold text-foreground font-heading mb-6 flex items-center gap-2", children: [
9287
- (sectionIcons == null ? void 0 : sectionIcons.itinerary) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.itinerary }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClockIcon, { className: "h-5 w-5 text-primary" }),
9288
- "Itinerary"
9289
- ] }),
9519
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "Itinerary" }),
9290
9520
  /* @__PURE__ */ jsxRuntime.jsx(ItineraryTimeline, { steps: itinerary })
9291
9521
  ] }),
9292
9522
  included && included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-included", className: "scroll-mt-20", children: [
@@ -10422,6 +10652,7 @@ exports.PaymentAmountSelector = PaymentAmountSelector;
10422
10652
  exports.PaymentMethodSelector = PaymentMethodSelector;
10423
10653
  exports.PaymentModalShell = PaymentModalShell;
10424
10654
  exports.PaymentReceiptEmail = PaymentReceiptEmail;
10655
+ exports.PaymentReminderEmail = PaymentReminderEmail;
10425
10656
  exports.PhoneCountrySelect = PhoneCountrySelect;
10426
10657
  exports.PhotoGallery = PhotoGallery;
10427
10658
  exports.PricingTrip = PricingTrip;