@planetaexo/design-system 0.2.0 → 0.2.10

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
@@ -1,11 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var React3 = require('react');
3
+ var React4 = require('react');
4
+ var dateFns = require('date-fns');
4
5
  var lucideReact = require('lucide-react');
5
6
  var clsx = require('clsx');
6
7
  var tailwindMerge = require('tailwind-merge');
7
8
  var separator = require('@base-ui/react/separator');
8
9
  var jsxRuntime = require('react/jsx-runtime');
10
+ var dialog = require('@base-ui/react/dialog');
11
+ var button = require('@base-ui/react/button');
12
+ var classVarianceAuthority = require('class-variance-authority');
13
+ var reactDayPicker = require('react-day-picker');
9
14
 
10
15
  function _interopNamespace(e) {
11
16
  if (e && e.__esModule) return e;
@@ -25,7 +30,7 @@ function _interopNamespace(e) {
25
30
  return Object.freeze(n);
26
31
  }
27
32
 
28
- var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
33
+ var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
29
34
 
30
35
  var __defProp = Object.defineProperty;
31
36
  var __defProps = Object.defineProperties;
@@ -81,10 +86,346 @@ function Separator(_a) {
81
86
  }, props)
82
87
  );
83
88
  }
84
- var FloatingInput = React3__namespace.forwardRef(
89
+ var buttonVariants = classVarianceAuthority.cva(
90
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
91
+ {
92
+ variants: {
93
+ variant: {
94
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
95
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
96
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
97
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
98
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
99
+ link: "text-primary underline-offset-4 hover:underline"
100
+ },
101
+ size: {
102
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
103
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
104
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
105
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
106
+ icon: "size-8",
107
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
108
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
109
+ "icon-lg": "size-9"
110
+ }
111
+ },
112
+ defaultVariants: {
113
+ variant: "default",
114
+ size: "default"
115
+ }
116
+ }
117
+ );
118
+ function Button(_a) {
119
+ var _b = _a, {
120
+ className,
121
+ variant = "default",
122
+ size = "default"
123
+ } = _b, props = __objRest(_b, [
124
+ "className",
125
+ "variant",
126
+ "size"
127
+ ]);
128
+ return /* @__PURE__ */ jsxRuntime.jsx(
129
+ button.Button,
130
+ __spreadValues({
131
+ "data-slot": "button",
132
+ className: cn(buttonVariants({ variant, size, className }))
133
+ }, props)
134
+ );
135
+ }
136
+ function Dialog(_a) {
137
+ var props = __objRest(_a, []);
138
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
139
+ }
140
+ function DialogPortal(_a) {
141
+ var props = __objRest(_a, []);
142
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
143
+ }
144
+ function DialogClose(_a) {
145
+ var props = __objRest(_a, []);
146
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Close, __spreadValues({ "data-slot": "dialog-close" }, props));
147
+ }
148
+ function DialogOverlay(_a) {
149
+ var _b = _a, {
150
+ className
151
+ } = _b, props = __objRest(_b, [
152
+ "className"
153
+ ]);
154
+ return /* @__PURE__ */ jsxRuntime.jsx(
155
+ dialog.Dialog.Backdrop,
156
+ __spreadValues({
157
+ "data-slot": "dialog-overlay",
158
+ className: cn(
159
+ "fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
160
+ className
161
+ )
162
+ }, props)
163
+ );
164
+ }
165
+ function DialogContent(_a) {
166
+ var _b = _a, {
167
+ className,
168
+ children,
169
+ showCloseButton = true
170
+ } = _b, props = __objRest(_b, [
171
+ "className",
172
+ "children",
173
+ "showCloseButton"
174
+ ]);
175
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
176
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
177
+ /* @__PURE__ */ jsxRuntime.jsxs(
178
+ dialog.Dialog.Popup,
179
+ __spreadProps(__spreadValues({
180
+ "data-slot": "dialog-content",
181
+ className: cn(
182
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
183
+ className
184
+ )
185
+ }, props), {
186
+ children: [
187
+ children,
188
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
189
+ dialog.Dialog.Close,
190
+ {
191
+ "data-slot": "dialog-close",
192
+ render: /* @__PURE__ */ jsxRuntime.jsx(
193
+ Button,
194
+ {
195
+ variant: "ghost",
196
+ className: "absolute top-2 right-2",
197
+ size: "icon-sm"
198
+ }
199
+ ),
200
+ children: [
201
+ /* @__PURE__ */ jsxRuntime.jsx(
202
+ lucideReact.XIcon,
203
+ {}
204
+ ),
205
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
206
+ ]
207
+ }
208
+ )
209
+ ]
210
+ })
211
+ )
212
+ ] });
213
+ }
214
+ function DialogHeader(_a) {
215
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
216
+ return /* @__PURE__ */ jsxRuntime.jsx(
217
+ "div",
218
+ __spreadValues({
219
+ "data-slot": "dialog-header",
220
+ className: cn("flex flex-col gap-2", className)
221
+ }, props)
222
+ );
223
+ }
224
+ function DialogTitle(_a) {
225
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
226
+ return /* @__PURE__ */ jsxRuntime.jsx(
227
+ dialog.Dialog.Title,
228
+ __spreadValues({
229
+ "data-slot": "dialog-title",
230
+ className: cn("text-base leading-none font-medium", className)
231
+ }, props)
232
+ );
233
+ }
234
+ function Calendar(_a) {
235
+ var _b = _a, {
236
+ className,
237
+ classNames,
238
+ showOutsideDays = true,
239
+ captionLayout = "label",
240
+ buttonVariant = "ghost",
241
+ locale,
242
+ formatters,
243
+ components
244
+ } = _b, props = __objRest(_b, [
245
+ "className",
246
+ "classNames",
247
+ "showOutsideDays",
248
+ "captionLayout",
249
+ "buttonVariant",
250
+ "locale",
251
+ "formatters",
252
+ "components"
253
+ ]);
254
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
255
+ return /* @__PURE__ */ jsxRuntime.jsx(
256
+ reactDayPicker.DayPicker,
257
+ __spreadValues({
258
+ showOutsideDays,
259
+ className: cn(
260
+ "group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
261
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
262
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
263
+ className
264
+ ),
265
+ captionLayout,
266
+ locale,
267
+ formatters: __spreadValues({
268
+ formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
269
+ }, formatters),
270
+ classNames: __spreadValues({
271
+ root: cn("w-fit", defaultClassNames.root),
272
+ months: cn(
273
+ "relative flex flex-col gap-4 md:flex-row",
274
+ defaultClassNames.months
275
+ ),
276
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
277
+ nav: cn(
278
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
279
+ defaultClassNames.nav
280
+ ),
281
+ button_previous: cn(
282
+ buttonVariants({ variant: buttonVariant }),
283
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
284
+ defaultClassNames.button_previous
285
+ ),
286
+ button_next: cn(
287
+ buttonVariants({ variant: buttonVariant }),
288
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
289
+ defaultClassNames.button_next
290
+ ),
291
+ month_caption: cn(
292
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
293
+ defaultClassNames.month_caption
294
+ ),
295
+ dropdowns: cn(
296
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
297
+ defaultClassNames.dropdowns
298
+ ),
299
+ dropdown_root: cn(
300
+ "relative rounded-(--cell-radius)",
301
+ defaultClassNames.dropdown_root
302
+ ),
303
+ dropdown: cn(
304
+ "absolute inset-0 bg-popover opacity-0",
305
+ defaultClassNames.dropdown
306
+ ),
307
+ caption_label: cn(
308
+ "font-medium select-none",
309
+ captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
310
+ defaultClassNames.caption_label
311
+ ),
312
+ table: "w-full border-collapse",
313
+ weekdays: cn("flex", defaultClassNames.weekdays),
314
+ weekday: cn(
315
+ "flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
316
+ defaultClassNames.weekday
317
+ ),
318
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
319
+ week_number_header: cn(
320
+ "w-(--cell-size) select-none",
321
+ defaultClassNames.week_number_header
322
+ ),
323
+ week_number: cn(
324
+ "text-[0.8rem] text-muted-foreground select-none",
325
+ defaultClassNames.week_number
326
+ ),
327
+ day: cn(
328
+ "group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
329
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
330
+ defaultClassNames.day
331
+ ),
332
+ range_start: cn(
333
+ "relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
334
+ defaultClassNames.range_start
335
+ ),
336
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
337
+ range_end: cn(
338
+ "relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
339
+ defaultClassNames.range_end
340
+ ),
341
+ today: cn(
342
+ "rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
343
+ defaultClassNames.today
344
+ ),
345
+ outside: cn(
346
+ "text-muted-foreground aria-selected:text-muted-foreground",
347
+ defaultClassNames.outside
348
+ ),
349
+ disabled: cn(
350
+ "text-muted-foreground opacity-50",
351
+ defaultClassNames.disabled
352
+ ),
353
+ hidden: cn("invisible", defaultClassNames.hidden)
354
+ }, classNames),
355
+ components: __spreadValues({
356
+ Root: (_a2) => {
357
+ var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
358
+ return /* @__PURE__ */ jsxRuntime.jsx(
359
+ "div",
360
+ __spreadValues({
361
+ "data-slot": "calendar",
362
+ ref: rootRef,
363
+ className: cn(className2)
364
+ }, props2)
365
+ );
366
+ },
367
+ Chevron: (_c) => {
368
+ var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
369
+ if (orientation === "left") {
370
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
371
+ }
372
+ if (orientation === "right") {
373
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
374
+ }
375
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
376
+ },
377
+ DayButton: (_e) => {
378
+ var props2 = __objRest(_e, []);
379
+ return /* @__PURE__ */ jsxRuntime.jsx(CalendarDayButton, __spreadValues({ locale }, props2));
380
+ },
381
+ WeekNumber: (_f) => {
382
+ var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
383
+ return /* @__PURE__ */ jsxRuntime.jsx("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
384
+ }
385
+ }, components)
386
+ }, props)
387
+ );
388
+ }
389
+ function CalendarDayButton(_a) {
390
+ var _b = _a, {
391
+ className,
392
+ day,
393
+ modifiers,
394
+ locale
395
+ } = _b, props = __objRest(_b, [
396
+ "className",
397
+ "day",
398
+ "modifiers",
399
+ "locale"
400
+ ]);
401
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
402
+ const ref = React4__namespace.useRef(null);
403
+ React4__namespace.useEffect(() => {
404
+ var _a2;
405
+ if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
406
+ }, [modifiers.focused]);
407
+ return /* @__PURE__ */ jsxRuntime.jsx(
408
+ Button,
409
+ __spreadValues({
410
+ variant: "ghost",
411
+ size: "icon",
412
+ "data-day": day.date.toLocaleDateString(locale == null ? void 0 : locale.code),
413
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
414
+ "data-range-start": modifiers.range_start,
415
+ "data-range-end": modifiers.range_end,
416
+ "data-range-middle": modifiers.range_middle,
417
+ className: cn(
418
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
419
+ defaultClassNames.day,
420
+ className
421
+ )
422
+ }, props)
423
+ );
424
+ }
425
+ var FloatingInput = React4__namespace.forwardRef(
85
426
  (_a, ref) => {
86
427
  var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
87
- const inputId = id != null ? id : React3__namespace.useId();
428
+ const inputId = id != null ? id : React4__namespace.useId();
88
429
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
89
430
  /* @__PURE__ */ jsxRuntime.jsx(
90
431
  "input",
@@ -124,10 +465,10 @@ var FloatingInput = React3__namespace.forwardRef(
124
465
  }
125
466
  );
126
467
  FloatingInput.displayName = "FloatingInput";
127
- var FloatingSelect = React3__namespace.forwardRef(
468
+ var FloatingSelect = React4__namespace.forwardRef(
128
469
  (_a, ref) => {
129
470
  var _b = _a, { label, error, id, className, required, children } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children"]);
130
- const inputId = id != null ? id : React3__namespace.useId();
471
+ const inputId = id != null ? id : React4__namespace.useId();
131
472
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
132
473
  /* @__PURE__ */ jsxRuntime.jsx(
133
474
  "select",
@@ -388,11 +729,11 @@ function PhoneCountrySelect({
388
729
  className
389
730
  }) {
390
731
  var _a;
391
- const [open, setOpen] = React3__namespace.useState(false);
392
- const containerRef = React3__namespace.useRef(null);
393
- const listRef = React3__namespace.useRef(null);
732
+ const [open, setOpen] = React4__namespace.useState(false);
733
+ const containerRef = React4__namespace.useRef(null);
734
+ const listRef = React4__namespace.useRef(null);
394
735
  const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
395
- React3__namespace.useEffect(() => {
736
+ React4__namespace.useEffect(() => {
396
737
  if (!open) return;
397
738
  const handler = (e) => {
398
739
  var _a2;
@@ -403,7 +744,7 @@ function PhoneCountrySelect({
403
744
  document.addEventListener("mousedown", handler);
404
745
  return () => document.removeEventListener("mousedown", handler);
405
746
  }, [open]);
406
- React3__namespace.useEffect(() => {
747
+ React4__namespace.useEffect(() => {
407
748
  if (!open || !listRef.current) return;
408
749
  const activeEl = listRef.current.querySelector("[data-selected=true]");
409
750
  activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
@@ -499,9 +840,9 @@ function PhoneCountrySelect({
499
840
  )
500
841
  ] });
501
842
  }
502
- function OfferAdventureCard({ adventure }) {
843
+ function AdventureCard({ adventure }) {
503
844
  var _a, _b, _c;
504
- const [checked, setChecked] = React3__namespace.useState(
845
+ const [checked, setChecked] = React4__namespace.useState(
505
846
  new Set((_b = (_a = adventure.optionals) == null ? void 0 : _a.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _b : [])
506
847
  );
507
848
  const toggleOptional = (id) => setChecked((prev) => {
@@ -521,13 +862,16 @@ function OfferAdventureCard({ adventure }) {
521
862
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 lg:p-6 flex flex-col gap-2.5", children: [
522
863
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 min-h-[22px]", children: [
523
864
  adventure.reference ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center rounded-md bg-primary/10 px-2 py-0.5 text-xs font-semibold text-primary font-heading tracking-wide", children: adventure.reference }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
524
- adventure.onRemove && /* @__PURE__ */ jsxRuntime.jsx(
865
+ adventure.onRemove && /* @__PURE__ */ jsxRuntime.jsxs(
525
866
  "button",
526
867
  {
527
868
  type: "button",
528
869
  onClick: adventure.onRemove,
529
- className: "text-[11px] text-destructive/60 hover:text-destructive transition-colors font-sans leading-none",
530
- children: "Remove from proposal"
870
+ className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1 text-xs text-muted-foreground font-ui hover:border-destructive hover:text-destructive transition-colors",
871
+ children: [
872
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-3 h-3" }),
873
+ "Remove"
874
+ ]
531
875
  }
532
876
  )
533
877
  ] }),
@@ -542,12 +886,12 @@ function OfferAdventureCard({ adventure }) {
542
886
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
543
887
  adventure.location
544
888
  ] }),
545
- adventure.optionals && adventure.optionals.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
889
+ adventure.optionals && adventure.optionals.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3", children: [
546
890
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Available optionals" }),
547
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5", children: adventure.optionals.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
891
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: adventure.optionals.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
548
892
  "label",
549
893
  {
550
- className: "flex items-center gap-2.5 cursor-pointer group",
894
+ className: "flex items-center gap-3 cursor-pointer group",
551
895
  children: [
552
896
  /* @__PURE__ */ jsxRuntime.jsx(
553
897
  "input",
@@ -561,7 +905,7 @@ function OfferAdventureCard({ adventure }) {
561
905
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-sans text-foreground/80 group-hover:text-foreground transition-colors leading-snug", children: [
562
906
  opt.label,
563
907
  " ",
564
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
908
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-semibold", children: [
565
909
  "(",
566
910
  opt.pricePerPerson,
567
911
  ")"
@@ -579,26 +923,30 @@ function OfferAdventureCard({ adventure }) {
579
923
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-relaxed font-sans", children: adventure.description })
580
924
  ] })
581
925
  ] }),
582
- adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
583
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "O que est\xE1 incluso" }),
584
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-foreground/80 font-sans", children: [
585
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-0.5" }),
926
+ adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
927
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: "O que est\xE1 incluso" }),
928
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-foreground/80 font-sans", children: [
929
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-1" }),
586
930
  item
587
931
  ] }, i)) })
588
932
  ] }),
589
- adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
590
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "O que n\xE3o est\xE1 incluso" }),
591
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-foreground/80 font-sans", children: [
592
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-0.5" }),
933
+ adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
934
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: "O que n\xE3o est\xE1 incluso" }),
935
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-foreground/80 font-sans", children: [
936
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-1" }),
593
937
  item
