@planetaexo/design-system 0.7.0 → 0.9.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
@@ -284,6 +284,10 @@ interface BookingAdventure {
284
284
  formName?: string;
285
285
  /** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
286
286
  addContactAsTravellerDisabled?: boolean;
287
+ /** Texto do botão "Add traveller" (desktop). Default: "More travellers". */
288
+ addTravellerLabel?: string;
289
+ /** Texto curto exibido em mobile (sm:hidden). Default: "Add". */
290
+ addTravellerShortLabel?: string;
287
291
  }
288
292
  interface BookingContact {
289
293
  name: string;
@@ -311,6 +315,17 @@ interface BookingDetailsProps {
311
315
  contact: BookingContact;
312
316
  agentName?: string;
313
317
  agentContactUrl?: string;
318
+ /** Texto exibido no lugar do nome do agente quando `agentName` é falsy.
319
+ * Quando omitido, usa default "No agent assigned". O card do Agente é
320
+ * sempre renderizado (mesmo sem `agentName`), com esse placeholder. */
321
+ agentNameFallback?: string;
322
+ /** Label do card do Agente. Default: "Your Agent". */
323
+ agentLabel?: string;
324
+ /** Label do botão/link de contato com o agente. Default: "Contact". */
325
+ agentContactLabel?: string;
326
+ /** Tooltip/title exibido nos botões de remove/unassign desabilitados
327
+ * quando a aventura tem apenas 1 viajante. Default: "Cannot remove last traveller". */
328
+ cannotRemoveLastTravellerLabel?: string;
314
329
  adventures: BookingAdventure[];
315
330
  summaryLineItems?: BookingSummaryLineItem[];
316
331
  subtotal?: string;
@@ -354,7 +369,7 @@ interface BookingDetailsProps {
354
369
  signOutLabel?: string;
355
370
  className?: string;
356
371
  }
357
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
372
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
358
373
 
359
374
  interface BookingConfirmationLabels {
360
375
  ctaButton?: string;
package/dist/index.d.ts CHANGED
@@ -284,6 +284,10 @@ interface BookingAdventure {
284
284
  formName?: string;
285
285
  /** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
286
286
  addContactAsTravellerDisabled?: boolean;
287
+ /** Texto do botão "Add traveller" (desktop). Default: "More travellers". */
288
+ addTravellerLabel?: string;
289
+ /** Texto curto exibido em mobile (sm:hidden). Default: "Add". */
290
+ addTravellerShortLabel?: string;
287
291
  }
288
292
  interface BookingContact {
289
293
  name: string;
@@ -311,6 +315,17 @@ interface BookingDetailsProps {
311
315
  contact: BookingContact;
312
316
  agentName?: string;
313
317
  agentContactUrl?: string;
318
+ /** Texto exibido no lugar do nome do agente quando `agentName` é falsy.
319
+ * Quando omitido, usa default "No agent assigned". O card do Agente é
320
+ * sempre renderizado (mesmo sem `agentName`), com esse placeholder. */
321
+ agentNameFallback?: string;
322
+ /** Label do card do Agente. Default: "Your Agent". */
323
+ agentLabel?: string;
324
+ /** Label do botão/link de contato com o agente. Default: "Contact". */
325
+ agentContactLabel?: string;
326
+ /** Tooltip/title exibido nos botões de remove/unassign desabilitados
327
+ * quando a aventura tem apenas 1 viajante. Default: "Cannot remove last traveller". */
328
+ cannotRemoveLastTravellerLabel?: string;
314
329
  adventures: BookingAdventure[];
315
330
  summaryLineItems?: BookingSummaryLineItem[];
316
331
  subtotal?: string;
@@ -354,7 +369,7 @@ interface BookingDetailsProps {
354
369
  signOutLabel?: string;
355
370
  className?: string;
356
371
  }
357
- declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
372
+ declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
358
373
 
359
374
  interface BookingConfirmationLabels {
360
375
  ctaButton?: string;
package/dist/index.js CHANGED
@@ -1353,11 +1353,11 @@ function AdventureCard({ adventure }) {
1353
1353
  /* @__PURE__ */ jsx(Separator, { className: "my-1" }),
1354
1354
  /* @__PURE__ */ jsxs("div", { children: [
1355
1355
  /* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Itinerary" }),
1356
- adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsx("p", { className: "text-base text-foreground/80 leading-relaxed font-sans", children: adventure.description }),
1356
+ adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsx("p", { className: "text-base text-foreground/80 leading-snug font-sans", children: adventure.description }),
1357
1357
  adventure.detailsSlot && /* @__PURE__ */ jsx("div", { className: cn(
1358
1358
  "text-foreground",
1359
1359
  // Base paragraph and heading styles
1360
- "[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
1360
+ "[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
1361
1361
  "[&_h2]:text-xl [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
1362
1362
  "[&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
1363
1363
  "[&_strong]:font-bold [&_strong]:text-foreground",
@@ -1367,7 +1367,7 @@ function AdventureCard({ adventure }) {
1367
1367
  // Standard lists
1368
1368
  "[&_ul:not(.list-check):not(.list-cross)]:list-disc [&_ul:not(.list-check):not(.list-cross)]:pl-5 [&_ul:not(.list-check):not(.list-cross)]:space-y-1",
1369
1369
  "[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
1370
- "[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-relaxed",
1370
+ "[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-snug",
1371
1371
  // Check list (✓)
1372
1372
  "[&_.list-check]:list-none [&_.list-check]:pl-5 [&_.list-check]:space-y-1",
1373
1373
  "[&_.list-check_li]:relative [&_.list-check_li]:before:absolute [&_.list-check_li]:before:-left-5 [&_.list-check_li]:before:content-['\u2713'] [&_.list-check_li]:before:text-primary [&_.list-check_li]:before:font-bold",
@@ -2214,16 +2214,29 @@ function StatusBadge({ status }) {
2214
2214
  );
2215
2215
  }
2216
2216
  function totalPeople(adventures) {
2217
- var _a, _b, _c, _d, _e, _f;
2218
- let adults = 0;
2219
- let children = 0;
2220
- let seniors = 0;
2221
- for (const a of adventures) {
2222
- adults += (_b = (_a = a.slots) == null ? void 0 : _a.adults) != null ? _b : 0;
2223
- children += (_d = (_c = a.slots) == null ? void 0 : _c.children) != null ? _d : 0;
2224
- seniors += (_f = (_e = a.slots) == null ? void 0 : _e.seniors) != null ? _f : 0;
2217
+ var _a, _b, _c, _d, _e, _f, _g;
2218
+ const byId = /* @__PURE__ */ new Map();
2219
+ for (const adv of adventures) {
2220
+ for (const t of (_a = adv.travellers) != null ? _a : []) {
2221
+ if (!byId.has(t.id)) byId.set(t.id, t);
2222
+ }
2223
+ }
2224
+ if (byId.size === 0) {
2225
+ let adults2 = 0, children2 = 0, seniors2 = 0;
2226
+ for (const a of adventures) {
2227
+ adults2 += (_c = (_b = a.slots) == null ? void 0 : _b.adults) != null ? _c : 0;
2228
+ children2 += (_e = (_d = a.slots) == null ? void 0 : _d.children) != null ? _e : 0;
2229
+ seniors2 += (_g = (_f = a.slots) == null ? void 0 : _f.seniors) != null ? _g : 0;
2230
+ }
2231
+ return { adults: adults2, children: children2, seniors: seniors2, total: adults2 + children2 + seniors2 };
2225
2232
  }
2226
- return { adults, children, seniors, total: adults + children + seniors };
2233
+ let adults = 0, children = 0, seniors = 0;
2234
+ for (const t of byId.values()) {
2235
+ if (t.personType === "CHILD" || t.isChild) children++;
2236
+ else if (t.personType === "SENIOR") seniors++;
2237
+ else adults++;
2238
+ }
2239
+ return { adults, children, seniors, total: byId.size };
2227
2240
  }
2228
2241
  function InfoCard({
2229
2242
  label,
@@ -2247,9 +2260,10 @@ function AdventureSection({
2247
2260
  hasConfirmRemoveTraveller,
2248
2261
  onRequestOpenAddModal,
2249
2262
  onRequestOpenEditModal,
2250
- onRequestOpenDeleteModal
2263
+ onRequestOpenDeleteModal,
2264
+ cannotRemoveLastTravellerLabel
2251
2265
  }) {
2252
- var _a, _b, _c, _d;
2266
+ var _a, _b, _c, _d, _e, _f, _g;
2253
2267
  const [detailsOpen, setDetailsOpen] = React22.useState(false);
2254
2268
  const handleCopyUrl = (url) => {
2255
2269
  navigator.clipboard.writeText(url);
@@ -2283,7 +2297,7 @@ function AdventureSection({
2283
2297
  ] })
2284
2298
  ] })
2285
2299
  ] }),
2286
- (adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxs(
2300
+ (adventure.detailsSlot || adventure.description || adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxs(
2287
2301
  "button",
2288
2302
  {
2289
2303
  type: "button",
@@ -2294,7 +2308,7 @@ function AdventureSection({
2294
2308
  detailsOpen && "border-primary text-primary"
2295
2309
  ),
2296
2310
  children: [
2297
- "Details",
2311
+ (_d = adventure.itineraryLabel) != null ? _d : "Details",
2298
2312
  detailsOpen ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-3 h-3" })
2299
2313
  ]
2300
2314
  }
@@ -2315,28 +2329,28 @@ function AdventureSection({
2315
2329
  tag
2316
2330
  )) })
2317
2331
  ] }),
2318
- (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: [
2319
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
2320
- adventure.detailsSlot ? /* @__PURE__ */ jsx(
2321
- "div",
2322
- {
2323
- className: cn(
2324
- "text-foreground",
2325
- "[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
2326
- "[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
2327
- "[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
2328
- "[&_strong]:font-bold [&_strong]:text-foreground",
2329
- "[&_em]:italic",
2330
- "[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
2331
- "[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
2332
- "[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
2333
- "[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-relaxed"
2334
- ),
2335
- children: adventure.detailsSlot
2336
- }
2337
- ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
2338
- ] }),
2339
2332
  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: [
2333
+ (adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2334
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
2335
+ adventure.detailsSlot ? /* @__PURE__ */ jsx(
2336
+ "div",
2337
+ {
2338
+ className: cn(
2339
+ "text-foreground",
2340
+ "[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
2341
+ "[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
2342
+ "[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
2343
+ "[&_strong]:font-bold [&_strong]:text-foreground",
2344
+ "[&_em]:italic",
2345
+ "[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
2346
+ "[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
2347
+ "[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
2348
+ "[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-snug"
2349
+ ),
2350
+ children: adventure.detailsSlot
2351
+ }
2352
+ ) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-snug font-sans", children: adventure.description })
2353
+ ] }),
2340
2354
  adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2341
2355
  /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que est\xE1 incluso" }),
2342
2356
  /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxs(
@@ -2422,121 +2436,139 @@ function AdventureSection({
2422
2436
  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",
2423
2437
  children: [
2424
2438
  /* @__PURE__ */ jsx(PlusIcon, { className: "w-3 h-3" }),
2425
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "More travellers" }),
2426
- /* @__PURE__ */ jsx("span", { className: "sm:hidden", children: "Add" })
2439
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: (_e = adventure.addTravellerLabel) != null ? _e : "More travellers" }),
2440
+ /* @__PURE__ */ jsx("span", { className: "sm:hidden", children: (_g = (_f = adventure.addTravellerShortLabel) != null ? _f : adventure.addTravellerLabel) != null ? _g : "Add" })
2427
2441
  ]
2428
2442
  }
2429
2443
  )
2430
2444
  ] })
2431
2445
  ] }),
2432
- /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => /* @__PURE__ */ jsxs(
2433
- "div",
2434
- {
2435
- className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
2436
- children: [
2437
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2438
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
2439
- /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
2440
- t.firstName,
2441
- " ",
2442
- t.lastName
2446
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => {
2447
+ const canRemoveTraveller = adventure.travellers.length > 1;
2448
+ const disabledRemoveTitle = canRemoveTraveller ? void 0 : cannotRemoveLastTravellerLabel != null ? cannotRemoveLastTravellerLabel : "Cannot remove last traveller";
2449
+ return /* @__PURE__ */ jsxs(
2450
+ "div",
2451
+ {
2452
+ className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
2453
+ children: [
2454
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2455
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
2456
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
2457
+ t.firstName,
2458
+ " ",
2459
+ t.lastName
2460
+ ] }),
2461
+ t.isChild && /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold font-heading rounded-full px-2 py-0.5 bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400 shrink-0", children: "Child" })
2443
2462
  ] }),
2444
- t.isChild && /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold font-heading rounded-full px-2 py-0.5 bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400 shrink-0", children: "Child" })
2445
- ] }),
2446
- t.formUrl && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2447
- /* @__PURE__ */ jsxs(
2448
- "a",
2449
- {
2450
- href: t.formUrl,
2451
- target: "_blank",
2452
- rel: "noopener noreferrer",
2453
- className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
2454
- children: [
2455
- /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "w-3 h-3" }),
2456
- "Open"
2457
- ]
2458
- }
2459
- ),
2460
- /* @__PURE__ */ jsx(
2461
- "button",
2462
- {
2463
- type: "button",
2464
- onClick: () => handleCopyUrl(t.formUrl),
2465
- className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
2466
- "aria-label": "Copy form URL",
2467
- children: /* @__PURE__ */ jsx(CopyIcon, { className: "w-3 h-3" })
2468
- }
2469
- )
2470
- ] })
2471
- ] }) }),
2472
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
2473
- /* @__PURE__ */ jsx(
2474
- "span",
2475
- {
2476
- className: cn(
2477
- "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
2478
- t.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
2463
+ t.formUrl && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2464
+ /* @__PURE__ */ jsxs(
2465
+ "a",
2466
+ {
2467
+ href: t.formUrl,
2468
+ target: "_blank",
2469
+ rel: "noopener noreferrer",
2470
+ className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
2471
+ children: [
2472
+ /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "w-3 h-3" }),
2473
+ "Open"
2474
+ ]
2475
+ }
2479
2476
  ),
2480
- children: t.status
2481
- }
2482
- ),
2483
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
2484
- (onEditTraveller || hasSubmitEditTraveller) && /* @__PURE__ */ jsx(
2485
- "button",
2486
- {
2487
- type: "button",
2488
- onClick: () => {
2489
- if (onEditTraveller) {
2490
- onEditTraveller(adventure.id, t.id);
2491
- } else {
2492
- onRequestOpenEditModal == null ? void 0 : onRequestOpenEditModal(adventure.id, t);
2493
- }
2494
- },
2495
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",
2496
- "aria-label": `Edit ${t.firstName}`,
2497
- children: /* @__PURE__ */ jsx(PencilIcon, { className: "w-3.5 h-3.5" })
2498
- }
2499
- ),
2500
- (onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2501
- "button",
2477
+ /* @__PURE__ */ jsx(
2478
+ "button",
2479
+ {
2480
+ type: "button",
2481
+ onClick: () => handleCopyUrl(t.formUrl),
2482
+ className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
2483
+ "aria-label": "Copy form URL",
2484
+ children: /* @__PURE__ */ jsx(CopyIcon, { className: "w-3 h-3" })
2485
+ }
2486
+ )
2487
+ ] })
2488
+ ] }) }),
2489
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
2490
+ /* @__PURE__ */ jsx(
2491
+ "span",
2502
2492
  {
2503
- type: "button",
2504
- onClick: () => {
2505
- if (onRemoveTraveller) {
2506
- onRemoveTraveller(adventure.id, t.id);
2507
- } else {
2508
- onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2509
- }
2510
- },
2511
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
2512
- "aria-label": `Delete ${t.firstName}`,
2513
- children: /* @__PURE__ */ jsx(Trash2Icon, { className: "w-3.5 h-3.5" })
2493
+ className: cn(
2494
+ "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
2495
+ t.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
2496
+ ),
2497
+ children: t.status
2514
2498
  }
2515
2499
  ),
