@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.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, 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';
7
+ import { XIcon, ChevronDownIcon, CalendarIcon, SearchIcon, ChevronRightIcon, ArrowLeftIcon, CheckCircle2Icon, MapIcon, LogOutIcon, UsersIcon, CreditCardIcon, AlertCircleIcon, MinusIcon, PlusIcon, CircleCheckIcon, ChevronLeftIcon, ClockIcon, ChevronUpIcon, UserIcon, MenuIcon, SunIcon, MoonIcon, MapPinIcon, PackageIcon, InfoIcon, Loader2Icon, SendIcon, CheckCircleIcon, CheckIcon, MailIcon, PhoneIcon, MessageCircleIcon, 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';
@@ -1352,7 +1352,7 @@ function AdventureCard({ adventure }) {
1352
1352
  (adventure.description || adventure.detailsSlot) && /* @__PURE__ */ jsxs(Fragment, { children: [
1353
1353
  /* @__PURE__ */ jsx(Separator, { className: "my-1" }),
1354
1354
  /* @__PURE__ */ jsxs("div", { children: [
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" }),
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 : "Details" }),
1356
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",
@@ -2195,11 +2195,193 @@ function Offer({
2195
2195
  ] }) })
2196
2196
  ] });
2197
2197
  }
2198
+ function getInitial(name) {
2199
+ return name && name.length > 0 ? name.charAt(0).toUpperCase() : "?";
2200
+ }
2201
+ function CompactAgentCard({
2202
+ name,
2203
+ avatar,
2204
+ email,
2205
+ whatsappUrl,
2206
+ label,
2207
+ nameFallback,
2208
+ legacyContactUrl,
2209
+ legacyContactLabel,
2210
+ className
2211
+ }) {
2212
+ const hasAgent = !!name;
2213
+ const displayName = hasAgent ? name : nameFallback != null ? nameFallback : "No agent assigned";
2214
+ const showLegacyContact = hasAgent && !email && !whatsappUrl && !!legacyContactUrl;
2215
+ return /* @__PURE__ */ jsxs(
2216
+ "div",
2217
+ {
2218
+ className: cn(
2219
+ "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0",
2220
+ className
2221
+ ),
2222
+ children: [
2223
+ hasAgent && avatar ? (
2224
+ // eslint-disable-next-line @next/next/no-img-element
2225
+ /* @__PURE__ */ jsx(
2226
+ "img",
2227
+ {
2228
+ src: avatar,
2229
+ alt: displayName,
2230
+ className: "h-10 w-10 shrink-0 rounded-full object-cover ring-2 ring-primary/20"
2231
+ }
2232
+ )
2233
+ ) : /* @__PURE__ */ jsx(
2234
+ "div",
2235
+ {
2236
+ className: cn(
2237
+ "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
2238
+ hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
2239
+ ),
2240
+ children: getInitial(name)
2241
+ }
2242
+ ),
2243
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
2244
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: label != null ? label : "Your Agent" }),
2245
+ /* @__PURE__ */ jsx(
2246
+ "p",
2247
+ {
2248
+ className: cn(
2249
+ "text-sm font-sans truncate",
2250
+ hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
2251
+ ),
2252
+ children: displayName
2253
+ }
2254
+ )
2255
+ ] }),
2256
+ hasAgent && (email || whatsappUrl) && /* @__PURE__ */ jsxs("div", { className: "ml-auto shrink-0 flex items-center gap-1.5", children: [
2257
+ email && /* @__PURE__ */ jsx(
2258
+ "a",
2259
+ {
2260
+ href: `mailto:${email}`,
2261
+ className: "flex items-center justify-center h-8 w-8 rounded-full bg-primary/10 text-primary transition-colors hover:bg-primary/20",
2262
+ "aria-label": `Email ${displayName}`,
2263
+ title: email,
2264
+ children: /* @__PURE__ */ jsx(MailIcon, { className: "w-3.5 h-3.5" })
2265
+ }
2266
+ ),
2267
+ whatsappUrl && /* @__PURE__ */ jsx(
2268
+ "a",
2269
+ {
2270
+ href: whatsappUrl,
2271
+ target: "_blank",
2272
+ rel: "noopener noreferrer",
2273
+ className: "flex items-center justify-center h-8 w-8 rounded-full bg-[#25D366]/15 text-[#25D366] transition-colors hover:bg-[#25D366]/25",
2274
+ "aria-label": `WhatsApp ${displayName}`,
2275
+ children: /* @__PURE__ */ jsx("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) })
2276
+ }
2277
+ )
2278
+ ] }),
2279
+ showLegacyContact && /* @__PURE__ */ jsxs(
2280
+ "a",
2281
+ {
2282
+ href: legacyContactUrl,
2283
+ target: "_blank",
2284
+ rel: "noopener noreferrer",
2285
+ 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",
2286
+ children: [
2287
+ /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
2288
+ legacyContactLabel != null ? legacyContactLabel : "Contact"
2289
+ ]
2290
+ }
2291
+ )
2292
+ ]
2293
+ }
2294
+ );
2295
+ }
2296
+ function WideAgentCard({
2297
+ name,
2298
+ avatar,
2299
+ email,
2300
+ whatsappUrl,
2301
+ label,
2302
+ nameFallback,
2303
+ helperText,
2304
+ className
2305
+ }) {
2306
+ const hasAgent = !!name;
2307
+ const displayName = hasAgent ? name : nameFallback != null ? nameFallback : "No agent assigned";
2308
+ return /* @__PURE__ */ jsxs(
2309
+ "div",
2310
+ {
2311
+ className: cn(
2312
+ "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4",
2313
+ className
2314
+ ),
2315
+ children: [
2316
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
2317
+ hasAgent && avatar ? (
2318
+ // eslint-disable-next-line @next/next/no-img-element
2319
+ /* @__PURE__ */ jsx(
2320
+ "img",
2321
+ {
2322
+ src: avatar,
2323
+ alt: displayName,
2324
+ className: "w-16 h-16 rounded-full object-cover ring-2 ring-primary/20"
2325
+ }
2326
+ )
2327
+ ) : /* @__PURE__ */ jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-xl font-bold text-primary font-heading", children: getInitial(name) }) }),
2328
+ /* @__PURE__ */ jsxs("div", { children: [
2329
+ label && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: label }),
2330
+ /* @__PURE__ */ jsxs("p", { className: "text-sm font-sans text-foreground mt-0.5", children: [
2331
+ /* @__PURE__ */ jsx("span", { className: "font-bold text-foreground font-heading", children: displayName }),
2332
+ helperText && /* @__PURE__ */ jsxs(Fragment, { children: [
2333
+ " ",
2334
+ helperText
2335
+ ] })
2336
+ ] })
2337
+ ] })
2338
+ ] }),
2339
+ (whatsappUrl || email) && /* @__PURE__ */ jsxs(Fragment, { children: [
2340
+ /* @__PURE__ */ jsx(Separator, {}),
2341
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2342
+ whatsappUrl && /* @__PURE__ */ jsxs(
2343
+ "a",
2344
+ {
2345
+ href: whatsappUrl,
2346
+ target: "_blank",
2347
+ rel: "noopener noreferrer",
2348
+ 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",
2349
+ children: [
2350
+ /* @__PURE__ */ jsx("svg", { className: "w-4 h-4 shrink-0 text-[#25D366]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }),
2351
+ "WhatsApp"
2352
+ ]
2353
+ }
2354
+ ),
2355
+ email && /* @__PURE__ */ jsxs(
2356
+ "a",
2357
+ {
2358
+ href: `mailto:${email}`,
2359
+ 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",
2360
+ children: [
2361
+ /* @__PURE__ */ jsx(MailIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
2362
+ "Email"
2363
+ ]
2364
+ }
2365
+ )
2366
+ ] })
2367
+ ] })
2368
+ ]
2369
+ }
2370
+ );
2371
+ }
2372
+ function AgentContactCard(props) {
2373
+ if (props.layout === "wide") return /* @__PURE__ */ jsx(WideAgentCard, __spreadValues({}, props));
2374
+ return /* @__PURE__ */ jsx(CompactAgentCard, __spreadValues({}, props));
2375
+ }
2198
2376
  var STATUS_STYLES = {
2199
2377
  pending: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
2200
2378
  confirmed: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
2201
2379
  cancelled: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",
2202
- completed: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
2380
+ completed: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400",
2381
+ pendingRegistration: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
2382
+ pendingPayment: "bg-warning/15 text-warning-foreground dark:bg-warning/20 dark:text-warning",
2383
+ pendingPaymentOverdue: "bg-destructive/15 text-destructive dark:bg-destructive/25 dark:text-destructive",
2384
+ complete: "bg-success/15 text-success dark:bg-success/20 dark:text-success"
2203
2385
  };