594
938
  ] }, i)) })
595
939
  ] }),
596
- adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
597
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "Pol\xEDtica de cancelamento" }),
598
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-muted-foreground font-sans", children: [
599
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2" }),
940
+ adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
941
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-base font-bold text-foreground font-heading", children: "Pol\xEDtica de cancelamento" }),
942
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-base text-muted-foreground font-sans", children: [
943
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2.5" }),
600
944
  item
601
945
  ] }, i)) })
946
+ ] }),
947
+ adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
948
+ /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
949
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 text-foreground", children: adventure.detailsSlot })
602
950
  ] })
603
951
  ] })
604
952
  ] });
@@ -607,10 +955,11 @@ function OfferSidebar({
607
955
  total,
608
956
  agent,
609
957
  onBook,
610
- bookLabel
958
+ bookLabel,
959
+ bookDisabled
611
960
  }) {
612
961
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
613
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
962
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden lg:flex rounded-2xl border border-border bg-card p-5 flex-col gap-4", children: [
614
963
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
615
964
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase tracking-widest text-muted-foreground font-heading mb-1", children: "Booking Total" }),
616
965
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-black text-primary font-heading leading-none", children: total })
@@ -619,11 +968,13 @@ function OfferSidebar({
619
968
  "button",
620
969
  {
621
970
  type: "button",
971
+ disabled: bookDisabled,
622
972
  onClick: onBook,
623
973
  className: cn(
624
974
  "w-full rounded-full bg-primary py-3 text-sm font-bold tracking-wide uppercase",
625
975
  "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
626
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
976
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
977
+ bookDisabled && "opacity-50 pointer-events-none"
627
978
  ),
628
979
  children: bookLabel
629
980
  }
@@ -643,8 +994,8 @@ function OfferSidebar({
643
994
  )
644
995
  ) : /* @__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: agent.name.charAt(0) }) }),
645
996
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
646
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-sans", children: "Need help with your offer?" }),
647
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-sans text-foreground/80 mt-0.5", children: [
997
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: "Need help with your offer?" }),
998
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-sans text-foreground mt-0.5", children: [
648
999
  "Contact",
649
1000
  " ",
650
1001
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.name }),
@@ -653,7 +1004,7 @@ function OfferSidebar({
653
1004
  " ",
654
1005
  "at",
655
1006
  " ",
656
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-primary", children: agent.company })
1007
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.company })
657
1008
  ] })
658
1009
  ] })
659
1010
  ] })
@@ -707,7 +1058,10 @@ function OfferSummarySection({
707
1058
  total,
708
1059
  depositInfo,
709
1060
  onContinue,
710
- continueLabel
1061
+ continueLabel,
1062
+ summaryNotesSlot,
1063
+ summaryDiscountLine,
1064
+ continueDisabled
711
1065
  }) {
712
1066
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
713
1067
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-bold text-foreground font-heading text-base", children: "Summary" }),
@@ -726,11 +1080,19 @@ function OfferSummarySection({
726
1080
  ] }, j)) }),
727
1081
  i < adventures.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-4" })
728
1082
  ] }, adventure.id)) }),
1083
+ summaryNotesSlot,
729
1084
  /* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
730
1085
  subtotal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
731
1086
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Subtotal" }),
732
1087
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: subtotal })
733
1088
  ] }),
1089
+ summaryDiscountLine && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-success", children: [
1090
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-sans", children: summaryDiscountLine.label }),
1091
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold font-sans shrink-0", children: [
1092
+ "\u2212",
1093
+ summaryDiscountLine.amount
1094
+ ] })
1095
+ ] }),
734
1096
  depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 rounded-lg bg-muted/50 border border-border p-3", children: [
735
1097
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
736
1098
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground font-sans", children: [
@@ -757,17 +1119,322 @@ function OfferSummarySection({
757
1119
  "button",
758
1120
  {
759
1121
  type: "button",
1122
+ disabled: continueDisabled,
760
1123
  onClick: onContinue,
761
1124
  className: cn(
762
1125
  "w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
763
1126
  "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
764
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1127
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1128
+ continueDisabled && "opacity-50 pointer-events-none"
765
1129
  ),
766
1130
  children: continueLabel
767
1131
  }
768
1132
  )
769
1133
  ] });
770
1134
  }
1135
+ var COUNTRIES = [
1136
+ { code: "AF", name: "Afghanistan" },
1137
+ { code: "AL", name: "Albania" },
1138
+ { code: "DZ", name: "Algeria" },
1139
+ { code: "AO", name: "Angola" },
1140
+ { code: "AR", name: "Argentina" },
1141
+ { code: "AM", name: "Armenia" },
1142
+ { code: "AU", name: "Australia" },
1143
+ { code: "AT", name: "Austria" },
1144
+ { code: "AZ", name: "Azerbaijan" },
1145
+ { code: "BE", name: "Belgium" },
1146
+ { code: "BO", name: "Bolivia" },
1147
+ { code: "BA", name: "Bosnia" },
1148
+ { code: "BR", name: "Brazil" },
1149
+ { code: "BG", name: "Bulgaria" },
1150
+ { code: "KH", name: "Cambodia" },
1151
+ { code: "CA", name: "Canada" },
1152
+ { code: "CL", name: "Chile" },
1153
+ { code: "CN", name: "China" },
1154
+ { code: "CO", name: "Colombia" },
1155
+ { code: "CR", name: "Costa Rica" },
1156
+ { code: "HR", name: "Croatia" },
1157
+ { code: "CU", name: "Cuba" },
1158
+ { code: "CZ", name: "Czech Republic" },
1159
+ { code: "DK", name: "Denmark" },
1160
+ { code: "DO", name: "Dominican Republic" },
1161
+ { code: "EC", name: "Ecuador" },
1162
+ { code: "EG", name: "Egypt" },
1163
+ { code: "SV", name: "El Salvador" },
1164
+ { code: "ET", name: "Ethiopia" },
1165
+ { code: "FI", name: "Finland" },
1166
+ { code: "FR", name: "France" },
1167
+ { code: "GE", name: "Georgia" },
1168
+ { code: "DE", name: "Germany" },
1169
+ { code: "GH", name: "Ghana" },
1170
+ { code: "GR", name: "Greece" },
1171
+ { code: "GT", name: "Guatemala" },
1172
+ { code: "HN", name: "Honduras" },
1173
+ { code: "HK", name: "Hong Kong" },
1174
+ { code: "HU", name: "Hungary" },
1175
+ { code: "IS", name: "Iceland" },
1176
+ { code: "IN", name: "India" },
1177
+ { code: "ID", name: "Indonesia" },
1178
+ { code: "IR", name: "Iran" },
1179
+ { code: "IQ", name: "Iraq" },
1180
+ { code: "IE", name: "Ireland" },
1181
+ { code: "IL", name: "Israel" },
1182
+ { code: "IT", name: "Italy" },
1183
+ { code: "JM", name: "Jamaica" },
1184
+ { code: "JP", name: "Japan" },
1185
+ { code: "JO", name: "Jordan" },
1186
+ { code: "KZ", name: "Kazakhstan" },
1187
+ { code: "KE", name: "Kenya" },
1188
+ { code: "KW", name: "Kuwait" },
1189
+ { code: "LB", name: "Lebanon" },
1190
+ { code: "LY", name: "Libya" },
1191
+ { code: "MY", name: "Malaysia" },
1192
+ { code: "MX", name: "Mexico" },
1193
+ { code: "MA", name: "Morocco" },
1194
+ { code: "MZ", name: "Mozambique" },
1195
+ { code: "NP", name: "Nepal" },
1196
+ { code: "NL", name: "Netherlands" },
1197
+ { code: "NZ", name: "New Zealand" },
1198
+ { code: "NI", name: "Nicaragua" },
1199
+ { code: "NG", name: "Nigeria" },
1200
+ { code: "NO", name: "Norway" },
1201
+ { code: "PK", name: "Pakistan" },
1202
+ { code: "PA", name: "Panama" },
1203
+ { code: "PY", name: "Paraguay" },
1204
+ { code: "PE", name: "Peru" },
1205
+ { code: "PH", name: "Philippines" },
1206
+ { code: "PL", name: "Poland" },
1207
+ { code: "PT", name: "Portugal" },
1208
+ { code: "QA", name: "Qatar" },
1209
+ { code: "RO", name: "Romania" },
1210
+ { code: "RU", name: "Russia" },
1211
+ { code: "SA", name: "Saudi Arabia" },
1212
+ { code: "SN", name: "Senegal" },
1213
+ { code: "RS", name: "Serbia" },
1214
+ { code: "SG", name: "Singapore" },
1215
+ { code: "ZA", name: "South Africa" },
1216
+ { code: "KR", name: "South Korea" },
1217
+ { code: "ES", name: "Spain" },
1218
+ { code: "LK", name: "Sri Lanka" },
1219
+ { code: "SE", name: "Sweden" },
1220
+ { code: "CH", name: "Switzerland" },
1221
+ { code: "TW", name: "Taiwan" },
1222
+ { code: "TZ", name: "Tanzania" },
1223
+ { code: "TH", name: "Thailand" },
1224
+ { code: "TN", name: "Tunisia" },
1225
+ { code: "TR", name: "Turkey" },
1226
+ { code: "UA", name: "Ukraine" },
1227
+ { code: "AE", name: "United Arab Emirates" },
1228
+ { code: "GB", name: "United Kingdom" },
1229
+ { code: "US", name: "United States" },
1230
+ { code: "UY", name: "Uruguay" },
1231
+ { code: "UZ", name: "Uzbekistan" },
1232
+ { code: "VE", name: "Venezuela" },
1233
+ { code: "VN", name: "Vietnam" },
1234
+ { code: "YE", name: "Yemen" },
1235
+ { code: "ZW", name: "Zimbabwe" }
1236
+ ];
1237
+ function CountrySearchField({
1238
+ value,
1239
+ onChange,
1240
+ required
1241
+ }) {
1242
+ var _a;
1243
+ const [query, setQuery] = React4__namespace.useState("");
1244
+ const [open, setOpen] = React4__namespace.useState(false);
1245
+ const containerRef = React4__namespace.useRef(null);
1246
+ const searchRef = React4__namespace.useRef(null);
1247
+ const selected = COUNTRIES.find((c) => c.code === value);
1248
+ const isFloated = open || !!selected;
1249
+ const filtered = query.trim() ? COUNTRIES.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : COUNTRIES;
1250
+ React4__namespace.useEffect(() => {
1251
+ if (!open) return;
1252
+ const handler = (e) => {
1253
+ var _a2;
1254
+ if (!((_a2 = containerRef.current) == null ? void 0 : _a2.contains(e.target))) {
1255
+ setOpen(false);
1256
+ setQuery("");
1257
+ }
1258
+ };
1259
+ document.addEventListener("mousedown", handler);
1260
+ return () => document.removeEventListener("mousedown", handler);
1261
+ }, [open]);
1262
+ const handleOpen = () => {
1263
+ setOpen(true);
1264
+ setQuery("");
1265
+ setTimeout(() => {
1266
+ var _a2;
1267
+ return (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
1268
+ }, 0);
1269
+ };
1270
+ const handleSelect = (code) => {
1271
+ onChange(code);
1272
+ setOpen(false);
1273
+ setQuery("");
1274
+ };
1275
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative w-full", children: [
1276
+ /* @__PURE__ */ jsxRuntime.jsxs(
1277
+ "button",
1278
+ {
1279
+ type: "button",
1280
+ onClick: handleOpen,
1281
+ className: cn(
1282
+ "relative flex w-full items-center rounded-lg border border-border bg-background h-14 px-3 text-left transition-colors",
1283
+ open && "border-primary ring-1 ring-primary"
1284
+ ),
1285
+ children: [
1286
+ /* @__PURE__ */ jsxRuntime.jsxs(
1287
+ "span",
1288
+ {
1289
+ className: cn(
1290
+ "pointer-events-none absolute left-3 transition-all duration-150 font-ui",
1291
+ isFloated ? "top-2 text-xs text-primary" : "top-1/2 -translate-y-1/2 text-base text-muted-foreground"
1292
+ ),
1293
+ children: [
1294
+ "Country",
1295
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
1296
+ ]
1297
+ }
1298
+ ),
1299
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-1 pt-3 text-base font-ui truncate", selected ? "text-foreground" : "invisible"), children: (_a = selected == null ? void 0 : selected.name) != null ? _a : "\u2014" }),
1300
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: cn("h-4 w-4 shrink-0 text-muted-foreground transition-transform", open && "rotate-180") })
1301
+ ]
1302
+ }
1303
+ ),
1304
+ open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-[calc(100%+4px)] left-0 right-0 z-50 rounded-xl border border-border bg-background shadow-lg overflow-hidden", children: [
1305
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-border", children: [
1306
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
1307
+ /* @__PURE__ */ jsxRuntime.jsx(
1308
+ "input",
1309
+ {
1310
+ ref: searchRef,
1311
+ type: "text",
1312
+ value: query,
1313
+ onChange: (e) => setQuery(e.target.value),
1314
+ placeholder: "Search country\u2026",
1315
+ className: "flex-1 bg-transparent text-sm font-ui text-foreground placeholder:text-muted-foreground focus:outline-none"
1316
+ }
1317
+ )
1318
+ ] }),
1319
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-52 overflow-y-auto py-1", children: filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-sm font-ui text-muted-foreground", children: "No countries found" }) : filtered.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
1320
+ "button",
1321
+ {
1322
+ type: "button",
1323
+ onClick: () => handleSelect(c.code),
1324
+ className: cn(
1325
+ "flex w-full items-center px-3 py-2 text-sm font-ui text-left transition-colors hover:bg-muted",
1326
+ c.code === value && "bg-primary/10 text-primary font-semibold"
1327
+ ),
1328
+ children: c.name
1329
+ },
1330
+ c.code
1331
+ )) })
1332
+ ] })
1333
+ ] });
1334
+ }
1335
+ function BirthDateField({
1336
+ label,
1337
+ required,
1338
+ value,
1339
+ onChange
1340
+ }) {
1341
+ const [open, setOpen] = React4__namespace.useState(false);
1342
+ const [text, setText] = React4__namespace.useState(value ? dateFns.format(value, "dd/MM/yyyy") : "");
1343
+ const containerRef = React4__namespace.useRef(null);
1344
+ const inputId = React4__namespace.useId();
1345
+ React4__namespace.useEffect(() => {
1346
+ setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
1347
+ }, [value]);
1348
+ React4__namespace.useEffect(() => {
1349
+ if (!open) return;
1350
+ const handler = (e) => {
1351
+ var _a;
1352
+ if (!((_a = containerRef.current) == null ? void 0 : _a.contains(e.target))) setOpen(false);
1353
+ };
1354
+ document.addEventListener("mousedown", handler);
1355
+ return () => document.removeEventListener("mousedown", handler);
1356
+ }, [open]);
1357
+ const handleTextChange = (e) => {
1358
+ const digits = e.target.value.replace(/\D/g, "").slice(0, 8);
1359
+ let formatted = digits.slice(0, 2);
1360
+ if (digits.length > 2) formatted += "/" + digits.slice(2, 4);
1361
+ if (digits.length > 4) formatted += "/" + digits.slice(4, 8);
1362
+ setText(formatted);
1363
+ if (formatted.length === 10) {
1364
+ const [dd, mm, yyyy] = formatted.split("/").map(Number);
1365
+ const d = new Date(yyyy, mm - 1, dd);
1366
+ if (!isNaN(d.getTime()) && d.getFullYear() === yyyy && d <= /* @__PURE__ */ new Date()) {
1367
+ onChange(d);
1368
+ return;
1369
+ }
1370
+ }
1371
+ onChange(void 0);
1372
+ };
1373
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative w-full", children: [
1374
+ /* @__PURE__ */ jsxRuntime.jsxs(
1375
+ "div",
1376
+ {
1377
+ className: cn(
1378
+ "flex items-center rounded-lg border border-border bg-background h-14 transition-colors",
1379
+ open ? "border-primary ring-1 ring-primary" : "focus-within:border-primary focus-within:ring-1 focus-within:ring-primary"
1380
+ ),
1381
+ children: [
1382
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full", children: [
1383
+ /* @__PURE__ */ jsxRuntime.jsxs(
1384
+ "label",
1385
+ {
1386
+ htmlFor: inputId,
1387
+ className: "pointer-events-none absolute left-3 top-2 text-xs text-muted-foreground font-ui",
1388
+ children: [
1389
+ label,
1390
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
1391
+ ]
1392
+ }
1393
+ ),
1394
+ /* @__PURE__ */ jsxRuntime.jsx(
1395
+ "input",
1396
+ {
1397
+ id: inputId,
1398
+ type: "text",
1399
+ inputMode: "numeric",
1400
+ value: text,
1401
+ onChange: handleTextChange,
1402
+ placeholder: "dd/mm/yyyy",
1403
+ className: "block h-full w-full bg-transparent px-3 pt-5 pb-2 text-base text-foreground font-ui focus:outline-none placeholder:text-muted-foreground/50"
1404
+ }
1405
+ )
1406
+ ] }),
1407
+ /* @__PURE__ */ jsxRuntime.jsx(
1408
+ "button",
1409
+ {
1410
+ type: "button",
1411
+ onClick: () => setOpen((v) => !v),
1412
+ tabIndex: -1,
1413
+ "aria-label": "Open calendar",
1414
+ className: "px-3 h-full flex items-center text-muted-foreground hover:text-primary transition-colors focus:outline-none",
1415
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "h-4 w-4" })
1416
+ }
1417
+ )
1418
+ ]
1419
+ }
1420
+ ),
1421
+ open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[calc(100%+4px)] left-0 right-0 z-50 rounded-xl border border-border bg-background shadow-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
1422
+ Calendar,
1423
+ {
1424
+ mode: "single",
1425
+ selected: value,
1426
+ onSelect: (date) => {
1427
+ onChange(date);
1428
+ setOpen(false);
1429
+ },
1430
+ defaultMonth: value != null ? value : new Date(1990, 0, 1),
1431
+ disabled: { after: /* @__PURE__ */ new Date() },
1432
+ className: "font-ui w-full",
1433
+ autoFocus: true
1434
+ }
1435
+ ) })
1436
+ ] });
1437
+ }
771
1438
  var WIZARD_STEPS = [
772
1439
  { id: "responsible", label: "Responsible party details" },
773
1440
  { id: "travellers", label: "Travellers" },
@@ -779,9 +1446,9 @@ function BookingWizard({
779
1446
  depositInfo,
780
1447
  onCancel
781
1448
  }) {
782
- const [step, setStep] = React3__namespace.useState("responsible");
783
- const [error, setError] = React3__namespace.useState(null);
784
- const [responsible, setResponsible] = React3__namespace.useState({
1449
+ const [step, setStep] = React4__namespace.useState("responsible");
1450
+ const [error, setError] = React4__namespace.useState(null);
1451
+ const [responsible, setResponsible] = React4__namespace.useState({
785
1452
  firstName: "",
786
1453
  lastName: "",
787
1454
  email: "",
@@ -800,18 +1467,21 @@ function BookingWizard({
800
1467
  return s + ((_b = (_a = a.slots) == null ? void 0 : _a.children) != null ? _b : 0);
801
1468
  }, 0);
802
1469
  const totalPax = totalAdults + totalChildren;
803
- const [travellers, setTravellers] = React3__namespace.useState(
1470
+ const [travellers, setTravellers] = React4__namespace.useState(
804
1471
  Array.from({ length: Math.max(totalPax, 1) }, () => ({
805
1472
  firstName: "",
806
1473
  lastName: "",
807
- dateOfBirth: "",
1474
+ dateOfBirth: void 0,
808
1475
  email: ""
809
1476
  }))
810
1477
  );
811
- const [payAmount, setPayAmount] = React3__namespace.useState("full");
812
- const [termsAccepted, setTermsAccepted] = React3__namespace.useState(false);
1478
+ const [payAmount, setPayAmount] = React4__namespace.useState("full");
1479
+ const [payMethod, setPayMethod] = React4__namespace.useState("stripe");
1480
+ const [termsAccepted, setTermsAccepted] = React4__namespace.useState(false);
1481
+ const [termsModalOpen, setTermsModalOpen] = React4__namespace.useState(false);
813
1482
  const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
814
1483
  const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
1484
+ const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
815
1485
  const stepIndex = WIZARD_STEPS.findIndex((s) => s.id === step);
816
1486
  const goNext = () => {
817
1487
  setError(null);
@@ -880,7 +1550,7 @@ function BookingWizard({
880
1550
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
881
1551
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
882
1552
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: "Booking details" }),
883
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: WIZARD_STEPS.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs(React3__namespace.Fragment, { children: [
1553
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: WIZARD_STEPS.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs(React4__namespace.Fragment, { children: [
884
1554
  /* @__PURE__ */ jsxRuntime.jsx(
885
1555
  "span",
886
1556
  {
@@ -914,22 +1584,14 @@ function BookingWizard({
914
1584
  placeholder: " ",
915
1585
  value: responsible.phone,
916
1586
  onChange: (e) => setR("phone", e.target.value),
917
- className: "peer block h-14 w-full rounded-r-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-sans transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
1587
+ className: "peer block h-14 w-full rounded-r-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-ui transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
918
1588
  }
919
1589
  ),
920
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-phone", className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-base text-muted-foreground font-sans transition-all duration-150 peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs", children: "Phone" })
1590
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-phone", className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs", children: "Phone" })
921
1591
  ] })
922
1592
  ] })
923
1593
  ] }),
924
- /* @__PURE__ */ jsxRuntime.jsxs(FloatingSelect, { label: "Country", required: true, value: responsible.country, onChange: (e) => setR("country", e.target.value), children: [
925
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, hidden: true }),
926
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "BR", children: "Brazil" }),
927
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "FR", children: "France" }),
928
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "US", children: "United States" }),
929
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "UK", children: "United Kingdom" }),
930
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "AR", children: "Argentina" }),
931
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "PT", children: "Portugal" })
932
- ] }),
1594
+ /* @__PURE__ */ jsxRuntime.jsx(CountrySearchField, { required: true, value: responsible.country, onChange: (code) => setR("country", code) }),
933
1595
  /* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Passport / CPF", required: true, value: responsible.passport, onChange: (e) => setR("passport", e.target.value) }),
934
1596
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
935
1597
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -940,10 +1602,10 @@ function BookingWizard({
940
1602
  rows: 3,
941
1603
  value: responsible.notes,
942
1604
  onChange: (e) => setR("notes", e.target.value),
943
- className: "peer block w-full resize-none rounded-lg border border-border bg-background px-3 pt-6 pb-3 text-base text-foreground font-sans transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
1605
+ className: "peer block w-full resize-none rounded-lg border border-border bg-background px-3 pt-6 pb-3 text-base text-foreground font-ui transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
944
1606
  }
945
1607
  ),
946
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-notes", className: "pointer-events-none absolute left-3 top-4 text-base text-muted-foreground font-sans transition-all duration-150 peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs", children: "Notes (optional)" })
1608
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-notes", className: "pointer-events-none absolute left-3 top-4 text-base text-muted-foreground font-ui transition-all duration-150 peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs", children: "Notes (optional)" })
947
1609
  ] })
948
1610
  ] }),
949
1611
  step === "travellers" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
@@ -969,23 +1631,15 @@ function BookingWizard({
969
1631
  /* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Last name", required: true, value: t.lastName, onChange: (e) => setT(i, "lastName", e.target.value) })
970
1632
  ] }),
971
1633
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
972
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
973
- /* @__PURE__ */ jsxRuntime.jsx(
974
- "input",
975
- {
976
- id: `dob-${i}`,
977
- type: "date",
978
- required: isChild,
979
- value: t.dateOfBirth,
980
- onChange: (e) => setT(i, "dateOfBirth", e.target.value),
981
- className: "peer block h-14 w-full rounded-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-sans transition-colors focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
982
- }
983
- ),
984
- /* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: `dob-${i}`, className: "pointer-events-none absolute left-3 top-3 text-xs text-muted-foreground font-sans", children: [
985
- "Date of birth",
986
- isChild && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
987
- ] })
988
- ] }),
1634
+ /* @__PURE__ */ jsxRuntime.jsx(
1635
+ BirthDateField,
1636
+ {
1637
+ label: "Date of birth",
1638
+ required: isChild,
1639
+ value: t.dateOfBirth,
1640
+ onChange: (d) => setTDob(i, d)
1641
+ }
1642
+ ),
989
1643
  /* @__PURE__ */ jsxRuntime.jsx(
990
1644
  FloatingInput,
991
1645
  {
@@ -1022,20 +1676,38 @@ function BookingWizard({
1022
1676
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "$" }),
1023
1677
  " Payment method"
1024
1678
  ] }),
