@planetaexo/design-system 0.95.2 → 0.96.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 +21 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +21 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2405,6 +2405,8 @@ function Offer({
|
|
|
2405
2405
|
confirmedState,
|
|
2406
2406
|
interactionsDisabled,
|
|
2407
2407
|
internalDemoCheckout = false,
|
|
2408
|
+
hideAdventures = false,
|
|
2409
|
+
hideSidebar = false,
|
|
2408
2410
|
className
|
|
2409
2411
|
}) {
|
|
2410
2412
|
var _a, _b, _c;
|
|
@@ -2420,7 +2422,7 @@ function Offer({
|
|
|
2420
2422
|
/* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: logoAlt, className: "w-[150px] h-auto object-contain mx-auto block" }),
|
|
2421
2423
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
2422
2424
|
subtitle && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
|
|
2423
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1
|
|
2425
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("grid grid-cols-1 gap-6 lg:gap-8 items-start", !hideSidebar && "lg:grid-cols-[1fr_280px]"), children: [
|
|
2424
2426
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2425
2427
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2426
2428
|
BookingConfirmedCard,
|
|
@@ -2436,7 +2438,7 @@ function Offer({
|
|
|
2436
2438
|
),
|
|
2437
2439
|
confirmedState.belowSlot
|
|
2438
2440
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2439
|
-
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2441
|
+
!hideAdventures && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2440
2442
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2441
2443
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2442
2444
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (_b = labels == null ? void 0 : labels.includedAdventures) != null ? _b : "Included Adventures" })
|
|
@@ -2469,7 +2471,7 @@ function Offer({
|
|
|
2469
2471
|
}
|
|
2470
2472
|
) : null)
|
|
2471
2473
|
] }) }),
|
|
2472
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2474
|
+
!hideSidebar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2473
2475
|
OfferSidebar,
|
|
2474
2476
|
{
|
|
2475
2477
|
total,
|
|
@@ -2482,7 +2484,7 @@ function Offer({
|
|
|
2482
2484
|
}
|
|
2483
2485
|
) })
|
|
2484
2486
|
] }),
|
|
2485
|
-
!isShowingCheckout && !confirmedState && /* @__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: [
|
|
2487
|
+
!isShowingCheckout && !confirmedState && !hideSidebar && /* @__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: [
|
|
2486
2488
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
2487
2489
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (_c = labels == null ? void 0 : labels.total) != null ? _c : "Total" }),
|
|
2488
2490
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|
|
@@ -18880,7 +18882,7 @@ function FeaturedDeparture({
|
|
|
18880
18882
|
labels,
|
|
18881
18883
|
onSelect
|
|
18882
18884
|
}) {
|
|
18883
|
-
var _a;
|
|
18885
|
+
var _a, _b;
|
|
18884
18886
|
const spotsLeft = d.capacity - d.travellers;
|
|
18885
18887
|
const needsQuorum = d.min != null && d.travellers < d.min;
|
|
18886
18888
|
const eyebrow = needsQuorum ? labels.confirmsIn(d.min - d.travellers) : labels.fillingFast(spotsLeft);
|
|
@@ -18899,7 +18901,7 @@ function FeaturedDeparture({
|
|
|
18899
18901
|
] }),
|
|
18900
18902
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-2", children: [
|
|
18901
18903
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-display text-lg font-extrabold tracking-tight whitespace-nowrap", children: fmtDates(d) }),
|
|
18902
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status }),
|
|
18904
|
+
/* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status, label: (_a = labels.statusLabels) == null ? void 0 : _a[d.status] }),
|
|
18903
18905
|
d.dynamicPricing && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
18904
18906
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18905
18907
|
TooltipTrigger,
|
|
@@ -18933,7 +18935,7 @@ function FeaturedDeparture({
|
|
|
18933
18935
|
{
|
|
18934
18936
|
className: "mt-3",
|
|
18935
18937
|
current: d.travellers,
|
|
18936
|
-
min: (
|
|
18938
|
+
min: (_b = d.min) != null ? _b : d.travellers,
|
|
18937
18939
|
max: d.capacity,
|
|
18938
18940
|
hideLabels: d.min == null
|
|
18939
18941
|
}
|
|
@@ -19020,14 +19022,17 @@ function MonthChip({
|
|
|
19020
19022
|
}
|
|
19021
19023
|
);
|
|
19022
19024
|
}
|
|
19023
|
-
function StatusChip({
|
|
19025
|
+
function StatusChip({
|
|
19026
|
+
status,
|
|
19027
|
+
label
|
|
19028
|
+
}) {
|
|
19024
19029
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
19025
19030
|
Chip,
|
|
19026
19031
|
{
|
|
19027
19032
|
variant: "solid",
|
|
19028
19033
|
size: "sm",
|
|
19029
19034
|
className: "hover:bg-muted hover:text-foreground/80",
|
|
19030
|
-
children: STATUS_MAP[status].label
|
|
19035
|
+
children: label != null ? label : STATUS_MAP[status].label
|
|
19031
19036
|
}
|
|
19032
19037
|
);
|
|
19033
19038
|
}
|
|
@@ -19036,10 +19041,11 @@ function DepartureRow({
|
|
|
19036
19041
|
labels,
|
|
19037
19042
|
onSelect
|
|
19038
19043
|
}) {
|
|
19039
|
-
var _a;
|
|
19044
|
+
var _a, _b, _c;
|
|
19040
19045
|
const dateLabel = fmtDates(d);
|
|
19041
19046
|
const statusTip = (_a = labels.statusTooltips) == null ? void 0 : _a[d.status];
|
|
19042
|
-
const pct = Math.max(0, Math.min(100, d.travellers / d.capacity * 100));
|
|
19047
|
+
const pct = d.capacity > 0 ? Math.max(0, Math.min(100, d.travellers / d.capacity * 100)) : 0;
|
|
19048
|
+
const travellersText = labels.travellers(d.travellers, d.capacity);
|
|
19043
19049
|
const overlayClass = "absolute inset-0 z-0 rounded-2xl focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary";
|
|
19044
19050
|
const statusBadge = statusTip ? /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
19045
19051
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -19052,14 +19058,14 @@ function DepartureRow({
|
|
|
19052
19058
|
className: "pointer-events-auto cursor-help outline-hidden"
|
|
19053
19059
|
}
|
|
19054
19060
|
),
|
|
19055
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status })
|
|
19061
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status, label: (_b = labels.statusLabels) == null ? void 0 : _b[d.status] })
|
|
19056
19062
|
}
|
|
19057
19063
|
),
|
|
19058
19064
|
/* @__PURE__ */ jsxRuntime.jsxs(TooltipContent, { children: [
|
|
19059
19065
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block font-bold", children: statusTip.title }),
|
|
19060
19066
|
statusTip.body
|
|
19061
19067
|
] })
|
|
19062
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status });
|
|
19068
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(StatusChip, { status: d.status, label: (_c = labels.statusLabels) == null ? void 0 : _c[d.status] });
|
|
19063
19069
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group relative grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-2 overflow-hidden rounded-2xl border border-border p-3.5 pb-4 transition-colors hover:border-foreground/25 hover:bg-muted/40 has-focus-visible:border-foreground/25 sm:flex sm:flex-nowrap sm:gap-4", children: [
|
|
19064
19070
|
d.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: d.href, "aria-label": dateLabel, className: overlayClass }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
19065
19071
|
"button",
|
|
@@ -19073,9 +19079,9 @@ function DepartureRow({
|
|
|
19073
19079
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10 font-display text-sm font-extrabold tracking-tight whitespace-nowrap sm:order-1", children: dateLabel }),
|
|
19074
19080
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10 justify-self-end sm:order-3 sm:ml-auto", children: statusBadge }),
|
|
19075
19081
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "pointer-events-none relative z-10 inline-flex items-center gap-2 sm:order-2", children: [
|
|
19076
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5 font-sans text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
19082
|
+
travellersText && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1.5 font-sans text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
19077
19083
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "size-4", strokeWidth: 1.6 }),
|
|
19078
|
-
|
|
19084
|
+
travellersText
|
|
19079
19085
|
] }),
|
|
19080
19086
|
d.dynamicPricing && /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
19081
19087
|
/* @__PURE__ */ jsxRuntime.jsx(
|