@planetaexo/design-system 0.5.4 → 0.6.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
@@ -219,6 +219,11 @@ interface BookingAdventure {
219
219
  tags?: string[];
220
220
  travellers: BookingTraveller[];
221
221
  description?: string;
222
+ /** Conteúdo rico de itinerário (HTML / ReactNode). Quando presente, substitui `description`
223
+ * e é renderizado SEMPRE VISÍVEL (fora do accordion). */
224
+ detailsSlot?: React.ReactNode;
225
+ /** Label acima do bloco de itinerário. Default: "Itinerary". */
226
+ itineraryLabel?: string;
222
227
  included?: string[];
223
228
  notIncluded?: string[];
224
229
  cancellationPolicy?: string[];
@@ -226,6 +231,8 @@ interface BookingAdventure {
226
231
  subtotal?: string;
227
232
  suggestedTravellers?: SuggestedTraveller[];
228
233
  formName?: string;
234
+ /** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
235
+ addContactAsTravellerDisabled?: boolean;
229
236
  }
230
237
  interface BookingContact {
231
238
  name: string;
@@ -240,6 +247,11 @@ interface BookingDepositInfo {
240
247
  remainingAmount: string;
241
248
  balanceDueDate: string;
242
249
  isPaidInFull?: boolean;
250
+ /** Valor numérico do saldo restante (em unidade monetária). Quando fornecido,
251
+ * o botão "Pay remaining balance" só é renderizado se > 0.
252
+ * Mantém backward compat: consumers que não passam o valor conservam o
253
+ * comportamento antigo (dependente apenas de `isPaidInFull`). */
254
+ remainingAmountValue?: number;
243
255
  }
244
256
  interface BookingDetailsProps {
245
257
  bookingId: string;
@@ -263,9 +275,17 @@ interface BookingDetailsProps {
263
275
  onUnassignFromAdventure?: (adventureId: string, travellerId: string) => void;
264
276
  onPayBalance?: () => void;
265
277
  onCancelRequest?: () => void;
278
+ /** URL da logo exibida no cabeçalho (centralizada). Quando omitido junto com `onSignOut`, o header não é renderizado. */
279
+ logoSrc?: string;
280
+ /** Alt text da logo. Default: "". */
281
+ logoAlt?: string;
282
+ /** Callback disparado pelo botão Sign Out. Quando omitido, o botão não é renderizado. */
283
+ onSignOut?: () => void;
284
+ /** Texto do botão de Sign Out. Default: "Sign out". */
285
+ signOutLabel?: string;
266
286
  className?: string;
267
287
  }
268
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onPayBalance, onCancelRequest, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
288
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
269
289
 
270
290
  interface BookingConfirmationLabels {
271
291
  ctaButton?: string;
package/dist/index.d.ts CHANGED
@@ -219,6 +219,11 @@ interface BookingAdventure {
219
219
  tags?: string[];
220
220
  travellers: BookingTraveller[];
221
221
  description?: string;
222
+ /** Conteúdo rico de itinerário (HTML / ReactNode). Quando presente, substitui `description`
223
+ * e é renderizado SEMPRE VISÍVEL (fora do accordion). */
224
+ detailsSlot?: React.ReactNode;
225
+ /** Label acima do bloco de itinerário. Default: "Itinerary". */
226
+ itineraryLabel?: string;
222
227
  included?: string[];
223
228
  notIncluded?: string[];
224
229
  cancellationPolicy?: string[];
@@ -226,6 +231,8 @@ interface BookingAdventure {
226
231
  subtotal?: string;
227
232
  suggestedTravellers?: SuggestedTraveller[];
228
233
  formName?: string;
234
+ /** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
235
+ addContactAsTravellerDisabled?: boolean;
229
236
  }
230
237
  interface BookingContact {
231
238
  name: string;
@@ -240,6 +247,11 @@ interface BookingDepositInfo {
240
247
  remainingAmount: string;
241
248
  balanceDueDate: string;
242
249
  isPaidInFull?: boolean;
250
+ /** Valor numérico do saldo restante (em unidade monetária). Quando fornecido,
251
+ * o botão "Pay remaining balance" só é renderizado se > 0.
252
+ * Mantém backward compat: consumers que não passam o valor conservam o
253
+ * comportamento antigo (dependente apenas de `isPaidInFull`). */
254
+ remainingAmountValue?: number;
243
255
  }
244
256
  interface BookingDetailsProps {
245
257
  bookingId: string;
@@ -263,9 +275,17 @@ interface BookingDetailsProps {
263
275
  onUnassignFromAdventure?: (adventureId: string, travellerId: string) => void;
264
276
  onPayBalance?: () => void;
265
277
  onCancelRequest?: () => void;
278
+ /** URL da logo exibida no cabeçalho (centralizada). Quando omitido junto com `onSignOut`, o header não é renderizado. */
279
+ logoSrc?: string;
280
+ /** Alt text da logo. Default: "". */
281
+ logoAlt?: string;
282
+ /** Callback disparado pelo botão Sign Out. Quando omitido, o botão não é renderizado. */
283
+ onSignOut?: () => void;
284
+ /** Texto do botão de Sign Out. Default: "Sign out". */
285
+ signOutLabel?: string;
266
286
  className?: string;
267
287
  }
268
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onPayBalance, onCancelRequest, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
288
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
269
289
 
270
290
  interface BookingConfirmationLabels {
271
291
  ctaButton?: string;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { cva } from 'class-variance-authority';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { XIcon, ChevronDownIcon, CalendarIcon, SearchIcon, ChevronRightIcon, ArrowLeftIcon, CheckCircle2Icon, MapIcon, MessageCircleIcon, UsersIcon, CreditCardIcon, AlertCircleIcon, MinusIcon, PlusIcon, CircleCheckIcon, ChevronLeftIcon, ClockIcon, ChevronUpIcon, UserIcon, MenuIcon, SunIcon, MoonIcon, MapPinIcon, PackageIcon, InfoIcon, Loader2Icon, SendIcon, CheckCircleIcon, CheckIcon, MailIcon, PhoneIcon, CompassIcon, UserPlusIcon, ExternalLinkIcon, CopyIcon, PencilIcon, Trash2Icon, UserMinusIcon, AlertTriangleIcon, CarIcon, ZoomInIcon, StarIcon, LayoutGridIcon } from 'lucide-react';
7
+ import { XIcon, ChevronDownIcon, CalendarIcon, SearchIcon, ChevronRightIcon, ArrowLeftIcon, CheckCircle2Icon, MapIcon, LogOutIcon, MessageCircleIcon, UsersIcon, CreditCardIcon, AlertCircleIcon, MinusIcon, PlusIcon, CircleCheckIcon, ChevronLeftIcon, ClockIcon, ChevronUpIcon, UserIcon, MenuIcon, SunIcon, MoonIcon, MapPinIcon, PackageIcon, InfoIcon, Loader2Icon, SendIcon, CheckCircleIcon, CheckIcon, MailIcon, PhoneIcon, CompassIcon, UserPlusIcon, ExternalLinkIcon, CopyIcon, PencilIcon, Trash2Icon, UserMinusIcon, AlertTriangleIcon, CarIcon, ZoomInIcon, StarIcon, LayoutGridIcon } from 'lucide-react';
8
8
  import { Separator as Separator$1 } from '@base-ui/react/separator';
9
9
  import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
10
10
  import { Button as Button$1 } from '@base-ui/react/button';
@@ -2243,7 +2243,7 @@ function AdventureSection({
2243
2243
  onAddTraveller,
2244
2244
  onUnassignFromAdventure
2245
2245
  }) {
2246
- var _a, _b, _c;
2246
+ var _a, _b, _c, _d;
2247
2247
  const [detailsOpen, setDetailsOpen] = React22.useState(false);
2248
2248
  const [addModalOpen, setAddModalOpen] = React22.useState(false);
2249
2249
  const [newTraveller, setNewTraveller] = React22.useState({
@@ -2288,7 +2288,7 @@ function AdventureSection({
2288
2288
  ] })
2289
2289
  ] })
2290
2290
  ] }),
2291
- /* @__PURE__ */ jsxs(
2291
+ (adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxs(
2292
2292
  "button",
2293
2293
  {
2294
2294
  type: "button",
@@ -2320,11 +2320,28 @@ function AdventureSection({
2320
2320
  tag
2321
2321
  )) })
2322
2322
  ] }),
2323
+ (adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-2", children: [
2324
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
2325
+ adventure.detailsSlot ? /* @__PURE__ */ jsx(
2326
+ "div",
2327
+ {
2328
+ className: cn(
2329
+ "text-foreground",
2330
+ "[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
2331
+ "[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
2332
+ "[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
2333
+ "[&_strong]:font-bold [&_strong]:text-foreground",
2334
+ "[&_em]:italic",
2335
+ "[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
2336
+ "[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
2337
+ "[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
2338
+ "[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-relaxed"
2339
+ ),
2340
+ children: adventure.detailsSlot
2341
+ }
2342
+ ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
2343
+ ] }),
2323
2344
  detailsOpen && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-5 bg-muted/10", children: [
