@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.d.cts CHANGED
@@ -446,6 +446,11 @@ interface TravellerFormConfig {
446
446
  interface BookingDetailsLabels {
447
447
  /** "Created on {date}" — render em sub-header. */
448
448
  createdOn?: (date: string) => string;
449
+ /** "cancelled on {date}" — appended ao sub-header quando `cancelledAt` é
450
+ * passado. Usado para reservas com `status="cancelled"` evitando banner
451
+ * duplicado no topo da página. Render sem prefixo (deve começar minúsculo
452
+ * na maioria das línguas) — vem após ", " no DOM. */
453
+ cancelledOn?: (date: string) => string;
449
454
  /** Header InfoCard "CONTACT". */
450
455
  contactInfo?: string;
451
456
  /** Header InfoCard "TOTAL PEOPLE". */
@@ -658,6 +663,11 @@ interface BookingDetailsProps {
658
663
  /** Texto exibido no badge de status. Quando ausente, usa um default em inglês baseado no `status`. */
659
664
  statusLabel?: string;
660
665
  createdAt: string;
666
+ /** Data de cancelamento já formatada/localizada. Quando preenchido, renderiza
667
+ * ", cancelada em {date}" appended ao subtitle de createdAt no header.
668
+ * Sub-bullet: substitui o uso do banner amber no topo da página para o
669
+ * estado cancelled (decisão UX 2026-05-29 — banner ficava grande/feio). */
670
+ cancelledAt?: string;
661
671
  contact: BookingContact;
662
672
  /** Dados completos do agente para renderizar o `AgentContactCard` (avatar + email + whatsapp).
663
673
  * Tem prioridade sobre `agentName` quando ambos forem passados. */
@@ -745,7 +755,7 @@ interface BookingDetailsProps {
745
755
  labels?: BookingDetailsLabels;
746
756
  className?: string;
747
757
  }
748
- declare function BookingDetails({ bookingId, status, statusLabel, createdAt, contact, agent, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, contactSectionLabel, payBalanceLabel, balanceDueLabel, totalPaidLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onResendInvite, resendingInviteTravellerIds, resendInviteAriaLabel, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, labels, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
758
+ declare function BookingDetails({ bookingId, status, statusLabel, createdAt, cancelledAt, contact, agent, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, contactSectionLabel, payBalanceLabel, balanceDueLabel, totalPaidLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onResendInvite, resendingInviteTravellerIds, resendInviteAriaLabel, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, labels, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
749
759
 
750
760
  interface AgentContactCardProps {
751
761
  layout: "compact" | "wide";
package/dist/index.d.ts CHANGED
@@ -446,6 +446,11 @@ interface TravellerFormConfig {
446
446
  interface BookingDetailsLabels {
447
447
  /** "Created on {date}" — render em sub-header. */
448
448
  createdOn?: (date: string) => string;
449
+ /** "cancelled on {date}" — appended ao sub-header quando `cancelledAt` é
450
+ * passado. Usado para reservas com `status="cancelled"` evitando banner
451
+ * duplicado no topo da página. Render sem prefixo (deve começar minúsculo
452
+ * na maioria das línguas) — vem após ", " no DOM. */
453
+ cancelledOn?: (date: string) => string;
449
454
  /** Header InfoCard "CONTACT". */
450
455
  contactInfo?: string;
451
456
  /** Header InfoCard "TOTAL PEOPLE". */
@@ -658,6 +663,11 @@ interface BookingDetailsProps {
658
663
  /** Texto exibido no badge de status. Quando ausente, usa um default em inglês baseado no `status`. */
659
664
  statusLabel?: string;
660
665
  createdAt: string;
666
+ /** Data de cancelamento já formatada/localizada. Quando preenchido, renderiza
667
+ * ", cancelada em {date}" appended ao subtitle de createdAt no header.
668
+ * Sub-bullet: substitui o uso do banner amber no topo da página para o
669
+ * estado cancelled (decisão UX 2026-05-29 — banner ficava grande/feio). */
670
+ cancelledAt?: string;
661
671
  contact: BookingContact;
662
672
  /** Dados completos do agente para renderizar o `AgentContactCard` (avatar + email + whatsapp).
663
673
  * Tem prioridade sobre `agentName` quando ambos forem passados. */
@@ -745,7 +755,7 @@ interface BookingDetailsProps {
745
755
  labels?: BookingDetailsLabels;
746
756
  className?: string;
747
757
  }
748
- declare function BookingDetails({ bookingId, status, statusLabel, createdAt, contact, agent, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, contactSectionLabel, payBalanceLabel, balanceDueLabel, totalPaidLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onResendInvite, resendingInviteTravellerIds, resendInviteAriaLabel, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, labels, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
758
+ declare function BookingDetails({ bookingId, status, statusLabel, createdAt, cancelledAt, contact, agent, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, contactSectionLabel, payBalanceLabel, balanceDueLabel, totalPaidLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onResendInvite, resendingInviteTravellerIds, resendInviteAriaLabel, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, labels, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
749
759
 
750
760
  interface AgentContactCardProps {
751
761
  layout: "compact" | "wide";
package/dist/index.js CHANGED
@@ -3541,6 +3541,7 @@ function BookingDetails({
3541
3541
  status,
3542
3542
  statusLabel,
3543
3543
  createdAt,
3544
+ cancelledAt,
3544
3545
  contact,
3545
3546
  agent,
3546
3547
  agentName,
@@ -3585,7 +3586,7 @@ function BookingDetails({
3585
3586
  labels,
3586
3587
  className
3587
3588
  }) {
3588
- 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;
3589
+ 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;
3589
3590
  const people = totalPeople(adventures);
3590
3591
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3591
3592
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
@@ -3718,12 +3719,18 @@ function BookingDetails({
3718
3719
  bookingId
3719
3720
  ] })
3720
3721
  ] }),
3721
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans", children: (_b = (_a = labels == null ? void 0 : labels.createdOn) == null ? void 0 : _a.call(labels, createdAt)) != null ? _b : `Created on ${createdAt}` })
3722
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground font-sans", children: [
3723
+ (_b = (_a = labels == null ? void 0 : labels.createdOn) == null ? void 0 : _a.call(labels, createdAt)) != null ? _b : `Created on ${createdAt}`,
3724
+ cancelledAt && /* @__PURE__ */ jsxs(Fragment, { children: [
3725
+ ", ",
3726
+ /* @__PURE__ */ 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}` })
3727
+ ] })
3728
+ ] })
3722
3729
  ] }),
3723
3730
  /* @__PURE__ */ jsx(StatusBadge, { status, label: statusLabel })
3724
3731
  ] }),
3725
3732
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
3726
- /* @__PURE__ */ jsxs(InfoCard, { label: (_c = labels == null ? void 0 : labels.contactInfo) != null ? _c : "Contact", children: [
3733
+ /* @__PURE__ */ jsxs(InfoCard, { label: (_e = labels == null ? void 0 : labels.contactInfo) != null ? _e : "Contact", children: [
3727
3734
  /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
3728
3735
  contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
3729
3736
  ] }),
@@ -3731,7 +3738,7 @@ function BookingDetails({
3731
3738
  AgentContactCard,
3732
3739
  {
3733
3740
  layout: "compact",
3734
- name: (_d = agent == null ? void 0 : agent.name) != null ? _d : agentName,
3741
+ name: (_f = agent == null ? void 0 : agent.name) != null ? _f : agentName,
3735
3742
  avatar: agent == null ? void 0 : agent.avatar,
3736
3743
  email: agent == null ? void 0 : agent.email,
3737
3744
  whatsappUrl: agent == null ? void 0 : agent.whatsappUrl,
@@ -3741,20 +3748,20 @@ function BookingDetails({
3741
3748
  legacyContactLabel: agentContactLabel
3742
3749
  }
3743
3750
  ),
3744
- /* @__PURE__ */ jsxs(InfoCard, { label: (_e = labels == null ? void 0 : labels.totalPeople) != null ? _e : "Total People", children: [
3751
+ /* @__PURE__ */ jsxs(InfoCard, { label: (_g = labels == null ? void 0 : labels.totalPeople) != null ? _g : "Total People", children: [
3745
3752
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3746
3753
  /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
3747
- /* @__PURE__ */ jsx("span", { className: "font-semibold", children: (_g = (_f = labels == null ? void 0 : labels.personCount) == null ? void 0 : _f.call(labels, people.total)) != null ? _g : `${people.total} person(s)` })
3754
+ /* @__PURE__ */ 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)` })
3748
3755
  ] }),
3749
3756
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans", children: [
3750
- people.adults > 0 ? (_j = (_i = (_h = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _h.adults) == null ? void 0 : _i.call(_h, people.adults)) != null ? _j : `Adults: ${people.adults}` : null,
3751
- people.children > 0 ? (_m = (_l = (_k = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _k.children) == null ? void 0 : _l.call(_k, people.children)) != null ? _m : `Children: ${people.children}` : null,
3752
- people.seniors > 0 ? (_p = (_o = (_n = labels == null ? void 0 : labels.peopleBreakdown) == null ? void 0 : _n.seniors) == null ? void 0 : _o.call(_n, people.seniors)) != null ? _p : `Seniors: ${people.seniors}` : null
3757
+ 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,
3758
+ 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,
3759
+ 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
3753
3760
  ].filter(Boolean).join(" \xB7 ") })
3754
3761
  ] })
3755
3762
  ] }),
3756
3763
  /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-4", children: [
3757
- /* @__PURE__ */ jsx("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_r = (_q = labels == null ? void 0 : labels.adventuresSection) == null ? void 0 : _q.call(labels, adventures.length)) != null ? _r : `Adventures (${adventures.length})` }),
3764
+ /* @__PURE__ */ 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})` }),
3758
3765
  adventures.map((adventure) => /* @__PURE__ */ jsx(
3759
3766
  AdventureSection,
3760
3767
  {
@@ -3799,23 +3806,23 @@ function BookingDetails({
3799
3806
  /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: contactSectionLabel != null ? contactSectionLabel : "Responsible Person" }),
3800
3807
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
3801
3808
  /* @__PURE__ */ jsxs("div", { children: [
3802
- /* @__PURE__ */ 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" }),
3809
+ /* @__PURE__ */ 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" }),
3803
3810
  /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
3804
3811
  ] }),
3805
3812
  /* @__PURE__ */ jsxs("div", { children: [
3806
- /* @__PURE__ */ 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" }),
3807
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_w = contact.email) != null ? _w : "\u2014" })
3813
+ /* @__PURE__ */ 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" }),
3814
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_y = contact.email) != null ? _y : "\u2014" })
3808
3815
  ] }),
3809
3816
  /* @__PURE__ */ jsxs("div", { children: [
3810
- /* @__PURE__ */ 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" }),
3811
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_z = contact.phone) != null ? _z : "\u2014" })
3817
+ /* @__PURE__ */ 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" }),
3818
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_B = contact.phone) != null ? _B : "\u2014" })
3812
3819
  ] }),
3813
3820
  /* @__PURE__ */ jsxs("div", { children: [
3814
- /* @__PURE__ */ 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" }),
3815
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_C = contact.country) != null ? _C : "\u2014" })
3821
+ /* @__PURE__ */ 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" }),
3822
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_E = contact.country) != null ? _E : "\u2014" })
3816
3823
  ] }),
3817
3824
  contact.passport && /* @__PURE__ */ jsxs("div", { children: [
3818
- /* @__PURE__ */ 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" }),
3825
+ /* @__PURE__ */ 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" }),
3819
3826
  /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
3820
3827
  ] }),
3821
3828
  (() => {
@@ -3876,7 +3883,7 @@ function BookingDetails({
3876
3883
  className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
3877
3884
  children: [
3878
3885
  /* @__PURE__ */ jsx(AlertCircleIcon, { className: "w-3 h-3" }),
3879
- (_F = labels == null ? void 0 : labels.cancelRequestLabel) != null ? _F : "Request cancellation"
3886
+ (_H = labels == null ? void 0 : labels.cancelRequestLabel) != null ? _H : "Request cancellation"
3880
3887
  ]
3881
3888
  }
3882
3889
  )
@@ -3926,7 +3933,7 @@ function BookingDetails({
3926
3933
  ResendInviteConfirmDialog,
3927
3934
  {
3928
3935
  open: resendInviteDialogState.open,
3929
- travellerName: resendInviteDialogState.traveller ? `${(_G = resendInviteDialogState.traveller.firstName) != null ? _G : ""} ${(_H = resendInviteDialogState.traveller.lastName) != null ? _H : ""}`.trim() : "",
3936
+ travellerName: resendInviteDialogState.traveller ? `${(_I = resendInviteDialogState.traveller.firstName) != null ? _I : ""} ${(_J = resendInviteDialogState.traveller.lastName) != null ? _J : ""}`.trim() : "",
3930
3937
  onClose: closeResendInviteDialog,
3931
3938
  onConfirm: () => {
3932
3939
  const traveller = resendInviteDialogState.traveller;