@planetaexo/design-system 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +52 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +52 -63
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1374,11 +1374,11 @@ function AdventureCard({ adventure }) {
|
|
|
1374
1374
|
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
|
|
1375
1375
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1376
1376
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-3", children: (_f = adventure.itineraryLabel) != null ? _f : "Itinerary" }),
|
|
1377
|
-
adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-
|
|
1377
|
+
adventure.description && !adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-snug font-sans", children: adventure.description }),
|
|
1378
1378
|
adventure.detailsSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
|
|
1379
1379
|
"text-foreground",
|
|
1380
1380
|
// Base paragraph and heading styles
|
|
1381
|
-
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-
|
|
1381
|
+
"[&_p]:text-base [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
1382
1382
|
"[&_h2]:text-xl [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
1383
1383
|
"[&_h3]:text-lg [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
1384
1384
|
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
@@ -1388,7 +1388,7 @@ function AdventureCard({ adventure }) {
|
|
|
1388
1388
|
// Standard lists
|
|
1389
1389
|
"[&_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",
|
|
1390
1390
|
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
1391
|
-
"[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-
|
|
1391
|
+
"[&_li]:text-base [&_li]:text-foreground/80 [&_li]:leading-snug",
|
|
1392
1392
|
// Check list (✓)
|
|
1393
1393
|
"[&_.list-check]:list-none [&_.list-check]:pl-5 [&_.list-check]:space-y-1",
|
|
1394
1394
|
"[&_.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",
|
|
@@ -2235,16 +2235,29 @@ function StatusBadge({ status }) {
|
|
|
2235
2235
|
);
|
|
2236
2236
|
}
|
|
2237
2237
|
function totalPeople(adventures) {
|
|
2238
|
-
var _a, _b, _c, _d, _e, _f;
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2238
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2239
|
+
const byId = /* @__PURE__ */ new Map();
|
|
2240
|
+
for (const adv of adventures) {
|
|
2241
|
+
for (const t of (_a = adv.travellers) != null ? _a : []) {
|
|
2242
|
+
if (!byId.has(t.id)) byId.set(t.id, t);
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
if (byId.size === 0) {
|
|
2246
|
+
let adults2 = 0, children2 = 0, seniors2 = 0;
|
|
2247
|
+
for (const a of adventures) {
|
|
2248
|
+
adults2 += (_c = (_b = a.slots) == null ? void 0 : _b.adults) != null ? _c : 0;
|
|
2249
|
+
children2 += (_e = (_d = a.slots) == null ? void 0 : _d.children) != null ? _e : 0;
|
|
2250
|
+
seniors2 += (_g = (_f = a.slots) == null ? void 0 : _f.seniors) != null ? _g : 0;
|
|
2251
|
+
}
|
|
2252
|
+
return { adults: adults2, children: children2, seniors: seniors2, total: adults2 + children2 + seniors2 };
|
|
2246
2253
|
}
|
|
2247
|
-
|
|
2254
|
+
let adults = 0, children = 0, seniors = 0;
|
|
2255
|
+
for (const t of byId.values()) {
|
|
2256
|
+
if (t.personType === "CHILD" || t.isChild) children++;
|
|
2257
|
+
else if (t.personType === "SENIOR") seniors++;
|
|
2258
|
+
else adults++;
|
|
2259
|
+
}
|
|
2260
|
+
return { adults, children, seniors, total: byId.size };
|
|
2248
2261
|
}
|
|
2249
2262
|
function InfoCard({
|
|
2250
2263
|
label,
|
|
@@ -2271,9 +2284,8 @@ function AdventureSection({
|
|
|
2271
2284
|
onRequestOpenDeleteModal,
|
|
2272
2285
|
cannotRemoveLastTravellerLabel
|
|
2273
2286
|
}) {
|
|
2274
|
-
var _a, _b, _c, _d;
|
|
2287
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2275
2288
|
const [detailsOpen, setDetailsOpen] = React22__namespace.useState(false);
|
|
2276
|
-
const [itineraryOpen, setItineraryOpen] = React22__namespace.useState(true);
|
|
2277
2289
|
const handleCopyUrl = (url) => {
|
|
2278
2290
|
navigator.clipboard.writeText(url);
|
|
2279
2291
|
};
|
|
@@ -2306,7 +2318,7 @@ function AdventureSection({
|
|
|
2306
2318
|
] })
|
|
2307
2319
|
] })
|
|
2308
2320
|
] }),
|
|
2309
|
-
(adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2321
|
+
(adventure.detailsSlot || adventure.description || adventure.included && adventure.included.length > 0 || adventure.notIncluded && adventure.notIncluded.length > 0 || adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2310
2322
|
"button",
|
|
2311
2323
|
{
|
|
2312
2324
|
type: "button",
|
|
@@ -2317,7 +2329,7 @@ function AdventureSection({
|
|
|
2317
2329
|
detailsOpen && "border-primary text-primary"
|
|
2318
2330
|
),
|
|
2319
2331
|
children: [
|
|
2320
|
-
"Details",
|
|
2332
|
+
(_d = adventure.itineraryLabel) != null ? _d : "Details",
|
|
2321
2333
|
detailsOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "w-3 h-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "w-3 h-3" })
|
|
2322
2334
|
]
|
|
2323
2335
|
}
|
|
@@ -2338,51 +2350,28 @@ function AdventureSection({
|
|
|
2338
2350
|
tag
|
|
2339
2351
|
)) })
|
|
2340
2352
|
] }),
|
|
2341
|
-
(adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border px-5 lg:px-6 py-5 flex flex-col gap-2", children: [
|
|
2342
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2343
|
-
"button",
|
|
2344
|
-
{
|
|
2345
|
-
type: "button",
|
|
2346
|
-
onClick: () => setItineraryOpen((v) => !v),
|
|
2347
|
-
className: cn(
|
|
2348
|
-
"group flex w-full items-center justify-between gap-2 text-left",
|
|
2349
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded"
|
|
2350
|
-
),
|
|
2351
|
-
"aria-expanded": itineraryOpen,
|
|
2352
|
-
children: [
|
|
2353
|
-
/* @__PURE__ */ jsxRuntime.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" }),
|
|
2354
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2355
|
-
lucideReact.ChevronDownIcon,
|
|
2356
|
-
{
|
|
2357
|
-
className: cn(
|
|
2358
|
-
"w-4 h-4 text-muted-foreground shrink-0 transition-transform",
|
|
2359
|
-
itineraryOpen && "rotate-180"
|
|
2360
|
-
)
|
|
2361
|
-
}
|
|
2362
|
-
)
|
|
2363
|
-
]
|
|
2364
|
-
}
|
|
2365
|
-
),
|
|
2366
|
-
itineraryOpen && (adventure.detailsSlot ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2367
|
-
"div",
|
|
2368
|
-
{
|
|
2369
|
-
className: cn(
|
|
2370
|
-
"text-foreground",
|
|
2371
|
-
"[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-relaxed [&_p]:mb-2",
|
|
2372
|
-
"[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
2373
|
-
"[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
2374
|
-
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
2375
|
-
"[&_em]:italic",
|
|
2376
|
-
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
2377
|
-
"[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
|
|
2378
|
-
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
2379
|
-
"[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-relaxed"
|
|
2380
|
-
),
|
|
2381
|
-
children: adventure.detailsSlot
|
|
2382
|
-
}
|
|
2383
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description }))
|
|
2384
|
-
] }),
|
|
2385
2353
|
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: [
|
|
2354
|
+
(adventure.detailsSlot || adventure.description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2355
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Itinerary" }),
|
|
2356
|
+
adventure.detailsSlot ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2357
|
+
"div",
|
|
2358
|
+
{
|
|
2359
|
+
className: cn(
|
|
2360
|
+
"text-foreground",
|
|
2361
|
+
"[&_p]:text-sm [&_p]:text-foreground/80 [&_p]:leading-snug [&_p]:mb-2",
|
|
2362
|
+
"[&_h2]:text-lg [&_h2]:font-bold [&_h2]:text-foreground [&_h2]:mb-2 [&_h2]:mt-4",
|
|
2363
|
+
"[&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mb-1 [&_h3]:mt-3",
|
|
2364
|
+
"[&_strong]:font-bold [&_strong]:text-foreground",
|
|
2365
|
+
"[&_em]:italic",
|
|
2366
|
+
"[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2",
|
|
2367
|
+
"[&_ul]:list-disc [&_ul]:pl-5 [&_ul]:space-y-1",
|
|
2368
|
+
"[&_ol]:list-decimal [&_ol]:pl-5 [&_ol]:space-y-1",
|
|
2369
|
+
"[&_li]:text-sm [&_li]:text-foreground/80 [&_li]:leading-snug"
|
|
2370
|
+
),
|
|
2371
|
+
children: adventure.detailsSlot
|
|
2372
|
+
}
|
|
2373
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-snug font-sans", children: adventure.description })
|
|
2374
|
+
] }),
|
|
2386
2375
|
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
2387
2376
|
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "O que est\xE1 incluso" }),
|
|
2388
2377
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2468,8 +2457,8 @@ function AdventureSection({
|
|
|
2468
2457
|
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",
|
|
2469
2458
|
children: [
|
|
2470
2459
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
2471
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: "More travellers" }),
|
|
2472
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: "Add" })
|
|
2460
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: (_e = adventure.addTravellerLabel) != null ? _e : "More travellers" }),
|
|
2461
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sm:hidden", children: (_g = (_f = adventure.addTravellerShortLabel) != null ? _f : adventure.addTravellerLabel) != null ? _g : "Add" })
|
|
2473
2462
|
]
|
|
2474
2463
|
}
|
|
2475
2464
|
)
|
|
@@ -3706,7 +3695,7 @@ function BookingConfirmation({
|
|
|
3706
3695
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3707
3696
|
"div",
|
|
3708
3697
|
{
|
|
3709
|
-
style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.
|
|
3698
|
+
style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.4", margin: 0 },
|
|
3710
3699
|
dangerouslySetInnerHTML: { __html: adventure.description }
|
|
3711
3700
|
}
|
|
3712
3701
|
)
|