2324
- adventure.description && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2325
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
2326
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
2327
- ] }),
2328
2345
  adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2329
2346
  /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que est\xE1 incluso" }),
2330
2347
  /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxs(
@@ -2383,7 +2400,12 @@ function AdventureSection({
2383
2400
  {
2384
2401
  type: "button",
2385
2402
  onClick: () => onAddContactAsTraveller(adventure.id),
2386
- className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground hover:border-primary hover:text-primary hover:bg-primary/5 transition-colors",
2403
+ disabled: adventure.addContactAsTravellerDisabled,
2404
+ className: cn(
2405
+ "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground transition-colors",
2406
+ "hover:border-primary hover:text-primary hover:bg-primary/5",
2407
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:border-border disabled:hover:text-muted-foreground disabled:hover:bg-transparent"
2408
+ ),
2387
2409
  children: [
2388
2410
  /* @__PURE__ */ jsx(UserPlusIcon, { className: "w-3 h-3" }),
2389
2411
  /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "Add contact as traveller" }),
@@ -2515,24 +2537,27 @@ function AdventureSection({
2515
2537
  adventure.travellers.length > 0 && totalSlots > 0 && (() => {
2516
2538
  const completed = adventure.travellers.filter((t) => t.status === "completed").length;
2517
2539
  const percent = Math.round(completed / totalSlots * 100);
2518
- const isComplete = completed === totalSlots;
2540
+ const isComplete = completed >= totalSlots;
2541
+ const isEmpty = completed === 0;
2542
+ const barColor = isComplete ? "bg-success" : isEmpty ? "bg-destructive" : "bg-warning";
2543
+ const textColor = isComplete ? "text-success" : isEmpty ? "text-destructive" : "text-warning";
2519
2544
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mt-1", children: [
2520
2545
  /* @__PURE__ */ jsx("div", { className: "flex-1 h-2 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsx(
2521
2546
  "div",
2522
2547
  {
2523
- className: "h-full rounded-full bg-primary transition-all duration-500",
2548
+ className: cn("h-full rounded-full transition-all duration-500", barColor),
2524
2549
  style: { width: `${percent}%` }
2525
2550
  }
2526
2551
  ) }),
2527
2552
  /* @__PURE__ */ jsxs("span", { className: cn(
2528
2553
  "text-xs font-semibold font-ui shrink-0 flex items-center gap-1",
2529
- isComplete ? "text-primary" : "text-destructive"
2554
+ textColor
2530
2555
  ), children: [
2531
2556
  completed,
2532
2557
  " of ",
2533
2558
  totalSlots,
2534
2559
  " travellers registered",
2535
- !isComplete && /* @__PURE__ */ jsx(AlertTriangleIcon, { className: "w-3 h-3" })
2560
+ isComplete ? /* @__PURE__ */ jsx(CheckIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx(AlertTriangleIcon, { className: "w-3 h-3" })
2536
2561
  ] })
2537
2562
  ] });
2538
2563
  })()
@@ -2769,162 +2794,196 @@ function BookingDetails({
2769
2794
  onUnassignFromAdventure,
2770
2795
  onPayBalance,
2771
2796
  onCancelRequest,
2797
+ logoSrc,
2798
+ logoAlt,
2799
+ onSignOut,
2800
+ signOutLabel,
2772
2801
  className
2773
2802
  }) {
2774
2803
  var _a, _b, _c;
2775
2804
  const people = totalPeople(adventures);
2776
- return /* @__PURE__ */ jsxs(
2777
- "div",
2778
- {
2779
- className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6 px-4 sm:px-6 lg:px-0", className),
2780
- children: [
2781
- /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 flex-wrap", children: [
2782
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
2783
- /* @__PURE__ */ jsxs("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: [
2784
- "Booking",
2785
- " ",
2786
- /* @__PURE__ */ jsxs("span", { className: "text-primary", children: [
2787
- "#",
2788
- bookingId
2805
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2806
+ (logoSrc || onSignOut) && /* @__PURE__ */ jsx("header", { className: "w-full border-b border-border bg-card/50 backdrop-blur-sm sticky top-0 z-30", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-5xl mx-auto px-4 sm:px-6 lg:px-0 h-14 flex items-center justify-between gap-4", children: [
2807
+ /* @__PURE__ */ jsx("div", { className: "flex-1" }),
2808
+ logoSrc ? /* @__PURE__ */ jsx(
2809
+ "img",
2810
+ {
2811
+ src: logoSrc,
2812
+ alt: logoAlt != null ? logoAlt : "",
2813
+ className: "h-11 w-auto object-contain shrink-0"
2814
+ }
2815
+ ) : /* @__PURE__ */ jsx("div", {}),
2816
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-end", children: onSignOut && /* @__PURE__ */ jsxs(
2817
+ "button",
2818
+ {
2819
+ type: "button",
2820
+ onClick: onSignOut,
2821
+ className: "inline-flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground hover:border-primary hover:text-primary hover:bg-primary/5 transition-colors",
2822
+ children: [
2823
+ /* @__PURE__ */ jsx(LogOutIcon, { className: "w-3.5 h-3.5" }),
2824
+ signOutLabel != null ? signOutLabel : "Sign out"
2825
+ ]
2826
+ }
2827
+ ) })
2828
+ ] }) }),
2829
+ /* @__PURE__ */ jsxs(
2830
+ "div",
2831
+ {
2832
+ className: cn(
2833
+ "w-full max-w-5xl mx-auto flex flex-col gap-6 px-4 sm:px-6 lg:px-0 py-8 sm:py-12",
2834
+ className
2835
+ ),
2836
+ children: [
2837
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 flex-wrap", children: [
2838
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
2839
+ /* @__PURE__ */ jsxs("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: [
2840
+ "Booking",
2841
+ " ",
2842
+ /* @__PURE__ */ jsxs("span", { className: "text-primary", children: [
2843
+ "#",
2844
+ bookingId
2845
+ ] })
2846
+ ] }),
2847
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground font-sans", children: [
2848
+ "Created on ",
2849
+ createdAt
2789
2850
  ] })
2790
2851
  ] }),
