@planetaexo/design-system 0.3.1 → 0.3.2
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 +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -77,8 +77,12 @@ interface OfferProps {
|
|
|
77
77
|
agent?: OfferAgentInfo;
|
|
78
78
|
onContinue?: () => void;
|
|
79
79
|
continueLabel?: string;
|
|
80
|
-
/** When true, only `onContinue` runs — no embedded booking wizard (host app handles checkout).
|
|
80
|
+
/** When true, only `onContinue` runs — no embedded booking wizard (host app handles checkout).
|
|
81
|
+
* @deprecated Prefira `checkoutSlot` para manter o padrão visual do DS. */
|
|
81
82
|
externalBookingFlow?: boolean;
|
|
83
|
+
/** Conteúdo de checkout do host app. Quando presente, substitui o BookingWizard interno:
|
|
84
|
+
* o sumário some e este slot aparece no lugar — mesmo comportamento visual do DS. */
|
|
85
|
+
checkoutSlot?: React.ReactNode;
|
|
82
86
|
/** Inserted after per-adventure summaries, before subtotal (e.g. coupon picker). */
|
|
83
87
|
summaryNotesSlot?: React.ReactNode;
|
|
84
88
|
/** Shown after subtotal, before deposit (e.g. coupon discount). */
|
|
@@ -94,7 +98,7 @@ interface OfferProps {
|
|
|
94
98
|
declare function OfferAdventureCard({ adventure }: {
|
|
95
99
|
adventure: OfferAdventureItem;
|
|
96
100
|
}): react_jsx_runtime.JSX.Element;
|
|
97
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, summaryNotesSlot, summaryDiscountLine, continueDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
98
102
|
|
|
99
103
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed";
|
|
100
104
|
interface BookingTraveller {
|
package/dist/index.d.ts
CHANGED
|
@@ -77,8 +77,12 @@ interface OfferProps {
|
|
|
77
77
|
agent?: OfferAgentInfo;
|
|
78
78
|
onContinue?: () => void;
|
|
79
79
|
continueLabel?: string;
|
|
80
|
-
/** When true, only `onContinue` runs — no embedded booking wizard (host app handles checkout).
|
|
80
|
+
/** When true, only `onContinue` runs — no embedded booking wizard (host app handles checkout).
|
|
81
|
+
* @deprecated Prefira `checkoutSlot` para manter o padrão visual do DS. */
|
|
81
82
|
externalBookingFlow?: boolean;
|
|
83
|
+
/** Conteúdo de checkout do host app. Quando presente, substitui o BookingWizard interno:
|
|
84
|
+
* o sumário some e este slot aparece no lugar — mesmo comportamento visual do DS. */
|
|
85
|
+
checkoutSlot?: React.ReactNode;
|
|
82
86
|
/** Inserted after per-adventure summaries, before subtotal (e.g. coupon picker). */
|
|
83
87
|
summaryNotesSlot?: React.ReactNode;
|
|
84
88
|
/** Shown after subtotal, before deposit (e.g. coupon discount). */
|
|
@@ -94,7 +98,7 @@ interface OfferProps {
|
|
|
94
98
|
declare function OfferAdventureCard({ adventure }: {
|
|
95
99
|
adventure: OfferAdventureItem;
|
|
96
100
|
}): react_jsx_runtime.JSX.Element;
|
|
97
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, summaryNotesSlot, summaryDiscountLine, continueDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
98
102
|
|
|
99
103
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed";
|
|
100
104
|
interface BookingTraveller {
|
package/dist/index.js
CHANGED
|
@@ -1842,14 +1842,16 @@ function Offer({
|
|
|
1842
1842
|
onContinue,
|
|
1843
1843
|
continueLabel = "Book now",
|
|
1844
1844
|
externalBookingFlow,
|
|
1845
|
+
checkoutSlot,
|
|
1845
1846
|
summaryNotesSlot,
|
|
1846
1847
|
summaryDiscountLine,
|
|
1847
1848
|
continueDisabled,
|
|
1848
1849
|
className
|
|
1849
1850
|
}) {
|
|
1850
1851
|
const [showBooking, setShowBooking] = React18.useState(false);
|
|
1852
|
+
const isShowingCheckout = !!checkoutSlot || showBooking;
|
|
1851
1853
|
const handleBook = () => {
|
|
1852
|
-
if (!externalBookingFlow) setShowBooking(true);
|
|
1854
|
+
if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
|
|
1853
1855
|
onContinue == null ? void 0 : onContinue();
|
|
1854
1856
|
};
|
|
1855
1857
|
return /* @__PURE__ */ jsxs("div", { className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6 pb-20 lg:pb-0", className), children: [
|
|
@@ -1865,7 +1867,7 @@ function Offer({
|
|
|
1865
1867
|
] }),
|
|
1866
1868
|
adventures.map((adventure) => /* @__PURE__ */ jsx(AdventureCard, { adventure }, adventure.id))
|
|
1867
1869
|
] }),
|
|
1868
|
-
!
|
|
1870
|
+
!isShowingCheckout && /* @__PURE__ */ jsx(
|
|
1869
1871
|
OfferSummarySection,
|
|
1870
1872
|
{
|
|
1871
1873
|
adventures,
|
|
@@ -1879,7 +1881,7 @@ function Offer({
|
|
|
1879
1881
|
continueDisabled
|
|
1880
1882
|
}
|
|
1881
1883
|
),
|
|
1882
|
-
|
|
1884
|
+
isShowingCheckout && (checkoutSlot != null ? checkoutSlot : /* @__PURE__ */ jsx(
|
|
1883
1885
|
BookingWizard,
|
|
1884
1886
|
{
|
|
1885
1887
|
adventures,
|
|
@@ -1887,7 +1889,7 @@ function Offer({
|
|
|
1887
1889
|
depositInfo,
|
|
1888
1890
|
onCancel: () => setShowBooking(false)
|
|
1889
1891
|
}
|
|
1890
|
-
)
|
|
1892
|
+
))
|
|
1891
1893
|
] }),
|
|
1892
1894
|
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
1893
1895
|
OfferSidebar,
|
|
@@ -1900,7 +1902,7 @@ function Offer({
|
|
|
1900
1902
|
}
|
|
1901
1903
|
) })
|
|
1902
1904
|
] }),
|
|
1903
|
-
!
|
|
1905
|
+
!isShowingCheckout && /* @__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: [
|
|
1904
1906
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
1905
1907
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: "Total" }),
|
|
1906
1908
|
/* @__PURE__ */ jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|