@planetaexo/design-system 0.9.4 → 0.10.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 CHANGED
@@ -1373,7 +1373,7 @@ function AdventureCard({ adventure }) {
1373
1373
  (adventure.description || adventure.detailsSlot) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1374
1374
  /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
1375
1375
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1376
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Itinerary" }),
1376
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Details" }),
1377
1377
  adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-snug font-sans", children: adventure.description }),
1378
1378
  adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
1379
1379
  "text-foreground",
@@ -2216,11 +2216,193 @@ function Offer({
2216
2216
  ] }) })
2217
2217
  ] });
2218
2218
  }
2219
+ function getInitial(name) {
2220
+ return name && name.length > 0 ? name.charAt(0).toUpperCase() : "?";
2221
+ }
2222
+ function CompactAgentCard({
2223
+ name,
2224
+ avatar,
2225
+ email,
2226
+ whatsappUrl,
2227
+ label,
2228
+ nameFallback,
2229
+ legacyContactUrl,
2230
+ legacyContactLabel,
2231
+ className
2232
+ }) {
2233
+ const hasAgent = !!name;
2234
+ const displayName = hasAgent ? name : nameFallback != null ? nameFallback : "No agent assigned";
2235
+ const showLegacyContact = hasAgent && !email && !whatsappUrl && !!legacyContactUrl;
2236
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2237
+ "div",
2238
+ {
2239
+ className: cn(
2240
+ "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0",
2241
+ className
2242
+ ),
2243
+ children: [
2244
+ hasAgent && avatar ? (
2245
+ // eslint-disable-next-line @next/next/no-img-element
2246
+ /* @__PURE__ */ jsxRuntime.jsx(
2247
+ "img",
2248
+ {
2249
+ src: avatar,
2250
+ alt: displayName,
2251
+ className: "h-10 w-10 shrink-0 rounded-full object-cover ring-2 ring-primary/20"
2252
+ }
2253
+ )
2254
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2255
+ "div",
2256
+ {
2257
+ className: cn(
2258
+ "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
2259
+ hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
2260
+ ),
2261
+ children: getInitial(name)
2262
+ }
2263
+ ),
2264
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2265
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: label != null ? label : "Your Agent" }),
2266
+ /* @__PURE__ */ jsxRuntime.jsx(
2267
+ "p",
2268
+ {
2269
+ className: cn(
2270
+ "text-sm font-sans truncate",
2271
+ hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
2272
+ ),
2273
+ children: displayName
2274
+ }
2275
+ )
2276
+ ] }),
2277
+ hasAgent && (email || whatsappUrl) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto shrink-0 flex items-center gap-1.5", children: [
2278
+ email && /* @__PURE__ */ jsxRuntime.jsx(
2279
+ "a",
2280
+ {
2281
+ href: `mailto:${email}`,
2282
+ className: "flex items-center justify-center h-8 w-8 rounded-full bg-primary/10 text-primary transition-colors hover:bg-primary/20",
2283
+ "aria-label": `Email ${displayName}`,
2284
+ title: email,
2285
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailIcon, { className: "w-3.5 h-3.5" })
2286
+ }
2287
+ ),
2288
+ whatsappUrl && /* @__PURE__ */ jsxRuntime.jsx(
2289
+ "a",
2290
+ {
2291
+ href: whatsappUrl,
2292
+ target: "_blank",
2293
+ rel: "noopener noreferrer",
2294
+ className: "flex items-center justify-center h-8 w-8 rounded-full bg-[#25D366]/15 text-[#25D366] transition-colors hover:bg-[#25D366]/25",
2295
+ "aria-label": `WhatsApp ${displayName}`,
2296
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) })
2297
+ }
2298
+ )
2299
+ ] }),
2300
+ showLegacyContact && /* @__PURE__ */ jsxRuntime.jsxs(
2301
+ "a",
2302
+ {
2303
+ href: legacyContactUrl,
2304
+ target: "_blank",
2305
+ rel: "noopener noreferrer",
2306
+ 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",
2307
+ children: [
2308
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleIcon, { className: "w-3.5 h-3.5" }),
2309
+ legacyContactLabel != null ? legacyContactLabel : "Contact"
2310
+ ]
2311
+ }
2312
+ )
2313
+ ]
2314
+ }
2315
+ );
2316
+ }
2317
+ function WideAgentCard({
2318
+ name,
2319
+ avatar,
2320
+ email,
2321
+ whatsappUrl,
2322
+ label,
2323
+ nameFallback,
2324
+ helperText,
2325
+ className
2326
+ }) {
2327
+ const hasAgent = !!name;
2328
+ const displayName = hasAgent ? name : nameFallback != null ? nameFallback : "No agent assigned";
2329
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2330
+ "div",
2331
+ {
2332
+ className: cn(
2333
+ "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4",
2334
+ className
2335
+ ),
2336
+ children: [
2337
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
2338
+ hasAgent && avatar ? (
2339
+ // eslint-disable-next-line @next/next/no-img-element
2340
+ /* @__PURE__ */ jsxRuntime.jsx(
2341
+ "img",
2342
+ {
2343
+ src: avatar,
2344
+ alt: displayName,
2345
+ className: "w-16 h-16 rounded-full object-cover ring-2 ring-primary/20"
2346
+ }
2347
+ )
2348
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-bold text-primary font-heading", children: getInitial(name) }) }),
2349
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2350
+ label && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: label }),
2351
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-sans text-foreground mt-0.5", children: [
2352
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: displayName }),
2353
+ helperText && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2354
+ " ",
2355
+ helperText
2356
+ ] })
2357
+ ] })
2358
+ ] })
2359
+ ] }),
2360
+ (whatsappUrl || email) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2361
+ /* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
2362
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
2363
+ whatsappUrl && /* @__PURE__ */ jsxRuntime.jsxs(
2364
+ "a",
2365
+ {
2366
+ href: whatsappUrl,
2367
+ target: "_blank",
2368
+ rel: "noopener noreferrer",
2369
+ className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
2370
+ children: [
2371
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4 shrink-0 text-[#25D366]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
2372
+ "WhatsApp"
2373
+ ]
2374
+ }
2375
+ ),
2376
+ email && /* @__PURE__ */ jsxRuntime.jsxs(
2377
+ "a",
2378
+ {
2379
+ href: `mailto:${email}`,
2380
+ className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
2381
+ children: [
2382
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
2383
+ "Email"
2384
+ ]
2385
+ }
2386
+ )
2387
+ ] })
2388
+ ] })
2389
+ ]
2390
+ }
2391
+ );
2392
+ }
2393
+ function AgentContactCard(props) {
2394
+ if (props.layout === "wide") return /* @__PURE__ */ jsxRuntime.jsx(WideAgentCard, __spreadValues({}, props));
2395
+ return /* @__PURE__ */ jsxRuntime.jsx(CompactAgentCard, __spreadValues({}, props));
2396
+ }
2219
2397
  var STATUS_STYLES = {
2220
2398
  pending: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
2221
2399
  confirmed: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
2222
2400
  cancelled: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",
2223
- completed: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
2401
+ completed: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
2402
+ pendingRegistration: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
2403
+ pendingPayment: "bg-warning/15 text-warning-foreground dark:bg-warning/20 dark:text-warning",
2404
+ pendingPaymentOverdue: "bg-destructive/15 text-destructive dark:bg-destructive/25 dark:text-destructive",
2405
+ complete: "bg-success/15 text-success dark:bg-success/20 dark:text-success"
2224
2406
  };