1025
- /* @__PURE__ */ jsxRuntime.jsx(
1679
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2", children: [
1680
+ { id: "stripe", label: "Credit / Debit card", sub: "Secure payment via Stripe" },
1681
+ { id: "pix", label: "PIX", sub: "Instant transfer \u2014 Brazil only" },
1682
+ { id: "bank", label: "Bank transfer", sub: "Wire / TED / DOC" }
1683
+ ].map((m) => /* @__PURE__ */ jsxRuntime.jsxs(
1026
1684
  "button",
1027
1685
  {
1028
1686
  type: "button",
1029
- className: "w-full rounded-lg border-2 border-primary bg-primary/5 px-4 py-3 text-sm text-center text-primary font-semibold font-sans",
1030
- children: "Stripe (cart\xE3o)"
1031
- }
1032
- )
1687
+ onClick: () => setPayMethod(m.id),
1688
+ className: cn(
1689
+ "flex items-start gap-3 rounded-lg border-2 px-4 py-3 text-left transition-colors",
1690
+ payMethod === m.id ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/40"
1691
+ ),
1692
+ children: [
1693
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
1694
+ "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors",
1695
+ payMethod === m.id ? "border-primary" : "border-border"
1696
+ ), children: payMethod === m.id && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-2 w-2 rounded-full bg-primary" }) }),
1697
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col gap-0.5", children: [
1698
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
1699
+ "text-sm font-semibold font-sans",
1700
+ payMethod === m.id ? "text-primary" : "text-foreground"
1701
+ ), children: m.label }),
1702
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: m.sub })
1703
+ ] })
1704
+ ]
1705
+ },
1706
+ m.id
1707
+ )) })
1033
1708
  ] }),