2516
- (onUnassignFromAdventure || onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2517
- "button",
2518
- {
2519
- type: "button",
2520
- onClick: () => {
2521
- if (onUnassignFromAdventure) {
2522
- onUnassignFromAdventure(adventure.id, t.id);
2523
- } else if (onRemoveTraveller) {
2524
- onRemoveTraveller(adventure.id, t.id);
2525
- } else {
2526
- onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2527
- }
2528
- },
2529
- className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-amber-500 hover:bg-amber-500/10 transition-colors",
2530
- "aria-label": `Remove ${t.firstName} from adventure`,
2531
- children: /* @__PURE__ */ jsx(UserMinusIcon, { className: "w-3.5 h-3.5" })
2532
- }
2533
- )
2500
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
2501
+ (onEditTraveller || hasSubmitEditTraveller) && /* @__PURE__ */ jsx(
2502
+ "button",
2503
+ {
2504
+ type: "button",
2505
+ onClick: () => {
2506
+ if (onEditTraveller) {
2507
+ onEditTraveller(adventure.id, t.id);
2508
+ } else {
2509
+ onRequestOpenEditModal == null ? void 0 : onRequestOpenEditModal(adventure.id, t);
2510
+ }
2511
+ },
2512
+ className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",
2513
+ "aria-label": `Edit ${t.firstName}`,
2514
+ children: /* @__PURE__ */ jsx(PencilIcon, { className: "w-3.5 h-3.5" })
2515
+ }
2516
+ ),
2517
+ (onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2518
+ "button",
2519
+ {
2520
+ type: "button",
2521
+ onClick: () => {
2522
+ if (!canRemoveTraveller) return;
2523
+ if (onRemoveTraveller) {
2524
+ onRemoveTraveller(adventure.id, t.id);
2525
+ } else {
2526
+ onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2527
+ }
2528
+ },
2529
+ disabled: !canRemoveTraveller,
2530
+ title: disabledRemoveTitle,
2531
+ "aria-disabled": !canRemoveTraveller,
2532
+ className: cn(
2533
+ "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
2534
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:text-muted-foreground disabled:hover:bg-transparent"
2535
+ ),
2536
+ "aria-label": `Delete ${t.firstName}`,
2537
+ children: /* @__PURE__ */ jsx(Trash2Icon, { className: "w-3.5 h-3.5" })
2538
+ }
2539
+ ),
2540
+ (onUnassignFromAdventure || onRemoveTraveller || hasConfirmRemoveTraveller) && /* @__PURE__ */ jsx(
2541
+ "button",
2542
+ {
2543
+ type: "button",
2544
+ onClick: () => {
2545
+ if (!canRemoveTraveller) return;
2546
+ if (onUnassignFromAdventure) {
2547
+ onUnassignFromAdventure(adventure.id, t.id);
2548
+ } else if (onRemoveTraveller) {
2549
+ onRemoveTraveller(adventure.id, t.id);
2550
+ } else {
2551
+ onRequestOpenDeleteModal == null ? void 0 : onRequestOpenDeleteModal(adventure.id, t);
2552
+ }
2553
+ },
2554
+ disabled: !canRemoveTraveller,
2555
+ title: disabledRemoveTitle,
2556
+ "aria-disabled": !canRemoveTraveller,
2557
+ className: cn(
2558
+ "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-amber-500 hover:bg-amber-500/10 transition-colors",
2559
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:text-muted-foreground disabled:hover:bg-transparent"
2560
+ ),
2561
+ "aria-label": `Remove ${t.firstName} from adventure`,
2562
+ children: /* @__PURE__ */ jsx(UserMinusIcon, { className: "w-3.5 h-3.5" })
2563
+ }
2564
+ )
2565
+ ] })
2534
2566
  ] })