2225
2407
  function StatusBadge({ status }) {
2226
2408
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -2285,7 +2467,7 @@ function AdventureSection({
2285
2467
  onRequestOpenDeleteModal,
2286
2468
  cannotRemoveLastTravellerLabel
2287
2469
  }) {
2288
- var _a, _b, _c, _d, _e, _f, _g;
2470
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2289
2471
  const [detailsOpen, setDetailsOpen] = React22__namespace.useState(false);
2290
2472
  const handleCopyUrl = (url) => {
2291
2473
  if (onCopyFormLink) {
@@ -2357,7 +2539,7 @@ function AdventureSection({
2357
2539
  ] }),
2358
2540
  detailsOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-5 bg-muted/10", children: [
2359
2541
  (adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
2360
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
2542
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_e = adventure.itineraryLabel) != null ? _e : "Details" }),
2361
2543
  adventure.detailsSlot ? /* @__PURE__ */ jsxRuntime.jsx(
2362
2544
  "div",
2363
2545
  {
@@ -2462,8 +2644,8 @@ function AdventureSection({
2462
2644
  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",
2463
2645
  children: [
2464
2646
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
2465
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (_e = adventure.addTravellerLabel) != null ? _e : "More travellers" }),
2466
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (_g = (_f = adventure.addTravellerShortLabel) != null ? _f : adventure.addTravellerLabel) != null ? _g : "Add" })
2647
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (_f = adventure.addTravellerLabel) != null ? _f : "More travellers" }),
2648
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (_h = (_g = adventure.addTravellerShortLabel) != null ? _g : adventure.addTravellerLabel) != null ? _h : "Add" })
2467
2649
  ]
