@planetaexo/design-system 0.43.0 → 0.45.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 +30 -89
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +33 -8
- package/dist/index.d.ts +33 -8
- package/dist/index.js +30 -89
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3799,7 +3799,20 @@ function BookingDetails({
|
|
|
3799
3799
|
contact.passport && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3800
3800
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_E = (_D = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _D.document) != null ? _E : "Passport / ID" }),
|
|
3801
3801
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
|
|
3802
|
-
] })
|
|
3802
|
+
] }),
|
|
3803
|
+
(() => {
|
|
3804
|
+
var _a2, _b2, _c2;
|
|
3805
|
+
const parts = [
|
|
3806
|
+
[contact.addressLine1, contact.addressLine2].map((s) => s == null ? void 0 : s.trim()).filter(Boolean).join(", "),
|
|
3807
|
+
[contact.city, contact.state].map((s) => s == null ? void 0 : s.trim()).filter(Boolean).join(", "),
|
|
3808
|
+
(_a2 = contact.postalCode) == null ? void 0 : _a2.trim()
|
|
3809
|
+
].filter((p) => p && p.length > 0);
|
|
3810
|
+
if (parts.length === 0) return null;
|
|
3811
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-2 sm:col-span-3", children: [
|
|
3812
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_c2 = (_b2 = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _b2.address) != null ? _c2 : "Address" }),
|
|
3813
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans whitespace-pre-line", children: parts.join("\n") })
|
|
3814
|
+
] });
|
|
3815
|
+
})()
|
|
3803
3816
|
] })
|
|
3804
3817
|
] }),
|
|
3805
3818
|
(onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
@@ -4655,7 +4668,10 @@ function BookingSummary({ heading, rows, footer, className }) {
|
|
|
4655
4668
|
padding: "12px 20px",
|
|
4656
4669
|
fontWeight: row.valueColor === emailTokens.primary ? 600 : 500,
|
|
4657
4670
|
color: (_a2 = row.valueColor) != null ? _a2 : emailTokens.foreground,
|
|
4658
|
-
verticalAlign: "top"
|
|
4671
|
+
verticalAlign: "top",
|
|
4672
|
+
// Preserva quebras de linha em valores multi-linha (ex.: endereço
|
|
4673
|
+
// montado com "\n"). Inócuo para valores de uma linha.
|
|
4674
|
+
whiteSpace: "pre-line"
|
|
4659
4675
|
},
|
|
4660
4676
|
children: row.value
|
|
4661
4677
|
}
|
|
@@ -4793,6 +4809,7 @@ var DEFAULT_LABELS3 = {
|
|
|
4793
4809
|
adventuresLabel: "Adventures",
|
|
4794
4810
|
totalTravellersLabel: "Total Travellers",
|
|
4795
4811
|
agentLabel: "Agent",
|
|
4812
|
+
addressLabel: "Address",
|
|
4796
4813
|
adultsUnit: "adult(s)",
|
|
4797
4814
|
childrenUnit: "child(ren)",
|
|
4798
4815
|
travellersLabel: "Travellers",
|
|
@@ -4823,6 +4840,7 @@ function BookingPaymentConfirmationEmail({
|
|
|
4823
4840
|
total,
|
|
4824
4841
|
depositInfo,
|
|
4825
4842
|
agent,
|
|
4843
|
+
responsiblePersonAddress,
|
|
4826
4844
|
viewBookingUrl,
|
|
4827
4845
|
labels,
|
|
4828
4846
|
className,
|
|
@@ -4901,7 +4919,8 @@ function BookingPaymentConfirmationEmail({
|
|
|
4901
4919
|
{ label: l.bookingNumberLabel, value: bookingReference, valueColor: emailTokens.primary },
|
|
4902
4920
|
{ label: l.adventuresLabel, value: adventures.length },
|
|
4903
4921
|
{ label: l.totalTravellersLabel, value: allTravellers.length },
|
|
4904
|
-
{ label: l.agentLabel, value: agent }
|
|
4922
|
+
{ label: l.agentLabel, value: agent },
|
|
4923
|
+
...responsiblePersonAddress && responsiblePersonAddress.trim().length > 0 ? [{ label: l.addressLabel, value: responsiblePersonAddress }] : []
|
|
4905
4924
|
]
|
|
4906
4925
|
}
|
|
4907
4926
|
) }),
|
|
@@ -5037,6 +5056,7 @@ var DEFAULT_LABELS4 = {
|
|
|
5037
5056
|
startingDateLabel: "Starting Date:",
|
|
5038
5057
|
numberOfPeopleLabel: "Number of People:",
|
|
5039
5058
|
hostLabel: "Host:",
|
|
5059
|
+
addressLabel: "Address:",
|
|
5040
5060
|
postCtaMessage: "After adding everyone, you will also receive your own registration email, just like the other travellers. Please make sure everyone completes this step so we can organise everything properly.",
|
|
5041
5061
|
closingMessage: "If you have any questions, just reply to this email \u2014 happy to help.",
|
|
5042
5062
|
nextStepsHeading: "Next steps:"
|
|
@@ -5055,6 +5075,7 @@ function BookingCreatedEmail({
|
|
|
5055
5075
|
className,
|
|
5056
5076
|
nextSteps,
|
|
5057
5077
|
nextStepsImportant,
|
|
5078
|
+
responsiblePersonAddress,
|
|
5058
5079
|
directBookingLinkLabel
|
|
5059
5080
|
}) {
|
|
5060
5081
|
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS4), labels);
|
|
@@ -5076,7 +5097,8 @@ function BookingCreatedEmail({
|
|
|
5076
5097
|
{ label: l.adventureLabel, value: adventure },
|
|
5077
5098
|
{ label: l.startingDateLabel, value: startingDate },
|
|
5078
5099
|
{ label: l.numberOfPeopleLabel, value: String(numberOfPeople) },
|
|
5079
|
-
{ label: l.hostLabel, value: host }
|
|
5100
|
+
{ label: l.hostLabel, value: host },
|
|
5101
|
+
...responsiblePersonAddress && responsiblePersonAddress.trim().length > 0 ? [{ label: l.addressLabel, value: responsiblePersonAddress }] : []
|
|
5080
5102
|
];
|
|
5081
5103
|
const showNextSteps = Array.isArray(nextSteps) && nextSteps.length > 0;
|
|
5082
5104
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6031,14 +6053,12 @@ var DEFAULT_LABELS8 = {
|
|
|
6031
6053
|
greeting: (n) => `Hi ${n},`,
|
|
6032
6054
|
intro: (adv) => `You have a new booking for your adventure ${adv}. Here are the details:`,
|
|
6033
6055
|
summaryHeading: "\u{1F4DD} Booking Summary",
|
|
6056
|
+
bookerNameLabel: "Name",
|
|
6057
|
+
bookerCountryLabel: "Country",
|
|
6034
6058
|
bookingNumberLabel: "Booking Number",
|
|
6035
6059
|
adventureLabel: "Adventure",
|
|
6036
6060
|
datesLabel: "Dates",
|
|
6037
6061
|
numberOfPeopleLabel: "Number of Travellers",
|
|
6038
|
-
bookerHeading: "Booking contact",
|
|
6039
|
-
bookerNameLabel: "Name",
|
|
6040
|
-
bookerEmailLabel: "Email",
|
|
6041
|
-
bookerPhoneLabel: "Phone",
|
|
6042
6062
|
registrationPendingNotice: "The travellers' registration details will be sent to you as soon as all travellers have completed their forms.",
|
|
6043
6063
|
mustReplyToConfirm: "Please reply to this email to confirm the booking.",
|
|
6044
6064
|
closingAgent: (agentName, contact) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -6069,6 +6089,8 @@ function PartnerBookingCreatedEmail({
|
|
|
6069
6089
|
}) {
|
|
6070
6090
|
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS8), labels);
|
|
6071
6091
|
const summaryRows = [
|
|
6092
|
+
{ label: l.bookerNameLabel, value: booker.name },
|
|
6093
|
+
...hasText4(booker.country) ? [{ label: l.bookerCountryLabel, value: booker.country }] : [],
|
|
6072
6094
|
{ label: l.bookingNumberLabel, value: `#${bookingNumber}`, valueColor: emailTokens.primary },
|
|
6073
6095
|
{ label: l.adventureLabel, value: adventureName },
|
|
6074
6096
|
{ label: l.datesLabel, value: dateRange },
|
|
@@ -6085,16 +6107,6 @@ function PartnerBookingCreatedEmail({
|
|
|
6085
6107
|
}
|
|
6086
6108
|
}
|
|
6087
6109
|
);
|
|
6088
|
-
const bookerRows = [
|
|
6089
|
-
{ label: l.bookerNameLabel, value: booker.name },
|
|
6090
|
-
...hasText4(booker.email) ? [
|
|
6091
|
-
{
|
|
6092
|
-
label: l.bookerEmailLabel,
|
|
6093
|
-
value: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${booker.email}`, style: INLINE_LINK_STYLE4, children: booker.email })
|
|
6094
|
-
}
|
|
6095
|
-
] : [],
|
|
6096
|
-
...hasText4(booker.phone) ? [{ label: l.bookerPhoneLabel, value: booker.phone }] : []
|
|
6097
|
-
];
|
|
6098
6110
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6099
6111
|
"div",
|
|
6100
6112
|
{
|
|
@@ -6133,77 +6145,6 @@ function PartnerBookingCreatedEmail({
|
|
|
6133
6145
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "24px" }, children: l.intro(adventureName) }),
|
|
6134
6146
|
sectionDivider,
|
|
6135
6147
|
/* @__PURE__ */ jsxRuntime.jsx(BookingSummary, { heading: l.summaryHeading, rows: summaryRows }),
|
|
6136
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6137
|
-
"p",
|
|
6138
|
-
{
|
|
6139
|
-
style: {
|
|
6140
|
-
marginTop: 0,
|
|
6141
|
-
marginBottom: "20px",
|
|
6142
|
-
fontWeight: 700,
|
|
6143
|
-
color: emailTokens.foreground,
|
|
6144
|
-
fontSize: "18px",
|
|
6145
|
-
fontFamily: emailTokens.fontFamily
|
|
6146
|
-
},
|
|
6147
|
-
children: l.bookerHeading
|
|
6148
|
-
}
|
|
6149
|
-
),
|
|
6150
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6151
|
-
"div",
|
|
6152
|
-
{
|
|
6153
|
-
style: {
|
|
6154
|
-
borderRadius: "12px",
|
|
6155
|
-
border: `1px solid ${emailTokens.border}`,
|
|
6156
|
-
overflow: "hidden",
|
|
6157
|
-
marginBottom: "24px"
|
|
6158
|
-
},
|
|
6159
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6160
|
-
"table",
|
|
6161
|
-
{
|
|
6162
|
-
style: {
|
|
6163
|
-
width: "100%",
|
|
6164
|
-
fontSize: "14px",
|
|
6165
|
-
borderCollapse: "collapse"
|
|
6166
|
-
},
|
|
6167
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: bookerRows.map((row, i) => {
|
|
6168
|
-
const isLastRow = i === bookerRows.length - 1;
|
|
6169
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6170
|
-
"tr",
|
|
6171
|
-
{
|
|
6172
|
-
style: !isLastRow ? { borderBottom: `1px solid ${emailTokens.border}` } : {},
|
|
6173
|
-
children: [
|
|
6174
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6175
|
-
"td",
|
|
6176
|
-
{
|
|
6177
|
-
style: {
|
|
6178
|
-
padding: "12px 20px",
|
|
6179
|
-
color: emailTokens.mutedForeground,
|
|
6180
|
-
backgroundColor: emailTokens.muted,
|
|
6181
|
-
verticalAlign: "top"
|
|
6182
|
-
},
|
|
6183
|
-
children: row.label
|
|
6184
|
-
}
|
|
6185
|
-
),
|
|
6186
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6187
|
-
"td",
|
|
6188
|
-
{
|
|
6189
|
-
style: {
|
|
6190
|
-
padding: "12px 20px",
|
|
6191
|
-
fontWeight: 500,
|
|
6192
|
-
color: emailTokens.foreground,
|
|
6193
|
-
verticalAlign: "top"
|
|
6194
|
-
},
|
|
6195
|
-
children: row.value
|
|
6196
|
-
}
|
|
6197
|
-
)
|
|
6198
|
-
]
|
|
6199
|
-
},
|
|
6200
|
-
i
|
|
6201
|
-
);
|
|
6202
|
-
}) })
|
|
6203
|
-
}
|
|
6204
|
-
)
|
|
6205
|
-
}
|
|
6206
|
-
),
|
|
6207
6148
|
sectionDivider,
|
|
6208
6149
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6209
6150
|
"div",
|