@planetaexo/design-system 0.2.0 → 0.2.11
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/README.md +121 -121
- package/dist/index.cjs +1660 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +126 -2
- package/dist/index.d.ts +126 -2
- package/dist/index.js +1659 -100
- package/dist/index.js.map +1 -1
- package/package.json +61 -61
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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
|
|
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
|
|
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 :
|
|
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 =
|
|
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 :
|
|
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] =
|
|
392
|
-
const containerRef =
|
|
393
|
-
const listRef =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
843
|
+
function AdventureCard({ adventure }) {
|
|
503
844
|
var _a, _b, _c;
|
|
504
|
-
const [checked, setChecked] =
|
|
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.
|
|
865
|
+
adventure.onRemove && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
525
866
|
"button",
|
|
526
867
|
{
|
|
527
868
|
type: "button",
|
|
528
869
|
onClick: adventure.onRemove,
|
|
529
|
-
className: "text-
|
|
530
|
-
children:
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
585
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-
|
|
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-
|
|
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-
|
|
592
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
647
|
-
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-sans text-foreground
|
|
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-
|
|
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] =
|
|
783
|
-
const [error, setError] =
|
|
784
|
-
const [responsible, setResponsible] =
|
|
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] =
|
|
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] =
|
|
812
|
-
const [
|
|
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(
|
|
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-
|
|
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-
|
|
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.
|
|
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-
|
|
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-
|
|
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.
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
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
|
-
|
|
1030
|
-
|
|
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.
|
|
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.
|
|
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] =
|
|
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-[
|
|
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(
|
|
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,13 +1876,847 @@ 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
|
-
] })
|
|
1156
|
-
|
|
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
|
+
] }) })
|
|
1903
|
+
] });
|
|
1904
|
+
}
|
|
1905
|
+
var STATUS_STYLES = {
|
|
1906
|
+
pending: "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
1907
|
+
confirmed: "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400",
|
|
1908
|
+
cancelled: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400",
|
|
1909
|
+
completed: "bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
|
|
1910
|
+
};
|
|
1911
|
+
function StatusBadge({ status }) {
|
|
1912
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1913
|
+
"span",
|
|
1914
|
+
{
|
|
1915
|
+
className: cn(
|
|
1916
|
+
"inline-flex items-center rounded-full px-3 py-1 text-xs font-bold font-heading uppercase tracking-wider",
|
|
1917
|
+
STATUS_STYLES[status]
|
|
1918
|
+
),
|
|
1919
|
+
children: status
|
|
1920
|
+
}
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
function totalPeople(adventures) {
|
|
1924
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1925
|
+
let adults = 0;
|
|
1926
|
+
let children = 0;
|
|
1927
|
+
let seniors = 0;
|
|
1928
|
+
for (const a of adventures) {
|
|
1929
|
+
adults += (_b = (_a = a.slots) == null ? void 0 : _a.adults) != null ? _b : 0;
|
|
1930
|
+
children += (_d = (_c = a.slots) == null ? void 0 : _c.children) != null ? _d : 0;
|
|
1931
|
+
seniors += (_f = (_e = a.slots) == null ? void 0 : _e.seniors) != null ? _f : 0;
|
|
1932
|
+
}
|
|
1933
|
+
return { adults, children, seniors, total: adults + children + seniors };
|
|
1934
|
+
}
|
|
1935
|
+
function InfoCard({
|
|
1936
|
+
label,
|
|
1937
|
+
children
|
|
1938
|
+
}) {
|
|
1939
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex flex-col gap-1 min-w-0", children: [
|
|
1940
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: label }),
|
|
1941
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-sans text-foreground", children })
|
|
1942
|
+
] });
|
|
1943
|
+
}
|
|
1944
|
+
function AdventureSection({
|
|
1945
|
+
adventure,
|
|
1946
|
+
onAddContactAsTraveller,
|
|
1947
|
+
onEditTraveller,
|
|
1948
|
+
onRemoveTraveller,
|
|
1949
|
+
onAddSuggestedTraveller
|
|
1950
|
+
}) {
|
|
1951
|
+
var _a, _b, _c;
|
|
1952
|
+
const [detailsOpen, setDetailsOpen] = React4__namespace.useState(false);
|
|
1953
|
+
const [addModalOpen, setAddModalOpen] = React4__namespace.useState(false);
|
|
1954
|
+
const [newTraveller, setNewTraveller] = React4__namespace.useState({
|
|
1955
|
+
firstName: "",
|
|
1956
|
+
lastName: "",
|
|
1957
|
+
passport: "",
|
|
1958
|
+
type: "adult",
|
|
1959
|
+
email: "",
|
|
1960
|
+
dateOfBirth: "",
|
|
1961
|
+
phone: ""
|
|
1962
|
+
});
|
|
1963
|
+
const setField = (k, v) => setNewTraveller((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
1964
|
+
const handleCopyUrl = (url) => {
|
|
1965
|
+
navigator.clipboard.writeText(url);
|
|
1966
|
+
};
|
|
1967
|
+
const people = adventure.slots;
|
|
1968
|
+
[
|
|
1969
|
+
(people == null ? void 0 : people.adults) ? `Adults: ${people.adults}` : null,
|
|
1970
|
+
(people == null ? void 0 : people.children) ? `Children: ${people.children}` : null,
|
|
1971
|
+
(people == null ? void 0 : people.seniors) ? `Seniors: ${people.seniors}` : null
|
|
1972
|
+
].filter(Boolean).join(" \xB7 ");
|
|
1973
|
+
const totalSlots = ((_a = people == null ? void 0 : people.adults) != null ? _a : 0) + ((_b = people == null ? void 0 : people.children) != null ? _b : 0) + ((_c = people == null ? void 0 : people.seniors) != null ? _c : 0);
|
|
1974
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
1975
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 lg:p-6 flex flex-col gap-2 bg-muted/60", children: [
|
|
1976
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1977
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
1978
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-xl font-bold text-foreground font-heading leading-snug", children: [
|
|
1979
|
+
adventure.title,
|
|
1980
|
+
adventure.reference && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-normal text-muted-foreground/40 ml-1.5", children: [
|
|
1981
|
+
"#",
|
|
1982
|
+
adventure.reference
|
|
1983
|
+
] })
|
|
1984
|
+
] }),
|
|
1985
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-wrap text-sm text-muted-foreground font-sans", children: [
|
|
1986
|
+
adventure.partner && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
1987
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CompassIcon, { className: "w-3.5 h-3.5 shrink-0 text-primary" }),
|
|
1988
|
+
adventure.partner
|
|
1989
|
+
] }),
|
|
1990
|
+
adventure.location && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
1991
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "w-3.5 h-3.5 shrink-0 text-primary" }),
|
|
1992
|
+
adventure.location
|
|
1993
|
+
] })
|
|
1994
|
+
] })
|
|
1995
|
+
] }),
|
|
1996
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1997
|
+
"button",
|
|
1998
|
+
{
|
|
1999
|
+
type: "button",
|
|
2000
|
+
onClick: () => setDetailsOpen((v) => !v),
|
|
2001
|
+
className: cn(
|
|
2002
|
+
"flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground shrink-0 transition-colors",
|
|
2003
|
+
"hover:border-primary hover:text-primary",
|
|
2004
|
+
detailsOpen && "border-primary text-primary"
|
|
2005
|
+
),
|
|
2006
|
+
children: [
|
|
2007
|
+
"Details",
|
|
2008
|
+
detailsOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "w-3 h-3" })
|
|
2009
|
+
]
|
|
2010
|
+
}
|
|
2011
|
+
)
|
|
2012
|
+
] }),
|
|
2013
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-4 flex-wrap text-sm text-muted-foreground font-sans", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
2014
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "w-3.5 h-3.5 shrink-0 text-primary" }),
|
|
2015
|
+
adventure.dateFrom,
|
|
2016
|
+
" \u2192 ",
|
|
2017
|
+
adventure.dateTo
|
|
2018
|
+
] }) }),
|
|
2019
|
+
adventure.tags && adventure.tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1.5 mt-1", children: adventure.tags.map((tag) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2020
|
+
"span",
|
|
2021
|
+
{
|
|
2022
|
+
className: "inline-flex items-center rounded-full bg-primary/10 px-2.5 py-0.5 text-xs font-semibold text-primary font-heading",
|
|
2023
|
+
children: tag
|
|
2024
|
+
},
|
|
2025
|
+
tag
|
|
2026
|
+
)) })
|
|
2027
|
+
] }),
|
|
2028
|
+
detailsOpen && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-5 bg-muted/10", children: [
|
|
2029
|
+
adventure.description && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2030
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
|
|
2031
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
|
|
2032
|
+
] }),
|
|
2033
|
+
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2034
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que est\xE1 incluso" }),
|
|
2035
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2036
|
+
"li",
|
|
2037
|
+
{
|
|
2038
|
+
className: "flex items-start gap-2 text-sm text-foreground/80 font-sans",
|
|
2039
|
+
children: [
|
|
2040
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-1" }),
|
|
2041
|
+
item
|
|
2042
|
+
]
|
|
2043
|
+
},
|
|
2044
|
+
i
|
|
2045
|
+
)) })
|
|
2046
|
+
] }),
|
|
2047
|
+
adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2048
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que n\xE3o est\xE1 incluso" }),
|
|
2049
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2050
|
+
"li",
|
|
2051
|
+
{
|
|
2052
|
+
className: "flex items-start gap-2 text-sm text-foreground/80 font-sans",
|
|
2053
|
+
children: [
|
|
2054
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-1" }),
|
|
2055
|
+
item
|
|
2056
|
+
]
|
|
2057
|
+
},
|
|
2058
|
+
i
|
|
2059
|
+
)) })
|
|
2060
|
+
] }),
|
|
2061
|
+
adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2062
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Pol\xEDtica de cancelamento" }),
|
|
2063
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2064
|
+
"li",
|
|
2065
|
+
{
|
|
2066
|
+
className: "flex items-start gap-2 text-sm text-muted-foreground font-sans",
|
|
2067
|
+
children: [
|
|
2068
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2.5" }),
|
|
2069
|
+
item
|
|
2070
|
+
]
|
|
2071
|
+
},
|
|
2072
|
+
i
|
|
2073
|
+
)) })
|
|
2074
|
+
] })
|
|
2075
|
+
] }),
|
|
2076
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-4", children: [
|
|
2077
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 flex-wrap", children: [
|
|
2078
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2079
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Travellers" }),
|
|
2080
|
+
adventure.formName && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-semibold text-muted-foreground/50 font-heading tracking-wide", children: [
|
|
2081
|
+
"\xB7 ",
|
|
2082
|
+
adventure.formName
|
|
2083
|
+
] })
|
|
2084
|
+
] }),
|
|
2085
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
2086
|
+
onAddContactAsTraveller && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2087
|
+
"button",
|
|
2088
|
+
{
|
|
2089
|
+
type: "button",
|
|
2090
|
+
onClick: () => onAddContactAsTraveller(adventure.id),
|
|
2091
|
+
className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-muted-foreground hover:border-primary hover:text-primary hover:bg-primary/5 transition-colors",
|
|
2092
|
+
children: [
|
|
2093
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserPlusIcon, { className: "w-3 h-3" }),
|
|
2094
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "Add contact as traveller" }),
|
|
2095
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: "Add contact" })
|
|
2096
|
+
]
|
|
2097
|
+
}
|
|
2098
|
+
),
|
|
2099
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2100
|
+
"button",
|
|
2101
|
+
{
|
|
2102
|
+
type: "button",
|
|
2103
|
+
onClick: () => setAddModalOpen(true),
|
|
2104
|
+
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",
|
|
2105
|
+
children: [
|
|
2106
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
2107
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "More travellers" }),
|
|
2108
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: "Add" })
|
|
2109
|
+
]
|
|
2110
|
+
}
|
|
2111
|
+
)
|
|
2112
|
+
] })
|
|
2113
|
+
] }),
|
|
2114
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col divide-y divide-border", children: adventure.travellers.map((t) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2115
|
+
"div",
|
|
2116
|
+
{
|
|
2117
|
+
className: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 py-3 first:pt-0",
|
|
2118
|
+
children: [
|
|
2119
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
|
|
2120
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
2121
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-semibold text-foreground font-ui truncate", children: [
|
|
2122
|
+
t.firstName,
|
|
2123
|
+
" ",
|
|
2124
|
+
t.lastName
|
|
2125
|
+
] }),
|
|
2126
|
+
t.isChild && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold font-heading rounded-full px-2 py-0.5 bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400 shrink-0", children: "Child" })
|
|
2127
|
+
] }),
|
|
2128
|
+
t.formUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2129
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2130
|
+
"a",
|
|
2131
|
+
{
|
|
2132
|
+
href: t.formUrl,
|
|
2133
|
+
target: "_blank",
|
|
2134
|
+
rel: "noopener noreferrer",
|
|
2135
|
+
className: "flex items-center gap-1 text-xs text-primary hover:text-primary/80 transition-colors font-ui",
|
|
2136
|
+
children: [
|
|
2137
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLinkIcon, { className: "w-3 h-3" }),
|
|
2138
|
+
"Open"
|
|
2139
|
+
]
|
|
2140
|
+
}
|
|
2141
|
+
),
|
|
2142
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2143
|
+
"button",
|
|
2144
|
+
{
|
|
2145
|
+
type: "button",
|
|
2146
|
+
onClick: () => handleCopyUrl(t.formUrl),
|
|
2147
|
+
className: "flex items-center text-xs text-muted-foreground hover:text-primary transition-colors font-ui",
|
|
2148
|
+
"aria-label": "Copy form URL",
|
|
2149
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, { className: "w-3 h-3" })
|
|
2150
|
+
}
|
|
2151
|
+
)
|
|
2152
|
+
] })
|
|
2153
|
+
] }) }),
|
|
2154
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 sm:gap-3 justify-between sm:justify-end", children: [
|
|
2155
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2156
|
+
"span",
|
|
2157
|
+
{
|
|
2158
|
+
className: cn(
|
|
2159
|
+
"inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-bold font-heading uppercase tracking-wider shrink-0",
|
|
2160
|
+
t.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400" : "bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
2161
|
+
),
|
|
2162
|
+
children: t.status
|
|
2163
|
+
}
|
|
2164
|
+
),
|
|
2165
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5 shrink-0", children: [
|
|
2166
|
+
onEditTraveller && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2167
|
+
"button",
|
|
2168
|
+
{
|
|
2169
|
+
type: "button",
|
|
2170
|
+
onClick: () => onEditTraveller(adventure.id, t.id),
|
|
2171
|
+
className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-primary hover:bg-primary/10 transition-colors",
|
|
2172
|
+
"aria-label": `Edit ${t.firstName}`,
|
|
2173
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PencilIcon, { className: "w-3.5 h-3.5" })
|
|
2174
|
+
}
|
|
2175
|
+
),
|
|
2176
|
+
onRemoveTraveller && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2177
|
+
"button",
|
|
2178
|
+
{
|
|
2179
|
+
type: "button",
|
|
2180
|
+
onClick: () => onRemoveTraveller(adventure.id, t.id),
|
|
2181
|
+
className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
|
|
2182
|
+
"aria-label": `Delete ${t.firstName}`,
|
|
2183
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2Icon, { className: "w-3.5 h-3.5" })
|
|
2184
|
+
}
|
|
2185
|
+
),
|
|
2186
|
+
onRemoveTraveller && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2187
|
+
"button",
|
|
2188
|
+
{
|
|
2189
|
+
type: "button",
|
|
2190
|
+
onClick: () => onRemoveTraveller(adventure.id, t.id),
|
|
2191
|
+
className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors",
|
|
2192
|
+
"aria-label": `Remove ${t.firstName} from adventure`,
|
|
2193
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserMinusIcon, { className: "w-3.5 h-3.5" })
|
|
2194
|
+
}
|
|
2195
|
+
)
|
|
2196
|
+
] })
|
|
2197
|
+
] })
|
|
2198
|
+
]
|
|
2199
|
+
},
|
|
2200
|
+
t.id
|
|
2201
|
+
)) }),
|
|
2202
|
+
adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
|
|
2203
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
|
|
2204
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2205
|
+
"button",
|
|
2206
|
+
{
|
|
2207
|
+
type: "button",
|
|
2208
|
+
onClick: () => onAddSuggestedTraveller == null ? void 0 : onAddSuggestedTraveller(adventure.id, st.id),
|
|
2209
|
+
className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-foreground hover:border-primary hover:text-primary hover:bg-primary/5 transition-colors",
|
|
2210
|
+
children: [
|
|
2211
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
2212
|
+
st.firstName,
|
|
2213
|
+
" ",
|
|
2214
|
+
st.lastName
|
|
2215
|
+
]
|
|
2216
|
+
},
|
|
2217
|
+
st.id
|
|
2218
|
+
)) })
|
|
2219
|
+
] }),
|
|
2220
|
+
adventure.travellers.length > 0 && totalSlots > 0 && (() => {
|
|
2221
|
+
const completed = adventure.travellers.filter((t) => t.status === "completed").length;
|
|
2222
|
+
const percent = Math.round(completed / totalSlots * 100);
|
|
2223
|
+
const isComplete = completed === totalSlots;
|
|
2224
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 mt-1", children: [
|
|
2225
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-2 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2226
|
+
"div",
|
|
2227
|
+
{
|
|
2228
|
+
className: "h-full rounded-full bg-primary transition-all duration-500",
|
|
2229
|
+
style: { width: `${percent}%` }
|
|
2230
|
+
}
|
|
2231
|
+
) }),
|
|
2232
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
|
|
2233
|
+
"text-xs font-semibold font-ui shrink-0 flex items-center gap-1",
|
|
2234
|
+
isComplete ? "text-primary" : "text-destructive"
|
|
2235
|
+
), children: [
|
|
2236
|
+
completed,
|
|
2237
|
+
" of ",
|
|
2238
|
+
totalSlots,
|
|
2239
|
+
" travellers registered",
|
|
2240
|
+
!isComplete && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangleIcon, { className: "w-3 h-3" })
|
|
2241
|
+
] })
|
|
2242
|
+
] });
|
|
2243
|
+
})()
|
|
2244
|
+
] }),
|
|
2245
|
+
/* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: addModalOpen, onOpenChange: setAddModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "sm:max-w-md", children: [
|
|
2246
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "font-heading text-xl", children: "Add traveller" }) }),
|
|
2247
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 pt-2", children: [
|
|
2248
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2249
|
+
FloatingInput,
|
|
2250
|
+
{
|
|
2251
|
+
label: "First name",
|
|
2252
|
+
required: true,
|
|
2253
|
+
value: newTraveller.firstName,
|
|
2254
|
+
onChange: (e) => setField("firstName", e.target.value)
|
|
2255
|
+
}
|
|
2256
|
+
),
|
|
2257
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2258
|
+
FloatingInput,
|
|
2259
|
+
{
|
|
2260
|
+
label: "Last name",
|
|
2261
|
+
required: true,
|
|
2262
|
+
value: newTraveller.lastName,
|
|
2263
|
+
onChange: (e) => setField("lastName", e.target.value)
|
|
2264
|
+
}
|
|
2265
|
+
),
|
|
2266
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2267
|
+
FloatingInput,
|
|
2268
|
+
{
|
|
2269
|
+
label: "Passport (optional)",
|
|
2270
|
+
value: newTraveller.passport,
|
|
2271
|
+
onChange: (e) => setField("passport", e.target.value)
|
|
2272
|
+
}
|
|
2273
|
+
),
|
|
2274
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2275
|
+
FloatingSelect,
|
|
2276
|
+
{
|
|
2277
|
+
label: "Type (adult/child/senior)",
|
|
2278
|
+
value: newTraveller.type,
|
|
2279
|
+
onChange: (e) => setField("type", e.target.value),
|
|
2280
|
+
children: [
|
|
2281
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "adult", children: "Adult" }),
|
|
2282
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "child", children: "Child" }),
|
|
2283
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "senior", children: "Senior" })
|
|
2284
|
+
]
|
|
2285
|
+
}
|
|
2286
|
+
),
|
|
2287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2288
|
+
FloatingInput,
|
|
2289
|
+
{
|
|
2290
|
+
label: "Email",
|
|
2291
|
+
type: "email",
|
|
2292
|
+
required: true,
|
|
2293
|
+
value: newTraveller.email,
|
|
2294
|
+
onChange: (e) => setField("email", e.target.value)
|
|
2295
|
+
}
|
|
2296
|
+
),
|
|
2297
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2298
|
+
FloatingInput,
|
|
2299
|
+
{
|
|
2300
|
+
label: "Date of birth",
|
|
2301
|
+
type: "date",
|
|
2302
|
+
value: newTraveller.dateOfBirth,
|
|
2303
|
+
onChange: (e) => setField("dateOfBirth", e.target.value)
|
|
2304
|
+
}
|
|
2305
|
+
),
|
|
2306
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2307
|
+
FloatingInput,
|
|
2308
|
+
{
|
|
2309
|
+
label: "Phone (optional)",
|
|
2310
|
+
type: "tel",
|
|
2311
|
+
value: newTraveller.phone,
|
|
2312
|
+
onChange: (e) => setField("phone", e.target.value)
|
|
2313
|
+
}
|
|
2314
|
+
),
|
|
2315
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-3 pt-2", children: [
|
|
2316
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2317
|
+
"button",
|
|
2318
|
+
{
|
|
2319
|
+
type: "button",
|
|
2320
|
+
onClick: () => setAddModalOpen(false),
|
|
2321
|
+
className: "text-sm font-ui text-muted-foreground hover:text-foreground transition-colors",
|
|
2322
|
+
children: "Cancel"
|
|
2323
|
+
}
|
|
2324
|
+
),
|
|
2325
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2326
|
+
"button",
|
|
2327
|
+
{
|
|
2328
|
+
type: "button",
|
|
2329
|
+
onClick: () => {
|
|
2330
|
+
setAddModalOpen(false);
|
|
2331
|
+
setNewTraveller({
|
|
2332
|
+
firstName: "",
|
|
2333
|
+
lastName: "",
|
|
2334
|
+
passport: "",
|
|
2335
|
+
type: "adult",
|
|
2336
|
+
email: "",
|
|
2337
|
+
dateOfBirth: "",
|
|
2338
|
+
phone: ""
|
|
2339
|
+
});
|
|
2340
|
+
},
|
|
2341
|
+
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",
|
|
2342
|
+
children: "Add"
|
|
2343
|
+
}
|
|
2344
|
+
)
|
|
2345
|
+
] })
|
|
2346
|
+
] })
|
|
2347
|
+
] }) })
|
|
2348
|
+
] });
|
|
2349
|
+
}
|
|
2350
|
+
function OrderSummary({
|
|
2351
|
+
adventures,
|
|
2352
|
+
summaryLineItems,
|
|
2353
|
+
subtotal,
|
|
2354
|
+
total,
|
|
2355
|
+
depositInfo
|
|
2356
|
+
}) {
|
|
2357
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
|
|
2358
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Order Summary" }),
|
|
2359
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
2360
|
+
adventures.map((adventure, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2361
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-bold text-foreground font-heading", children: adventure.title }),
|
|
2362
|
+
adventure.lineItems && adventure.lineItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5 pl-3 border-l-2 border-primary/20 ml-1", children: adventure.lineItems.map((item, j) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2363
|
+
"div",
|
|
2364
|
+
{
|
|
2365
|
+
className: "flex items-start justify-between gap-3",
|
|
2366
|
+
children: [
|
|
2367
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2368
|
+
"span",
|
|
2369
|
+
{
|
|
2370
|
+
className: cn(
|
|
2371
|
+
"text-sm font-sans leading-tight",
|
|
2372
|
+
item.isBold ? "font-semibold text-foreground" : "text-muted-foreground"
|
|
2373
|
+
),
|
|
2374
|
+
children: item.label
|
|
2375
|
+
}
|
|
2376
|
+
),
|
|
2377
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2378
|
+
"span",
|
|
2379
|
+
{
|
|
2380
|
+
className: cn(
|
|
2381
|
+
"text-sm font-sans shrink-0",
|
|
2382
|
+
item.isDiscount ? "text-green-600 dark:text-green-400" : item.isBold ? "font-semibold text-foreground" : "text-foreground"
|
|
2383
|
+
),
|
|
2384
|
+
children: [
|
|
2385
|
+
item.isDiscount ? "\u2212" : "",
|
|
2386
|
+
item.price
|
|
2387
|
+
]
|
|
2388
|
+
}
|
|
2389
|
+
)
|
|
2390
|
+
]
|
|
2391
|
+
},
|
|
2392
|
+
j
|
|
2393
|
+
)) }),
|
|
2394
|
+
adventure.subtotal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mt-1", children: [
|
|
2395
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Subtotal this adventure" }),
|
|
2396
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: adventure.subtotal })
|
|
2397
|
+
] }),
|
|
2398
|
+
i < adventures.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-2" })
|
|
2399
|
+
] }, adventure.id)),
|
|
2400
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
2401
|
+
summaryLineItems && summaryLineItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2402
|
+
summaryLineItems.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2403
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2404
|
+
"span",
|
|
2405
|
+
{
|
|
2406
|
+
className: cn(
|
|
2407
|
+
"text-sm font-sans",
|
|
2408
|
+
item.isBold ? "font-semibold text-foreground" : "text-muted-foreground"
|
|
2409
|
+
),
|
|
2410
|
+
children: item.label
|
|
2411
|
+
}
|
|
2412
|
+
),
|
|
2413
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2414
|
+
"span",
|
|
2415
|
+
{
|
|
2416
|
+
className: cn(
|
|
2417
|
+
"text-sm font-sans",
|
|
2418
|
+
item.isDiscount ? "text-green-600 dark:text-green-400" : item.isBold ? "font-semibold text-foreground" : "text-foreground"
|
|
2419
|
+
),
|
|
2420
|
+
children: [
|
|
2421
|
+
item.isDiscount ? "\u2212" : "",
|
|
2422
|
+
item.price
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
)
|
|
2426
|
+
] }, i)),
|
|
2427
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {})
|
|
2428
|
+
] }),
|
|
2429
|
+
subtotal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2430
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Subtotal" }),
|
|
2431
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: subtotal })
|
|
2432
|
+
] }),
|
|
2433
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1", children: [
|
|
2434
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-foreground font-heading", children: "Total" }),
|
|
2435
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl font-black text-primary font-heading", children: total })
|
|
2436
|
+
] }),
|
|
2437
|
+
depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 rounded-lg bg-muted/50 border border-border p-4", children: [
|
|
2438
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2439
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm text-muted-foreground font-sans", children: [
|
|
2440
|
+
"Deposit (",
|
|
2441
|
+
depositInfo.depositPercent,
|
|
2442
|
+
"%)"
|
|
2443
|
+
] }),
|
|
2444
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.depositAmount })
|
|
2445
|
+
] }),
|
|
2446
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2447
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Remaining balance" }),
|
|
2448
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.remainingAmount })
|
|
2449
|
+
] }),
|
|
2450
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2451
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Balance due" }),
|
|
2452
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: depositInfo.balanceDueDate })
|
|
2453
|
+
] })
|
|
2454
|
+
] })
|
|
2455
|
+
] });
|
|
2456
|
+
}
|
|
2457
|
+
function BookingDetails({
|
|
2458
|
+
bookingId,
|
|
2459
|
+
status,
|
|
2460
|
+
createdAt,
|
|
2461
|
+
contact,
|
|
2462
|
+
agentName,
|
|
2463
|
+
agentContactUrl,
|
|
2464
|
+
adventures,
|
|
2465
|
+
summaryLineItems,
|
|
2466
|
+
subtotal,
|
|
2467
|
+
total,
|
|
2468
|
+
depositInfo,
|
|
2469
|
+
onAddContactAsTraveller,
|
|
2470
|
+
onEditTraveller,
|
|
2471
|
+
onRemoveTraveller,
|
|
2472
|
+
onAddSuggestedTraveller,
|
|
2473
|
+
onPayBalance,
|
|
2474
|
+
onCancelRequest,
|
|
2475
|
+
className
|
|
2476
|
+
}) {
|
|
2477
|
+
var _a, _b, _c;
|
|
2478
|
+
const people = totalPeople(adventures);
|
|
2479
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2480
|
+
"div",
|
|
2481
|
+
{
|
|
2482
|
+
className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6 px-4 sm:px-6 lg:px-0", className),
|
|
2483
|
+
children: [
|
|
2484
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4 flex-wrap", children: [
|
|
2485
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
2486
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: [
|
|
2487
|
+
"Booking",
|
|
2488
|
+
" ",
|
|
2489
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-primary", children: [
|
|
2490
|
+
"#",
|
|
2491
|
+
bookingId
|
|
2492
|
+
] })
|
|
2493
|
+
] }),
|
|
2494
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground font-sans", children: [
|
|
2495
|
+
"Created on ",
|
|
2496
|
+
createdAt
|
|
2497
|
+
] })
|
|
2498
|
+
] }),
|
|
2499
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status })
|
|
2500
|
+
] }),
|
|
2501
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
|
|
2502
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: "Contact", children: [
|
|
2503
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold", children: contact.name }),
|
|
2504
|
+
contact.email && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans truncate", children: contact.email })
|
|
2505
|
+
] }),
|
|
2506
|
+
agentName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-card p-4 flex items-center gap-3.5 min-w-0", children: [
|
|
2507
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary font-heading font-bold text-sm uppercase", children: agentName.charAt(0) }),
|
|
2508
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0", children: [
|
|
2509
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Your Agent" }),
|
|
2510
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: agentName })
|
|
2511
|
+
] }),
|
|
2512
|
+
agentContactUrl && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2513
|
+
"a",
|
|
2514
|
+
{
|
|
2515
|
+
href: agentContactUrl,
|
|
2516
|
+
target: "_blank",
|
|
2517
|
+
rel: "noopener noreferrer",
|
|
2518
|
+
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",
|
|
2519
|
+
children: [
|
|
2520
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleIcon, { className: "w-3.5 h-3.5" }),
|
|
2521
|
+
"Contact"
|
|
2522
|
+
]
|
|
2523
|
+
}
|
|
2524
|
+
)
|
|
2525
|
+
] }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsxs(InfoCard, { label: "Total People", children: [
|
|
2527
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2528
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "w-4 h-4 text-primary shrink-0" }),
|
|
2529
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-semibold", children: [
|
|
2530
|
+
people.total,
|
|
2531
|
+
" person(s)"
|
|
2532
|
+
] })
|
|
2533
|
+
] }),
|
|
2534
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: [
|
|
2535
|
+
people.adults > 0 ? `Adults: ${people.adults}` : null,
|
|
2536
|
+
people.children > 0 ? `Children: ${people.children}` : null,
|
|
2537
|
+
people.seniors > 0 ? `Seniors: ${people.seniors}` : null
|
|
2538
|
+
].filter(Boolean).join(" \xB7 ") })
|
|
2539
|
+
] })
|
|
2540
|
+
] }),
|
|
2541
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-4", children: [
|
|
2542
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: [
|
|
2543
|
+
"Adventures (",
|
|
2544
|
+
adventures.length,
|
|
2545
|
+
")"
|
|
2546
|
+
] }),
|
|
2547
|
+
adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2548
|
+
AdventureSection,
|
|
2549
|
+
{
|
|
2550
|
+
adventure,
|
|
2551
|
+
onAddContactAsTraveller,
|
|
2552
|
+
onEditTraveller,
|
|
2553
|
+
onRemoveTraveller,
|
|
2554
|
+
onAddSuggestedTraveller
|
|
2555
|
+
},
|
|
2556
|
+
adventure.id
|
|
2557
|
+
))
|
|
2558
|
+
] }),
|
|
2559
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2560
|
+
OrderSummary,
|
|
2561
|
+
{
|
|
2562
|
+
adventures,
|
|
2563
|
+
summaryLineItems,
|
|
2564
|
+
subtotal,
|
|
2565
|
+
total,
|
|
2566
|
+
depositInfo
|
|
2567
|
+
}
|
|
2568
|
+
),
|
|
2569
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 lg:p-6 flex flex-col gap-4", children: [
|
|
2570
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Responsible Person" }),
|
|
2571
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-3", children: [
|
|
2572
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2573
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Name" }),
|
|
2574
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold text-foreground font-sans", children: contact.name })
|
|
2575
|
+
] }),
|
|
2576
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2577
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Email" }),
|
|
2578
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans truncate", children: (_a = contact.email) != null ? _a : "\u2014" })
|
|
2579
|
+
] }),
|
|
2580
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2581
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Phone" }),
|
|
2582
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_b = contact.phone) != null ? _b : "\u2014" })
|
|
2583
|
+
] }),
|
|
2584
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2585
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Country" }),
|
|
2586
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: (_c = contact.country) != null ? _c : "\u2014" })
|
|
2587
|
+
] }),
|
|
2588
|
+
contact.passport && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2589
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground/60 font-heading uppercase tracking-widest mb-0.5", children: "Passport / CPF" }),
|
|
2590
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground font-sans", children: contact.passport })
|
|
2591
|
+
] })
|
|
2592
|
+
] })
|
|
2593
|
+
] }),
|
|
2594
|
+
(onPayBalance || onCancelRequest) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
2595
|
+
depositInfo && !depositInfo.isPaidInFull && onPayBalance && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2596
|
+
"button",
|
|
2597
|
+
{
|
|
2598
|
+
type: "button",
|
|
2599
|
+
onClick: onPayBalance,
|
|
2600
|
+
className: cn(
|
|
2601
|
+
"w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
|
|
2602
|
+
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
2603
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2604
|
+
"flex items-center justify-center gap-2"
|
|
2605
|
+
),
|
|
2606
|
+
children: [
|
|
2607
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCardIcon, { className: "w-4 h-4" }),
|
|
2608
|
+
"Pay remaining balance \u2014 ",
|
|
2609
|
+
depositInfo.remainingAmount
|
|
2610
|
+
]
|
|
2611
|
+
}
|
|
2612
|
+
),
|
|
2613
|
+
onCancelRequest && status !== "cancelled" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2614
|
+
"button",
|
|
2615
|
+
{
|
|
2616
|
+
type: "button",
|
|
2617
|
+
onClick: onCancelRequest,
|
|
2618
|
+
className: "flex items-center gap-1.5 text-xs font-ui text-muted-foreground hover:text-destructive transition-colors underline underline-offset-2",
|
|
2619
|
+
children: [
|
|
2620
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "w-3 h-3" }),
|
|
2621
|
+
"Request cancellation"
|
|
2622
|
+
]
|
|
2623
|
+
}
|
|
2624
|
+
)
|
|
2625
|
+
] })
|
|
2626
|
+
]
|
|
2627
|
+
}
|
|
2628
|
+
);
|
|
2629
|
+
}
|
|
2630
|
+
var DEFAULT_LOGO = "/logo-planetaexo.png";
|
|
2631
|
+
function BookingConfirmationEmail({
|
|
2632
|
+
recipientName,
|
|
2633
|
+
addTravellersUrl,
|
|
2634
|
+
logoUrl = DEFAULT_LOGO,
|
|
2635
|
+
bookingNumber,
|
|
2636
|
+
activity,
|
|
2637
|
+
adventure,
|
|
2638
|
+
startingDate,
|
|
2639
|
+
numberOfPeople,
|
|
2640
|
+
host,
|
|
2641
|
+
className
|
|
2642
|
+
}) {
|
|
2643
|
+
const AddTravellersCta = addTravellersUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2644
|
+
"a",
|
|
2645
|
+
{
|
|
2646
|
+
href: addTravellersUrl,
|
|
2647
|
+
className: "inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 text-sm font-bold text-primary-foreground font-heading hover:bg-primary-800 transition-colors no-underline",
|
|
2648
|
+
children: "Add travellers to your booking"
|
|
2649
|
+
}
|
|
2650
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2651
|
+
"span",
|
|
2652
|
+
{
|
|
2653
|
+
className: "inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 text-sm font-bold text-primary-foreground font-heading",
|
|
2654
|
+
role: "presentation",
|
|
2655
|
+
children: "Add travellers to your booking"
|
|
2656
|
+
}
|
|
2657
|
+
);
|
|
2658
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2659
|
+
"div",
|
|
2660
|
+
{
|
|
2661
|
+
className: cn(
|
|
2662
|
+
"max-w-xl mx-auto bg-white text-foreground font-sans text-base leading-relaxed",
|
|
2663
|
+
className
|
|
2664
|
+
),
|
|
2665
|
+
children: [
|
|
2666
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 mb-8 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2667
|
+
"img",
|
|
2668
|
+
{
|
|
2669
|
+
src: logoUrl,
|
|
2670
|
+
alt: "PlanetaEXO",
|
|
2671
|
+
className: "h-[70px] w-auto object-contain"
|
|
2672
|
+
}
|
|
2673
|
+
) }),
|
|
2674
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-4", children: [
|
|
2675
|
+
"Hi ",
|
|
2676
|
+
recipientName,
|
|
2677
|
+
","
|
|
2678
|
+
] }),
|
|
2679
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: "Thank you for booking your adventure with PlanetaEXO \u2014 we're really looking forward to your adventure." }),
|
|
2680
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: "To move forward, the first step is to add all travellers included in your booking. Once you do this, each person \u2014 including you \u2014 will receive an email with a link to complete their individual registration." }),
|
|
2681
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-8", children: AddTravellersCta }),
|
|
2682
|
+
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
|
|
2683
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4 font-heading font-bold text-foreground", children: "\u{1F4DD} Here's a quick summary of your booking:" }),
|
|
2684
|
+
/* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full text-sm mb-8", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: "divide-y divide-border", children: [
|
|
2685
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2686
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Booking Number:" }),
|
|
2687
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: bookingNumber })
|
|
2688
|
+
] }),
|
|
2689
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2690
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Activity:" }),
|
|
2691
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: activity })
|
|
2692
|
+
] }),
|
|
2693
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2694
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Adventure:" }),
|
|
2695
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: adventure })
|
|
2696
|
+
] }),
|
|
2697
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2698
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Starting Date:" }),
|
|
2699
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: startingDate })
|
|
2700
|
+
] }),
|
|
2701
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2702
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Number of People:" }),
|
|
2703
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: numberOfPeople })
|
|
2704
|
+
] }),
|
|
2705
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2706
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: "Host:" }),
|
|
2707
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: host })
|
|
2708
|
+
] })
|
|
2709
|
+
] }) }),
|
|
2710
|
+
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
|
|
2711
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: "After adding everyone, you will also receive your own registration email, just like the other travellers. Please make sure everyone completes this step so we can organise everything properly." }),
|
|
2712
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: "If you have any questions, just reply to this email \u2014 happy to help." })
|
|
2713
|
+
]
|
|
2714
|
+
}
|
|
2715
|
+
);
|
|
1157
2716
|
}
|
|
1158
2717
|
|
|
2718
|
+
exports.BookingConfirmationEmail = BookingConfirmationEmail;
|
|
2719
|
+
exports.BookingDetails = BookingDetails;
|
|
1159
2720
|
exports.Offer = Offer;
|
|
1160
2721
|
exports.OfferAdventureCard = OfferAdventureCard;
|
|
1161
2722
|
exports.cn = cn;
|