@planetaexo/design-system 0.14.2 → 0.15.1
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 +111 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -1
- package/dist/index.d.ts +101 -1
- package/dist/index.js +111 -77
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1478,7 +1478,7 @@ function OfferSidebar({
|
|
|
1478
1478
|
bookDisabled,
|
|
1479
1479
|
labels
|
|
1480
1480
|
}) {
|
|
1481
|
-
var _a, _b;
|
|
1481
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1482
1482
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
1483
1483
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex rounded-2xl border border-border bg-card p-5 flex-col gap-4", children: [
|
|
1484
1484
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -1516,18 +1516,26 @@ function OfferSidebar({
|
|
|
1516
1516
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-bold text-primary font-heading", children: agent.name.charAt(0) }) }),
|
|
1517
1517
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1518
1518
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = labels == null ? void 0 : labels.needHelp) != null ? _b : "Need help with your offer?" }),
|
|
1519
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1519
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-sans text-foreground mt-0.5", children: (labels == null ? void 0 : labels.agentContactTemplate) ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1520
|
+
labels.agentContactTemplate(agent.name),
|
|
1521
|
+
agent.company && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1522
|
+
" ",
|
|
1523
|
+
(_d = (_c = labels == null ? void 0 : labels.agentContact) == null ? void 0 : _c.atCompanyLabel) != null ? _d : "at",
|
|
1524
|
+
" ",
|
|
1525
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.company })
|
|
1526
|
+
] })
|
|
1527
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1520
1528
|
"Contact",
|
|
1521
1529
|
" ",
|
|
1522
1530
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.name }),
|
|
1523
1531
|
" your travel advisor",
|
|
1524
1532
|
agent.company && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1525
1533
|
" ",
|
|
1526
|
-
"at",
|
|
1534
|
+
(_f = (_e = labels == null ? void 0 : labels.agentContact) == null ? void 0 : _e.atCompanyLabel) != null ? _f : "at",
|
|
1527
1535
|
" ",
|
|
1528
1536
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.company })
|
|
1529
1537
|
] })
|
|
1530
|
-
] })
|
|
1538
|
+
] }) })
|
|
1531
1539
|
] })
|
|
1532
1540
|
] }),
|
|
1533
1541
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
@@ -1541,7 +1549,7 @@ function OfferSidebar({
|
|
|
1541
1549
|
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
1542
1550
|
children: [
|
|
1543
1551
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4 shrink-0 text-[#25D366]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
|
|
1544
|
-
"WhatsApp"
|
|
1552
|
+
(_h = (_g = labels == null ? void 0 : labels.agentContact) == null ? void 0 : _g.whatsappLabel) != null ? _h : "WhatsApp"
|
|
1545
1553
|
]
|
|
1546
1554
|
}
|
|
1547
1555
|
),
|
|
@@ -1552,7 +1560,7 @@ function OfferSidebar({
|
|
|
1552
1560
|
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
1553
1561
|
children: [
|
|
1554
1562
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
1555
|
-
"Email"
|
|
1563
|
+
(_j = (_i = labels == null ? void 0 : labels.agentContact) == null ? void 0 : _i.emailLabel) != null ? _j : "Email"
|
|
1556
1564
|
]
|
|
1557
1565
|
}
|
|
1558
1566
|
),
|
|
@@ -1565,7 +1573,7 @@ function OfferSidebar({
|
|
|
1565
1573
|
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
1566
1574
|
children: [
|
|
1567
1575
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PhoneIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
1568
|
-
"Schedule a call"
|
|
1576
|
+
(_l = (_k = labels == null ? void 0 : labels.agentContact) == null ? void 0 : _k.scheduleCallLabel) != null ? _l : "Schedule a call"
|
|
1569
1577
|
]
|
|
1570
1578
|
}
|
|
1571
1579
|
)
|
|
@@ -1585,7 +1593,7 @@ function OfferSummarySection({
|
|
|
1585
1593
|
continueDisabled,
|
|
1586
1594
|
labels
|
|
1587
1595
|
}) {
|
|
1588
|
-
var _a, _b, _c, _d, _e;
|
|
1596
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1589
1597
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
|
|
1590
1598
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-bold text-foreground font-heading text-base", children: (_a = labels == null ? void 0 : labels.summary) != null ? _a : "Summary" }),
|
|
1591
1599
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
@@ -1618,24 +1626,20 @@ function OfferSummarySection({
|
|
|
1618
1626
|
] }),
|
|
1619
1627
|
depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 rounded-lg bg-muted/50 border border-border p-3", children: [
|
|
1620
1628
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1621
|
-
/* @__PURE__ */ jsxRuntime.
|
|
1622
|
-
"Deposit (",
|
|
1623
|
-
depositInfo.depositPercent,
|
|
1624
|
-
"%)"
|
|
1625
|
-
] }),
|
|
1629
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: (_d = (_c = labels == null ? void 0 : labels.depositLabel) == null ? void 0 : _c.call(labels, depositInfo.depositPercent)) != null ? _d : `Deposit (${depositInfo.depositPercent}%)` }),
|
|
1626
1630
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.depositAmount })
|
|
1627
1631
|
] }),
|
|
1628
1632
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1629
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: (
|
|
1633
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: (_e = labels == null ? void 0 : labels.remainingBalance) != null ? _e : "Remaining balance" }),
|
|
1630
1634
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.remainingAmount })
|
|
1631
1635
|
] }),
|
|
1632
1636
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1633
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: (
|
|
1637
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: (_f = labels == null ? void 0 : labels.balanceDue) != null ? _f : "Balance due" }),
|
|
1634
1638
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.balanceDueDate })
|
|
1635
1639
|
] })
|
|
1636
1640
|
] }),
|
|
1637
1641
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1", children: [
|
|
1638
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-foreground font-heading", children: (
|
|
1642
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-foreground font-heading", children: (_g = labels == null ? void 0 : labels.total) != null ? _g : "Total" }),
|
|
1639
1643
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl font-black text-primary font-heading", children: total })
|
|
1640
1644
|
] }),
|
|
1641
1645
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1965,7 +1969,7 @@ function BookingWizard({
|
|
|
1965
1969
|
onCancel,
|
|
1966
1970
|
labels
|
|
1967
1971
|
}) {
|
|
1968
|
-
var _a;
|
|
1972
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
|
|
1969
1973
|
const wizardSteps = WIZARD_STEPS_FN(labels);
|
|
1970
1974
|
const [step, setStep] = React23__namespace.useState("responsible");
|
|
1971
1975
|
const [error, setError] = React23__namespace.useState(null);
|
|
@@ -1980,12 +1984,12 @@ function BookingWizard({
|
|
|
1980
1984
|
notes: ""
|
|
1981
1985
|
});
|
|
1982
1986
|
const totalAdults = adventures.reduce((s, a) => {
|
|
1983
|
-
var _a2,
|
|
1984
|
-
return s + ((
|
|
1987
|
+
var _a2, _b2;
|
|
1988
|
+
return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.adults) != null ? _b2 : 1);
|
|
1985
1989
|
}, 0);
|
|
1986
1990
|
const totalChildren = adventures.reduce((s, a) => {
|
|
1987
|
-
var _a2,
|
|
1988
|
-
return s + ((
|
|
1991
|
+
var _a2, _b2;
|
|
1992
|
+
return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
|
|
1989
1993
|
}, 0);
|
|
1990
1994
|
const totalPax = totalAdults + totalChildren;
|
|
1991
1995
|
const [travellers, setTravellers] = React23__namespace.useState(
|
|
@@ -2039,7 +2043,17 @@ function BookingWizard({
|
|
|
2039
2043
|
const depositLabel = depositInfo ? `${payDepositLabel} (${depositInfo.depositPercent}%) \u2014 ${depositInfo.depositAmount}` : payDepositLabel;
|
|
2040
2044
|
const fullLabel = `Pay full amount \u2014 ${total}`;
|
|
2041
2045
|
if (step === "confirmed") {
|
|
2042
|
-
|
|
2046
|
+
const confirmedMsg = labels == null ? void 0 : labels.bookingConfirmedMessage;
|
|
2047
|
+
const resolvedMsg = typeof confirmedMsg === "function" ? confirmedMsg({ email: (_b = responsible.email) != null ? _b : "" }) : confirmedMsg;
|
|
2048
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2049
|
+
BookingConfirmedCard,
|
|
2050
|
+
{
|
|
2051
|
+
title: labels == null ? void 0 : labels.bookingConfirmed,
|
|
2052
|
+
email: responsible.email,
|
|
2053
|
+
message: resolvedMsg,
|
|
2054
|
+
onBack: onCancel
|
|
2055
|
+
}
|
|
2056
|
+
);
|
|
2043
2057
|
}
|
|
2044
2058
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2045
2059
|
BookingShell,
|
|
@@ -2050,13 +2064,13 @@ function BookingWizard({
|
|
|
2050
2064
|
onNext: goNext,
|
|
2051
2065
|
onBack: goPrev,
|
|
2052
2066
|
onCancel,
|
|
2053
|
-
nextLabel: step === "payment" ? "Confirm booking" : "Next",
|
|
2054
|
-
backLabel: "Back",
|
|
2055
|
-
cancelLabel: "Cancel",
|
|
2067
|
+
nextLabel: step === "payment" ? (_d = (_c = labels == null ? void 0 : labels.wizard) == null ? void 0 : _c.confirmBookingLabel) != null ? _d : "Confirm booking" : (_f = (_e = labels == null ? void 0 : labels.wizard) == null ? void 0 : _e.nextLabel) != null ? _f : "Next",
|
|
2068
|
+
backLabel: (_h = (_g = labels == null ? void 0 : labels.wizard) == null ? void 0 : _g.backLabel) != null ? _h : "Back",
|
|
2069
|
+
cancelLabel: (_j = (_i = labels == null ? void 0 : labels.wizard) == null ? void 0 : _i.cancelLabel) != null ? _j : "Cancel",
|
|
2056
2070
|
error,
|
|
2057
2071
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
2058
2072
|
step === "responsible" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
2059
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: "Enter the responsible person's details. This person will receive booking confirmations and is accountable for all travellers." }),
|
|
2073
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: (_l = (_k = labels == null ? void 0 : labels.wizard) == null ? void 0 : _k.step1Description) != null ? _l : "Enter the responsible person's details. This person will receive booking confirmations and is accountable for all travellers." }),
|
|
2060
2074
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
2061
2075
|
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "First name", required: true, value: responsible.firstName, onChange: (e) => setR("firstName", e.target.value) }),
|
|
2062
2076
|
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Last name", required: true, value: responsible.lastName, onChange: (e) => setR("lastName", e.target.value) })
|
|
@@ -2077,7 +2091,7 @@ function BookingWizard({
|
|
|
2077
2091
|
className: "peer block h-14 w-full rounded-r-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-ui transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
|
|
2078
2092
|
}
|
|
2079
2093
|
),
|
|
2080
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-phone", className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs", children: "Phone" })
|
|
2094
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-phone", className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs", children: (_o = (_n = (_m = labels == null ? void 0 : labels.wizard) == null ? void 0 : _m.fields) == null ? void 0 : _n.phone) != null ? _o : "Phone" })
|
|
2081
2095
|
] })
|
|
2082
2096
|
] })
|
|
2083
2097
|
] }),
|
|
@@ -2095,27 +2109,24 @@ function BookingWizard({
|
|
|
2095
2109
|
className: "peer block w-full resize-none rounded-lg border border-border bg-background px-3 pt-6 pb-3 text-base text-foreground font-ui transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
|
|
2096
2110
|
}
|
|
2097
2111
|
),
|
|
2098
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-notes", className: "pointer-events-none absolute left-3 top-4 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs", children: "Notes (optional)" })
|
|
2112
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-notes", className: "pointer-events-none absolute left-3 top-4 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs", children: (_r = (_q = (_p = labels == null ? void 0 : labels.wizard) == null ? void 0 : _p.fields) == null ? void 0 : _q.notesOptional) != null ? _r : "Notes (optional)" })
|
|
2099
2113
|
] })
|
|
2100
2114
|
] }),
|
|
2101
2115
|
step === "travellers" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
2102
2116
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2103
2117
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2104
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "Traveller details" })
|
|
2118
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: (_t = (_s = labels == null ? void 0 : labels.wizard) == null ? void 0 : _s.step2Heading) != null ? _t : "Traveller details" })
|
|
2105
2119
|
] }),
|
|
2106
2120
|
travellers.map((t, i) => {
|
|
2107
|
-
var _a2,
|
|
2121
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
2108
2122
|
const isChild = i >= totalAdults;
|
|
2109
2123
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
2110
2124
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2111
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2112
|
-
"Traveller ",
|
|
2113
|
-
i + 1
|
|
2114
|
-
] }),
|
|
2125
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-bold text-foreground font-heading", children: (_c2 = (_b2 = (_a2 = labels == null ? void 0 : labels.wizard) == null ? void 0 : _a2.step2TravellerCard) == null ? void 0 : _b2.call(_a2, i + 1)) != null ? _c2 : `Traveller ${i + 1}` }),
|
|
2115
2126
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
2116
2127
|
"text-xs font-semibold font-heading rounded-full px-2.5 py-0.5",
|
|
2117
2128
|
isChild ? "bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400" : "bg-primary/10 text-primary"
|
|
2118
|
-
), children: isChild ? (
|
|
2129
|
+
), children: isChild ? (_d2 = labels == null ? void 0 : labels.childLabel) != null ? _d2 : "Child" : (_e2 = labels == null ? void 0 : labels.adultLabel) != null ? _e2 : "Adult" })
|
|
2119
2130
|
] }),
|
|
2120
2131
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
2121
2132
|
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "First name", required: true, value: t.firstName, onChange: (e) => setT(i, "firstName", e.target.value) }),
|
|
@@ -2125,7 +2136,7 @@ function BookingWizard({
|
|
|
2125
2136
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2126
2137
|
BirthDateField,
|
|
2127
2138
|
{
|
|
2128
|
-
label: "Date of birth",
|
|
2139
|
+
label: (_h2 = (_g2 = (_f2 = labels == null ? void 0 : labels.wizard) == null ? void 0 : _f2.fields) == null ? void 0 : _g2.dateOfBirth) != null ? _h2 : "Date of birth",
|
|
2129
2140
|
required: isChild,
|
|
2130
2141
|
value: t.dateOfBirth,
|
|
2131
2142
|
onChange: (d) => setTDob(i, d)
|
|
@@ -2134,7 +2145,7 @@ function BookingWizard({
|
|
|
2134
2145
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2135
2146
|
FloatingInput,
|
|
2136
2147
|
{
|
|
2137
|
-
label: "Email",
|
|
2148
|
+
label: (_k2 = (_j2 = (_i2 = labels == null ? void 0 : labels.wizard) == null ? void 0 : _i2.fields) == null ? void 0 : _j2.email) != null ? _k2 : "Email",
|
|
2138
2149
|
type: "email",
|
|
2139
2150
|
value: t.email,
|
|
2140
2151
|
onChange: (e) => setT(i, "email", e.target.value)
|
|
@@ -2145,7 +2156,7 @@ function BookingWizard({
|
|
|
2145
2156
|
})
|
|
2146
2157
|
] }),
|
|
2147
2158
|
step === "payment" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
2148
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: "When you confirm, we will open secure online payment (Stripe). Choose deposit vs full amount below when applicable." }),
|
|
2159
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: (_v = (_u = labels == null ? void 0 : labels.wizard) == null ? void 0 : _u.step3Description) != null ? _v : "When you confirm, we will open secure online payment (Stripe). Choose deposit vs full amount below when applicable." }),
|
|
2149
2160
|
depositInfo && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2150
2161
|
PaymentAmountSelector,
|
|
2151
2162
|
{
|
|
@@ -2160,9 +2171,21 @@ function BookingWizard({
|
|
|
2160
2171
|
{
|
|
2161
2172
|
title: labels == null ? void 0 : labels.paymentMethod,
|
|
2162
2173
|
methods: [
|
|
2163
|
-
{
|
|
2164
|
-
|
|
2165
|
-
|
|
2174
|
+
{
|
|
2175
|
+
id: "stripe",
|
|
2176
|
+
label: (_z = (_y = (_x = (_w = labels == null ? void 0 : labels.wizard) == null ? void 0 : _w.paymentMethods) == null ? void 0 : _x.creditCard) == null ? void 0 : _y.label) != null ? _z : "Credit / Debit card",
|
|
2177
|
+
description: (_D = (_C = (_B = (_A = labels == null ? void 0 : labels.wizard) == null ? void 0 : _A.paymentMethods) == null ? void 0 : _B.creditCard) == null ? void 0 : _C.description) != null ? _D : "Secure payment via Stripe"
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
id: "pix",
|
|
2181
|
+
label: (_H = (_G = (_F = (_E = labels == null ? void 0 : labels.wizard) == null ? void 0 : _E.paymentMethods) == null ? void 0 : _F.pix) == null ? void 0 : _G.label) != null ? _H : "PIX",
|
|
2182
|
+
description: (_L = (_K = (_J = (_I = labels == null ? void 0 : labels.wizard) == null ? void 0 : _I.paymentMethods) == null ? void 0 : _J.pix) == null ? void 0 : _K.description) != null ? _L : "Instant transfer \u2014 Brazil only"
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
id: "bank",
|
|
2186
|
+
label: (_P = (_O = (_N = (_M = labels == null ? void 0 : labels.wizard) == null ? void 0 : _M.paymentMethods) == null ? void 0 : _N.bankTransfer) == null ? void 0 : _O.label) != null ? _P : "Bank transfer",
|
|
2187
|
+
description: (_T = (_S = (_R = (_Q = labels == null ? void 0 : labels.wizard) == null ? void 0 : _Q.paymentMethods) == null ? void 0 : _R.bankTransfer) == null ? void 0 : _S.description) != null ? _T : "Wire / TED / DOC"
|
|
2188
|
+
}
|
|
2166
2189
|
],
|
|
2167
2190
|
value: payMethod,
|
|
2168
2191
|
onChange: (v) => setPayMethod(v)
|
|
@@ -2388,6 +2411,8 @@ function WideAgentCard({
|
|
|
2388
2411
|
label,
|
|
2389
2412
|
nameFallback,
|
|
2390
2413
|
helperText,
|
|
2414
|
+
whatsappLabel,
|
|
2415
|
+
emailLabel,
|
|
2391
2416
|
className
|
|
2392
2417
|
}) {
|
|
2393
2418
|
const hasAgent = !!name;
|
|
@@ -2435,7 +2460,7 @@ function WideAgentCard({
|
|
|
2435
2460
|
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
2436
2461
|
children: [
|
|
2437
2462
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4 shrink-0 text-[#25D366]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
|
|
2438
|
-
"WhatsApp"
|
|
2463
|
+
whatsappLabel != null ? whatsappLabel : "WhatsApp"
|
|
2439
2464
|
]
|
|
2440
2465
|
}
|
|
2441
2466
|
),
|
|
@@ -2446,7 +2471,7 @@ function WideAgentCard({
|
|
|
2446
2471
|
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
2447
2472
|
children: [
|
|
2448
2473
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
2449
|
-
"Email"
|
|
2474
|
+
emailLabel != null ? emailLabel : "Email"
|
|
2450
2475
|
]
|
|
2451
2476
|
}
|
|
2452
2477
|
)
|
|
@@ -2545,7 +2570,7 @@ function AdventureSection({
|
|
|
2545
2570
|
cannotRemoveLastTravellerLabel,
|
|
2546
2571
|
labels
|
|
2547
2572
|
}) {
|
|
2548
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
2573
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
2549
2574
|
const [detailsOpen, setDetailsOpen] = React23__namespace.useState(false);
|
|
2550
2575
|
const handleCopyUrl = (url) => {
|
|
2551
2576
|
if (onCopyFormLink) {
|
|
@@ -2638,7 +2663,7 @@ function AdventureSection({
|
|
|
2638
2663
|
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-snug font-sans", children: adventure.description })
|
|
2639
2664
|
] }),
|
|
2640
2665
|
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2641
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children:
|
|
2666
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_g = (_f = labels == null ? void 0 : labels.adventureSections) == null ? void 0 : _f.included) != null ? _g : "What's included" }),
|
|
2642
2667
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2643
2668
|
"li",
|
|
2644
2669
|
{
|
|
@@ -2652,7 +2677,7 @@ function AdventureSection({
|
|
|
2652
2677
|
)) })
|
|
2653
2678
|
] }),
|
|
2654
2679
|
adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2655
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children:
|
|
2680
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_i = (_h = labels == null ? void 0 : labels.adventureSections) == null ? void 0 : _h.notIncluded) != null ? _i : "What's not included" }),
|
|
2656
2681
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2657
2682
|
"li",
|
|
2658
2683
|
{
|
|
@@ -2666,7 +2691,7 @@ function AdventureSection({
|
|
|
2666
2691
|
)) })
|
|
2667
2692
|
] }),
|
|
2668
2693
|
adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2669
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children:
|
|
2694
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_k = (_j = labels == null ? void 0 : labels.adventureSections) == null ? void 0 : _j.cancellationPolicy) != null ? _k : "Cancellation policy" }),
|
|
2670
2695
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2671
2696
|
"li",
|
|
2672
2697
|
{
|
|
@@ -2683,7 +2708,7 @@ function AdventureSection({
|
|
|
2683
2708
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-4", children: [
|
|
2684
2709
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 flex-wrap", children: [
|
|
2685
2710
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2686
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (
|
|
2711
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_l = labels == null ? void 0 : labels.travellersSection) != null ? _l : "Travellers" }),
|
|
2687
2712
|
adventure.formName && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-semibold text-muted-foreground/50 font-heading tracking-wide", children: [
|
|
2688
2713
|
"\xB7 ",
|
|
2689
2714
|
adventure.formName
|
|
@@ -2703,8 +2728,8 @@ function AdventureSection({
|
|
|
2703
2728
|
),
|
|
2704
2729
|
children: [
|
|
2705
2730
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlusIcon, { className: "w-3 h-3" }),
|
|
2706
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (
|
|
2707
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (
|
|
2731
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (_m = labels == null ? void 0 : labels.addContactAsTraveller) != null ? _m : "Add contact as traveller" }),
|
|
2732
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (_n = labels == null ? void 0 : labels.addContactAsTravellerShort) != null ? _n : "Add contact" })
|
|
2708
2733
|
]
|
|
2709
2734
|
}
|
|
2710
2735
|
),
|
|
@@ -2722,8 +2747,8 @@ function AdventureSection({
|
|
|
2722
2747
|
className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-primary hover:border-primary hover:bg-primary/5 transition-colors",
|
|
2723
2748
|
children: [
|
|
2724
2749
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
2725
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (
|
|
2726
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (
|
|
2750
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (_o = adventure.addTravellerLabel) != null ? _o : "More travellers" }),
|
|
2751
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (_q = (_p = adventure.addTravellerShortLabel) != null ? _p : adventure.addTravellerLabel) != null ? _q : "Add" })
|
|
2727
2752
|
]
|
|
2728
2753
|
}
|
|
2729
2754
|
)
|
|
@@ -2888,7 +2913,7 @@ function AdventureSection({
|
|
|
2888
2913
|
)) })
|
|
2889
2914
|
] });
|
|
2890
2915
|
})(),
|
|
2891
|
-
adventure.registrationNotRequired ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-ui text-muted-foreground", children: (
|
|
2916
|
+
adventure.registrationNotRequired ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-ui text-muted-foreground", children: (_r = adventure.noRegistrationRequiredLabel) != null ? _r : "No registration required" }) }) : adventure.travellers.length > 0 && totalSlots > 0 && (() => {
|
|
2892
2917
|
var _a2, _b2;
|
|
2893
2918
|
const completed = adventure.travellers.filter((t) => t.status === "completed").length;
|
|
2894
2919
|
const percent = Math.round(completed / totalSlots * 100);
|
|
@@ -3376,7 +3401,7 @@ function BookingDetails({
|
|
|
3376
3401
|
labels,
|
|
3377
3402
|
className
|
|
3378
3403
|
}) {
|
|
3379
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
3404
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
3380
3405
|
const people = totalPeople(adventures);
|
|
3381
3406
|
const hasSubmitAddTraveller = !!onSubmitAddTraveller;
|
|
3382
3407
|
const hasSubmitEditTraveller = !!onSubmitEditTraveller;
|
|
@@ -3563,23 +3588,23 @@ function BookingDetails({
|
|
|
3563
3588
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: contactSectionLabel != null ? contactSectionLabel : "Responsible Person" }),
|
|
3564
3589
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
|
|
3565
3590
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3566
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
|
|
3591
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_t = (_s = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _s.name) != null ? _t : "Name" }),
|
|
3567
3592
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
|
|
3568
3593
|
] }),
|
|
3569
3594
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3570
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
|
|
3571
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (
|
|
3595
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_v = (_u = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _u.email) != null ? _v : "Email" }),
|
|
3596
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_w = contact.email) != null ? _w : "\u2014" })
|
|
3572
3597
|
] }),
|
|
3573
3598
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3574
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
|
|
3575
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (
|
|
3599
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_y = (_x = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _x.phone) != null ? _y : "Phone" }),
|
|
3600
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_z = contact.phone) != null ? _z : "\u2014" })
|
|
3576
3601
|
] }),
|
|
3577
3602
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3578
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
|
|
3579
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (
|
|
3603
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_B = (_A = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _A.country) != null ? _B : "Country" }),
|
|
3604
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_C = contact.country) != null ? _C : "\u2014" })
|
|
3580
3605
|
] }),
|
|
3581
3606
|
contact.passport && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3582
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport /
|
|
3607
|
+
/* @__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" }),
|
|
3583
3608
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
|
|
3584
3609
|
] })
|
|
3585
3610
|
] })
|
|
@@ -3627,7 +3652,7 @@ function BookingDetails({
|
|
|
3627
3652
|
className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
|
|
3628
3653
|
children: [
|
|
3629
3654
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "w-3 h-3" }),
|
|
3630
|
-
"Request cancellation"
|
|
3655
|
+
(_F = labels == null ? void 0 : labels.cancelRequestLabel) != null ? _F : "Request cancellation"
|
|
3631
3656
|
]
|
|
3632
3657
|
}
|
|
3633
3658
|
)
|
|
@@ -4886,7 +4911,11 @@ var DEFAULT_LABELS3 = {
|
|
|
4886
4911
|
nationalityLabel: "Nationality",
|
|
4887
4912
|
selectPlaceholder: "Select an option\u2026",
|
|
4888
4913
|
optionalLabel: "(optional)",
|
|
4889
|
-
requiredFieldError: "Required"
|
|
4914
|
+
requiredFieldError: "Required",
|
|
4915
|
+
dateLabel: "Date",
|
|
4916
|
+
datesLabel: "Dates",
|
|
4917
|
+
yesLabel: "Yes",
|
|
4918
|
+
noLabel: "No"
|
|
4890
4919
|
};
|
|
4891
4920
|
var TERMS_ACCEPT_KEY = "__registrationTermsAccepted";
|
|
4892
4921
|
function emptyName() {
|
|
@@ -5667,7 +5696,7 @@ function RegistrationForm({
|
|
|
5667
5696
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5668
5697
|
] }),
|
|
5669
5698
|
dateRange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-x-4", children: [
|
|
5670
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ?
|
|
5699
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? L.datesLabel : L.dateLabel }),
|
|
5671
5700
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground text-right min-w-0", children: dateRange })
|
|
5672
5701
|
] }),
|
|
5673
5702
|
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-x-4", children: [
|
|
@@ -5851,8 +5880,8 @@ function phoneCountryDial(code) {
|
|
|
5851
5880
|
var _a, _b;
|
|
5852
5881
|
return (_b = (_a = PHONE_COUNTRIES.find((c) => c.code === code)) == null ? void 0 : _a.dial) != null ? _b : code;
|
|
5853
5882
|
}
|
|
5854
|
-
function defaultFormatAnswer(field, value, fmtDate) {
|
|
5855
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5883
|
+
function defaultFormatAnswer(field, value, fmtDate, yesNoLabels) {
|
|
5884
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5856
5885
|
if (value == null || value === "") return "\u2014";
|
|
5857
5886
|
if (value instanceof Date) return fmtDate(value);
|
|
5858
5887
|
if (Array.isArray(value)) {
|
|
@@ -5861,7 +5890,8 @@ function defaultFormatAnswer(field, value, fmtDate) {
|
|
|
5861
5890
|
}
|
|
5862
5891
|
return value.filter(Boolean).join(", ") || "\u2014";
|
|
5863
5892
|
}
|
|
5864
|
-
if (typeof value === "boolean")
|
|
5893
|
+
if (typeof value === "boolean")
|
|
5894
|
+
return value ? (_a = yesNoLabels == null ? void 0 : yesNoLabels.yesLabel) != null ? _a : "Yes" : (_b = yesNoLabels == null ? void 0 : yesNoLabels.noLabel) != null ? _b : "No";
|
|
5865
5895
|
if (typeof value === "object") {
|
|
5866
5896
|
if ("contactName" in value) {
|
|
5867
5897
|
const ec = value;
|
|
@@ -5879,13 +5909,13 @@ function defaultFormatAnswer(field, value, fmtDate) {
|
|
|
5879
5909
|
}
|
|
5880
5910
|
}
|
|
5881
5911
|
if (field.type === "nationality" && typeof value === "string") {
|
|
5882
|
-
return (
|
|
5912
|
+
return (_d = (_c = COUNTRIES.find((c) => c.code === value)) == null ? void 0 : _c.name) != null ? _d : value;
|
|
5883
5913
|
}
|
|
5884
5914
|
if (field.type === "select" && field.options) {
|
|
5885
|
-
return (
|
|
5915
|
+
return (_f = (_e = field.options.find((o) => o.value === value)) == null ? void 0 : _e.label) != null ? _f : String(value);
|
|
5886
5916
|
}
|
|
5887
5917
|
if (field.type === "radio" && field.options) {
|
|
5888
|
-
return (
|
|
5918
|
+
return (_h = (_g = field.options.find((o) => o.value === value)) == null ? void 0 : _g.label) != null ? _h : String(value);
|
|
5889
5919
|
}
|
|
5890
5920
|
if (field.type === "date" && typeof value === "string") return fmtDate(value);
|
|
5891
5921
|
return String(value);
|
|
@@ -5918,9 +5948,10 @@ function RegistrationSuccessCard({
|
|
|
5918
5948
|
tripInfoLabels,
|
|
5919
5949
|
density = "comfortable",
|
|
5920
5950
|
submissionTimestamps,
|
|
5921
|
-
submissionTimestampsLabels
|
|
5951
|
+
submissionTimestampsLabels,
|
|
5952
|
+
labels: scLabels
|
|
5922
5953
|
}) {
|
|
5923
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
5954
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
5924
5955
|
const isMinimal = variant === "minimal";
|
|
5925
5956
|
const isCompact = density === "compact";
|
|
5926
5957
|
const sorted = isMinimal ? [] : [...fields].sort((a, b) => {
|
|
@@ -5989,7 +6020,7 @@ function RegistrationSuccessCard({
|
|
|
5989
6020
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
|
|
5990
6021
|
] }),
|
|
5991
6022
|
dateRange && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
5992
|
-
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
|
|
6023
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? (_h = scLabels == null ? void 0 : scLabels.datesLabel) != null ? _h : "Dates" : (_i = scLabels == null ? void 0 : scLabels.dateLabel) != null ? _i : "Date" }),
|
|
5993
6024
|
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: dateRange })
|
|
5994
6025
|
] }),
|
|
5995
6026
|
(adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
@@ -6007,18 +6038,21 @@ function RegistrationSuccessCard({
|
|
|
6007
6038
|
] }) }),
|
|
6008
6039
|
sorted.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-x-4", children: [
|
|
6009
6040
|
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: f.label }),
|
|
6010
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter
|
|
6041
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter, {
|
|
6042
|
+
yesLabel: scLabels == null ? void 0 : scLabels.yesLabel,
|
|
6043
|
+
noLabel: scLabels == null ? void 0 : scLabels.noLabel
|
|
6044
|
+
})))(
|
|
6011
6045
|
f,
|
|
6012
6046
|
answers[f.id]
|
|
6013
6047
|
) })
|
|
6014
6048
|
] }, f.id)) }) }),
|
|
6015
|
-
!isMinimal && terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: (
|
|
6049
|
+
!isMinimal && terms && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: (_j = termsLabels == null ? void 0 : termsLabels.title) != null ? _j : "Terms & Conditions", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 text-sm font-ui", children: [
|
|
6016
6050
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6017
6051
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
6018
6052
|
"inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
|
|
6019
6053
|
terms.accepted ? "bg-primary" : "bg-destructive"
|
|
6020
6054
|
), children: terms.accepted ? "\u2713" : "\u2717" }),
|
|
6021
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: terms.accepted ? "text-primary font-medium" : "text-destructive font-medium", children: terms.accepted ? (
|
|
6055
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: terms.accepted ? "text-primary font-medium" : "text-destructive font-medium", children: terms.accepted ? (_k = termsLabels == null ? void 0 : termsLabels.accepted) != null ? _k : "Accepted" : (_l = termsLabels == null ? void 0 : termsLabels.notAccepted) != null ? _l : "Not accepted" })
|
|
6022
6056
|
] }),
|
|
6023
6057
|
termsLayout === "full" && terms.markdown.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6024
6058
|
"div",
|