@planetaexo/design-system 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +92 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +92 -82
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -284,6 +284,13 @@ interface BookingAdventure {
|
|
|
284
284
|
formName?: string;
|
|
285
285
|
/** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
|
|
286
286
|
addContactAsTravellerDisabled?: boolean;
|
|
287
|
+
/** Texto do botão "Add traveller" (desktop). Default: "More travellers". */
|
|
288
|
+
addTravellerLabel?: string;
|
|
289
|
+
/** Texto curto exibido em mobile (sm:hidden). Default: "Add". */
|
|
290
|
+
addTravellerShortLabel?: string;
|
|
291
|
+
/** Tooltip exibido quando chips de "Add to this adventure" estão desabilitados por capacidade.
|
|
292
|
+
* Default: "Adventure full". */
|
|
293
|
+
atCapacityLabel?: string;
|
|
287
294
|
}
|
|
288
295
|
interface BookingContact {
|
|
289
296
|
name: string;
|
|
@@ -337,6 +344,9 @@ interface BookingDetailsProps {
|
|
|
337
344
|
onAddTraveller?: (adventureId: string) => void;
|
|
338
345
|
/** Quando fornecida, desassocia o viajante da aventura sem deletá-lo da reserva. */
|
|
339
346
|
onUnassignFromAdventure?: (adventureId: string, travellerId: string) => void;
|
|
347
|
+
/** Quando fornecida, o consumer assume clipboard + feedback visual (ex.: toast). Fallback:
|
|
348
|
+
* `navigator.clipboard.writeText` sem feedback. */
|
|
349
|
+
onCopyFormLink?: (url: string) => void;
|
|
340
350
|
/** Submit do modal de ADD interno. Usado quando `onAddTraveller` NÃO é passado. */
|
|
341
351
|
onSubmitAddTraveller?: (adventureId: string, data: TravellerFormData) => Promise<void> | void;
|
|
342
352
|
/** Submit do modal de EDIT interno. Usado quando `onEditTraveller` NÃO é passado. */
|
|
@@ -365,7 +375,7 @@ interface BookingDetailsProps {
|
|
|
365
375
|
signOutLabel?: string;
|
|
366
376
|
className?: string;
|
|
367
377
|
}
|
|
368
|
-
declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
|
|
378
|
+
declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
|
|
369
379
|
|
|
370
380
|
interface BookingConfirmationLabels {
|
|
371
381
|
ctaButton?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -284,6 +284,13 @@ interface BookingAdventure {
|
|
|
284
284
|
formName?: string;
|
|
285
285
|
/** Quando true, desabilita o botão "Add contact as traveller" desta aventura. */
|
|
286
286
|
addContactAsTravellerDisabled?: boolean;
|
|
287
|
+
/** Texto do botão "Add traveller" (desktop). Default: "More travellers". */
|
|
288
|
+
addTravellerLabel?: string;
|
|
289
|
+
/** Texto curto exibido em mobile (sm:hidden). Default: "Add". */
|
|
290
|
+
addTravellerShortLabel?: string;
|
|
291
|
+
/** Tooltip exibido quando chips de "Add to this adventure" estão desabilitados por capacidade.
|
|
292
|
+
* Default: "Adventure full". */
|
|
293
|
+
atCapacityLabel?: string;
|
|
287
294
|
}
|
|
288
295
|
interface BookingContact {
|
|
289
296
|
name: string;
|
|
@@ -337,6 +344,9 @@ interface BookingDetailsProps {
|
|
|
337
344
|
onAddTraveller?: (adventureId: string) => void;
|
|
338
345
|
/** Quando fornecida, desassocia o viajante da aventura sem deletá-lo da reserva. */
|
|
339
346
|
onUnassignFromAdventure?: (adventureId: string, travellerId: string) => void;
|
|
347
|
+
/** Quando fornecida, o consumer assume clipboard + feedback visual (ex.: toast). Fallback:
|
|
348
|
+
* `navigator.clipboard.writeText` sem feedback. */
|
|
349
|
+
onCopyFormLink?: (url: string) => void;
|
|
340
350
|
/** Submit do modal de ADD interno. Usado quando `onAddTraveller` NÃO é passado. */
|
|
341
351
|
onSubmitAddTraveller?: (adventureId: string, data: TravellerFormData) => Promise<void> | void;
|
|
342
352
|
/** Submit do modal de EDIT interno. Usado quando `onEditTraveller` NÃO é passado. */
|
|
@@ -365,7 +375,7 @@ interface BookingDetailsProps {
|
|
|
365
375
|
signOutLabel?: string;
|
|
366
376
|
className?: string;
|
|
367
377
|
}
|
|
368
|
-
declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
|
|
378
|
+
declare function BookingDetails({ bookingId, status, createdAt, contact, agentName, agentContactUrl, agentNameFallback, agentLabel, agentContactLabel, cannotRemoveLastTravellerLabel, adventures, summaryLineItems, subtotal, total, depositInfo, onAddContactAsTraveller, onEditTraveller, onRemoveTraveller, onAddSuggestedTraveller, onAddTraveller, onUnassignFromAdventure, onCopyFormLink, onSubmitAddTraveller, onSubmitEditTraveller, onConfirmRemoveTraveller, travellerFormConfig, addTravellerSaving, editTravellerSaving, removeTravellerSaving, travellerFormError, onPayBalance, onCancelRequest, logoSrc, logoAlt, onSignOut, signOutLabel, className, }: BookingDetailsProps): react_jsx_runtime.JSX.Element;
|
|
369
379
|
|
|
370
380
|
interface BookingConfirmationLabels {
|
|
371
381
|
ctaButton?: string;
|
package/dist/index.js
CHANGED
|
@@ -1353,11 +1353,11 @@ function AdventureCard({ adventure }) {
|
|
|
1353
1353
|
/* @__PURE__ */ jsx(Separator, { className: "my-1" }),
|
|
1354
1354
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1355
1355
|
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Itinerary" }),
|
|
1356
|
-
adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsx("p", { className: "text-base text-foreground/80 leading-
|
|
1356
|
+
adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsx("p", { className: "text-base text-foreground/80 leading-snug font-sans", children: adventure.description }),
|
|
1357
1357
|
adventure.detailsSlot && /* @__PURE__ */ jsx("div", { className: cn(
|
|
1358
1358
|
"text-foreground",
|
|
1359
1359
|
// Base paragraph and heading styles
|
|
1360
|
-
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-
|
|
1360
|
+
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
1361
1361
|
"[&_h2]:text-xl [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
1362
1362
|
"[&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
1363
1363
|
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
@@ -1367,7 +1367,7 @@ function AdventureCard({ adventure }) {
|
|
|
1367
1367
|
// Standard lists
|
|
1368
1368
|
"[&_ul:not(.list-check):not(.list-cross)]:list-disc [&_ul:not(.list-check):not(.list-cross)]:pl-5 [&_ul:not(.list-check):not(.list-cross)]:space-y-1",
|
|
1369
1369
|
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
1370
|
-
"[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-
|
|
1370
|
+
"[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-snug",
|
|
1371
1371
|
// Check list (✓)
|
|
1372
1372
|
"[&_.list-check]:list-none [&_.list-check]:pl-5 [&_.list-check]:space-y-1",
|
|
1373
1373
|
"[&_.list-check_li]:relative [&_.list-check_li]:before:absolute [&_.list-check_li]:before:-left-5 [&_.list-check_li]:before:content-['\u2713'] [&_.list-check_li]:before:text-primary [&_.list-check_li]:before:font-bold",
|
|
@@ -2214,16 +2214,29 @@ function StatusBadge({ status }) {
|
|
|
2214
2214
|
);
|
|
2215
2215
|
}
|
|
2216
2216
|
function totalPeople(adventures) {
|
|
2217
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2217
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2218
|
+
const byId = /* @__PURE__ */ new Map();
|
|
2219
|
+
for (const adv of adventures) {
|
|
2220
|
+
for (const t of (_a = adv.travellers) != null ? _a : []) {
|
|
2221
|
+
if (!byId.has(t.id)) byId.set(t.id, t);
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
if (byId.size === 0) {
|
|
2225
|
+
let adults2 = 0, children2 = 0, seniors2 = 0;
|
|
2226
|
+
for (const a of adventures) {
|
|
2227
|
+
adults2 += (_c = (_b = a.slots) == null ? void 0 : _b.adults) != null ? _c : 0;
|
|
2228
|
+
children2 += (_e = (_d = a.slots) == null ? void 0 : _d.children) != null ? _e : 0;
|
|
2229
|
+
seniors2 += (_g = (_f = a.slots) == null ? void 0 : _f.seniors) != null ? _g : 0;
|
|
2230
|
+
}
|
|
2231
|
+
return { adults: adults2, children: children2, seniors: seniors2, total: adults2 + children2 + seniors2 };
|
|
2225
2232
|
}
|
|
2226
|
-
|
|
2233
|
+
let adults = 0, children = 0, seniors = 0;
|
|
2234
|
+
for (const t of byId.values()) {
|
|
2235
|
+
if (t.personType === "CHILD" || t.isChild) children++;
|
|
2236
|
+
else if (t.personType === "SENIOR") seniors++;
|
|
2237
|
+
else adults++;
|
|
2238
|
+
}
|
|
2239
|
+
return { adults, children, seniors, total: byId.size };
|
|
2227
2240
|
}
|
|
2228
2241
|
function InfoCard({
|
|
2229
2242
|
label,
|
|
@@ -2242,6 +2255,7 @@ function AdventureSection({
|
|
|
2242
2255
|
onAddSuggestedTraveller,
|
|
2243
2256
|
onAddTraveller,
|
|
2244
2257
|
onUnassignFromAdventure,
|
|
2258
|
+
onCopyFormLink,
|
|
2245
2259
|
hasSubmitAddTraveller,
|
|
2246
2260
|
hasSubmitEditTraveller,
|
|
2247
2261
|
hasConfirmRemoveTraveller,
|
|
@@ -2250,11 +2264,14 @@ function AdventureSection({
|
|
|
2250
2264
|
onRequestOpenDeleteModal,
|
|
2251
2265
|
cannotRemoveLastTravellerLabel
|
|
2252
2266
|
}) {
|
|
2253
|
-
var _a, _b, _c, _d;
|
|
2267
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2254
2268
|
const [detailsOpen, setDetailsOpen] = React22.useState(false);
|
|
2255
|
-
const [itineraryOpen, setItineraryOpen] = React22.useState(true);
|
|
2256
2269
|
const handleCopyUrl = (url) => {
|
|
2257
|
-
|
|
2270
|
+
if (onCopyFormLink) {
|
|
2271
|
+
onCopyFormLink(url);
|
|
2272
|
+
} else {
|
|
2273
|
+
void navigator.clipboard.writeText(url);
|
|
2274
|
+
}
|
|
2258
2275
|
};
|
|
2259
2276
|
const people = adventure.slots;
|
|
2260
2277
|
[
|
|
@@ -2285,7 +2302,7 @@ function AdventureSection({
|
|
|
2285
2302
|
] })
|
|
2286
2303
|
] })
|
|
2287
2304
|
] }),
|
|
2288
|
-
(adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxs(
|
|
2305
|
+
(adventure.detailsSlot || adventure.description || adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxs(
|
|
2289
2306
|
"button",
|
|
2290
2307
|
{
|
|
2291
2308
|
type: "button",
|
|
@@ -2296,7 +2313,7 @@ function AdventureSection({
|
|
|
2296
2313
|
detailsOpen && "border-primary text-primary"
|
|
2297
2314
|
),
|
|
2298
2315
|
children: [
|
|
2299
|
-
"Details",
|
|
2316
|
+
(_d = adventure.itineraryLabel) != null ? _d : "Details",
|
|
2300
2317
|
detailsOpen ? /* @__PURE__ */ jsx(ChevronUpIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsx(ChevronDownIcon, { className: "w-3 h-3" })
|
|
2301
2318
|
]
|
|
2302
2319
|
}
|
|
@@ -2317,51 +2334,28 @@ function AdventureSection({
|
|
|
2317
2334
|
tag
|
|
2318
2335
|
)) })
|
|
2319
2336
|
] }),
|
|
2320
|
-
(adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-2", children: [
|
|
2321
|
-
/* @__PURE__ */ jsxs(
|
|
2322
|
-
"button",
|
|
2323
|
-
{
|
|
2324
|
-
type: "button",
|
|
2325
|
-
onClick: () => setItineraryOpen((v) => !v),
|
|
2326
|
-
className: cn(
|
|
2327
|
-
"group flex w-full items-center justify-between gap-2 text-left",
|
|
2328
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded"
|
|
2329
|
-
),
|
|
2330
|
-
"aria-expanded": itineraryOpen,
|
|
2331
|
-
children: [
|
|
2332
|
-
/* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest group-hover:text-foreground transition-colors", children: (_d = adventure.itineraryLabel) != null ? _d : "Itinerary" }),
|
|
2333
|
-
/* @__PURE__ */ jsx(
|
|
2334
|
-
ChevronDownIcon,
|
|
2335
|
-
{
|
|
2336
|
-
className: cn(
|
|
2337
|
-
"w-4 h-4 text-muted-foreground shrink-0 transition-transform",
|
|
2338
|
-
itineraryOpen && "rotate-180"
|
|
2339
|
-
)
|
|
2340
|
-
}
|
|
2341
|
-
)
|
|
2342
|
-
]
|
|
2343
|
-
}
|
|
2344
|
-
),
|
|
2345
|
-
itineraryOpen && (adventure.detailsSlot ? /* @__PURE__ */ jsx(
|
|
2346
|
-
"div",
|
|
2347
|
-
{
|
|
2348
|
-
className: cn(
|
|
2349
|
-
"text-foreground",
|
|
2350
|
-
"[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
|
|
2351
|
-
"[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
2352
|
-
"[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
2353
|
-
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
2354
|
-
"[&_em]:italic",
|
|
2355
|
-
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
2356
|
-
"[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
|
|
2357
|
-
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
2358
|
-
"[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-relaxed"
|
|
2359
|
-
),
|
|
2360
|
-
children: adventure.detailsSlot
|
|
2361
|
-
}
|
|
2362
|
-
) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description }))
|
|
2363
|
-
] }),
|
|
2364
2337
|
detailsOpen && /* @__PURE__ */ jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-5 bg-muted/10", children: [
|
|
2338
|
+
(adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2339
|
+
/* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
|
|
2340
|
+
adventure.detailsSlot ? /* @__PURE__ */ jsx(
|
|
2341
|
+
"div",
|
|
2342
|
+
{
|
|
2343
|
+
className: cn(
|
|
2344
|
+
"text-foreground",
|
|
2345
|
+
"[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
2346
|
+
"[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
2347
|
+
"[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
2348
|
+
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
2349
|
+
"[&_em]:italic",
|
|
2350
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
2351
|
+
"[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
|
|
2352
|
+
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
2353
|
+
"[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-snug"
|
|
2354
|
+
),
|
|
2355
|
+
children: adventure.detailsSlot
|
|
2356
|
+
}
|
|
2357
|
+
) : /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-snug font-sans", children: adventure.description })
|
|
2358
|
+
] }),
|
|
2365
2359
|
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2366
2360
|
/* @__PURE__ */ jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que est\xE1 incluso" }),
|
|
2367
2361
|
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxs(
|
|
@@ -2447,8 +2441,8 @@ function AdventureSection({
|
|
|
2447
2441
|
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",
|
|
2448
2442
|
children: [
|
|
2449
2443
|
/* @__PURE__ */ jsx(PlusIcon, { className: "w-3 h-3" }),
|
|
2450
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: "More travellers" }),
|
|
2451
|
-
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: "Add" })
|
|
2444
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: (_e = adventure.addTravellerLabel) != null ? _e : "More travellers" }),
|
|
2445
|
+
/* @__PURE__ */ jsx("span", { className: "sm:hidden", children: (_g = (_f = adventure.addTravellerShortLabel) != null ? _f : adventure.addTravellerLabel) != null ? _g : "Add" })
|
|
2452
2446
|
]
|
|
2453
2447
|
}
|
|
2454
2448
|
)
|
|
@@ -2580,24 +2574,38 @@ function AdventureSection({
|
|
|
2580
2574
|
t.id
|
|
2581
2575
|
);
|
|
2582
2576
|
}) }),
|
|
2583
|
-
adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 &&
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2577
|
+
adventure.suggestedTravellers && adventure.suggestedTravellers.length > 0 && (() => {
|
|
2578
|
+
var _a2;
|
|
2579
|
+
const atCapacity = totalSlots > 0 && adventure.travellers.length >= totalSlots;
|
|
2580
|
+
const atCapacityTooltip = atCapacity ? (_a2 = adventure.atCapacityLabel) != null ? _a2 : "Adventure full" : void 0;
|
|
2581
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pt-2", children: [
|
|
2582
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui", children: "Add to this adventure" }),
|
|
2583
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: adventure.suggestedTravellers.map((st) => /* @__PURE__ */ jsxs(
|
|
2584
|
+
"button",
|
|
2585
|
+
{
|
|
2586
|
+
type: "button",
|
|
2587
|
+
onClick: () => {
|
|
2588
|
+
if (atCapacity) return;
|
|
2589
|
+
onAddSuggestedTraveller == null ? void 0 : onAddSuggestedTraveller(adventure.id, st.id);
|
|
2590
|
+
},
|
|
2591
|
+
disabled: atCapacity,
|
|
2592
|
+
title: atCapacityTooltip,
|
|
2593
|
+
"aria-disabled": atCapacity,
|
|
2594
|
+
className: cn(
|
|
2595
|
+
"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",
|
|
2596
|
+
"disabled:opacity-40 disabled:cursor-not-allowed disabled:pointer-events-none disabled:hover:border-border disabled:hover:text-foreground disabled:hover:bg-transparent"
|
|
2597
|
+
),
|
|
2598
|
+
children: [
|
|
2599
|
+
/* @__PURE__ */ jsx(PlusIcon, { className: "w-3 h-3" }),
|
|
2600
|
+
st.firstName,
|
|
2601
|
+
" ",
|
|
2602
|
+
st.lastName
|
|
2603
|
+
]
|
|
2604
|
+
},
|
|
2605
|
+
st.id
|
|
2606
|
+
)) })
|
|
2607
|
+
] });
|
|
2608
|
+
})(),
|
|
2601
2609
|
adventure.travellers.length > 0 && totalSlots > 0 && (() => {
|
|
2602
2610
|
const completed = adventure.travellers.filter((t) => t.status === "completed").length;
|
|
2603
2611
|
const percent = Math.round(completed / totalSlots * 100);
|
|
@@ -3052,6 +3060,7 @@ function BookingDetails({
|
|
|
3052
3060
|
onAddSuggestedTraveller,
|
|
3053
3061
|
onAddTraveller,
|
|
3054
3062
|
onUnassignFromAdventure,
|
|
3063
|
+
onCopyFormLink,
|
|
3055
3064
|
onSubmitAddTraveller,
|
|
3056
3065
|
onSubmitEditTraveller,
|
|
3057
3066
|
onConfirmRemoveTraveller,
|
|
@@ -3264,6 +3273,7 @@ function BookingDetails({
|
|
|
3264
3273
|
onAddSuggestedTraveller,
|
|
3265
3274
|
onAddTraveller,
|
|
3266
3275
|
onUnassignFromAdventure,
|
|
3276
|
+
onCopyFormLink,
|
|
3267
3277
|
hasSubmitAddTraveller,
|
|
3268
3278
|
hasSubmitEditTraveller,
|
|
3269
3279
|
hasConfirmRemoveTraveller,
|
|
@@ -3685,7 +3695,7 @@ function BookingConfirmation({
|
|
|
3685
3695
|
/* @__PURE__ */ jsx(
|
|
3686
3696
|
"div",
|
|
3687
3697
|
{
|
|
3688
|
-
style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.
|
|
3698
|
+
style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.4", margin: 0 },
|
|
3689
3699
|
dangerouslySetInnerHTML: { __html: adventure.description }
|
|
3690
3700
|
}
|
|
3691
3701
|
)
|