@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.d.cts
CHANGED
|
@@ -488,6 +488,18 @@ interface OfferProps {
|
|
|
488
488
|
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
489
489
|
*/
|
|
490
490
|
internalDemoCheckout?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Quando true, oculta a seção "Included Adventures" (header + cards de aventura).
|
|
493
|
+
* O host renderiza os detalhes por conta própria (ex.: um acordeão "Trip details"
|
|
494
|
+
* dentro do `checkoutSlot`).
|
|
495
|
+
*/
|
|
496
|
+
hideAdventures?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Quando true, oculta a sidebar de compra (card "Booking Total" + CTA) E o rodapé
|
|
499
|
+
* flutuante mobile, colapsando o layout para coluna única. Use quando o pagamento/CTA
|
|
500
|
+
* não acontece nesta página (ex.: criação de grupo, em que o sinal é pago depois).
|
|
501
|
+
*/
|
|
502
|
+
hideSidebar?: boolean;
|
|
491
503
|
className?: string;
|
|
492
504
|
}
|
|
493
505
|
interface BookingShellProps {
|
|
@@ -592,7 +604,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
592
604
|
declare function OfferAdventureCard({ adventure }: {
|
|
593
605
|
adventure: OfferAdventureItem;
|
|
594
606
|
}): react_jsx_runtime.JSX.Element;
|
|
595
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
607
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, hideAdventures, hideSidebar, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
596
608
|
|
|
597
609
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
598
610
|
interface BookingTraveller {
|
|
@@ -5058,6 +5070,9 @@ interface DeparturesLabels {
|
|
|
5058
5070
|
title: string;
|
|
5059
5071
|
body: string;
|
|
5060
5072
|
}>>;
|
|
5073
|
+
/** Sobrescreve o rótulo visível da pílula de status (i18n). Sem override,
|
|
5074
|
+
* cai no rótulo (em inglês) de DEPARTURE_STATUS_MAP. */
|
|
5075
|
+
statusLabels?: Partial<Record<DepartureStatus, string>>;
|
|
5061
5076
|
}
|
|
5062
5077
|
interface DeparturesListProps {
|
|
5063
5078
|
departures: Departure[];
|
package/dist/index.d.ts
CHANGED
|
@@ -488,6 +488,18 @@ interface OfferProps {
|
|
|
488
488
|
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
489
489
|
*/
|
|
490
490
|
internalDemoCheckout?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* Quando true, oculta a seção "Included Adventures" (header + cards de aventura).
|
|
493
|
+
* O host renderiza os detalhes por conta própria (ex.: um acordeão "Trip details"
|
|
494
|
+
* dentro do `checkoutSlot`).
|
|
495
|
+
*/
|
|
496
|
+
hideAdventures?: boolean;
|
|
497
|
+
/**
|
|
498
|
+
* Quando true, oculta a sidebar de compra (card "Booking Total" + CTA) E o rodapé
|
|
499
|
+
* flutuante mobile, colapsando o layout para coluna única. Use quando o pagamento/CTA
|
|
500
|
+
* não acontece nesta página (ex.: criação de grupo, em que o sinal é pago depois).
|
|
501
|
+
*/
|
|
502
|
+
hideSidebar?: boolean;
|
|
491
503
|
className?: string;
|
|
492
504
|
}
|
|
493
505
|
interface BookingShellProps {
|
|
@@ -592,7 +604,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
592
604
|
declare function OfferAdventureCard({ adventure }: {
|
|
593
605
|
adventure: OfferAdventureItem;
|
|
594
606
|
}): react_jsx_runtime.JSX.Element;
|
|
595
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
607
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, internalDemoCheckout, hideAdventures, hideSidebar, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
596
608
|
|
|
597
609
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
598
610
|
interface BookingTraveller {
|
|
@@ -5058,6 +5070,9 @@ interface DeparturesLabels {
|
|
|
5058
5070
|
title: string;
|
|
5059
5071
|
body: string;
|
|
5060
5072
|
}>>;
|
|
5073
|
+
/** Sobrescreve o rótulo visível da pílula de status (i18n). Sem override,
|
|
5074
|
+
* cai no rótulo (em inglês) de DEPARTURE_STATUS_MAP. */
|
|
5075
|
+
statusLabels?: Partial<Record<DepartureStatus, string>>;
|
|
5061
5076
|
}
|
|
5062
5077
|
interface DeparturesListProps {
|
|
5063
5078
|
departures: Departure[];
|
package/dist/index.js
CHANGED
|
@@ -2384,6 +2384,8 @@ function Offer({
|
|
|
2384
2384
|
confirmedState,
|
|
2385
2385
|
interactionsDisabled,
|
|
2386
2386
|
internalDemoCheckout = false,
|
|
2387
|
+
hideAdventures = false,
|
|
2388
|
+
hideSidebar = false,
|
|
2387
2389
|
className
|
|
2388
2390
|
}) {
|
|
2389
2391
|
var _a, _b, _c;
|
|
@@ -2399,7 +2401,7 @@ function Offer({
|
|
|
2399
2401
|
/* @__PURE__ */ jsx("img", { src: logo, alt: logoAlt, className: "w-[150px] h-auto object-contain mx-auto block" }),
|
|
2400
2402
|
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
2401
2403
|
subtitle && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
|
|
2402
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1
|
|
2404
|
+
/* @__PURE__ */ jsxs("div", { className: cn("grid grid-cols-1 gap-6 lg:gap-8 items-start", !hideSidebar && "lg:grid-cols-[1fr_280px]"), children: [
|
|
2403
2405
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2404
2406
|
/* @__PURE__ */ jsx(
|
|
2405
2407
|
BookingConfirmedCard,
|
|
@@ -2415,7 +2417,7 @@ function Offer({
|
|
|
2415
2417
|
),
|
|
2416
2418
|
confirmedState.belowSlot
|
|
2417
2419
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2418
|
-
/* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2420
|
+
!hideAdventures && /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2419
2421
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2420
2422
|
/* @__PURE__ */ jsx(MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2421
2423
|
/* @__PURE__ */ jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (_b = labels == null ? void 0 : labels.includedAdventures) != null ? _b : "Included Adventures" })
|
|
@@ -2448,7 +2450,7 @@ function Offer({
|
|
|
2448
2450
|
}
|
|
2449
2451
|
) : null)
|
|
2450
2452
|
] }) }),
|
|
2451
|
-
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2453
|
+
!hideSidebar && /* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2452
2454
|
OfferSidebar,
|
|
2453
2455
|
{
|
|
2454
2456
|
total,
|
|
@@ -2461,7 +2463,7 @@ function Offer({
|
|
|
2461
2463
|
}
|
|
2462
2464
|
) })
|
|
2463
2465
|
] }),
|
|
2464
|
-
!isShowingCheckout && !confirmedState && /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2466
|
+
!isShowingCheckout && !confirmedState && !hideSidebar && /* @__PURE__ */ 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__ */ jsxs("div", { className: "flex items-center justify-between gap-4 max-w-5xl mx-auto", children: [
|
|
2465
2467
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
2466
2468
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (_c = labels == null ? void 0 : labels.total) != null ? _c : "Total" }),
|
|
2467
2469
|
/* @__PURE__ */ jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|
|
@@ -18859,7 +18861,7 @@ function FeaturedDeparture({
|
|
|
18859
18861
|
labels,
|
|
18860
18862
|
onSelect
|
|
18861
18863
|
}) {
|
|
18862
|
-
var _a;
|
|
18864
|
+
var _a, _b;
|
|
18863
18865
|
const spotsLeft = d.capacity - d.travellers;
|
|
18864
18866
|
const needsQuorum = d.min != null && d.travellers < d.min;
|
|
18865
18867
|
const eyebrow = needsQuorum ? labels.confirmsIn(d.min - d.travellers) : labels.fillingFast(spotsLeft);
|
|
@@ -18878,7 +18880,7 @@ function FeaturedDeparture({
|
|
|
18878
18880
|
] }),
|
|
18879
18881
|
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-2", children: [
|
|
18880
18882
|
/* @__PURE__ */ jsx("span", { className: "font-display text-lg font-extrabold tracking-tight whitespace-nowrap", children: fmtDates(d) }),
|
|
18881
|
-
/* @__PURE__ */ jsx(StatusChip, { status: d.status }),
|
|
18883
|
+
/* @__PURE__ */ jsx(StatusChip, { status: d.status, label: (_a = labels.statusLabels) == null ? void 0 : _a[d.status] }),
|
|
18882
18884
|
d.dynamicPricing && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
18883
18885
|
/* @__PURE__ */ jsx(
|
|
18884
18886
|
TooltipTrigger,
|
|
@@ -18912,7 +18914,7 @@ function FeaturedDeparture({
|
|
|
18912
18914
|
{
|
|
18913
18915
|
className: "mt-3",
|
|
18914
18916
|
current: d.travellers,
|
|
18915
|
-
min: (
|
|
18917
|
+
min: (_b = d.min) != null ? _b : d.travellers,
|
|
18916
18918
|
max: d.capacity,
|
|
18917
18919
|
hideLabels: d.min == null
|
|
18918
18920
|
}
|
|
@@ -18999,14 +19001,17 @@ function MonthChip({
|
|
|
18999
19001
|
}
|
|
19000
19002
|
);
|
|
19001
19003
|
}
|
|
19002
|
-
function StatusChip({
|
|
19004
|
+
function StatusChip({
|
|
19005
|
+
status,
|
|
19006
|
+
label
|
|
19007
|
+
}) {
|
|
19003
19008
|
return /* @__PURE__ */ jsx(
|
|
19004
19009
|
Chip,
|
|
19005
19010
|
{
|
|
19006
19011
|
variant: "solid",
|
|
19007
19012
|
size: "sm",
|
|
19008
19013
|
className: "hover:bg-muted hover:text-foreground/80",
|
|
19009
|
-
children: STATUS_MAP[status].label
|
|
19014
|
+
children: label != null ? label : STATUS_MAP[status].label
|
|
19010
19015
|
}
|
|
19011
19016
|
);
|
|
19012
19017
|
}
|
|
@@ -19015,10 +19020,11 @@ function DepartureRow({
|
|
|
19015
19020
|
labels,
|
|
19016
19021
|
onSelect
|
|
19017
19022
|
}) {
|
|
19018
|
-
var _a;
|
|
19023
|
+
var _a, _b, _c;
|
|
19019
19024
|
const dateLabel = fmtDates(d);
|
|
19020
19025
|
const statusTip = (_a = labels.statusTooltips) == null ? void 0 : _a[d.status];
|
|
19021
|
-
const pct = Math.max(0, Math.min(100, d.travellers / d.capacity * 100));
|
|
19026
|
+
const pct = d.capacity > 0 ? Math.max(0, Math.min(100, d.travellers / d.capacity * 100)) : 0;
|
|
19027
|
+
const travellersText = labels.travellers(d.travellers, d.capacity);
|
|
19022
19028
|
const overlayClass = "absolute inset-0 z-0 rounded-2xl focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary";
|
|
19023
19029
|
const statusBadge = statusTip ? /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
19024
19030
|
/* @__PURE__ */ jsx(
|
|
@@ -19031,14 +19037,14 @@ function DepartureRow({
|
|
|
19031
19037
|
className: "pointer-events-auto cursor-help outline-hidden"
|
|
19032
19038
|
}
|
|
19033
19039
|
),
|
|
19034
|
-
children: /* @__PURE__ */ jsx(StatusChip, { status: d.status })
|
|
19040
|
+
children: /* @__PURE__ */ jsx(StatusChip, { status: d.status, label: (_b = labels.statusLabels) == null ? void 0 : _b[d.status] })
|
|
19035
19041
|
}
|
|
19036
19042
|
),
|
|
19037
19043
|
/* @__PURE__ */ jsxs(TooltipContent, { children: [
|
|
19038
19044
|
/* @__PURE__ */ jsx("span", { className: "block font-bold", children: statusTip.title }),
|
|
19039
19045
|
statusTip.body
|
|
19040
19046
|
] })
|
|
19041
|
-
] }) : /* @__PURE__ */ jsx(StatusChip, { status: d.status });
|
|
19047
|
+
] }) : /* @__PURE__ */ jsx(StatusChip, { status: d.status, label: (_c = labels.statusLabels) == null ? void 0 : _c[d.status] });
|
|
19042
19048
|
return /* @__PURE__ */ 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: [
|
|
19043
19049
|
d.href ? /* @__PURE__ */ jsx("a", { href: d.href, "aria-label": dateLabel, className: overlayClass }) : /* @__PURE__ */ jsx(
|
|
19044
19050
|
"button",
|
|
@@ -19052,9 +19058,9 @@ function DepartureRow({
|
|
|
19052
19058
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10 font-display text-sm font-extrabold tracking-tight whitespace-nowrap sm:order-1", children: dateLabel }),
|
|
19053
19059
|
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10 justify-self-end sm:order-3 sm:ml-auto", children: statusBadge }),
|
|
19054
19060
|
/* @__PURE__ */ jsxs("span", { className: "pointer-events-none relative z-10 inline-flex items-center gap-2 sm:order-2", children: [
|
|
19055
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-sans text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
19061
|
+
travellersText && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 font-sans text-sm text-muted-foreground whitespace-nowrap", children: [
|
|
19056
19062
|
/* @__PURE__ */ jsx(UsersIcon, { className: "size-4", strokeWidth: 1.6 }),
|
|
19057
|
-
|
|
19063
|
+
travellersText
|
|
19058
19064
|
] }),
|
|
19059
19065
|
d.dynamicPricing && /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
19060
19066
|
/* @__PURE__ */ jsx(
|