2204
2386
  function StatusBadge({ status }) {
2205
2387
  return /* @__PURE__ */ jsx(
@@ -2264,7 +2446,7 @@ function AdventureSection({
2264
2446
  onRequestOpenDeleteModal,
2265
2447
  cannotRemoveLastTravellerLabel
2266
2448
  }) {
2267
- var _a, _b, _c, _d, _e, _f, _g;
2449
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2268
2450
  const [detailsOpen, setDetailsOpen] = React22.useState(false);
2269
2451
  const handleCopyUrl = (url) => {
2270
2452
  if (onCopyFormLink) {
@@ -2336,7 +2518,7 @@ function AdventureSection({
2336
2518
  ] }),
2337
2519
  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: [
2338
2520
  (adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
2339
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
2521
+ /* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: (_e = adventure.itineraryLabel) != null ? _e : "Details" }),
2340
2522
  adventure.detailsSlot ? /* @__PURE__ */ jsx(
2341
2523
  "div",
2342
2524
  {
@@ -2441,8 +2623,8 @@ function AdventureSection({
2441
2623
  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",
2442
2624
  children: [
2443
2625
  /* @__PURE__ */ jsx(PlusIcon, { className: "w-3 h-3" }),
2444
- /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: (_e = adventure.addTravellerLabel) != null ? _e : "More travellers" }),
2445
- /* @__PURE__ */ jsx("span", { className: "sm:hidden", children: (_g = (_f = adventure.addTravellerShortLabel) != null ? _f : adventure.addTravellerLabel) != null ? _g : "Add" })
2626
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: (_f = adventure.addTravellerLabel) != null ? _f : "More travellers" }),
2627
+ /* @__PURE__ */ jsx("span", { className: "sm:hidden", children: (_h = (_g = adventure.addTravellerShortLabel) != null ? _g : adventure.addTravellerLabel) != null ? _h : "Add" })
2446
2628
  ]
2447
2629
  }
2448
2630
  )
@@ -2936,7 +3118,8 @@ function OrderSummary({
2936
3118
  summaryLineItems,
2937
3119
  subtotal,
2938
3120
  total,
2939
- depositInfo
3121
+ depositInfo,
3122
+ balanceDueLabel
2940
3123
  }) {
2941
3124
  return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
2942
3125
  /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Order Summary" }),
@@ -3032,7 +3215,7 @@ function OrderSummary({
3032
3215
  /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.remainingAmount })
3033
3216
  ] }),
3034
3217
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
3035
- /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Balance due" }),
3218
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground font-sans", children: balanceDueLabel != null ? balanceDueLabel : "Balance due" }),
3036
3219
  /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.balanceDueDate })