2468
2650
  }
2469
2651
  )
@@ -2957,7 +3139,8 @@ function OrderSummary({
2957
3139
  summaryLineItems,
2958
3140
  subtotal,
2959
3141
  total,
2960
- depositInfo
3142
+ depositInfo,
3143
+ balanceDueLabel
2961
3144
  }) {
2962
3145
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
2963
3146
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Order Summary" }),
@@ -3053,7 +3236,7 @@ function OrderSummary({
3053
3236
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.remainingAmount })
3054
3237
  ] }),
3055
3238
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
3056
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Balance due" }),
3239
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: balanceDueLabel != null ? balanceDueLabel : "Balance due" }),
3057
3240
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.balanceDueDate })
3058
3241
  ] })
3059
3242
  ] })
@@ -3064,11 +3247,15 @@ function BookingDetails({
3064
3247
  status,
3065
3248
  createdAt,
3066
3249
  contact,
3250
+ agent,
3067
3251
  agentName,
3068
3252
  agentContactUrl,
3069
3253
  agentNameFallback,
3070
3254
  agentLabel,
3071
3255
  agentContactLabel,
3256
+ contactSectionLabel,
3257
+ payBalanceLabel,
3258
+ balanceDueLabel,
3072
3259
  cannotRemoveLastTravellerLabel,
3073
3260
  adventures,
3074
3261
  summaryLineItems,
@@ -3098,7 +3285,7 @@ function BookingDetails({
3098
3285
  signOutLabel,
3099
3286
  className
3100
3287
  }) {
3101
- var _a, _b, _c;
3288
+ var _a, _b, _c, _d;
3102
3289
  const people = totalPeople(adventures);
3103
3290
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3104
3291
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
@@ -3220,49 +3407,20 @@ function BookingDetails({
3220
3407
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold", children: contact.name }),
3221
3408
  contact.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
3222
3409
  ] }),
3223
- (() => {
3224
- const hasAgent = !!agentName;
3225
- const displayName = hasAgent ? agentName : agentNameFallback != null ? agentNameFallback : "No agent assigned";
3226
- const initial = hasAgent ? agentName.charAt(0) : "?";
3227
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3228
- /* @__PURE__ */ jsxRuntime.jsx(
3229
- "div",
3230
- {
3231
- className: cn(
3232
- "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
3233
- hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
3234
- ),
3235
- children: initial
3236
- }
3237
- ),
3238
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3239
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: agentLabel != null ? agentLabel : "Your Agent" }),
3240
- /* @__PURE__ */ jsxRuntime.jsx(
3241
- "p",
3242
- {
3243
- className: cn(
3244
- "text-sm font-sans truncate",
3245
- hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
3246
- ),
3247
- children: displayName
3248
- }
3249
- )
3250
- ] }),
3251
- hasAgent && agentContactUrl && /* @__PURE__ */ jsxRuntime.jsxs(
3252
- "a",
3253
- {
3254
- href: agentContactUrl,
3255
- target: "_blank",
3256
- rel: "noopener noreferrer",
3257
- 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",
3258
- children: [
3259
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3260
- agentContactLabel != null ? agentContactLabel : "Contact"
3261
- ]
3262
- }
3263
- )
3264
- ] });
3265
- })(),
3410
+ /* @__PURE__ */ jsxRuntime.jsx(
3411
+ AgentContactCard,
3412
+ {
3413
+ layout: "compact",
3414
+ name: (_a = agent == null ? void 0 : agent.name) != null ? _a : agentName,
3415
+ avatar: agent == null ? void 0 : agent.avatar,
3416
+ email: agent == null ? void 0 : agent.email,
3417
+ whatsappUrl: agent == null ? void 0 : agent.whatsappUrl,
3418
+ label: agentLabel,
3419
+ nameFallback: agentNameFallback,
3420
+ legacyContactUrl: agentContactUrl,
3421
+ legacyContactLabel: agentContactLabel
3422
+ }
3423
+ ),
3266
3424
  /* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: "Total People", children: [
3267
3425
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3268
3426
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
@@ -3313,11 +3471,12 @@ function BookingDetails({
3313
3471
  summaryLineItems,
3314
3472
  subtotal,
3315
3473
  total,
3316
- depositInfo
3474
+ depositInfo,
3475
+ balanceDueLabel
3317
3476
  }
3318
3477
  ),
3319
3478
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
3320
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Responsible Person" }),
3479
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: contactSectionLabel != null ? contactSectionLabel : "Responsible Person" }),
3321
3480
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
3322
3481
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3323
3482
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
@@ -3325,15 +3484,15 @@ function BookingDetails({
3325
3484
  ] }),
3326
3485
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3327
3486
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
3328
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_a = contact.email) != null ? _a : "\u2014" })
3487
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_b = contact.email) != null ? _b : "\u2014" })
3329
3488
  ] }),
3330
3489
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3331
3490
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
3332
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = contact.phone) != null ? _b : "\u2014" })
3491
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.phone) != null ? _c : "\u2014" })
3333
3492
  ] }),
3334
3493
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3335
3494
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
3336
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.country) != null ? _c : "\u2014" })
3495
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_d = contact.country) != null ? _d : "\u2014" })
3337
3496
  ] }),
3338
3497
  contact.passport && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3339
3498
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport / CPF" }),
@@ -3344,24 +3503,38 @@ function BookingDetails({
3344
3503
  (onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
3345
3504
  depositInfo && !depositInfo.isPaidInFull && // Se consumer passar remainingAmountValue, só mostra botão quando saldo > 0.
3346
3505
  // Quando undefined, mantém comportamento antigo (backward compat).
3347
- (depositInfo.remainingAmountValue === void 0 || depositInfo.remainingAmountValue > 0) && onPayBalance && /* @__PURE__ */ jsxRuntime.jsxs(
3348
- "button",
3349
- {
3350
- type: "button",
3351
- onClick: onPayBalance,
3352
- className: cn(
3353
- "w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
3354
- "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
3355
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3356
- "flex items-center justify-center gap-2"
3357
- ),
3358
- children: [
3359
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCardIcon, { className: "w-4 h-4" }),
3360
- "Pay remaining balance \u2014 ",
3361
- depositInfo.remainingAmount
3362
- ]
3363
- }
3364
- ),
3506
+ (depositInfo.remainingAmountValue === void 0 || depositInfo.remainingAmountValue > 0) && onPayBalance && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col items-center gap-1.5", children: [
3507
+ /* @__PURE__ */ jsxRuntime.jsxs(
3508
+ "button",
3509
+ {
3510
+ type: "button",
3511
+ onClick: onPayBalance,
3512
+ className: cn(
3513
+ "w-full rounded-full py-3.5 text-center text-sm font-bold uppercase tracking-wide font-heading",
3514
+ depositInfo.isOverdue ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-primary text-primary-foreground hover:bg-primary/90",
3515
+ "transition-colors",
3516
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3517
+ "flex items-center justify-center gap-2"
3518
+ ),
3519
+ children: [
3520
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCardIcon, { className: "w-4 h-4" }),
3521
+ payBalanceLabel != null ? payBalanceLabel : "Pay remaining balance",
3522
+ " \u2014 ",
3523
+ depositInfo.remainingAmount
3524
+ ]
3525
+ }
3526
+ ),
3527
+ depositInfo.dueDateLabel && /* @__PURE__ */ jsxRuntime.jsx(
3528
+ "p",
3529
+ {
3530
+ className: cn(
3531
+ "text-xs font-sans",
3532
+ depositInfo.isOverdue ? "text-destructive font-semibold" : "text-muted-foreground"
3533
+ ),
3534
+ children: depositInfo.dueDateLabel
3535
+ }
3536
+ )
3537
+ ] }),
3365
3538
  onCancelRequest && status !== "cancelled" && /* @__PURE__ */ jsxRuntime.jsxs(
3366
3539
  "button",
3367
3540
  {
@@ -3513,7 +3686,7 @@ var DEFAULT_LABELS = {
3513
3686
  childrenUnit: "child(ren)",
3514
3687
  travellersLabel: "Travellers",
3515
3688
  childBadge: "child",
3516
- itineraryLabel: "Itinerary",
3689
+ itineraryLabel: "Details",
3517
3690
  includedLabel: "O que est\xE1 incluso",
3518
3691
  notIncludedLabel: "O que n\xE3o est\xE1 incluso",
3519
3692
  pricingLabel: "Pricing",
@@ -5696,74 +5869,19 @@ var OTPCodeInput = ({
5696
5869
  required
5697
5870
  }) => {
5698
5871
  const baseId = id != null ? id : React22__namespace.useId();
5699
- const inputRefs = React22__namespace.useRef([]);
5872
+ const inputRef = React22__namespace.useRef(null);
5873
+ const [focused, setFocused] = React22__namespace.useState(false);
5700
5874
  const digits = React22__namespace.useMemo(() => {
5701
5875
  const arr = value.split("").slice(0, length);
5702
5876
  while (arr.length < length) arr.push("");
5703
5877
  return arr;
5704
5878
  }, [value, length]);
5705
- const updateValue = (newDigits) => {
5706
- onChange(newDigits.join(""));
5707
- };
5708
- const focusedIndexRef = React22__namespace.useRef(0);
5709
- const focusSlot = (index) => {
5710
- var _a;
5711
- if (index >= 0 && index < length) {
5712
- (_a = inputRefs.current[index]) == null ? void 0 : _a.focus();
5713
- }
5714
- };
5715
- const handleChange = (index, raw) => {
5716
- const numeric = raw.replace(/\D/g, "");
5717
- if (!numeric) return;
5718
- const newDigits = [...digits];
5719
- if (numeric.length === 1) {
5720
- newDigits[index] = numeric;
5721
- updateValue(newDigits);
5722
- if (index < length - 1) focusSlot(index + 1);
5723
- return;
5724
- }
5725
- const toPaste = numeric.slice(0, length - index);
5726
- for (let i = 0; i < toPaste.length; i++) {
5727
- newDigits[index + i] = toPaste[i];
5728
- }
5729
- updateValue(newDigits);
5730
- const lastFilled = Math.min(index + toPaste.length, length) - 1;
5731
- focusSlot(lastFilled < length - 1 ? lastFilled + 1 : lastFilled);
5732
- };
5733
- const handleKeyDown = (index, e) => {
5734
- if (e.key === "Backspace") {
5735
- e.preventDefault();
5736
- const newDigits = [...digits];
5737
- if (newDigits[index]) {
5738
- newDigits[index] = "";
5739
- updateValue(newDigits);
5740
- } else if (index > 0) {
5741
- newDigits[index - 1] = "";
5742
- updateValue(newDigits);
5743
- focusSlot(index - 1);
5744
- }
5745
- } else if (e.key === "ArrowLeft") {
5746
- e.preventDefault();
5747
- focusSlot(index - 1);
5748
- } else if (e.key === "ArrowRight") {
5749
- e.preventDefault();
5750
- focusSlot(index + 1);
5751
- } else if (e.key === "Tab") ; else if (!/^\d$/.test(e.key) && e.key.length === 1) {
5752
- e.preventDefault();
5753
- }
5754
- };
5755
- const handlePaste = (e, startIndex) => {
5756
- e.preventDefault();
5757
- const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
5758
- if (!pasted) return;
5759
- const newDigits = [...digits];
5760
- for (let i = 0; i < pasted.length && startIndex + i < length; i++) {
5761
- newDigits[startIndex + i] = pasted[i];
5762
- }
5763
- updateValue(newDigits);
5764
- const lastFilled = Math.min(startIndex + pasted.length, length) - 1;
5765
- focusSlot(lastFilled < length - 1 ? lastFilled + 1 : lastFilled);
5879
+ const handleChange = (e) => {
5880
+ const numeric = e.target.value.replace(/\D/g, "").slice(0, length);
5881
+ onChange(numeric);
5766
5882
  };
5883
+ const activeIndex = Math.min(value.length, length - 1);
5884
+ const errorId = error ? `${baseId}-error` : void 0;
5767
5885
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center", className), children: [
5768
5886
  /* @__PURE__ */ jsxRuntime.jsx(
5769
5887
  "label",
@@ -5776,50 +5894,71 @@ var OTPCodeInput = ({
5776
5894
  children: label
5777
5895
  }
5778
5896
  ),
5779
- /* @__PURE__ */ jsxRuntime.jsx(
5897
+ /* @__PURE__ */ jsxRuntime.jsxs(
5780
5898
  "div",
5781
5899
  {
5782
5900
  className: cn(
5783
- "flex justify-center gap-2",
5901
+ "relative",
5784
5902
  disabled && "opacity-50 pointer-events-none"
5785
5903
  ),
5786
- role: "group",
5787
- "aria-label": label,
5788
- children: digits.map((digit, index) => /* @__PURE__ */ jsxRuntime.jsx(
5789
- "input",
5790
- {
5791
- ref: (el) => {
5792
- inputRefs.current[index] = el;
5793
- },
5794
- id: index === 0 ? baseId : `${baseId}-${index}`,
5795
- type: "text",
5796
- inputMode: "numeric",
5797
- pattern: "\\d*",
5798
- maxLength: 1,
5799
- value: digit,
5800
- autoComplete: index === 0 ? "one-time-code" : "off",
5801
- "aria-label": `${label} d\xEDgito ${index + 1} de ${length}`,
5802
- disabled,
5803
- onChange: (e) => handleChange(index, e.target.value),
5804
- onKeyDown: (e) => handleKeyDown(index, e),
5805
- onPaste: (e) => handlePaste(e, index),
5806
- onFocus: (e) => {
5807
- focusedIndexRef.current = index;
5808
- e.target.select();
5809
- },
5810
- className: cn(
5811
- "w-11 h-14 text-center text-lg rounded-lg border font-ui",
5812
- "bg-background text-foreground border-border",
5813
- "transition-colors",
5814
- "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
5815
- error && "border-destructive focus:border-destructive focus:ring-destructive"
5816
- )
5817
- },
5818
- index
5819
- ))
5904
+ children: [
5905
+ /* @__PURE__ */ jsxRuntime.jsx(
5906
+ "input",
5907
+ {
5908
+ ref: inputRef,
5909
+ id: baseId,
5910
+ type: "text",
5911
+ inputMode: "numeric",
5912
+ pattern: "\\d*",
5913
+ maxLength: length,
5914
+ value,
5915
+ autoComplete: "one-time-code",
5916
+ "aria-label": label,
5917
+ "aria-describedby": errorId,
5918
+ "aria-invalid": !!error,
5919
+ disabled,
5920
+ required,
5921
+ onChange: handleChange,
5922
+ onFocus: () => setFocused(true),
5923
+ onBlur: () => setFocused(false),
5924
+ className: "absolute inset-0 w-full h-full opacity-0 cursor-text outline-none"
5925
+ }
5926
+ ),
5927
+ /* @__PURE__ */ jsxRuntime.jsx(
5928
+ "div",
5929
+ {
5930
+ className: "flex justify-center gap-2 pointer-events-none",
5931
+ role: "group",
5932
+ "aria-hidden": "true",
5933
+ children: digits.map((digit, i) => {
5934
+ const isActive = focused && i === activeIndex;
5935
+ return /* @__PURE__ */ jsxRuntime.jsx(
5936
+ "div",
5937
+ {
5938
+ className: cn(
5939
+ "w-11 h-14 flex items-center justify-center text-lg rounded-lg border font-ui",
5940
+ "bg-background text-foreground border-border transition-colors",
5941
+ isActive && "border-primary ring-1 ring-primary",
5942
+ error && "border-destructive"
5943
+ ),
5944
+ children: digit
5945
+ },
5946
+ i
5947
+ );
5948
+ })
5949
+ }
5950
+ )
5951
+ ]
5820
5952
  }
5821
5953
  ),
5822
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive font-ui self-start", children: error })
5954
+ error && /* @__PURE__ */ jsxRuntime.jsx(
5955
+ "p",
5956
+ {
5957
+ id: errorId,
5958
+ className: "mt-1 text-xs text-destructive font-ui self-start",
5959
+ children: error
5960
+ }
5961
+ )
5823
5962
  ] });
5824
5963
  };
5825
5964
  OTPCodeInput.displayName = "OTPCodeInput";
@@ -9256,6 +9395,7 @@ function LeadCapturePopup({
9256
9395
  }
9257
9396
 
9258
9397
  exports.ActivityCard = ActivityCard;
9398
+ exports.AgentContactCard = AgentContactCard;
9259
9399
  exports.Alert = Alert;
9260
9400
  exports.BirthDateField = BirthDateField;
9261
9401
  exports.BookingConfirmation = BookingConfirmation;