2791
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground font-sans", children: [
2792
- "Created on ",
2793
- createdAt
2794
- ] })
2852
+ /* @__PURE__ */ jsx(StatusBadge, { status })
2795
2853
  ] }),
2796
- /* @__PURE__ */ jsx(StatusBadge, { status })
2797
- ] }),
2798
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
2799
- /* @__PURE__ */ jsxs(InfoCard, { label: "Contact", children: [
2800
- /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
2801
- contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
2854
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
2855
+ /* @__PURE__ */ jsxs(InfoCard, { label: "Contact", children: [
2856
+ /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
2857
+ contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
2858
+ ] }),
2859
+ agentName && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
2860
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary font-heading font-bold text-sm uppercase", children: agentName.charAt(0) }),
2861
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
2862
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
2863
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
2864
+ ] }),
2865
+ agentContactUrl && /* @__PURE__ */ jsxs(
2866
+ "a",
2867
+ {
2868
+ href: agentContactUrl,
2869
+ target: "_blank",
2870
+ rel: "noopener noreferrer",
2871
+ className: "ml-auto shrink-0 flex items-center gap-1.5 rounded-full bg-primary/10 px-3.5 py-1.5 text-xs font-semibold text-primary font-ui transition-colors hover:bg-primary/20",
2872
+ children: [
2873
+ /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
2874
+ "Contact"
2875
+ ]
2876
+ }
2877
+ )
2878
+ ] }),
2879
+ /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
2880
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2881
+ /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
2882
+ /* @__PURE__ */ jsxs("span", { className: "font-semibold", children: [
2883
+ people.total,
2884
+ " person(s)"
2885
+ ] })
2886
+ ] }),
2887
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans", children: [
2888
+ people.adults > 0 ? `Adults: ${people.adults}` : null,
2889
+ people.children > 0 ? `Children: ${people.children}` : null,
2890
+ people.seniors > 0 ? `Seniors: ${people.seniors}` : null
2891
+ ].filter(Boolean).join(" \xB7 ") })
2892
+ ] })
2802
2893
  ] }),
