@planetaexo/design-system 0.39.0 → 0.40.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
@@ -5977,7 +5977,196 @@ function PartnerConfirmationEmail({
5977
5977
  }
5978
5978
  );
5979
5979
  }
5980
+ var INLINE_LINK_STYLE4 = {
5981
+ color: emailTokens.primary,
5982
+ textDecoration: "underline"
5983
+ };
5984
+ function renderWhatsappLink4(contact, label) {
5985
+ if (contact.whatsappUrl) {
5986
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE4, children: label });
5987
+ }
5988
+ return label;
5989
+ }
5990
+ function renderEmailLink4(contact, label) {
5991
+ if (contact.email) {
5992
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE4, children: label });
5993
+ }
5994
+ return label;
5995
+ }
5996
+ function hasText4(s) {
5997
+ return typeof s === "string" && s.trim().length > 0;
5998
+ }
5980
5999
  var DEFAULT_LABELS8 = {
6000
+ logoAlt: "PlanetaEXO",
6001
+ greeting: (n) => `Hi ${n},`,
6002
+ intro: (adv) => `You have a new booking for your adventure ${adv}. Here are the details:`,
6003
+ summaryHeading: "\u{1F4DD} Booking Summary",
6004
+ bookingNumberLabel: "Booking Number",
6005
+ adventureLabel: "Adventure",
6006
+ datesLabel: "Dates",
6007
+ numberOfPeopleLabel: "Number of Travellers",
6008
+ bookerHeading: "Booking contact",
6009
+ bookerNameLabel: "Name",
6010
+ bookerEmailLabel: "Email",
6011
+ bookerPhoneLabel: "Phone",
6012
+ closingAgent: (agentName, contact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6013
+ "If you have any questions, your contact ",
6014
+ agentName,
6015
+ " is available via",
6016
+ " ",
6017
+ renderWhatsappLink4(contact, "WhatsApp"),
6018
+ " or ",
6019
+ renderEmailLink4(contact, "email"),
6020
+ "."
6021
+ ] }),
6022
+ closingNoAgent: "If you have any questions, our team is available via WhatsApp or email.",
6023
+ teamSignature: "The PlanetaEXO Team"
6024
+ };
6025
+ function PartnerBookingCreatedEmail({
6026
+ partnerName,
6027
+ bookingNumber,
6028
+ adventureName,
6029
+ dateRange,
6030
+ travellersCount,
6031
+ booker,
6032
+ agent,
6033
+ logoUrl,
6034
+ labels,
6035
+ className
6036
+ }) {
6037
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS8), labels);
6038
+ const summaryRows = [
6039
+ { label: l.bookingNumberLabel, value: `#${bookingNumber}`, valueColor: emailTokens.primary },
6040
+ { label: l.adventureLabel, value: adventureName },
6041
+ { label: l.datesLabel, value: dateRange },
6042
+ { label: l.numberOfPeopleLabel, value: travellersCount }
6043
+ ];
6044
+ const sectionDivider = /* @__PURE__ */ jsxRuntime.jsx(
6045
+ "hr",
6046
+ {
6047
+ style: {
6048
+ border: "none",
6049
+ borderTop: `1px solid ${emailTokens.border}`,
6050
+ marginTop: 0,
6051
+ marginBottom: "24px"
6052
+ }
6053
+ }
6054
+ );
6055
+ const bookerRows = [
6056
+ { label: l.bookerNameLabel, value: booker.name },
6057
+ ...hasText4(booker.email) ? [
6058
+ {
6059
+ label: l.bookerEmailLabel,
6060
+ value: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${booker.email}`, style: INLINE_LINK_STYLE4, children: booker.email })
6061
+ }
6062
+ ] : [],
6063
+ ...hasText4(booker.phone) ? [{ label: l.bookerPhoneLabel, value: booker.phone }] : []
6064
+ ];
6065
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6066
+ "div",
6067
+ {
6068
+ style: {
6069
+ maxWidth: "576px",
6070
+ margin: "0 auto",
6071
+ backgroundColor: emailTokens.white,
6072
+ color: emailTokens.foreground,
6073
+ fontFamily: emailTokens.fontFamily,
6074
+ fontSize: "16px",
6075
+ lineHeight: "1.6",
6076
+ border: `1px solid ${emailTokens.border}`,
6077
+ borderRadius: "12px",
6078
+ overflow: "hidden",
6079
+ padding: "32px"
6080
+ },
6081
+ className,
6082
+ children: [
6083
+ /* @__PURE__ */ jsxRuntime.jsx(EmailLogo, { src: logoUrl, alt: l.logoAlt }),
6084
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "16px" }, children: l.greeting(partnerName) }),
6085
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "24px" }, children: l.intro(adventureName) }),
6086
+ sectionDivider,
6087
+ /* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.summaryHeading, rows: summaryRows }),
6088
+ /* @__PURE__ */ jsxRuntime.jsx(
6089
+ "p",
6090
+ {
6091
+ style: {
6092
+ marginTop: 0,
6093
+ marginBottom: "20px",
6094
+ fontWeight: 700,
6095
+ color: emailTokens.foreground,
6096
+ fontSize: "18px",
6097
+ fontFamily: emailTokens.fontFamily
6098
+ },
6099
+ children: l.bookerHeading
6100
+ }
6101
+ ),
6102
+ /* @__PURE__ */ jsxRuntime.jsx(
6103
+ "div",
6104
+ {
6105
+ style: {
6106
+ borderRadius: "12px",
6107
+ border: `1px solid ${emailTokens.border}`,
6108
+ overflow: "hidden",
6109
+ marginBottom: "24px"
6110
+ },
6111
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6112
+ "table",
6113
+ {
6114
+ style: {
6115
+ width: "100%",
6116
+ fontSize: "14px",
6117
+ borderCollapse: "collapse"
6118
+ },
6119
+ children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: bookerRows.map((row, i) => {
6120
+ const isLastRow = i === bookerRows.length - 1;
6121
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6122
+ "tr",
6123
+ {
6124
+ style: !isLastRow ? { borderBottom: `1px solid ${emailTokens.border}` } : {},
6125
+ children: [
6126
+ /* @__PURE__ */ jsxRuntime.jsx(
6127
+ "td",
6128
+ {
6129
+ style: {
6130
+ padding: "12px 20px",
6131
+ color: emailTokens.mutedForeground,
6132
+ backgroundColor: emailTokens.muted,
6133
+ verticalAlign: "top"
6134
+ },
6135
+ children: row.label
6136
+ }
6137
+ ),
6138
+ /* @__PURE__ */ jsxRuntime.jsx(
6139
+ "td",
6140
+ {
6141
+ style: {
6142
+ padding: "12px 20px",
6143
+ fontWeight: 500,
6144
+ color: emailTokens.foreground,
6145
+ verticalAlign: "top"
6146
+ },
6147
+ children: row.value
6148
+ }
6149
+ )
6150
+ ]
6151
+ },
6152
+ i
6153
+ );
6154
+ }) })
6155
+ }
6156
+ )
6157
+ }
6158
+ ),
6159
+ sectionDivider,
6160
+ /* @__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, {
6161
+ whatsappUrl: agent.whatsappUrl,
6162
+ email: agent.email
6163
+ }) : l.closingNoAgent }),
6164
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: 0, fontSize: "14px", color: emailTokens.bodyText }, children: l.teamSignature })
6165
+ ]
6166
+ }
6167
+ );
6168
+ }
6169
+ var DEFAULT_LABELS9 = {
5981
6170
  logoAlt: "PlanetaEXO",
5982
6171
  greeting: (name) => `Hi ${name},`,
5983
6172
  receiptHeading: "Payment receipt",
@@ -6016,7 +6205,7 @@ function PaymentReceiptEmail({
6016
6205
  labels,
6017
6206
  className
6018
6207
  }) {
6019
- const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS8), labels);
6208
+ const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS9), labels);
6020
6209
  const travellersLine = travellers.filter((s) => s.trim().length > 0).join(", ");
6021
6210
  const interestRow = chargedAmount && chargedAmount !== amount;
6022
6211
  const receiptRows = [
@@ -6091,24 +6280,24 @@ function PaymentReceiptEmail({
6091
6280
  }
6092
6281
  );
6093
6282
  }
6094
- var INLINE_LINK_STYLE4 = {
6283
+ var INLINE_LINK_STYLE5 = {
6095
6284
  color: emailTokens.primary,
6096
6285
  textDecoration: "underline"
6097
6286
  };
6098
- function renderWhatsappLink4(contact, label) {
6287
+ function renderWhatsappLink5(contact, label) {
6099
6288
  if (contact.whatsappUrl) {
6100
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE4, children: label });
6289
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE5, children: label });
6101
6290
  }
6102
6291
  return label;
6103
6292
  }
6104
- function renderEmailLink4(contact, label) {
6293
+ function renderEmailLink5(contact, label) {
6105
6294
  if (contact.email) {
6106
- return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE4, children: label });
6295
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE5, children: label });
6107
6296
  }
6108
6297
  return label;
6109
6298
  }
6110
6299
  var EMPTY_CLOSING_ALTERNATIVE = (_agentName, _contact) => null;
6111
- var DEFAULT_LABELS9 = {
6300
+ var DEFAULT_LABELS10 = {
6112
6301
  logoAlt: "PlanetaEXO",
6113
6302
  greeting: (name) => `Hi ${name},`,
6114
6303
  intermediateHello: "Hope you're doing well.",
@@ -6123,9 +6312,9 @@ var DEFAULT_LABELS9 = {
6123
6312
  "If you need any assistance or would like to discuss your payment, feel free to contact your agent ",
6124
6313
  agentName,
6125
6314
  " via ",
6126
- renderWhatsappLink4(contact, "WhatsApp"),
6315
+ renderWhatsappLink5(contact, "WhatsApp"),
6127
6316
  " or ",
6128
- renderEmailLink4(contact, "email"),
6317
+ renderEmailLink5(contact, "email"),
6129
6318
  "."
6130
6319
  ] }),
6131
6320
  closingNoAgent: "If you need any assistance or would like to discuss your payment, feel free to contact us via WhatsApp or email.",
@@ -6169,9 +6358,9 @@ var DEFAULT_LABELS9 = {
6169
6358
  "If you are experiencing any issues with payment or need additional time, please contact your agent ",
6170
6359
  agentName,
6171
6360
  " via ",
6172
- renderWhatsappLink4(contact, "WhatsApp"),
6361
+ renderWhatsappLink5(contact, "WhatsApp"),
6173
6362
  " or ",
6174
- renderEmailLink4(contact, "email"),
6363
+ renderEmailLink5(contact, "email"),
6175
6364
  ". We'll be happy to assist."
6176
6365
  ] })
6177
6366
  }
@@ -6195,7 +6384,7 @@ function PaymentReminderEmail({
6195
6384
  }) {
6196
6385
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
6197
6386
  const lOverride = labels != null ? labels : {};
6198
- const variantDefaults = DEFAULT_LABELS9.variants[variant];
6387
+ const variantDefaults = DEFAULT_LABELS10.variants[variant];
6199
6388
  const variantOverride = (_b = (_a = lOverride.variants) == null ? void 0 : _a[variant]) != null ? _b : {};
6200
6389
  const variantLabels = {
6201
6390
  intro: (_c = variantOverride.intro) != null ? _c : variantDefaults.intro,
@@ -6205,19 +6394,19 @@ function PaymentReminderEmail({
6205
6394
  closingAlternative: (_f = variantOverride.closingAlternative) != null ? _f : variantDefaults.closingAlternative
6206
6395
  };
6207
6396
  const l = {
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 : {})
6397
+ logoAlt: (_g = lOverride.logoAlt) != null ? _g : DEFAULT_LABELS10.logoAlt,
6398
+ greeting: (_h = lOverride.greeting) != null ? _h : DEFAULT_LABELS10.greeting,
6399
+ intermediateHello: (_i = lOverride.intermediateHello) != null ? _i : DEFAULT_LABELS10.intermediateHello,
6400
+ bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j : DEFAULT_LABELS10.bookingSummaryHeader,
6401
+ amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k : DEFAULT_LABELS10.amountAlreadyPaidLabel,
6402
+ remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l : DEFAULT_LABELS10.remainingBalanceDueLabel,
6403
+ totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m : DEFAULT_LABELS10.totalBookingAmountLabel,
6404
+ paymentDetailsHeading: (_n = lOverride.paymentDetailsHeading) != null ? _n : DEFAULT_LABELS10.paymentDetailsHeading,
6405
+ ctaLabel: (_o = lOverride.ctaLabel) != null ? _o : DEFAULT_LABELS10.ctaLabel,
6406
+ teamSignature: (_p = lOverride.teamSignature) != null ? _p : DEFAULT_LABELS10.teamSignature,
6407
+ closingAgent: (_q = lOverride.closingAgent) != null ? _q : DEFAULT_LABELS10.closingAgent,
6408
+ closingNoAgent: (_r = lOverride.closingNoAgent) != null ? _r : DEFAULT_LABELS10.closingNoAgent,
6409
+ adventureCard: __spreadValues(__spreadValues({}, DEFAULT_LABELS10.adventureCard), (_s = lOverride.adventureCard) != null ? _s : {})
6221
6410
  };
6222
6411
  const ctaStyle = {
6223
6412
  display: "inline-block",
@@ -7044,7 +7233,7 @@ function BookingForm({
7044
7233
  }
7045
7234
  );
7046
7235
  }
7047
- var DEFAULT_LABELS10 = {
7236
+ var DEFAULT_LABELS11 = {
7048
7237
  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.",
7049
7238
  detailsSectionTitle: "Your details",
7050
7239
  tripInfoSectionTitle: "Trip info",
@@ -7709,7 +7898,7 @@ function RegistrationForm({
7709
7898
  }) {
7710
7899
  var _a;
7711
7900
  const L = React28__namespace.useMemo(
7712
- () => __spreadValues(__spreadValues({}, DEFAULT_LABELS10), labels != null ? labels : {}),
7901
+ () => __spreadValues(__spreadValues({}, DEFAULT_LABELS11), labels != null ? labels : {}),
7713
7902
  [labels]
7714
7903
  );
7715
7904
  const sortedFields = React28__namespace.useMemo(
@@ -13571,6 +13760,7 @@ exports.MenuTrip = MenuTrip;
13571
13760
  exports.OTPCodeInput = OTPCodeInput;
13572
13761
  exports.Offer = Offer;
13573
13762
  exports.OfferAdventureCard = OfferAdventureCard;
13763
+ exports.PartnerBookingCreatedEmail = PartnerBookingCreatedEmail;
13574
13764
  exports.PartnerConfirmationEmail = PartnerConfirmationEmail;
13575
13765
  exports.PaymentAmountSelector = PaymentAmountSelector;
13576
13766
  exports.PaymentDetailsBlock = PaymentDetailsBlock;