3037
3220
  ] })
3038
3221
  ] })
@@ -3043,11 +3226,15 @@ function BookingDetails({
3043
3226
  status,
3044
3227
  createdAt,
3045
3228
  contact,
3229
+ agent,
3046
3230
  agentName,
3047
3231
  agentContactUrl,
3048
3232
  agentNameFallback,
3049
3233
  agentLabel,
3050
3234
  agentContactLabel,
3235
+ contactSectionLabel,
3236
+ payBalanceLabel,
3237
+ balanceDueLabel,
3051
3238
  cannotRemoveLastTravellerLabel,
3052
3239
  adventures,
3053
3240
  summaryLineItems,
@@ -3077,7 +3264,7 @@ function BookingDetails({
3077
3264
  signOutLabel,
3078
3265
  className
3079
3266
  }) {
3080
- var _a, _b, _c;
3267
+ var _a, _b, _c, _d;
3081
3268
  const people = totalPeople(adventures);
3082
3269
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3083
3270
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
@@ -3199,49 +3386,20 @@ function BookingDetails({
3199
3386
  /* @__PURE__ */ jsx("p", { className: "font-semibold", children: contact.name }),
3200
3387
  contact.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
3201
3388
  ] }),
3202
- (() => {
3203
- const hasAgent = !!agentName;
3204
- const displayName = hasAgent ? agentName : agentNameFallback != null ? agentNameFallback : "No agent assigned";
3205
- const initial = hasAgent ? agentName.charAt(0) : "?";
3206
- return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
3207
- /* @__PURE__ */ jsx(
3208
- "div",
3209
- {
3210
- className: cn(
3211
- "flex h-10 w-10 shrink-0 items-center justify-center rounded-full font-heading font-bold text-sm uppercase",
3212
- hasAgent ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
3213
- ),
3214
- children: initial
3215
- }
3216
- ),
3217
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
3218
- /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: agentLabel != null ? agentLabel : "Your Agent" }),
3219
- /* @__PURE__ */ jsx(
3220
- "p",
3221
- {
3222
- className: cn(
3223
- "text-sm font-sans truncate",
3224
- hasAgent ? "font-semibold text-foreground" : "italic text-muted-foreground"
3225
- ),
3226
- children: displayName
3227
- }
3228
- )
3229
- ] }),
3230
- hasAgent && agentContactUrl && /* @__PURE__ */ jsxs(
3231
- "a",
3232
- {
3233
- href: agentContactUrl,
3234
- target: "_blank",
3235
- rel: "noopener noreferrer",
3236
- 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",
3237
- children: [
3238
- /* @__PURE__ */ jsx(MessageCircleIcon, { className: "w-3.5 h-3.5" }),
3239
- agentContactLabel != null ? agentContactLabel : "Contact"
3240
- ]
3241
- }
3242
- )
3243
- ] });
3244
- })(),
3389
+ /* @__PURE__ */ jsx(
3390
+ AgentContactCard,
3391
+ {
3392
+ layout: "compact",
3393
+ name: (_a = agent == null ? void 0 : agent.name) != null ? _a : agentName,
3394
+ avatar: agent == null ? void 0 : agent.avatar,
3395
+ email: agent == null ? void 0 : agent.email,
3396
+ whatsappUrl: agent == null ? void 0 : agent.whatsappUrl,
3397
+ label: agentLabel,
3398
+ nameFallback: agentNameFallback,
3399
+ legacyContactUrl: agentContactUrl,
3400
+ legacyContactLabel: agentContactLabel
3401
+ }
3402
+ ),
3245
3403
  /* @__PURE__ */ jsxs(InfoCard, { label: "Total People", children: [
3246
3404
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3247
3405
  /* @__PURE__ */ jsx(UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
@@ -3292,11 +3450,12 @@ function BookingDetails({
3292
3450
  summaryLineItems,
3293
3451
  subtotal,
3294
3452
  total,
3295
- depositInfo
3453
+ depositInfo,
3454
+ balanceDueLabel
3296
3455
  }
3297
3456
  ),
3298
3457
  /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
3299
- /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Responsible Person" }),
3458
+ /* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: contactSectionLabel != null ? contactSectionLabel : "Responsible Person" }),
3300
3459
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
3301
3460
  /* @__PURE__ */ jsxs("div", { children: [
3302
3461
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
@@ -3304,15 +3463,15 @@ function BookingDetails({
3304
3463
  ] }),
3305
3464
  /* @__PURE__ */ jsxs("div", { children: [
3306
3465
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
3307
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_a = contact.email) != null ? _a : "\u2014" })
3466
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_b = contact.email) != null ? _b : "\u2014" })
3308
3467
  ] }),