2803
- agentName && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
2804
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary font-heading font-bold text-sm uppercase", children: agentName.charAt(0) }),
2805
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
2806
- /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
2807
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
2894
+ /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-4", children: [
2895
+ /* @__PURE__ */ jsxs("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: [
2896
+ "Adventures (",
2897
+ adventures.length,
2898
+ ")"
2808
2899
  ] }),
2809
- agentContactUrl && /* @__PURE__ */ jsxs(
2810
- "a",
2900
+ adventures.map((adventure) => /* @__PURE__ */ jsx(
2901
+ AdventureSection,
2902
+ {
2903
+ adventure,
2904
+ onAddContactAsTraveller,
2905
+ onEditTraveller,
2906
+ onRemoveTraveller,
2907
+ onAddSuggestedTraveller,
2908
+ onAddTraveller,
2909
+ onUnassignFromAdventure
2910
+ },
2911
+ adventure.id
2912
+ ))
2913
+ ] }),
2914
+ /* @__PURE__ */ jsx(
2915
+ OrderSummary,
2916
+ {
2917
+ adventures,
2918
+ summaryLineItems,
2919
+ subtotal,
2920
+ total,
2921
+ depositInfo
2922
+ }
2923
+ ),
2924
+ /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
2925
+ /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Responsible Person" }),
2926
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
2927
+ /* @__PURE__ */ jsxs("div", { children: [
2928
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
2929
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
2930
+ ] }),
2931
+ /* @__PURE__ */ jsxs("div", { children: [
2932
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
2933
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_a = contact.email) != null ? _a : "\u2014" })
2934
+ ] }),
2935
+ /* @__PURE__ */ jsxs("div", { children: [
2936
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
2937
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = contact.phone) != null ? _b : "\u2014" })
2938
+ ] }),
2939
+ /* @__PURE__ */ jsxs("div", { children: [
2940
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
2941
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.country) != null ? _c : "\u2014" })
2942
+ ] }),
2943
+ contact.passport && /* @__PURE__ */ jsxs("div", { children: [
2944
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport / CPF" }),
2945
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
2946
+ ] })
2947
+ ] })
2948
+ ] }),
2949
+ (onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
2950
+ depositInfo && !depositInfo.isPaidInFull && // Se consumer passar remainingAmountValue, só mostra botão quando saldo > 0.
2951
+ // Quando undefined, mantém comportamento antigo (backward compat).
2952
+ (depositInfo.remainingAmountValue === void 0 || depositInfo.remainingAmountValue > 0) && onPayBalance && /* @__PURE__ */ jsxs(
2953
+ "button",
2811
2954
  {
2812
- href: agentContactUrl,
2813
- target: "_blank",
2814
- rel: "noopener noreferrer",
2815
- className: "ml-auto shrink-0 flex items-center gap-1.5 rounded-full bg-primary/10 px-3.5 py-1.5 text-xs font-semibold text-primary font-ui transition-colors hover:bg-primary/20",
2955
+ type: "button",
2956
+ onClick: onPayBalance,
2957
+ className: cn(
2958
+ "w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
2959
+ "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
2960
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2961
+ "flex items-center justify-center gap-2"
2962
+ ),
2816
2963
  children: [
2817
- /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
2818
- "Contact"
2964
+ /* @__PURE__ */ jsx(CreditCardIcon, { className: "w-4 h-4" }),
2965
+ "Pay remaining balance \u2014 ",
2966
+ depositInfo.remainingAmount
2967
+ ]
2968
+ }
2969
+ ),
2970
+ onCancelRequest && status !== "cancelled" && /* @__PURE__ */ jsxs(
2971
+ "button",
2972
+ {
2973
+ type: "button",
2974
+ onClick: onCancelRequest,
2975
+ className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
2976
+ children: [
2977
+ /* @__PURE__ */ jsx(AlertCircleIcon, { className: "w-3 h-3" }),
2978
+ "Request cancellation"
2819
2979
  ]
2820
2980
  }
2821
2981
  )
2822
- ] }),
2823
- /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
2824
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2825
- /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
2826
- /* @__PURE__ */ jsxs("span", { className: "font-semibold", children: [
2827
- people.total,
2828
- " person(s)"
2829
- ] })
2830
- ] }),
2831
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans", children: [
2832
- people.adults > 0 ? `Adults: ${people.adults}` : null,
2833
- people.children > 0 ? `Children: ${people.children}` : null,
2834
- people.seniors > 0 ? `Seniors: ${people.seniors}` : null
2835
- ].filter(Boolean).join(" \xB7 ") })
2836
2982
  ] })