1034
1709
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
1035
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest flex items-center gap-1.5", children: [
1036
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "w-3.5 h-3.5" }),
1037
- " Terms and conditions"
1038
- ] }),
1710
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Terms and conditions" }),
1039
1711
  /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer", children: [
1040
1712
  /* @__PURE__ */ jsxRuntime.jsx(
1041
1713
  "input",
@@ -1046,9 +1718,52 @@ function BookingWizard({
1046
1718
  className: "h-4 w-4 shrink-0 mt-0.5 rounded border-border accent-primary cursor-pointer"
1047
1719
  }
1048
1720
  ),
1049
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: "I have read and accept the terms and conditions of the reservation." })
1721
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: [
1722
+ "I have read and accept the",
1723
+ " ",
1724
+ /* @__PURE__ */ jsxRuntime.jsx(
1725
+ "button",
1726
+ {
1727
+ type: "button",
1728
+ onClick: () => setTermsModalOpen(true),
1729
+ className: "underline underline-offset-2 text-primary hover:text-primary/80 transition-colors font-semibold",
1730
+ children: "terms and conditions"
1731
+ }
1732
+ ),
1733
+ " ",
1734
+ "of the reservation."
1735
+ ] })
1050
1736
  ] })
1051
- ] })
1737
+ ] }),
1738
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: termsModalOpen, onOpenChange: setTermsModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "!max-w-[80vw] w-[80vw] max-h-[85vh] overflow-y-auto", children: [
1739
+ /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "font-heading text-xl", children: "Terms and Conditions" }) }),
1740
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 text-sm font-sans text-foreground/80 leading-relaxed", children: [
1741
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: 'These terms and conditions ("Terms") govern the booking of travel experiences offered through Planeta EXO ("Company"). By confirming a booking, you agree to these Terms in full.' }),
1742
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "1. Bookings and payments" }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "A booking is confirmed upon receipt of the required deposit or full payment. The deposit amount is specified in your offer. The remaining balance must be paid by the balance due date stated in your offer." }),
1744
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "2. Cancellation policy" }),
1745
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Cancellations made more than 60 days before departure are eligible for a full refund of the deposit. Cancellations between 30 and 60 days forfeit 50% of the deposit. Cancellations within 30 days of departure are non-refundable." }),
1746
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "3. Changes and modifications" }),
1747
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "The Company reserves the right to modify itineraries due to weather, safety, or operational reasons. Equivalent alternatives will be offered wherever possible." }),
1748
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "4. Travel insurance" }),
1749
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Comprehensive travel insurance is strongly recommended. The Company is not liable for costs arising from trip interruption, medical emergencies, or personal loss." }),
1750
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "5. Liability" }),
1751
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Participation in adventure activities carries inherent risk. By booking, you acknowledge and accept these risks. The Company's liability is limited to the total booking amount." }),
1752
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
1753
+ DialogClose,
1754
+ {
1755
+ render: /* @__PURE__ */ jsxRuntime.jsx(
1756
+ "button",
1757
+ {
1758
+ type: "button",
1759
+ className: "rounded-full bg-primary px-6 py-2.5 text-sm font-bold text-primary-foreground font-heading hover:bg-primary/90 transition-colors"
1760
+ }
1761
+ ),
1762
+ children: "Close"
1763
+ }
1764
+ ) })
1765
+ ] })
1766
+ ] }) })
1052
1767
  ] }),
