@planetaexo/design-system 0.16.0 → 0.17.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 +39 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +39 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3808,7 +3808,8 @@ var DEFAULT_LABELS = {
|
|
|
3808
3808
|
balanceDueLabel: "Balance due",
|
|
3809
3809
|
paidInFullLabel: "\u2705 Paid in full",
|
|
3810
3810
|
footerMessage: "All travellers have been registered for this booking. Each person will receive a separate email with their individual details and any pre-departure information.",
|
|
3811
|
-
footerContact: (agent) => `If you have any questions, just reply to this email or contact ${agent} \u2014 happy to help
|
|
3811
|
+
footerContact: (agent) => `If you have any questions, just reply to this email or contact ${agent} \u2014 happy to help.`,
|
|
3812
|
+
closingMessage: "You can access your booking at any time through the link below."
|
|
3812
3813
|
};
|
|
3813
3814
|
function BookingConfirmation({
|
|
3814
3815
|
recipientName,
|
|
@@ -3822,13 +3823,15 @@ function BookingConfirmation({
|
|
|
3822
3823
|
agent,
|
|
3823
3824
|
viewBookingUrl,
|
|
3824
3825
|
labels,
|
|
3825
|
-
className
|
|
3826
|
+
className,
|
|
3827
|
+
flow = "auto"
|
|
3826
3828
|
}) {
|
|
3827
3829
|
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS), labels);
|
|
3828
3830
|
const allTravellers = adventures.flatMap((a) => {
|
|
3829
3831
|
var _a;
|
|
3830
3832
|
return (_a = a.travellers) != null ? _a : [];
|
|
3831
3833
|
});
|
|
3834
|
+
const isManualFlow = flow === "manual";
|
|
3832
3835
|
const ctaStyle = {
|
|
3833
3836
|
display: "inline-block",
|
|
3834
3837
|
backgroundColor: emailTokens.primary,
|
|
@@ -3861,31 +3864,33 @@ function BookingConfirmation({
|
|
|
3861
3864
|
/* @__PURE__ */ jsxRuntime.jsx(EmailLogo, { src: logoUrl, alt: l.logoAlt, paddingTop: "40px", paddingX: "32px" }),
|
|
3862
3865
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { paddingLeft: "32px", paddingRight: "32px" }, children: [
|
|
3863
3866
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "20px", marginTop: 0, fontSize: "16px" }, children: l.greeting(recipientName) }),
|
|
3864
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "20px", marginTop: 0, fontSize: "16px" }, children: l.confirmationMessage }),
|
|
3865
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", marginTop: 0, fontSize: "16px" }, children: l.detailsIntro }),
|
|
3866
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "40px" }, children: ViewBookingCta })
|
|
3867
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: isManualFlow ? "32px" : "20px", marginTop: 0, fontSize: "16px" }, children: l.confirmationMessage }),
|
|
3868
|
+
!isManualFlow && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", marginTop: 0, fontSize: "16px" }, children: l.detailsIntro }),
|
|
3869
|
+
!isManualFlow && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "40px" }, children: ViewBookingCta })
|
|
3867
3870
|
] }),
|
|
3868
3871
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
|
|
3869
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3870
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3871
|
-
|
|
3872
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3872
|
+
!isManualFlow && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3873
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: [
|
|
3874
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: "20px", fontWeight: "700", color: emailTokens.foreground, fontSize: "18px", fontFamily: emailTokens.fontFamily }, children: l.nextStepsHeading }),
|
|
3875
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { borderRadius: "12px", border: `1px solid ${emailTokens.border}`, padding: "20px" }, children: l.nextSteps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsx("table", { cellPadding: "0", cellSpacing: "0", style: { borderCollapse: "collapse", width: "100%", marginBottom: i < l.nextSteps.length - 1 ? "16px" : "0" }, children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3876
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { verticalAlign: "top", width: "32px", paddingRight: "14px" }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
|
|
3877
|
+
display: "inline-block",
|
|
3878
|
+
height: "24px",
|
|
3879
|
+
width: "24px",
|
|
3880
|
+
lineHeight: "24px",
|
|
3881
|
+
textAlign: "center",
|
|
3882
|
+
borderRadius: "9999px",
|
|
3883
|
+
backgroundColor: emailTokens.primaryLight,
|
|
3884
|
+
fontSize: "12px",
|
|
3885
|
+
fontWeight: "700",
|
|
3886
|
+
color: emailTokens.primary,
|
|
3887
|
+
marginTop: "2px"
|
|
3888
|
+
}, children: i + 1 }) }),
|
|
3889
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { verticalAlign: "top" }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 }, children: step }) })
|
|
3890
|
+
] }) }) }, i)) })
|
|
3891
|
+
] }),
|
|
3892
|
+
/* @__PURE__ */ jsxRuntime.jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } })
|
|
3887
3893
|
] }),
|
|
3888
|
-
/* @__PURE__ */ jsxRuntime.jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
|
|
3889
3894
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "32px" }, children: [
|
|
3890
3895
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: "20px", fontWeight: "700", color: emailTokens.foreground, fontSize: "18px", fontFamily: emailTokens.fontFamily }, children: l.bookingSummaryHeading }),
|
|
3891
3896
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { borderRadius: "12px", border: `1px solid ${emailTokens.border}`, overflow: "hidden" }, children: /* @__PURE__ */ jsxRuntime.jsx("table", { style: { width: "100%", fontSize: "14px", borderCollapse: "collapse" }, children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
@@ -4049,11 +4054,11 @@ function BookingConfirmation({
|
|
|
4049
4054
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.depositLabel(depositInfo.depositPercent) }),
|
|
4050
4055
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.depositAmount })
|
|
4051
4056
|
] }),
|
|
4052
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderBottom: `1px solid ${emailTokens.border}` }, children: [
|
|
4057
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { style: depositInfo.isPaidInFull ? {} : { borderBottom: `1px solid ${emailTokens.border}` }, children: [
|
|
4053
4058
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.remainingBalanceLabel }),
|
|
4054
4059
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.remainingAmount })
|
|
4055
4060
|
] }),
|
|
4056
|
-
/* @__PURE__ */ jsxRuntime.jsxs("tr", {
|
|
4061
|
+
!depositInfo.isPaidInFull && /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
4057
4062
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", color: emailTokens.mutedForeground }, children: l.balanceDueLabel }),
|
|
4058
4063
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "10px 16px", textAlign: "right", fontWeight: "500", color: emailTokens.foreground, whiteSpace: "nowrap" }, children: depositInfo.balanceDueDate })
|
|
4059
4064
|
] }),
|
|
@@ -4062,10 +4067,16 @@ function BookingConfirmation({
|
|
|
4062
4067
|
] })
|
|
4063
4068
|
] }),
|
|
4064
4069
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { style: { border: "none", borderTop: `1px solid ${emailTokens.border}`, margin: "0 32px" } }),
|
|
4065
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4070
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { paddingLeft: "32px", paddingRight: "32px", paddingTop: "32px", paddingBottom: "40px" }, children: isManualFlow ? (
|
|
4071
|
+
// Manual flow: closing message + CTA no rodapé (substitui footerMessage/footerContact).
|
|
4072
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4073
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: "32px", fontSize: "16px" }, children: l.closingMessage }),
|
|
4074
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: ViewBookingCta })
|
|
4075
|
+
] })
|
|
4076
|
+
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4066
4077
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: "20px", fontSize: "16px" }, children: l.footerMessage }),
|
|
4067
4078
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginTop: 0, marginBottom: 0, fontSize: "16px" }, children: l.footerContact(agent) })
|
|
4068
|
-
] })
|
|
4079
|
+
] }) })
|
|
4069
4080
|
]
|
|
4070
4081
|
}
|
|
4071
4082
|
);
|