@planetaexo/design-system 0.37.6 → 0.38.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
@@ -5804,7 +5804,180 @@ function RegistrationReminderIndividualEmail({
5804
5804
  }
5805
5805
  );
5806
5806
  }
5807
+ var INLINE_LINK_STYLE3 = {
5808
+ color: emailTokens.primary,
5809
+ textDecoration: "underline"
5810
+ };
5811
+ function renderWhatsappLink3(contact, label) {
5812
+ if (contact.whatsappUrl) {
5813
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE3, children: label });
5814
+ }
5815
+ return label;
5816
+ }
5817
+ function renderEmailLink3(contact, label) {
5818
+ if (contact.email) {
5819
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE3, children: label });
5820
+ }
5821
+ return label;
5822
+ }
5807
5823
  var DEFAULT_LABELS7 = {
5824
+ logoAlt: "PlanetaEXO",
5825
+ greeting: (n) => `Hi ${n},`,
5826
+ introAllDone: (adv, dr) => `All travellers for ${adv} (${dr}) have completed their registration. Their consolidated registration details are attached, and below you'll find what they're most looking forward to.`,
5827
+ introD7: (adv, dr) => `Your upcoming adventure ${adv} (${dr}) starts in one week. All travellers have completed their registration \u2014 their consolidated details are attached.`,
5828
+ travellersCountLine: (n) => `${n} traveller${n === 1 ? "" : "s"} registered.`,
5829
+ tripDetailsHeader: "\u{1F4CB} Trip details",
5830
+ bookingNumberLabel: "Booking Number",
5831
+ adventureLabel: "Adventure",
5832
+ datesLabel: "Dates",
5833
+ partnerLabel: "Partner",
5834
+ expectationsHeading: "Travellers Expectations",
5835
+ expectationsEmptyNote: "No expectations were collected for this adventure.",
5836
+ expectationsEmptyAnswer: "\u2014",
5837
+ pdfNote: "The consolidated registration PDF is attached to this email.",
5838
+ closingAgent: (agentName, contact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5839
+ "If you have any questions, your contact ",
5840
+ agentName,
5841
+ " is available via",
5842
+ " ",
5843
+ renderWhatsappLink3(contact, "WhatsApp"),
5844
+ " or ",
5845
+ renderEmailLink3(contact, "email"),
5846
+ "."
5847
+ ] }),
5848
+ closingNoAgent: "If you have any questions, our team is available via WhatsApp or email.",
5849
+ teamSignature: "The PlanetaEXO Team"
5850
+ };
5851
+ function hasText3(s) {
5852
+ return typeof s === "string" && s.trim().length > 0;
5853
+ }
5854
+ function PartnerConfirmationEmail({
5855
+ scenario,
5856
+ partnerName,
5857
+ bookingNumber,
5858
+ adventureName,
5859
+ dateRange,
5860
+ travellersCount,
5861
+ expectations,
5862
+ pdfAttached,
5863
+ agent,
5864
+ logoUrl,
5865
+ labels,
5866
+ className
5867
+ }) {
5868
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS7), labels);
5869
+ const tripRows = [
5870
+ { label: l.bookingNumberLabel, value: `#${bookingNumber}`, valueColor: emailTokens.primary },
5871
+ { label: l.adventureLabel, value: adventureName },
5872
+ { label: l.datesLabel, value: dateRange },
5873
+ { label: l.partnerLabel, value: partnerName }
5874
+ ];
5875
+ const sectionDivider = /* @__PURE__ */ jsxRuntime.jsx(
5876
+ "hr",
5877
+ {
5878
+ style: {
5879
+ border: "none",
5880
+ borderTop: `1px solid ${emailTokens.border}`,
5881
+ marginTop: 0,
5882
+ marginBottom: "24px"
5883
+ }
5884
+ }
5885
+ );
5886
+ const introText = scenario === "all_done" ? l.introAllDone(adventureName, dateRange) : l.introD7(adventureName, dateRange);
5887
+ const showExpectationsRows = expectations.hasSection && expectations.rows.length > 0;
5888
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5889
+ "div",
5890
+ {
5891
+ style: {
5892
+ maxWidth: "576px",
5893
+ margin: "0 auto",
5894
+ backgroundColor: emailTokens.white,
5895
+ color: emailTokens.foreground,
5896
+ fontFamily: emailTokens.fontFamily,
5897
+ fontSize: "16px",
5898
+ lineHeight: "1.6",
5899
+ border: `1px solid ${emailTokens.border}`,
5900
+ borderRadius: "12px",
5901
+ overflow: "hidden",
5902
+ padding: "32px"
5903
+ },
5904
+ className,
5905
+ children: [
5906
+ /* @__PURE__ */ jsxRuntime.jsx(EmailLogo, { src: logoUrl, alt: l.logoAlt }),
5907
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: l.greeting(partnerName) }),
5908
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: introText }),
5909
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "24px", fontWeight: 600 }, children: l.travellersCountLine(travellersCount) }),
5910
+ sectionDivider,
5911
+ /* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.tripDetailsHeader, rows: tripRows }),
5912
+ /* @__PURE__ */ jsxRuntime.jsx(
5913
+ "p",
5914
+ {
5915
+ style: {
5916
+ marginTop: 0,
5917
+ marginBottom: "16px",
5918
+ paddingBottom: "8px",
5919
+ borderBottom: `2px solid ${emailTokens.primary}`,
5920
+ fontWeight: 700,
5921
+ fontSize: "18px",
5922
+ color: emailTokens.foreground,
5923
+ fontFamily: emailTokens.fontFamily
5924
+ },
5925
+ children: l.expectationsHeading
5926
+ }
5927
+ ),
5928
+ showExpectationsRows ? /* @__PURE__ */ jsxRuntime.jsx(
5929
+ "table",
5930
+ {
5931
+ role: "presentation",
5932
+ style: {
5933
+ width: "100%",
5934
+ borderCollapse: "collapse",
5935
+ fontSize: "14px",
5936
+ marginBottom: "24px"
5937
+ },
5938
+ children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: expectations.rows.map((row, i) => {
5939
+ var _a;
5940
+ return /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
5941
+ /* @__PURE__ */ jsxRuntime.jsx(
5942
+ "td",
5943
+ {
5944
+ style: {
5945
+ width: "35%",
5946
+ padding: "10px 12px 10px 0",
5947
+ fontWeight: 600,
5948
+ color: emailTokens.foreground,
5949
+ verticalAlign: "top"
5950
+ },
5951
+ children: row.travellerName
5952
+ }
5953
+ ),
5954
+ /* @__PURE__ */ jsxRuntime.jsx(
5955
+ "td",
5956
+ {
5957
+ style: {
5958
+ padding: "10px 0",
5959
+ color: emailTokens.bodyText,
5960
+ verticalAlign: "top"
5961
+ },
5962
+ children: (_a = row.answer) != null ? _a : l.expectationsEmptyAnswer
5963
+ }
5964
+ )
5965
+ ] }, i);
5966
+ }) })
5967
+ }
5968
+ ) : /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: "24px", color: emailTokens.bodyText }, children: l.expectationsEmptyNote }),
5969
+ pdfAttached && hasText3(l.pdfNote) && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px", color: emailTokens.bodyText }, children: l.pdfNote }),
5970
+ sectionDivider,
5971
+ /* @__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, {
5972
+ whatsappUrl: agent.whatsappUrl,
5973
+ email: agent.email
5974
+ }) : l.closingNoAgent }),
5975
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: 0, fontSize: "14px", color: emailTokens.bodyText }, children: l.teamSignature })
5976
+ ]
5977
+ }
5978
+ );
5979
+ }
5980
+ var DEFAULT_LABELS8 = {
5808
5981
  logoAlt: "PlanetaEXO",
5809
5982
  greeting: (name) => `Hi ${name},`,
5810
5983
  receiptHeading: "Payment receipt",
@@ -5843,7 +6016,7 @@ function PaymentReceiptEmail({
5843
6016
  labels,
5844
6017
  className
5845
6018
  }) {
5846
- const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS7), labels);
6019
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS8), labels);
5847
6020
  const travellersLine = travellers.filter((s) => s.trim().length > 0).join(", ");
5848
6021
  const interestRow = chargedAmount && chargedAmount !== amount;
5849
6022
  const receiptRows = [
@@ -5918,24 +6091,24 @@ function PaymentReceiptEmail({
5918
6091
  }
5919
6092
  );
5920
6093
  }
5921
- var INLINE_LINK_STYLE3 = {
6094
+ var INLINE_LINK_STYLE4 = {
5922
6095
  color: emailTokens.primary,
5923
6096
  textDecoration: "underline"
5924
6097
  };
5925
- function renderWhatsappLink3(contact, label) {
6098
+ function renderWhatsappLink4(contact, label) {
5926
6099
  if (contact.whatsappUrl) {
5927
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE3, children: label });
6100
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE4, children: label });
5928
6101
  }
5929
6102
  return label;
5930
6103
  }
5931
- function renderEmailLink3(contact, label) {
6104
+ function renderEmailLink4(contact, label) {
5932
6105
  if (contact.email) {
5933
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE3, children: label });
6106
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE4, children: label });
5934
6107
  }
5935
6108
  return label;
5936
6109
  }
5937
6110
  var EMPTY_CLOSING_ALTERNATIVE = (_agentName, _contact) => null;
5938
- var DEFAULT_LABELS8 = {
6111
+ var DEFAULT_LABELS9 = {
5939
6112
  logoAlt: "PlanetaEXO",
5940
6113
  greeting: (name) => `Hi ${name},`,
5941
6114
  intermediateHello: "Hope you're doing well.",
@@ -5950,9 +6123,9 @@ var DEFAULT_LABELS8 = {
5950
6123
  "If you need any assistance or would like to discuss your payment, feel free to contact your agent ",
5951
6124
  agentName,
5952
6125
  " via ",
5953
- renderWhatsappLink3(contact, "WhatsApp"),
6126
+ renderWhatsappLink4(contact, "WhatsApp"),
5954
6127
  " or ",
5955
- renderEmailLink3(contact, "email"),
6128
+ renderEmailLink4(contact, "email"),
5956
6129
  "."
5957
6130
  ] }),
5958
6131
  closingNoAgent: "If you need any assistance or would like to discuss your payment, feel free to contact us via WhatsApp or email.",
@@ -5996,9 +6169,9 @@ var DEFAULT_LABELS8 = {
5996
6169
  "If you are experiencing any issues with payment or need additional time, please contact your agent ",
5997
6170
  agentName,
5998
6171
  " via ",
5999
- renderWhatsappLink3(contact, "WhatsApp"),
6172
+ renderWhatsappLink4(contact, "WhatsApp"),
6000
6173
  " or ",
6001
- renderEmailLink3(contact, "email"),
6174
+ renderEmailLink4(contact, "email"),
6002
6175
  ". We'll be happy to assist."
6003
6176
  ] })
6004
6177
  }
@@ -6022,7 +6195,7 @@ function PaymentReminderEmail({
6022
6195
  }) {
6023
6196
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
6024
6197
  const lOverride = labels != null ? labels : {};
6025
- const variantDefaults = DEFAULT_LABELS8.variants[variant];
6198
+ const variantDefaults = DEFAULT_LABELS9.variants[variant];
6026
6199
  const variantOverride = (_b = (_a = lOverride.variants) == null ? void 0 : _a[variant]) != null ? _b : {};
6027
6200
  const variantLabels = {
6028
6201
  intro: (_c = variantOverride.intro) != null ? _c : variantDefaults.intro,
@@ -6032,19 +6205,19 @@ function PaymentReminderEmail({
6032
6205
  closingAlternative: (_f = variantOverride.closingAlternative) != null ? _f : variantDefaults.closingAlternative
6033
6206
  };
6034
6207
  const l = {
6035
- logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS8.logoAlt,
6036
- greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS8.greeting,
6037
- intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS8.intermediateHello,
6038
- bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS8.bookingSummaryHeader,
6039
- amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS8.amountAlreadyPaidLabel,
6040
- remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS8.remainingBalanceDueLabel,
6041
- totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS8.totalBookingAmountLabel,
6042
- paymentDetailsHeading: (_n = lOverride.paymentDetailsHeading) != null ? _n : DEFAULT_LABELS8.paymentDetailsHeading,
6043
- ctaLabel: (_o = lOverride.ctaLabel) != null ? _o : DEFAULT_LABELS8.ctaLabel,
6044
- teamSignature: (_p = lOverride.teamSignature) != null ? _p : DEFAULT_LABELS8.teamSignature,
6045
- closingAgent: (_q = lOverride.closingAgent) != null ? _q : DEFAULT_LABELS8.closingAgent,
6046
- closingNoAgent: (_r = lOverride.closingNoAgent) != null ? _r : DEFAULT_LABELS8.closingNoAgent,
6047
- adventureCard: __spreadValues(__spreadValues({}, DEFAULT_LABELS8.adventureCard), (_s = lOverride.adventureCard) != null ? _s : {})
6208
+ logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS9.logoAlt,
6209
+ greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS9.greeting,
6210
+ intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS9.intermediateHello,
6211
+ bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS9.bookingSummaryHeader,
6212
+ amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS9.amountAlreadyPaidLabel,
6213
+ remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS9.remainingBalanceDueLabel,
6214
+ totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS9.totalBookingAmountLabel,
6215
+ paymentDetailsHeading: (_n = lOverride.paymentDetailsHeading) != null ? _n : DEFAULT_LABELS9.paymentDetailsHeading,
6216
+ ctaLabel: (_o = lOverride.ctaLabel) != null ? _o : DEFAULT_LABELS9.ctaLabel,
6217
+ teamSignature: (_p = lOverride.teamSignature) != null ? _p : DEFAULT_LABELS9.teamSignature,
6218
+ closingAgent: (_q = lOverride.closingAgent) != null ? _q : DEFAULT_LABELS9.closingAgent,
6219
+ closingNoAgent: (_r = lOverride.closingNoAgent) != null ? _r : DEFAULT_LABELS9.closingNoAgent,
6220
+ adventureCard: __spreadValues(__spreadValues({}, DEFAULT_LABELS9.adventureCard), (_s = lOverride.adventureCard) != null ? _s : {})
6048
6221
  };
6049
6222
  const ctaStyle = {
6050
6223
  display: "inline-block",
@@ -6871,7 +7044,7 @@ function BookingForm({
6871
7044
  }
6872
7045
  );
6873
7046
  }
6874
- var DEFAULT_LABELS9 = {
7047
+ var DEFAULT_LABELS10 = {
6875
7048
  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.",
6876
7049
  detailsSectionTitle: "Your details",
6877
7050
  tripInfoSectionTitle: "Trip info",
@@ -7536,7 +7709,7 @@ function RegistrationForm({
7536
7709
  }) {
7537
7710
  var _a;
7538
7711
  const L = React28__namespace.useMemo(
7539
- () => __spreadValues(__spreadValues({}, DEFAULT_LABELS9), labels != null ? labels : {}),
7712
+ () => __spreadValues(__spreadValues({}, DEFAULT_LABELS10), labels != null ? labels : {}),
7540
7713
  [labels]
7541
7714
  );
7542
7715
  const sortedFields = React28__namespace.useMemo(
@@ -13398,6 +13571,7 @@ exports.MenuTrip = MenuTrip;
13398
13571
  exports.OTPCodeInput = OTPCodeInput;
13399
13572
  exports.Offer = Offer;
13400
13573
  exports.OfferAdventureCard = OfferAdventureCard;
13574
+ exports.PartnerConfirmationEmail = PartnerConfirmationEmail;
13401
13575
  exports.PaymentAmountSelector = PaymentAmountSelector;
13402
13576
  exports.PaymentDetailsBlock = PaymentDetailsBlock;
13403
13577
  exports.PaymentMethodSelector = PaymentMethodSelector;