@planetaexo/design-system 0.51.0 → 0.52.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 +27 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +27 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3562,6 +3562,7 @@ function BookingDetails({
|
|
|
3562
3562
|
status,
|
|
3563
3563
|
statusLabel,
|
|
3564
3564
|
createdAt,
|
|
3565
|
+
cancelledAt,
|
|
3565
3566
|
contact,
|
|
3566
3567
|
agent,
|
|
3567
3568
|
agentName,
|
|
@@ -3606,7 +3607,7 @@ function BookingDetails({
|
|
|
3606
3607
|
labels,
|
|
3607
3608
|
className
|
|
3608
3609
|
}) {
|
|
3609
|
-
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;
|
|
3610
|
+
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;
|
|
3610
3611
|
const people = totalPeople(adventures);
|
|
3611
3612
|
const hasSubmitAddTraveller = !!onSubmitAddTraveller;
|
|
3612
3613
|
const hasSubmitEditTraveller = !!onSubmitEditTraveller;
|
|
@@ -3739,12 +3740,18 @@ function BookingDetails({
|
|
|
3739
3740
|
bookingId
|
|
3740
3741
|
] })
|
|
3741
3742
|
] }),
|
|
3742
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3743
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground font-sans", children: [
|
|
3744
|
+
(_b = (_a = labels == null ? void 0 : labels.createdOn) == null ? void 0 : _a.call(labels, createdAt)) != null ? _b : `Created on ${createdAt}`,
|
|
3745
|
+
cancelledAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3746
|
+
", ",
|
|
3747
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive font-medium", children: (_d = (_c = labels == null ? void 0 : labels.cancelledOn) == null ? void 0 : _c.call(labels, cancelledAt)) != null ? _d : `cancelled on ${cancelledAt}` })
|
|
3748
|
+
] })
|
|
3749
|
+
] })
|
|
3743
3750
|
] }),
|
|
3744
3751
|
/* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status, label: statusLabel })
|
|
3745
3752
|
] }),
|
|
3746
3753
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
|
|
3747
|
-
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: (
|
|
3754
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: (_e = labels == null ? void 0 : labels.contactInfo) != null ? _e : "Contact", children: [
|
|
3748
3755
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold", children: contact.name }),
|
|
3749
3756
|
contact.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
|
|
3750
3757
|
] }),
|
|
@@ -3752,7 +3759,7 @@ function BookingDetails({
|
|
|
3752
3759
|
AgentContactCard,
|
|
3753
3760
|
{
|
|
3754
3761
|
layout: "compact",
|
|
3755
|
-
name: (
|
|
3762
|
+
name: (_f = agent == null ? void 0 : agent.name) != null ? _f : agentName,
|
|
3756
3763
|
avatar: agent == null ? void 0 : agent.avatar,
|
|
3757
3764
|
email: agent == null ? void 0 : agent.email,
|
|
3758
3765
|
whatsappUrl: agent == null ? void 0 : agent.whatsappUrl,
|
|
@@ -3762,20 +3769,20 @@ function BookingDetails({
|
|
|
3762
3769
|
legacyContactLabel: agentContactLabel
|
|
3763
3770
|
}
|
|
3764
3771
|
),
|
|
3765
|
-
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: (
|
|
3772
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: (_g = labels == null ? void 0 : labels.totalPeople) != null ? _g : "Total People", children: [
|
|
3766
3773
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3767
3774
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
|
|
3768
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: (
|
|
3775
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: (_i = (_h = labels == null ? void 0 : labels.personCount) == null ? void 0 : _h.call(labels, people.total)) != null ? _i : `${people.total} person(s)` })
|
|
3769
3776
|
] }),
|
|
3770
3777
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: [
|
|
3771
|
-
people.adults > 0 ? (
|
|
3772
|
-
people.children > 0 ? (
|
|
3773
|
-
people.seniors > 0 ? (
|
|
3778
|
+
people.adults > 0 ? (_l = (_k = (_j = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _j.adults) == null ? void 0 : _k.call(_j, people.adults)) != null ? _l : `Adults: ${people.adults}` : null,
|
|
3779
|
+
people.children > 0 ? (_o = (_n = (_m = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _m.children) == null ? void 0 : _n.call(_m, people.children)) != null ? _o : `Children: ${people.children}` : null,
|
|
3780
|
+
people.seniors > 0 ? (_r = (_q = (_p = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _p.seniors) == null ? void 0 : _q.call(_p, people.seniors)) != null ? _r : `Seniors: ${people.seniors}` : null
|
|
3774
3781
|
].filter(Boolean).join(" \xB7 ") })
|
|
3775
3782
|
] })
|
|
3776
3783
|
] }),
|
|
3777
3784
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
3778
|
-
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (
|
|
3785
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_t = (_s = labels == null ? void 0 : labels.adventuresSection) == null ? void 0 : _s.call(labels, adventures.length)) != null ? _t : `Adventures (${adventures.length})` }),
|
|
3779
3786
|
adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3780
3787
|
AdventureSection,
|
|
3781
3788
|
{
|
|
@@ -3820,23 +3827,23 @@ function BookingDetails({
|
|
|
3820
3827
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: contactSectionLabel != null ? contactSectionLabel : "Responsible Person" }),
|
|
3821
3828
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
|
|
3822
3829
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3823
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (
|
|
3830
|
+
/* @__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.name) != null ? _v : "Name" }),
|
|
3824
3831
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
|
|
3825
3832
|
] }),
|
|
3826
3833
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3827
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (
|
|
3828
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (
|
|
3834
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_x = (_w = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _w.email) != null ? _x : "Email" }),
|
|
3835
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_y = contact.email) != null ? _y : "\u2014" })
|
|
3829
3836
|
] }),
|
|
3830
3837
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3831
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (
|
|
3832
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (
|
|
3838
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_A = (_z = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _z.phone) != null ? _A : "Phone" }),
|
|
3839
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_B = contact.phone) != null ? _B : "\u2014" })
|
|
3833
3840
|
] }),
|
|
3834
3841
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3835
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (
|
|
3836
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (
|
|
3842
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_D = (_C = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _C.country) != null ? _D : "Country" }),
|
|
3843
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_E = contact.country) != null ? _E : "\u2014" })
|
|
3837
3844
|
] }),
|
|
3838
3845
|
contact.passport && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3839
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (
|
|
3846
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: (_G = (_F = labels == null ? void 0 : labels.contactDetailsFields) == null ? void 0 : _F.document) != null ? _G : "Passport / ID" }),
|
|
3840
3847
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
|
|
3841
3848
|
] }),
|
|
3842
3849
|
(() => {
|
|
@@ -3897,7 +3904,7 @@ function BookingDetails({
|
|
|
3897
3904
|
className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
|
|
3898
3905
|
children: [
|
|
3899
3906
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "w-3 h-3" }),
|
|
3900
|
-
(
|
|
3907
|
+
(_H = labels == null ? void 0 : labels.cancelRequestLabel) != null ? _H : "Request cancellation"
|
|
3901
3908
|
]
|
|
3902
3909
|
}
|
|
3903
3910
|
)
|
|
@@ -3947,7 +3954,7 @@ function BookingDetails({
|
|
|
3947
3954
|
ResendInviteConfirmDialog,
|
|
3948
3955
|
{
|
|
3949
3956
|
open: resendInviteDialogState.open,
|
|
3950
|
-
travellerName: resendInviteDialogState.traveller ? `${(
|
|
3957
|
+
travellerName: resendInviteDialogState.traveller ? `${(_I = resendInviteDialogState.traveller.firstName) != null ? _I : ""} ${(_J = resendInviteDialogState.traveller.lastName) != null ? _J : ""}`.trim() : "",
|
|
3951
3958
|
onClose: closeResendInviteDialog,
|
|
3952
3959
|
onConfirm: () => {
|
|
3953
3960
|
const traveller = resendInviteDialogState.traveller;
|