2837
- ] }),
2838
- /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-4", children: [
2839
- /* @__PURE__ */ jsxs("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: [
2840
- "Adventures (",
2841
- adventures.length,
2842
- ")"
2843
- ] }),
2844
- adventures.map((adventure) => /* @__PURE__ */ jsx(
2845
- AdventureSection,
2846
- {
2847
- adventure,
2848
- onAddContactAsTraveller,
2849
- onEditTraveller,
2850
- onRemoveTraveller,
2851
- onAddSuggestedTraveller,
2852
- onAddTraveller,
2853
- onUnassignFromAdventure
2854
- },
2855
- adventure.id
2856
- ))
2857
- ] }),
2858
- /* @__PURE__ */ jsx(
2859
- OrderSummary,
2860
- {
2861
- adventures,
2862
- summaryLineItems,
2863
- subtotal,
2864
- total,
2865
- depositInfo
2866
- }
2867
- ),
2868
- /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
2869
- /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Responsible Person" }),
2870
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
2871
- /* @__PURE__ */ jsxs("div", { children: [
2872
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
2873
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
2874
- ] }),
2875
- /* @__PURE__ */ jsxs("div", { children: [
2876
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
2877
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_a = contact.email) != null ? _a : "\u2014" })
2878
- ] }),
2879
- /* @__PURE__ */ jsxs("div", { children: [
2880
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
2881
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = contact.phone) != null ? _b : "\u2014" })
2882
- ] }),
2883
- /* @__PURE__ */ jsxs("div", { children: [
2884
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
2885
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.country) != null ? _c : "\u2014" })
2886
- ] }),
2887
- contact.passport && /* @__PURE__ */ jsxs("div", { children: [
2888
- /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport / CPF" }),
2889
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
2890
- ] })
2891
- ] })
2892
- ] }),
2893
- (onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
2894
- depositInfo && !depositInfo.isPaidInFull && onPayBalance && /* @__PURE__ */ jsxs(
2895
- "button",
2896
- {
2897
- type: "button",
2898
- onClick: onPayBalance,
2899
- className: cn(
2900
- "w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
2901
- "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
2902
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2903
- "flex items-center justify-center gap-2"
2904
- ),
2905
- children: [
2906
- /* @__PURE__ */ jsx(CreditCardIcon, { className: "w-4 h-4" }),
2907
- "Pay remaining balance \u2014 ",
2908
- depositInfo.remainingAmount
2909
- ]
2910
- }
2911
- ),
2912
- onCancelRequest && status !== "cancelled" && /* @__PURE__ */ jsxs(
2913
- "button",
2914
- {
2915
- type: "button",
2916
- onClick: onCancelRequest,
2917
- className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
2918
- children: [
2919
- /* @__PURE__ */ jsx(AlertCircleIcon, { className: "w-3 h-3" }),
2920
- "Request cancellation"
2921
- ]
2922
- }
2923
- )
2924
- ] })
2925
- ]
2926
- }
2927
- );
2983
+ ]
2984
+ }
2985
+ )
2986
+ ] });
2928
2987
  }