1053
1768
  error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive font-sans", children: error }),
1054
1769
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
@@ -1092,10 +1807,14 @@ function BookingWizard({
1092
1807
  ] })
1093
1808
  ] });
1094
1809
  }
1810
+ function OfferAdventureCard({ adventure }) {
1811
+ return /* @__PURE__ */ jsxRuntime.jsx(AdventureCard, { adventure });
1812
+ }
1095
1813
  function Offer({
1096
1814
  logo = "/logo-planetaexo.png",
1097
1815
  logoAlt = "Planeta EXO",
1098
1816
  title,
1817
+ subtitle,
1099
1818
  adventures,
1100
1819
  subtotal,
1101
1820
  total,
@@ -1103,16 +1822,21 @@ function Offer({
1103
1822
  agent,
1104
1823
  onContinue,
1105
1824
  continueLabel = "Book now",
1825
+ externalBookingFlow,
1826
+ summaryNotesSlot,
1827
+ summaryDiscountLine,
1828
+ continueDisabled,
1106
1829
  className
1107
1830
  }) {
1108
- const [showBooking, setShowBooking] = React3__namespace.useState(false);
1831
+ const [showBooking, setShowBooking] = React4__namespace.useState(false);
1109
1832
  const handleBook = () => {
1110
- setShowBooking(true);
1833
+ if (!externalBookingFlow) setShowBooking(true);
1111
1834
  onContinue == null ? void 0 : onContinue();
1112
1835
  };
1113
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6", className), children: [
1114
- /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: logoAlt, className: "w-[200px] h-auto object-contain" }),
1836
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6 pb-20 lg:pb-0", className), children: [
1837
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: logoAlt, className: "w-[150px] h-auto object-contain mx-auto block" }),
1115
1838
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
1839
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
1116
1840
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-6 lg:gap-8 items-start", children: [
1117
1841
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
1118
1842
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
@@ -1120,7 +1844,7 @@ function Offer({
1120
1844
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
1121
1845
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: "Included Adventures" })
1122
1846
  ] }),
