@planetaexo/design-system 0.37.2 → 0.37.3
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 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -268,6 +268,13 @@ interface OfferProps {
|
|
|
268
268
|
confirmedState?: OfferConfirmedState;
|
|
269
269
|
/** When true, opcionais (checkbox + stepper) ficam read-only. Usado em estado expirado. */
|
|
270
270
|
interactionsDisabled?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Quando true, "Book now" abre o BookingWizard interno (demo). Em produção
|
|
273
|
+
* (host com checkout próprio via `checkoutSlot`) deixe `false` para que o
|
|
274
|
+
* fallback do wizard interno nunca renderize — evita regressões em que
|
|
275
|
+
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
276
|
+
*/
|
|
277
|
+
internalDemoCheckout?: boolean;
|
|
271
278
|
className?: string;
|
|
272
279
|
}
|
|
273
280
|
interface BookingShellProps {
|
|
@@ -358,7 +365,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
358
365
|
declare function OfferAdventureCard({ adventure }: {
|
|
359
366
|
adventure: OfferAdventureItem;
|
|
360
367
|
}): react_jsx_runtime.JSX.Element;
|
|
361
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
368
|
+
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;
|
|
362
369
|
|
|
363
370
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
364
371
|
interface BookingTraveller {
|
package/dist/index.d.ts
CHANGED
|
@@ -268,6 +268,13 @@ interface OfferProps {
|
|
|
268
268
|
confirmedState?: OfferConfirmedState;
|
|
269
269
|
/** When true, opcionais (checkbox + stepper) ficam read-only. Usado em estado expirado. */
|
|
270
270
|
interactionsDisabled?: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* Quando true, "Book now" abre o BookingWizard interno (demo). Em produção
|
|
273
|
+
* (host com checkout próprio via `checkoutSlot`) deixe `false` para que o
|
|
274
|
+
* fallback do wizard interno nunca renderize — evita regressões em que
|
|
275
|
+
* fechar o `checkoutSlot` no host expõe um stepper demo com schema antigo.
|
|
276
|
+
*/
|
|
277
|
+
internalDemoCheckout?: boolean;
|
|
271
278
|
className?: string;
|
|
272
279
|
}
|
|
273
280
|
interface BookingShellProps {
|
|
@@ -358,7 +365,7 @@ declare function TransferDetailsBlock({ label, items, className, }: TransferDeta
|
|
|
358
365
|
declare function OfferAdventureCard({ adventure }: {
|
|
359
366
|
adventure: OfferAdventureItem;
|
|
360
367
|
}): react_jsx_runtime.JSX.Element;
|
|
361
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, interactionsDisabled, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
368
|
+
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;
|
|
362
369
|
|
|
363
370
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
364
371
|
interface BookingTraveller {
|
package/dist/index.js
CHANGED
|
@@ -2258,13 +2258,16 @@ function Offer({
|
|
|
2258
2258
|
labels,
|
|
2259
2259
|
confirmedState,
|
|
2260
2260
|
interactionsDisabled,
|
|
2261
|
+
internalDemoCheckout = false,
|
|
2261
2262
|
className
|
|
2262
2263
|
}) {
|
|
2263
2264
|
var _a, _b, _c;
|
|
2264
2265
|
const [showBooking, setShowBooking] = React8.useState(false);
|
|
2265
|
-
const isShowingCheckout = !confirmedState && (!!checkoutSlot || showBooking);
|
|
2266
|
+
const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
|
|
2266
2267
|
const handleBook = () => {
|
|
2267
|
-
if (!checkoutSlot && !externalBookingFlow)
|
|
2268
|
+
if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
|
|
2269
|
+
setShowBooking(true);
|
|
2270
|
+
}
|
|
2268
2271
|
onContinue == null ? void 0 : onContinue();
|
|
2269
2272
|
};
|
|
2270
2273
|
return /* @__PURE__ */ jsxs("div", { className: cn("w-full max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col gap-6 pb-20 lg:pb-12", className), children: [
|
|
@@ -2309,7 +2312,7 @@ function Offer({
|
|
|
2309
2312
|
labels
|
|
2310
2313
|
}
|
|
2311
2314
|
),
|
|
2312
|
-
isShowingCheckout && (checkoutSlot != null ? checkoutSlot : /* @__PURE__ */ jsx(
|
|
2315
|
+
isShowingCheckout && (checkoutSlot != null ? checkoutSlot : internalDemoCheckout ? /* @__PURE__ */ jsx(
|
|
2313
2316
|
BookingWizard,
|
|
2314
2317
|
{
|
|
2315
2318
|
adventures,
|
|
@@ -2318,7 +2321,7 @@ function Offer({
|
|
|
2318
2321
|
onCancel: () => setShowBooking(false),
|
|
2319
2322
|
labels
|
|
2320
2323
|
}
|
|
2321
|
-
))
|
|
2324
|
+
) : null)
|
|
2322
2325
|
] }) }),
|
|
2323
2326
|
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2324
2327
|
OfferSidebar,
|