2929
2988
 
2930
2989
  // src/lib/emailAssets.ts
@@ -5143,16 +5202,13 @@ function RegistrationSuccessCard({
5143
5202
  answers[f.id]
5144
5203
  ) })
5145
5204
  ] }, f.id)) }) }),
5146
- terms && /* @__PURE__ */ jsxs(FormSection2, { title: "Terms & Conditions", children: [
5147
- /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-muted/30 p-4 max-h-48 overflow-y-auto", children: /* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
5148
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm font-ui", children: [
5149
- /* @__PURE__ */ jsx("div", { className: cn(
5150
- "inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs",
5151
- terms.accepted ? "bg-primary" : "bg-destructive"
5152
- ), children: terms.accepted ? "\u2713" : "\u2717" }),
5153
- /* @__PURE__ */ jsx("span", { className: terms.accepted ? "text-primary font-medium" : "text-destructive font-medium", children: terms.accepted ? "Accepted" : "Not accepted" })
5154
- ] })
5155
- ] })
5205
+ terms && /* @__PURE__ */ jsx(FormSection2, { title: "Terms & Conditions", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm font-ui", children: [
5206
+ /* @__PURE__ */ jsx("div", { className: cn(
5207
+ "inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
5208
+ terms.accepted ? "bg-primary" : "bg-destructive"
5209
+ ), children: terms.accepted ? "\u2713" : "\u2717" }),
5210
+ /* @__PURE__ */ jsx("span", { className: terms.accepted ? "text-primary font-medium" : "text-destructive font-medium", children: terms.accepted ? "Accepted" : "Not accepted" })
5211
+ ] }) })
5156
5212
  ] });
5157
5213
  }
5158
5214
  var OTPCodeInput = ({