@planetaexo/design-system 0.37.5 → 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 +202 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.js +202 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2804,6 +2804,7 @@ function AdventureSection({
|
|
|
2804
2804
|
type: "button",
|
|
2805
2805
|
onClick: () => onAddContactAsTraveller(adventure.id),
|
|
2806
2806
|
disabled: adventure.addContactAsTravellerDisabled,
|
|
2807
|
+
title: adventure.addContactAsTravellerDisabled ? labels == null ? void 0 : labels.addContactAsTravellerDisabledTooltip : void 0,
|
|
2807
2808
|
className: cn(
|
|
2808
2809
|
"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground transition-colors",
|
|
2809
2810
|
"hover:border-primary hover:text-primary hover:bg-primary/5",
|
|
@@ -5803,7 +5804,180 @@ function RegistrationReminderIndividualEmail({
|
|
|
5803
5804
|
}
|
|
5804
5805
|
);
|
|
5805
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
|
+
}
|
|
5806
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 = {
|
|
5807
5981
|
logoAlt: "PlanetaEXO",
|
|
5808
5982
|
greeting: (name) => `Hi ${name},`,
|
|
5809
5983
|
receiptHeading: "Payment receipt",
|
|
@@ -5842,7 +6016,7 @@ function PaymentReceiptEmail({
|
|
|
5842
6016
|
labels,
|
|
5843
6017
|
className
|
|
5844
6018
|
}) {
|
|
5845
|
-
const l = __spreadValues(__spreadValues({},
|
|
6019
|
+
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS8), labels);
|
|
5846
6020
|
const travellersLine = travellers.filter((s) => s.trim().length > 0).join(", ");
|
|
5847
6021
|
const interestRow = chargedAmount && chargedAmount !== amount;
|
|
5848
6022
|
const receiptRows = [
|
|
@@ -5917,24 +6091,24 @@ function PaymentReceiptEmail({
|
|
|
5917
6091
|
}
|
|
5918
6092
|
);
|
|
5919
6093
|
}
|
|
5920
|
-
var
|
|
6094
|
+
var INLINE_LINK_STYLE4 = {
|
|
5921
6095
|
color: emailTokens.primary,
|
|
5922
6096
|
textDecoration: "underline"
|
|
5923
6097
|
};
|
|
5924
|
-
function
|
|
6098
|
+
function renderWhatsappLink4(contact, label) {
|
|
5925
6099
|
if (contact.whatsappUrl) {
|
|
5926
|
-
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style:
|
|
6100
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: contact.whatsappUrl, style: INLINE_LINK_STYLE4, children: label });
|
|
5927
6101
|
}
|
|
5928
6102
|
return label;
|
|
5929
6103
|
}
|
|
5930
|
-
function
|
|
6104
|
+
function renderEmailLink4(contact, label) {
|
|
5931
6105
|
if (contact.email) {
|
|
5932
|
-
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style:
|
|
6106
|
+
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${contact.email}`, style: INLINE_LINK_STYLE4, children: label });
|
|
5933
6107
|
}
|
|
5934
6108
|
return label;
|
|
5935
6109
|
}
|
|
5936
6110
|
var EMPTY_CLOSING_ALTERNATIVE = (_agentName, _contact) => null;
|
|
5937
|
-
var
|
|
6111
|
+
var DEFAULT_LABELS9 = {
|
|
5938
6112
|
logoAlt: "PlanetaEXO",
|
|
5939
6113
|
greeting: (name) => `Hi ${name},`,
|
|
5940
6114
|
intermediateHello: "Hope you're doing well.",
|
|
@@ -5949,9 +6123,9 @@ var DEFAULT_LABELS8 = {
|
|
|
5949
6123
|
"If you need any assistance or would like to discuss your payment, feel free to contact your agent ",
|
|
5950
6124
|
agentName,
|
|
5951
6125
|
" via ",
|
|
5952
|
-
|
|
6126
|
+
renderWhatsappLink4(contact, "WhatsApp"),
|
|
5953
6127
|
" or ",
|
|
5954
|
-
|
|
6128
|
+
renderEmailLink4(contact, "email"),
|
|
5955
6129
|
"."
|
|
5956
6130
|
] }),
|
|
5957
6131
|
closingNoAgent: "If you need any assistance or would like to discuss your payment, feel free to contact us via WhatsApp or email.",
|
|
@@ -5995,9 +6169,9 @@ var DEFAULT_LABELS8 = {
|
|
|
5995
6169
|
"If you are experiencing any issues with payment or need additional time, please contact your agent ",
|
|
5996
6170
|
agentName,
|
|
5997
6171
|
" via ",
|
|
5998
|
-
|
|
6172
|
+
renderWhatsappLink4(contact, "WhatsApp"),
|
|
5999
6173
|
" or ",
|
|
6000
|
-
|
|
6174
|
+
renderEmailLink4(contact, "email"),
|
|
6001
6175
|
". We'll be happy to assist."
|
|
6002
6176
|
] })
|
|
6003
6177
|
}
|
|
@@ -6021,7 +6195,7 @@ function PaymentReminderEmail({
|
|
|
6021
6195
|
}) {
|
|
6022
6196
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
6023
6197
|
const lOverride = labels != null ? labels : {};
|
|
6024
|
-
const variantDefaults =
|
|
6198
|
+
const variantDefaults = DEFAULT_LABELS9.variants[variant];
|
|
6025
6199
|
const variantOverride = (_b = (_a = lOverride.variants) == null ? void 0 : _a[variant]) != null ? _b : {};
|
|
6026
6200
|
const variantLabels = {
|
|
6027
6201
|
intro: (_c = variantOverride.intro) != null ? _c : variantDefaults.intro,
|
|
@@ -6031,19 +6205,19 @@ function PaymentReminderEmail({
|
|
|
6031
6205
|
closingAlternative: (_f = variantOverride.closingAlternative) != null ? _f : variantDefaults.closingAlternative
|
|
6032
6206
|
};
|
|
6033
6207
|
const l = {
|
|
6034
|
-
logoAlt: (_g = lOverride.logoAlt) != null ? _g :
|
|
6035
|
-
greeting: (_h = lOverride.greeting) != null ? _h :
|
|
6036
|
-
intermediateHello: (_i = lOverride.intermediateHello) != null ? _i :
|
|
6037
|
-
bookingSummaryHeader: (_j = lOverride.bookingSummaryHeader) != null ? _j :
|
|
6038
|
-
amountAlreadyPaidLabel: (_k = lOverride.amountAlreadyPaidLabel) != null ? _k :
|
|
6039
|
-
remainingBalanceDueLabel: (_l = lOverride.remainingBalanceDueLabel) != null ? _l :
|
|
6040
|
-
totalBookingAmountLabel: (_m = lOverride.totalBookingAmountLabel) != null ? _m :
|
|
6041
|
-
paymentDetailsHeading: (_n = lOverride.paymentDetailsHeading) != null ? _n :
|
|
6042
|
-
ctaLabel: (_o = lOverride.ctaLabel) != null ? _o :
|
|
6043
|
-
teamSignature: (_p = lOverride.teamSignature) != null ? _p :
|
|
6044
|
-
closingAgent: (_q = lOverride.closingAgent) != null ? _q :
|
|
6045
|
-
closingNoAgent: (_r = lOverride.closingNoAgent) != null ? _r :
|
|
6046
|
-
adventureCard: __spreadValues(__spreadValues({},
|
|
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 : {})
|
|
6047
6221
|
};
|
|
6048
6222
|
const ctaStyle = {
|
|
6049
6223
|
display: "inline-block",
|
|
@@ -6870,7 +7044,7 @@ function BookingForm({
|
|
|
6870
7044
|
}
|
|
6871
7045
|
);
|
|
6872
7046
|
}
|
|
6873
|
-
var
|
|
7047
|
+
var DEFAULT_LABELS10 = {
|
|
6874
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.",
|
|
6875
7049
|
detailsSectionTitle: "Your details",
|
|
6876
7050
|
tripInfoSectionTitle: "Trip info",
|
|
@@ -7535,7 +7709,7 @@ function RegistrationForm({
|
|
|
7535
7709
|
}) {
|
|
7536
7710
|
var _a;
|
|
7537
7711
|
const L = React28__namespace.useMemo(
|
|
7538
|
-
() => __spreadValues(__spreadValues({},
|
|
7712
|
+
() => __spreadValues(__spreadValues({}, DEFAULT_LABELS10), labels != null ? labels : {}),
|
|
7539
7713
|
[labels]
|
|
7540
7714
|
);
|
|
7541
7715
|
const sortedFields = React28__namespace.useMemo(
|
|
@@ -13397,6 +13571,7 @@ exports.MenuTrip = MenuTrip;
|
|
|
13397
13571
|
exports.OTPCodeInput = OTPCodeInput;
|
|
13398
13572
|
exports.Offer = Offer;
|
|
13399
13573
|
exports.OfferAdventureCard = OfferAdventureCard;
|
|
13574
|
+
exports.PartnerConfirmationEmail = PartnerConfirmationEmail;
|
|
13400
13575
|
exports.PaymentAmountSelector = PaymentAmountSelector;
|
|
13401
13576
|
exports.PaymentDetailsBlock = PaymentDetailsBlock;
|
|
13402
13577
|
exports.PaymentMethodSelector = PaymentMethodSelector;
|