3309
3468
  /* @__PURE__ */ jsxs("div", { children: [
3310
3469
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
3311
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = contact.phone) != null ? _b : "\u2014" })
3470
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.phone) != null ? _c : "\u2014" })
3312
3471
  ] }),
3313
3472
  /* @__PURE__ */ jsxs("div", { children: [
3314
3473
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
3315
- /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.country) != null ? _c : "\u2014" })
3474
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground font-sans", children: (_d = contact.country) != null ? _d : "\u2014" })
3316
3475
  ] }),
3317
3476
  contact.passport && /* @__PURE__ */ jsxs("div", { children: [
3318
3477
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport / CPF" }),
@@ -3323,24 +3482,38 @@ function BookingDetails({
3323
3482
  (onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
3324
3483
  depositInfo && !depositInfo.isPaidInFull && // Se consumer passar remainingAmountValue, só mostra botão quando saldo > 0.
3325
3484
  // Quando undefined, mantém comportamento antigo (backward compat).
3326
- (depositInfo.remainingAmountValue === void 0 || depositInfo.remainingAmountValue > 0) && onPayBalance && /* @__PURE__ */ jsxs(
3327
- "button",
3328
- {
3329
- type: "button",
3330
- onClick: onPayBalance,
3331
- className: cn(
3332
- "w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
3333
- "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
3334
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3335
- "flex items-center justify-center gap-2"
3336
- ),
3337
- children: [
3338
- /* @__PURE__ */ jsx(CreditCardIcon, { className: "w-4 h-4" }),
3339
- "Pay remaining balance \u2014 ",
3340
- depositInfo.remainingAmount
3341
- ]
3342
- }
3343
- ),
3485
+ (depositInfo.remainingAmountValue === void 0 || depositInfo.remainingAmountValue > 0) && onPayBalance && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col items-center gap-1.5", children: [
3486
+ /* @__PURE__ */ jsxs(
3487
+ "button",
3488
+ {
3489
+ type: "button",
3490
+ onClick: onPayBalance,
3491
+ className: cn(
3492
+ "w-full rounded-full py-3.5 text-center text-sm font-bold uppercase tracking-wide font-heading",
3493
+ depositInfo.isOverdue ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-primary text-primary-foreground hover:bg-primary/90",
3494
+ "transition-colors",
3495
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3496
+ "flex items-center justify-center gap-2"
3497
+ ),
3498
+ children: [
3499
+ /* @__PURE__ */ jsx(CreditCardIcon, { className: "w-4 h-4" }),
3500
+ payBalanceLabel != null ? payBalanceLabel : "Pay remaining balance",
3501
+ " \u2014 ",
3502
+ depositInfo.remainingAmount
3503
+ ]
3504
+ }
3505
+ ),
3506
+ depositInfo.dueDateLabel && /* @__PURE__ */ jsx(
3507
+ "p",
3508
+ {
3509
+ className: cn(
3510
+ "text-xs font-sans",
3511
+ depositInfo.isOverdue ? "text-destructive font-semibold" : "text-muted-foreground"
3512
+ ),
3513
+ children: depositInfo.dueDateLabel
3514
+ }
3515
+ )
3516
+ ] }),
3344
3517
  onCancelRequest && status !== "cancelled" && /* @__PURE__ */ jsxs(
3345
3518
  "button",
3346
3519
  {
@@ -3492,7 +3665,7 @@ var DEFAULT_LABELS = {
3492
3665
  childrenUnit: "child(ren)",
3493
3666
  travellersLabel: "Travellers",
3494
3667
  childBadge: "child",
3495
- itineraryLabel: "Itinerary",
3668
+ itineraryLabel: "Details",
3496
3669
  includedLabel: "O que est\xE1 incluso",
3497
3670
  notIncludedLabel: "O que n\xE3o est\xE1 incluso",
3498
3671
  pricingLabel: "Pricing",
@@ -5675,74 +5848,19 @@ var OTPCodeInput = ({
5675
5848
  required
5676
5849
  }) => {
5677
5850
  const baseId = id != null ? id : React22.useId();
5678
- const inputRefs = React22.useRef([]);
5851
+ const inputRef = React22.useRef(null);
5852
+ const [focused, setFocused] = React22.useState(false);
5679
5853
  const digits = React22.useMemo(() => {
5680
5854
  const arr = value.split("").slice(0, length);
5681
5855
  while (arr.length < length) arr.push("");
5682
5856
  return arr;
5683
5857
  }, [value, length]);
5684
- const updateValue = (newDigits) => {
5685
- onChange(newDigits.join(""));
5686
- };
5687
- const focusedIndexRef = React22.useRef(0);
5688
- const focusSlot = (index) => {
5689
- var _a;
5690
- if (index >= 0 && index < length) {
5691
- (_a = inputRefs.current[index]) == null ? void 0 : _a.focus();
5692
- }
5693
- };
5694
- const handleChange = (index, raw) => {
5695
- const numeric = raw.replace(/\D/g, "");
5696
- if (!numeric) return;
5697
- const newDigits = [...digits];
5698
- if (numeric.length === 1) {
5699
- newDigits[index] = numeric;
5700
- updateValue(newDigits);
5701
- if (index < length - 1) focusSlot(index + 1);
5702
- return;
5703
- }
5704
- const toPaste = numeric.slice(0, length - index);
5705
- for (let i = 0; i < toPaste.length; i++) {
5706
- newDigits[index + i] = toPaste[i];
5707
- }
5708
- updateValue(newDigits);
5709
- const lastFilled = Math.min(index + toPaste.length, length) - 1;
5710
- focusSlot(lastFilled < length - 1 ? lastFilled + 1 : lastFilled);
5711
- };
5712
- const handleKeyDown = (index, e) => {
5713
- if (e.key === "Backspace") {
5714
- e.preventDefault();
5715
- const newDigits = [...digits];
5716
- if (newDigits[index]) {
5717
- newDigits[index] = "";
5718
- updateValue(newDigits);
5719
- } else if (index > 0) {
5720
- newDigits[index - 1] = "";
5721
- updateValue(newDigits);
5722
- focusSlot(index - 1);
5723
- }
5724
- } else if (e.key === "ArrowLeft") {
5725
- e.preventDefault();
5726
- focusSlot(index - 1);
5727
- } else if (e.key === "ArrowRight") {
5728
- e.preventDefault();
5729
- focusSlot(index + 1);
5730
- } else if (e.key === "Tab") ; else if (!/^\d$/.test(e.key) && e.key.length === 1) {
5731
- e.preventDefault();
5732
- }
5733
- };
5734
- const handlePaste = (e, startIndex) => {
5735
- e.preventDefault();
5736
- const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
5737
- if (!pasted) return;
5738
- const newDigits = [...digits];
5739
- for (let i = 0; i < pasted.length && startIndex + i < length; i++) {
5740
- newDigits[startIndex + i] = pasted[i];
5741
- }
5742
- updateValue(newDigits);
5743
- const lastFilled = Math.min(startIndex + pasted.length, length) - 1;
5744
- focusSlot(lastFilled < length - 1 ? lastFilled + 1 : lastFilled);
5858
+ const handleChange = (e) => {
5859
+ const numeric = e.target.value.replace(/\D/g, "").slice(0, length);
5860
+ onChange(numeric);
5745
5861
  };
5862
+ const activeIndex = Math.min(value.length, length - 1);
5863
+ const errorId = error ? `${baseId}-error` : void 0;
5746
5864
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-center", className), children: [
5747
5865
  /* @__PURE__ */ jsx(
5748
5866
  "label",
@@ -5755,50 +5873,71 @@ var OTPCodeInput = ({
5755
5873
  children: label
5756
5874
  }
5757
5875
  ),
5758
- /* @__PURE__ */ jsx(
5876
+ /* @__PURE__ */ jsxs(
5759
5877
  "div",
5760
5878
  {
5761
5879
  className: cn(
5762
- "flex justify-center gap-2",
5880
+ "relative",
5763
5881
  disabled && "opacity-50 pointer-events-none"
5764
5882
  ),
5765
- role: "group",
5766
- "aria-label": label,
5767
- children: digits.map((digit, index) => /* @__PURE__ */ jsx(
5768
- "input",
5769
- {
5770
- ref: (el) => {
5771
- inputRefs.current[index] = el;
5772
- },
5773
- id: index === 0 ? baseId : `${baseId}-${index}`,
5774
- type: "text",
5775
- inputMode: "numeric",
5776
- pattern: "\\d*",
5777
- maxLength: 1,
5778
- value: digit,
5779
- autoComplete: index === 0 ? "one-time-code" : "off",
5780
- "aria-label": `${label} d\xEDgito ${index + 1} de ${length}`,
5781
- disabled,
5782
- onChange: (e) => handleChange(index, e.target.value),
5783
- onKeyDown: (e) => handleKeyDown(index, e),
5784
- onPaste: (e) => handlePaste(e, index),
5785
- onFocus: (e) => {
5786
- focusedIndexRef.current = index;
5787
- e.target.select();
5788
- },
5789
- className: cn(
5790
- "w-11 h-14 text-center text-lg rounded-lg border font-ui",
5791
- "bg-background text-foreground border-border",
5792
- "transition-colors",
5793
- "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
5794
- error && "border-destructive focus:border-destructive focus:ring-destructive"
5795
- )
5796
- },
5797
- index
5798
- ))
5883
+ children: [
5884
+ /* @__PURE__ */ jsx(
5885
+ "input",
5886
+ {
5887
+ ref: inputRef,
5888
+ id: baseId,
5889
+ type: "text",
5890
+ inputMode: "numeric",
5891
+ pattern: "\\d*",
5892
+ maxLength: length,
5893
+ value,
5894
+ autoComplete: "one-time-code",
5895
+ "aria-label": label,
5896
+ "aria-describedby": errorId,
5897
+ "aria-invalid": !!error,
5898
+ disabled,
5899
+ required,
5900
+ onChange: handleChange,
5901
+ onFocus: () => setFocused(true),
5902
+ onBlur: () => setFocused(false),
5903
+ className: "absolute inset-0 w-full h-full opacity-0 cursor-text outline-none"
5904
+ }
5905
+ ),
5906
+ /* @__PURE__ */ jsx(
5907
+ "div",
5908
+ {
5909
+ className: "flex justify-center gap-2 pointer-events-none",
5910
+ role: "group",
5911
+ "aria-hidden": "true",
5912
+ children: digits.map((digit, i) => {
5913
+ const isActive = focused && i === activeIndex;
5914
+ return /* @__PURE__ */ jsx(
5915
+ "div",
5916
+ {
5917
+ className: cn(
5918
+ "w-11 h-14 flex items-center justify-center text-lg rounded-lg border font-ui",
5919
+ "bg-background text-foreground border-border transition-colors",
5920
+ isActive && "border-primary ring-1 ring-primary",
5921
+ error && "border-destructive"
5922
+ ),
5923
+ children: digit
5924
+ },
5925
+ i
5926
+ );
5927
+ })
5928
+ }
5929
+ )
5930
+ ]
5799
5931
  }
5800
5932
  ),
5801
- error && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive font-ui self-start", children: error })
5933
+ error && /* @__PURE__ */ jsx(
5934
+ "p",
5935
+ {
5936
+ id: errorId,
5937
+ className: "mt-1 text-xs text-destructive font-ui self-start",
5938
+ children: error
5939
+ }
5940
+ )
5802
5941
  ] });
5803
5942
  };
5804
5943
  OTPCodeInput.displayName = "OTPCodeInput";
@@ -9234,6 +9373,6 @@ function LeadCapturePopup({
9234
9373
  );
9235
9374
  }
9236
9375
 
9237
- export { ActivityCard, Alert, BirthDateField, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
9376
+ export { ActivityCard, AgentContactCard, Alert, BirthDateField, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
9238
9377
  //# sourceMappingURL=index.js.map
9239
9378
  //# sourceMappingURL=index.js.map