2535
- ] })
2536
- ]
2537
- },
2538
- t.id
2539
- )) }),
2567
+ ]
2568
+ },
2569
+ t.id
2570
+ );
2571
+ }) }),
2540
2572
  adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
2541
2573
  /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
2542
2574
  /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxs(
@@ -2994,6 +3026,10 @@ function BookingDetails({
2994
3026
  contact,
2995
3027
  agentName,
2996
3028
  agentContactUrl,
3029
+ agentNameFallback,
3030
+ agentLabel,
3031
+ agentContactLabel,
3032
+ cannotRemoveLastTravellerLabel,
2997
3033
  adventures,
2998
3034
  summaryLineItems,
2999
3035
  subtotal,
@@ -3143,26 +3179,49 @@ function BookingDetails({
3143
3179
  /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
3144
3180
  contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
3145
3181
  ] }),
3146
- agentName && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3147
- /* @__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) }),
3148
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3149
- /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
3150
- /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
3151
- ] }),
3152
- agentContactUrl && /* @__PURE__ */ jsxs(
3153
- "a",
3154
- {
3155
- href: agentContactUrl,
3156
- target: "_blank",
3157
- rel: "noopener noreferrer",
3158
- 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",
3159
- children: [
3160
- /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3161
- "Contact"
3162
- ]
3163
- }
3164
- )
3165
- ] }),
3182
+ (() => {
3183
+ const hasAgent = !!agentName;
3184
+ const displayName = hasAgent ? agentName : agentNameFallback != null ? agentNameFallback : "No agent assigned";
3185
+ const initial = hasAgent ? agentName.charAt(0) : "?";
3186
+ return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3187
+ /* @__PURE__ */ jsx(
3188
+ "div",
3189
+ {
3190
+ className: cn(
3191
+ "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
3192
+ hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
3193
+ ),
3194
+ children: initial
3195
+ }
3196
+ ),
3197
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3198
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: agentLabel != null ? agentLabel : "Your Agent" }),
3199
+ /* @__PURE__ */ jsx(
3200
+ "p",
3201
+ {
3202
+ className: cn(
3203
+ "text-sm font-sans truncate",
3204
+ hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
3205
+ ),
3206
+ children: displayName
3207
+ }
3208
+ )
3209
+ ] }),
3210
+ hasAgent && agentContactUrl && /* @__PURE__ */ jsxs(
3211
+ "a",
3212
+ {
3213
+ href: agentContactUrl,
3214
+ target: "_blank",
3215
+ rel: "noopener noreferrer",
3216
+ 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",
3217
+ children: [
3218
+ /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3219
+ agentContactLabel != null ? agentContactLabel : "Contact"
3220
+ ]
3221
+ }
3222
+ )
3223
+ ] });
3224
+ })(),
3166
3225
  /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
3167
3226
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3168
3227
  /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
@@ -3199,7 +3258,8 @@ function BookingDetails({
3199
3258
  hasConfirmRemoveTraveller,
3200
3259
  onRequestOpenAddModal: handleRequestOpenAddModal,
3201
3260
  onRequestOpenEditModal: handleRequestOpenEditModal,
3202
- onRequestOpenDeleteModal: handleRequestOpenDeleteModal
3261
+ onRequestOpenDeleteModal: handleRequestOpenDeleteModal,
3262
+ cannotRemoveLastTravellerLabel
3203
3263
  },
3204
3264
  adventure.id
3205
3265
  ))
@@ -3614,7 +3674,7 @@ function BookingConfirmation({
3614
3674
  /* @__PURE__ */ jsx(
3615
3675
  "div",
3616
3676
  {
3617
- style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 },
3677
+ style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.4", margin: 0 },
3618
3678
  dangerouslySetInnerHTML: { __html: adventure.description }
3619
3679
  }
3620
3680
  )