@planetaexo/design-system 0.18.0 → 0.20.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 +71 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.js +71 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -200,6 +200,32 @@ interface OfferAgentInfo {
|
|
|
200
200
|
email?: string;
|
|
201
201
|
scheduleUrl?: string;
|
|
202
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Estado "proposta já reservada" — quando passado ao `<Offer>`, a coluna
|
|
205
|
+
* esquerda exibe APENAS o `<BookingConfirmedCard>` (com props derivadas deste
|
|
206
|
+
* objeto) + `belowSlot` opcional. As seções "Included Adventures", "Summary"
|
|
207
|
+
* e o `checkoutSlot` NÃO renderizam. Mobile floating footer some também.
|
|
208
|
+
* Sidebar (Booking Total + agente) continua visível, com o botão "Reservar"
|
|
209
|
+
* substituído por um link "View booking" quando `viewBookingHref` é passado.
|
|
210
|
+
*/
|
|
211
|
+
interface OfferConfirmedState {
|
|
212
|
+
/** Número da reserva confirmada. Quando ausente, oculta a linha "Your booking number is" e o botão CTA. */
|
|
213
|
+
bookingNumber?: number | string;
|
|
214
|
+
/** Rótulo "Your booking number is:" — quando ausente, default EN do BookingConfirmedCard. */
|
|
215
|
+
bookingNumberLabel?: string;
|
|
216
|
+
/** E-mail do cliente usado na mensagem padrão "A confirmation email was sent to <email>". */
|
|
217
|
+
email?: string;
|
|
218
|
+
/** Quando informado, renderiza botão CTA "VIEW BOOKING" linkando para essa URL. */
|
|
219
|
+
viewBookingHref?: string;
|
|
220
|
+
/** Rótulo do botão CTA. Default EN: "VIEW BOOKING". */
|
|
221
|
+
viewBookingLabel?: string;
|
|
222
|
+
/** Título do card. Default EN: "Booking confirmed!" (do BookingConfirmedCard). */
|
|
223
|
+
title?: string;
|
|
224
|
+
/** Mensagem central. ReactNode para permitir markup (ex.: <strong>email</strong>). */
|
|
225
|
+
message?: React.ReactNode;
|
|
226
|
+
/** Slot opcional renderizado ABAIXO do BookingConfirmedCard, dentro da coluna esquerda — usado para "Outstanding balance". */
|
|
227
|
+
belowSlot?: React.ReactNode;
|
|
228
|
+
}
|
|
203
229
|
interface OfferProps {
|
|
204
230
|
/** Logo URL (defaults to /logo-planetaexo.png) */
|
|
205
231
|
logo?: string;
|
|
@@ -231,6 +257,17 @@ interface OfferProps {
|
|
|
231
257
|
continueDisabled?: boolean;
|
|
232
258
|
/** Overrides i18n para labels hardcoded no componente. */
|
|
233
259
|
labels?: OfferLabels;
|
|
260
|
+
/**
|
|
261
|
+
* Quando presente, a coluna esquerda renderiza APENAS o `BookingConfirmedCard`
|
|
262
|
+
* (com props derivadas deste objeto) + `belowSlot` opcional. As seções
|
|
263
|
+
* "Included Adventures", "Summary" e o `checkoutSlot` NÃO renderizam.
|
|
264
|
+
* Mobile floating footer some também. Sidebar (Booking Total + agente)
|
|
265
|
+
* continua visível, mas o botão "Reservar" vira `<a href={viewBookingHref}>`
|
|
266
|
+
* quando essa URL é informada.
|
|
267
|
+
*/
|
|
268
|
+
confirmedState?: OfferConfirmedState;
|
|
269
|
+
/** When true, opcionais (checkbox + stepper) ficam read-only. Usado em estado expirado. */
|
|
270
|
+
interactionsDisabled?: boolean;
|
|
234
271
|
className?: string;
|
|
235
272
|
}
|
|
236
273
|
interface BookingShellProps {
|
|
@@ -298,13 +335,21 @@ interface BookingConfirmedCardProps {
|
|
|
298
335
|
onBack?: () => void;
|
|
299
336
|
/** Label for the back button. Default: "Back to offer" */
|
|
300
337
|
backLabel?: string;
|
|
338
|
+
/** Número da reserva exibido como "<bookingNumberLabel> <bookingNumber>" entre o título e a mensagem. Quando ausente/falsy, a linha não renderiza. */
|
|
339
|
+
bookingNumber?: number | string;
|
|
340
|
+
/** Rótulo da linha "Your booking number is:". Default EN: "Your booking number is:". */
|
|
341
|
+
bookingNumberLabel?: string;
|
|
342
|
+
/** URL para o botão CTA principal "VIEW BOOKING". Quando ausente, o botão não renderiza. */
|
|
343
|
+
viewBookingHref?: string;
|
|
344
|
+
/** Label do botão CTA principal. Default EN: "VIEW BOOKING". */
|
|
345
|
+
viewBookingLabel?: string;
|
|
301
346
|
}
|
|
302
|
-
declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
|
|
347
|
+
declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, bookingNumber, bookingNumberLabel, viewBookingHref, viewBookingLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
|
|
303
348
|
/** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
|
|
304
349
|
declare function OfferAdventureCard({ adventure }: {
|
|
305
350
|
adventure: OfferAdventureItem;
|
|
306
351
|
}): react_jsx_runtime.JSX.Element;
|
|
307
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
352
|
+
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;
|
|
308
353
|
|
|
309
354
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
310
355
|
interface BookingTraveller {
|
|
@@ -2041,4 +2086,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
2041
2086
|
config: LeadCapturePopupConfig;
|
|
2042
2087
|
}): react_jsx_runtime.JSX.Element | null;
|
|
2043
2088
|
|
|
2044
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, type DatePickerFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, type EmailTokens, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, OTPCodeInput, type OTPCodeInputProps, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferDepositInfo, type OfferLabels, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, type RegistrationAdventure, type RegistrationBooking, type RegistrationEmergencyContactValue, type RegistrationField, type RegistrationFieldOption, type RegistrationFieldType, type RegistrationFieldValue, RegistrationForm, type RegistrationFormLabels, type RegistrationFormProps, type RegistrationFormValues, type RegistrationNameValue, type RegistrationPhoneValue, RegistrationSuccessCard, type RegistrationSuccessCardProps, type RegistrationTerms, type RegistrationTraveller, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type StripeAppearance, type SuggestedTraveller, TERMS_ACCEPT_KEY, TermsSection, type TermsSectionProps, ThemeToggle, Toast, type ToastProps, type ToastVariant, type TravellerFormConfig, type TravellerFormData, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, type TravellerFormLabels, TripCard, type TripCardCta, type TripCardProps, type TripCardSize, type TripCardStatus, type TripDuration, type TripFaq, TripHeader, type TripHeaderProps, type TripHighlight, type TripInfoGroup, type TripItineraryStep, type TripMeetingPoint, TripPage, type TripPageProps, type TripPricingOption, type TripReview, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
|
2089
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, type DatePickerFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, type EmailTokens, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, OTPCodeInput, type OTPCodeInputProps, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferConfirmedState, type OfferDepositInfo, type OfferLabels, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, type RegistrationAdventure, type RegistrationBooking, type RegistrationEmergencyContactValue, type RegistrationField, type RegistrationFieldOption, type RegistrationFieldType, type RegistrationFieldValue, RegistrationForm, type RegistrationFormLabels, type RegistrationFormProps, type RegistrationFormValues, type RegistrationNameValue, type RegistrationPhoneValue, RegistrationSuccessCard, type RegistrationSuccessCardProps, type RegistrationTerms, type RegistrationTraveller, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type StripeAppearance, type SuggestedTraveller, TERMS_ACCEPT_KEY, TermsSection, type TermsSectionProps, ThemeToggle, Toast, type ToastProps, type ToastVariant, type TravellerFormConfig, type TravellerFormData, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, type TravellerFormLabels, TripCard, type TripCardCta, type TripCardProps, type TripCardSize, type TripCardStatus, type TripDuration, type TripFaq, TripHeader, type TripHeaderProps, type TripHighlight, type TripInfoGroup, type TripItineraryStep, type TripMeetingPoint, TripPage, type TripPageProps, type TripPricingOption, type TripReview, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
package/dist/index.d.ts
CHANGED
|
@@ -200,6 +200,32 @@ interface OfferAgentInfo {
|
|
|
200
200
|
email?: string;
|
|
201
201
|
scheduleUrl?: string;
|
|
202
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Estado "proposta já reservada" — quando passado ao `<Offer>`, a coluna
|
|
205
|
+
* esquerda exibe APENAS o `<BookingConfirmedCard>` (com props derivadas deste
|
|
206
|
+
* objeto) + `belowSlot` opcional. As seções "Included Adventures", "Summary"
|
|
207
|
+
* e o `checkoutSlot` NÃO renderizam. Mobile floating footer some também.
|
|
208
|
+
* Sidebar (Booking Total + agente) continua visível, com o botão "Reservar"
|
|
209
|
+
* substituído por um link "View booking" quando `viewBookingHref` é passado.
|
|
210
|
+
*/
|
|
211
|
+
interface OfferConfirmedState {
|
|
212
|
+
/** Número da reserva confirmada. Quando ausente, oculta a linha "Your booking number is" e o botão CTA. */
|
|
213
|
+
bookingNumber?: number | string;
|
|
214
|
+
/** Rótulo "Your booking number is:" — quando ausente, default EN do BookingConfirmedCard. */
|
|
215
|
+
bookingNumberLabel?: string;
|
|
216
|
+
/** E-mail do cliente usado na mensagem padrão "A confirmation email was sent to <email>". */
|
|
217
|
+
email?: string;
|
|
218
|
+
/** Quando informado, renderiza botão CTA "VIEW BOOKING" linkando para essa URL. */
|
|
219
|
+
viewBookingHref?: string;
|
|
220
|
+
/** Rótulo do botão CTA. Default EN: "VIEW BOOKING". */
|
|
221
|
+
viewBookingLabel?: string;
|
|
222
|
+
/** Título do card. Default EN: "Booking confirmed!" (do BookingConfirmedCard). */
|
|
223
|
+
title?: string;
|
|
224
|
+
/** Mensagem central. ReactNode para permitir markup (ex.: <strong>email</strong>). */
|
|
225
|
+
message?: React.ReactNode;
|
|
226
|
+
/** Slot opcional renderizado ABAIXO do BookingConfirmedCard, dentro da coluna esquerda — usado para "Outstanding balance". */
|
|
227
|
+
belowSlot?: React.ReactNode;
|
|
228
|
+
}
|
|
203
229
|
interface OfferProps {
|
|
204
230
|
/** Logo URL (defaults to /logo-planetaexo.png) */
|
|
205
231
|
logo?: string;
|
|
@@ -231,6 +257,17 @@ interface OfferProps {
|
|
|
231
257
|
continueDisabled?: boolean;
|
|
232
258
|
/** Overrides i18n para labels hardcoded no componente. */
|
|
233
259
|
labels?: OfferLabels;
|
|
260
|
+
/**
|
|
261
|
+
* Quando presente, a coluna esquerda renderiza APENAS o `BookingConfirmedCard`
|
|
262
|
+
* (com props derivadas deste objeto) + `belowSlot` opcional. As seções
|
|
263
|
+
* "Included Adventures", "Summary" e o `checkoutSlot` NÃO renderizam.
|
|
264
|
+
* Mobile floating footer some também. Sidebar (Booking Total + agente)
|
|
265
|
+
* continua visível, mas o botão "Reservar" vira `<a href={viewBookingHref}>`
|
|
266
|
+
* quando essa URL é informada.
|
|
267
|
+
*/
|
|
268
|
+
confirmedState?: OfferConfirmedState;
|
|
269
|
+
/** When true, opcionais (checkbox + stepper) ficam read-only. Usado em estado expirado. */
|
|
270
|
+
interactionsDisabled?: boolean;
|
|
234
271
|
className?: string;
|
|
235
272
|
}
|
|
236
273
|
interface BookingShellProps {
|
|
@@ -298,13 +335,21 @@ interface BookingConfirmedCardProps {
|
|
|
298
335
|
onBack?: () => void;
|
|
299
336
|
/** Label for the back button. Default: "Back to offer" */
|
|
300
337
|
backLabel?: string;
|
|
338
|
+
/** Número da reserva exibido como "<bookingNumberLabel> <bookingNumber>" entre o título e a mensagem. Quando ausente/falsy, a linha não renderiza. */
|
|
339
|
+
bookingNumber?: number | string;
|
|
340
|
+
/** Rótulo da linha "Your booking number is:". Default EN: "Your booking number is:". */
|
|
341
|
+
bookingNumberLabel?: string;
|
|
342
|
+
/** URL para o botão CTA principal "VIEW BOOKING". Quando ausente, o botão não renderiza. */
|
|
343
|
+
viewBookingHref?: string;
|
|
344
|
+
/** Label do botão CTA principal. Default EN: "VIEW BOOKING". */
|
|
345
|
+
viewBookingLabel?: string;
|
|
301
346
|
}
|
|
302
|
-
declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
|
|
347
|
+
declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, bookingNumber, bookingNumberLabel, viewBookingHref, viewBookingLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
|
|
303
348
|
/** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
|
|
304
349
|
declare function OfferAdventureCard({ adventure }: {
|
|
305
350
|
adventure: OfferAdventureItem;
|
|
306
351
|
}): react_jsx_runtime.JSX.Element;
|
|
307
|
-
declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, className, }: OfferProps): react_jsx_runtime.JSX.Element;
|
|
352
|
+
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;
|
|
308
353
|
|
|
309
354
|
type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
|
|
310
355
|
interface BookingTraveller {
|
|
@@ -2041,4 +2086,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
2041
2086
|
config: LeadCapturePopupConfig;
|
|
2042
2087
|
}): react_jsx_runtime.JSX.Element | null;
|
|
2043
2088
|
|
|
2044
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, type DatePickerFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, type EmailTokens, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, OTPCodeInput, type OTPCodeInputProps, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferDepositInfo, type OfferLabels, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, type RegistrationAdventure, type RegistrationBooking, type RegistrationEmergencyContactValue, type RegistrationField, type RegistrationFieldOption, type RegistrationFieldType, type RegistrationFieldValue, RegistrationForm, type RegistrationFormLabels, type RegistrationFormProps, type RegistrationFormValues, type RegistrationNameValue, type RegistrationPhoneValue, RegistrationSuccessCard, type RegistrationSuccessCardProps, type RegistrationTerms, type RegistrationTraveller, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type StripeAppearance, type SuggestedTraveller, TERMS_ACCEPT_KEY, TermsSection, type TermsSectionProps, ThemeToggle, Toast, type ToastProps, type ToastVariant, type TravellerFormConfig, type TravellerFormData, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, type TravellerFormLabels, TripCard, type TripCardCta, type TripCardProps, type TripCardSize, type TripCardStatus, type TripDuration, type TripFaq, TripHeader, type TripHeaderProps, type TripHighlight, type TripInfoGroup, type TripItineraryStep, type TripMeetingPoint, TripPage, type TripPageProps, type TripPricingOption, type TripReview, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
|
2089
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, type DatePickerFieldProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, type EmailTokens, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, OTPCodeInput, type OTPCodeInputProps, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferConfirmedState, type OfferDepositInfo, type OfferLabels, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, type RegistrationAdventure, type RegistrationBooking, type RegistrationEmergencyContactValue, type RegistrationField, type RegistrationFieldOption, type RegistrationFieldType, type RegistrationFieldValue, RegistrationForm, type RegistrationFormLabels, type RegistrationFormProps, type RegistrationFormValues, type RegistrationNameValue, type RegistrationPhoneValue, RegistrationSuccessCard, type RegistrationSuccessCardProps, type RegistrationTerms, type RegistrationTraveller, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type StripeAppearance, type SuggestedTraveller, TERMS_ACCEPT_KEY, TermsSection, type TermsSectionProps, ThemeToggle, Toast, type ToastProps, type ToastVariant, type TravellerFormConfig, type TravellerFormData, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, type TravellerFormLabels, TripCard, type TripCardCta, type TripCardProps, type TripCardSize, type TripCardStatus, type TripDuration, type TripFaq, TripHeader, type TripHeaderProps, type TripHighlight, type TripInfoGroup, type TripItineraryStep, type TripMeetingPoint, TripPage, type TripPageProps, type TripPricingOption, type TripReview, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
package/dist/index.js
CHANGED
|
@@ -1261,7 +1261,11 @@ function Alert({ variant = "info", children, className }) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
);
|
|
1263
1263
|
}
|
|
1264
|
-
function AdventureCard({
|
|
1264
|
+
function AdventureCard({
|
|
1265
|
+
adventure,
|
|
1266
|
+
labels,
|
|
1267
|
+
interactionsDisabled
|
|
1268
|
+
}) {
|
|
1265
1269
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1266
1270
|
const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
|
|
1267
1271
|
const [checkedInternal, setCheckedInternal] = React23.useState(
|
|
@@ -1330,15 +1334,19 @@ function AdventureCard({ adventure, labels }) {
|
|
|
1330
1334
|
const currentQty = (_c2 = opt.quantity) != null ? _c2 : minQty;
|
|
1331
1335
|
const canDec = currentQty > minQty;
|
|
1332
1336
|
const canInc = currentQty < maxQty;
|
|
1333
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1.5", children: [
|
|
1334
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-center gap-3 cursor-
|
|
1337
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-center gap-x-3 gap-y-1.5", interactionsDisabled && "opacity-60"), children: [
|
|
1338
|
+
/* @__PURE__ */ jsxs("label", { className: cn("flex items-center gap-3 group", interactionsDisabled ? "cursor-not-allowed" : "cursor-pointer"), children: [
|
|
1335
1339
|
/* @__PURE__ */ jsx(
|
|
1336
1340
|
"input",
|
|
1337
1341
|
{
|
|
1338
1342
|
type: "checkbox",
|
|
1339
1343
|
checked,
|
|
1340
1344
|
onChange: () => toggleOptional(opt),
|
|
1341
|
-
|
|
1345
|
+
disabled: interactionsDisabled,
|
|
1346
|
+
className: cn(
|
|
1347
|
+
"h-4 w-4 shrink-0 rounded border-border accent-primary",
|
|
1348
|
+
interactionsDisabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1349
|
+
)
|
|
1342
1350
|
}
|
|
1343
1351
|
),
|
|
1344
1352
|
/* @__PURE__ */ jsxs("span", { className: "text-sm font-sans text-foreground/80 group-hover:text-foreground transition-colors leading-snug", children: [
|
|
@@ -1358,14 +1366,14 @@ function AdventureCard({ adventure, labels }) {
|
|
|
1358
1366
|
type: "button",
|
|
1359
1367
|
onClick: () => {
|
|
1360
1368
|
var _a3;
|
|
1361
|
-
return canDec && ((_a3 = opt.onQuantityChange) == null ? void 0 : _a3.call(opt, opt.id, currentQty - 1));
|
|
1369
|
+
return !interactionsDisabled && canDec && ((_a3 = opt.onQuantityChange) == null ? void 0 : _a3.call(opt, opt.id, currentQty - 1));
|
|
1362
1370
|
},
|
|
1363
|
-
disabled: !canDec,
|
|
1371
|
+
disabled: interactionsDisabled || !canDec,
|
|
1364
1372
|
"aria-label": (_d2 = opt.decreaseQuantityLabel) != null ? _d2 : "Decrease quantity",
|
|
1365
1373
|
className: cn(
|
|
1366
1374
|
"h-7 w-7 rounded border border-border flex items-center justify-center text-sm font-semibold",
|
|
1367
1375
|
"transition-colors",
|
|
1368
|
-
canDec ? "hover:bg-muted cursor-pointer text-foreground" : "opacity-40 cursor-not-allowed text-muted-foreground"
|
|
1376
|
+
interactionsDisabled ? "opacity-40 cursor-not-allowed text-muted-foreground" : canDec ? "hover:bg-muted cursor-pointer text-foreground" : "opacity-40 cursor-not-allowed text-muted-foreground"
|
|
1369
1377
|
),
|
|
1370
1378
|
children: "\u2212"
|
|
1371
1379
|
}
|
|
@@ -1377,14 +1385,14 @@ function AdventureCard({ adventure, labels }) {
|
|
|
1377
1385
|
type: "button",
|
|
1378
1386
|
onClick: () => {
|
|
1379
1387
|
var _a3;
|
|
1380
|
-
return canInc && ((_a3 = opt.onQuantityChange) == null ? void 0 : _a3.call(opt, opt.id, currentQty + 1));
|
|
1388
|
+
return !interactionsDisabled && canInc && ((_a3 = opt.onQuantityChange) == null ? void 0 : _a3.call(opt, opt.id, currentQty + 1));
|
|
1381
1389
|
},
|
|
1382
|
-
disabled: !canInc,
|
|
1390
|
+
disabled: interactionsDisabled || !canInc,
|
|
1383
1391
|
"aria-label": (_e2 = opt.increaseQuantityLabel) != null ? _e2 : "Increase quantity",
|
|
1384
1392
|
className: cn(
|
|
1385
1393
|
"h-7 w-7 rounded border border-border flex items-center justify-center text-sm font-semibold",
|
|
1386
1394
|
"transition-colors",
|
|
1387
|
-
canInc ? "hover:bg-muted cursor-pointer text-foreground" : "opacity-40 cursor-not-allowed text-muted-foreground"
|
|
1395
|
+
interactionsDisabled ? "opacity-40 cursor-not-allowed text-muted-foreground" : canInc ? "hover:bg-muted cursor-pointer text-foreground" : "opacity-40 cursor-not-allowed text-muted-foreground"
|
|
1388
1396
|
),
|
|
1389
1397
|
children: "+"
|
|
1390
1398
|
}
|
|
@@ -1455,11 +1463,12 @@ function OfferSidebar({
|
|
|
1455
1463
|
onBook,
|
|
1456
1464
|
bookLabel,
|
|
1457
1465
|
bookDisabled,
|
|
1458
|
-
labels
|
|
1466
|
+
labels,
|
|
1467
|
+
bookHref
|
|
1459
1468
|
}) {
|
|
1460
1469
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1461
1470
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
1462
|
-
/* @__PURE__ */ jsxs("div", { className: "hidden lg:flex rounded-2xl border border-border bg-card p-5 flex-col gap-4", children: [
|
|
1471
|
+
!bookHref && /* @__PURE__ */ jsxs("div", { className: "hidden lg:flex rounded-2xl border border-border bg-card p-5 flex-col gap-4", children: [
|
|
1463
1472
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
1464
1473
|
/* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-widest text-muted-foreground font-heading mb-1", children: (_a = labels == null ? void 0 : labels.bookingTotal) != null ? _a : "Booking Total" }),
|
|
1465
1474
|
/* @__PURE__ */ jsx("p", { className: "text-3xl font-black text-primary font-heading leading-none", children: total })
|
|
@@ -1909,19 +1918,37 @@ function BookingConfirmedCard({
|
|
|
1909
1918
|
email,
|
|
1910
1919
|
message,
|
|
1911
1920
|
onBack,
|
|
1912
|
-
backLabel = "Back to offer"
|
|
1921
|
+
backLabel = "Back to offer",
|
|
1922
|
+
bookingNumber,
|
|
1923
|
+
bookingNumberLabel = "Your booking number is:",
|
|
1924
|
+
viewBookingHref,
|
|
1925
|
+
viewBookingLabel = "VIEW BOOKING"
|
|
1913
1926
|
}) {
|
|
1927
|
+
const hasBookingNumber = bookingNumber !== void 0 && bookingNumber !== null && bookingNumber !== "";
|
|
1914
1928
|
return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card p-8 flex flex-col items-center gap-6 text-center", children: [
|
|
1915
1929
|
/* @__PURE__ */ jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsx(CheckCircle2Icon, { className: "w-10 h-10 text-primary" }) }),
|
|
1916
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1930
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
1917
1931
|
/* @__PURE__ */ jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: title }),
|
|
1918
|
-
/* @__PURE__ */
|
|
1932
|
+
hasBookingNumber && /* @__PURE__ */ jsxs("p", { className: "text-sm text-foreground font-sans", children: [
|
|
1933
|
+
bookingNumberLabel,
|
|
1934
|
+
" ",
|
|
1935
|
+
/* @__PURE__ */ jsx("span", { className: "font-bold text-foreground font-heading", children: bookingNumber })
|
|
1936
|
+
] }),
|
|
1937
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: message != null ? message : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1919
1938
|
"A confirmation email has been sent to",
|
|
1920
1939
|
" ",
|
|
1921
1940
|
/* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: email || "your email" }),
|
|
1922
1941
|
". Our team will be in touch shortly."
|
|
1923
1942
|
] }) })
|
|
1924
1943
|
] }),
|
|
1944
|
+
viewBookingHref && /* @__PURE__ */ jsx(
|
|
1945
|
+
"a",
|
|
1946
|
+
{
|
|
1947
|
+
href: viewBookingHref,
|
|
1948
|
+
className: "rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase text-primary-foreground font-heading transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1949
|
+
children: viewBookingLabel
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1925
1952
|
onBack && /* @__PURE__ */ jsx(
|
|
1926
1953
|
"button",
|
|
1927
1954
|
{
|
|
@@ -2203,11 +2230,13 @@ function Offer({
|
|
|
2203
2230
|
summaryDiscountLine,
|
|
2204
2231
|
continueDisabled,
|
|
2205
2232
|
labels,
|
|
2233
|
+
confirmedState,
|
|
2234
|
+
interactionsDisabled,
|
|
2206
2235
|
className
|
|
2207
2236
|
}) {
|
|
2208
|
-
var _a, _b;
|
|
2237
|
+
var _a, _b, _c;
|
|
2209
2238
|
const [showBooking, setShowBooking] = React23.useState(false);
|
|
2210
|
-
const isShowingCheckout = !!checkoutSlot || showBooking;
|
|
2239
|
+
const isShowingCheckout = !confirmedState && (!!checkoutSlot || showBooking);
|
|
2211
2240
|
const handleBook = () => {
|
|
2212
2241
|
if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
|
|
2213
2242
|
onContinue == null ? void 0 : onContinue();
|
|
@@ -2217,13 +2246,27 @@ function Offer({
|
|
|
2217
2246
|
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
2218
2247
|
subtitle && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
|
|
2219
2248
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-6 lg:gap-8 items-start", children: [
|
|
2220
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2250
|
+
/* @__PURE__ */ jsx(
|
|
2251
|
+
BookingConfirmedCard,
|
|
2252
|
+
{
|
|
2253
|
+
title: (_a = confirmedState.title) != null ? _a : labels == null ? void 0 : labels.bookingConfirmed,
|
|
2254
|
+
email: confirmedState.email,
|
|
2255
|
+
message: confirmedState.message,
|
|
2256
|
+
bookingNumber: confirmedState.bookingNumber,
|
|
2257
|
+
bookingNumberLabel: confirmedState.bookingNumberLabel,
|
|
2258
|
+
viewBookingHref: confirmedState.viewBookingHref,
|
|
2259
|
+
viewBookingLabel: confirmedState.viewBookingLabel
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
confirmedState.belowSlot
|
|
2263
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2221
2264
|
/* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
2222
2265
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2223
2266
|
/* @__PURE__ */ jsx(MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
2224
|
-
/* @__PURE__ */ jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (
|
|
2267
|
+
/* @__PURE__ */ jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: (_b = labels == null ? void 0 : labels.includedAdventures) != null ? _b : "Included Adventures" })
|
|
2225
2268
|
] }),
|
|
2226
|
-
adventures.map((adventure) => /* @__PURE__ */ jsx(AdventureCard, { adventure, labels }, adventure.id))
|
|
2269
|
+
adventures.map((adventure) => /* @__PURE__ */ jsx(AdventureCard, { adventure, labels, interactionsDisabled }, adventure.id))
|
|
2227
2270
|
] }),
|
|
2228
2271
|
!isShowingCheckout && /* @__PURE__ */ jsx(
|
|
2229
2272
|
OfferSummarySection,
|
|
@@ -2250,7 +2293,7 @@ function Offer({
|
|
|
2250
2293
|
labels
|
|
2251
2294
|
}
|
|
2252
2295
|
))
|
|
2253
|
-
] }),
|
|
2296
|
+
] }) }),
|
|
2254
2297
|
/* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
|
|
2255
2298
|
OfferSidebar,
|
|
2256
2299
|
{
|
|
@@ -2259,13 +2302,14 @@ function Offer({
|
|
|
2259
2302
|
onBook: handleBook,
|
|
2260
2303
|
bookLabel: continueLabel,
|
|
2261
2304
|
bookDisabled: continueDisabled,
|
|
2262
|
-
labels
|
|
2305
|
+
labels,
|
|
2306
|
+
bookHref: confirmedState == null ? void 0 : confirmedState.viewBookingHref
|
|
2263
2307
|
}
|
|
2264
2308
|
) })
|
|
2265
2309
|
] }),
|
|
2266
|
-
!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: [
|
|
2310
|
+
!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: [
|
|
2267
2311
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
2268
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (
|
|
2312
|
+
/* @__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" }),
|
|
2269
2313
|
/* @__PURE__ */ jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
|
|
2270
2314
|
] }),
|
|
2271
2315
|
/* @__PURE__ */ jsx(
|
|
@@ -2273,10 +2317,12 @@ function Offer({
|
|
|
2273
2317
|
{
|
|
2274
2318
|
type: "button",
|
|
2275
2319
|
onClick: handleBook,
|
|
2320
|
+
disabled: continueDisabled,
|
|
2276
2321
|
className: cn(
|
|
2277
2322
|
"rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase",
|
|
2278
2323
|
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
2279
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
2324
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2325
|
+
continueDisabled && "opacity-50 pointer-events-none"
|
|
2280
2326
|
),
|
|
2281
2327
|
children: continueLabel
|
|
2282
2328
|
}
|