1123
- adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(OfferAdventureCard, { adventure }, adventure.id))
1847
+ adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(AdventureCard, { adventure }, adventure.id))
1124
1848
  ] }),
1125
1849
  !showBooking && /* @__PURE__ */ jsxRuntime.jsx(
1126
1850
  OfferSummarySection,
@@ -1130,10 +1854,13 @@ function Offer({
1130
1854
  total,
1131
1855
  depositInfo,
1132
1856
  onContinue: handleBook,
1133
- continueLabel
1857
+ continueLabel,
1858
+ summaryNotesSlot,
1859
+ summaryDiscountLine,
1860
+ continueDisabled
1134
1861
  }
1135
1862
  ),
1136
- showBooking && /* @__PURE__ */ jsxRuntime.jsx(
1863
+ showBooking && !externalBookingFlow && /* @__PURE__ */ jsxRuntime.jsx(
1137
1864
  BookingWizard,
1138
1865
  {
1139
1866
  adventures,
@@ -1149,10 +1876,30 @@ function Offer({
1149
1876
  total,
1150
1877
  agent,
1151
1878
  onBook: handleBook,
1152
- bookLabel: continueLabel
1879
+ bookLabel: continueLabel,
1880
+ bookDisabled: continueDisabled
1153
1881
  }
1154
1882
  ) })
1155
- ] })
1883
+ ] }),
1884
+ !showBooking && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "fixed bottom-0 inset-x-0 z-40 border-t border-border bg-background/95 backdrop-blur-sm px-4 py-3 lg:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
1885
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
1886
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: "Total" }),
1887
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
1888
+ ] }),
1889
+ /* @__PURE__ */ jsxRuntime.jsx(
1890
+ "button",
1891
+ {
1892
+ type: "button",
1893
+ onClick: handleBook,
1894
+ className: cn(
1895
+ "rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase",
1896
+ "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
1897
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1898
+ ),
1899
+ children: continueLabel
1900
+ }
1901
+ )
1902
+ ] }) })
1156
1903
  ] });
1157
1904
  }
1158
1905