@planetaexo/design-system 0.17.0 → 0.19.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.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,15 @@ 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;
234
269
  className?: string;
235
270
  }
236
271
  interface BookingShellProps {
@@ -298,13 +333,21 @@ interface BookingConfirmedCardProps {
298
333
  onBack?: () => void;
299
334
  /** Label for the back button. Default: "Back to offer" */
300
335
  backLabel?: string;
336
+ /** Número da reserva exibido como "<bookingNumberLabel> <bookingNumber>" entre o título e a mensagem. Quando ausente/falsy, a linha não renderiza. */
337
+ bookingNumber?: number | string;
338
+ /** Rótulo da linha "Your booking number is:". Default EN: "Your booking number is:". */
339
+ bookingNumberLabel?: string;
340
+ /** URL para o botão CTA principal "VIEW BOOKING". Quando ausente, o botão não renderiza. */
341
+ viewBookingHref?: string;
342
+ /** Label do botão CTA principal. Default EN: "VIEW BOOKING". */
343
+ viewBookingLabel?: string;
301
344
  }
302
- declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
345
+ declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, bookingNumber, bookingNumberLabel, viewBookingHref, viewBookingLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
303
346
  /** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
304
347
  declare function OfferAdventureCard({ adventure }: {
305
348
  adventure: OfferAdventureItem;
306
349
  }): 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;
350
+ declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, className, }: OfferProps): react_jsx_runtime.JSX.Element;
308
351
 
309
352
  type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
310
353
  interface BookingTraveller {
@@ -1125,6 +1168,16 @@ interface RegistrationSuccessCardProps {
1125
1168
  /** Logo URL displayed above the title. Pass `null` to hide the logo. */
1126
1169
  logo?: string | null;
1127
1170
  logoAlt?: string;
1171
+ /**
1172
+ * Controls the green success check icon rendered above the title.
1173
+ * - `undefined` (default): legacy behavior — check renders only when `logo === undefined`
1174
+ * (i.e. only when no logo is passed at all). Preserves backward compatibility for
1175
+ * callers that pass a custom `logo` URL expecting it to replace the check.
1176
+ * - `true`: always renders the check icon, independently of `logo`. Use this when you
1177
+ * want a standalone logo (rendered outside the card) but still want the check inside.
1178
+ * - `false`: never renders the check icon.
1179
+ */
1180
+ showSuccessIcon?: boolean;
1128
1181
  /** Terms section rendered at the bottom of the card. */
1129
1182
  terms?: {
1130
1183
  markdown: string;
@@ -1181,7 +1234,7 @@ interface RegistrationSuccessCardProps {
1181
1234
  */
1182
1235
  labels?: RegistrationFormLabels;
1183
1236
  }
1184
- declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1237
+ declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1185
1238
 
1186
1239
  interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1187
1240
  label: string;
@@ -2031,4 +2084,4 @@ declare function LeadCapturePopup({ config: _config, }: {
2031
2084
  config: LeadCapturePopupConfig;
2032
2085
  }): react_jsx_runtime.JSX.Element | null;
2033
2086
 
2034
- 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 };
2087
+ 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,15 @@ 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;
234
269
  className?: string;
235
270
  }
236
271
  interface BookingShellProps {
@@ -298,13 +333,21 @@ interface BookingConfirmedCardProps {
298
333
  onBack?: () => void;
299
334
  /** Label for the back button. Default: "Back to offer" */
300
335
  backLabel?: string;
336
+ /** Número da reserva exibido como "<bookingNumberLabel> <bookingNumber>" entre o título e a mensagem. Quando ausente/falsy, a linha não renderiza. */
337
+ bookingNumber?: number | string;
338
+ /** Rótulo da linha "Your booking number is:". Default EN: "Your booking number is:". */
339
+ bookingNumberLabel?: string;
340
+ /** URL para o botão CTA principal "VIEW BOOKING". Quando ausente, o botão não renderiza. */
341
+ viewBookingHref?: string;
342
+ /** Label do botão CTA principal. Default EN: "VIEW BOOKING". */
343
+ viewBookingLabel?: string;
301
344
  }
302
- declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
345
+ declare function BookingConfirmedCard({ title, email, message, onBack, backLabel, bookingNumber, bookingNumberLabel, viewBookingHref, viewBookingLabel, }: BookingConfirmedCardProps): react_jsx_runtime.JSX.Element;
303
346
  /** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
304
347
  declare function OfferAdventureCard({ adventure }: {
305
348
  adventure: OfferAdventureItem;
306
349
  }): 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;
350
+ declare function Offer({ logo, logoAlt, title, subtitle, adventures, subtotal, total, depositInfo, agent, onContinue, continueLabel, externalBookingFlow, checkoutSlot, summaryNotesSlot, summaryDiscountLine, continueDisabled, labels, confirmedState, className, }: OfferProps): react_jsx_runtime.JSX.Element;
308
351
 
309
352
  type BookingStatus = "pending" | "confirmed" | "cancelled" | "completed" | "pendingRegistration" | "pendingPayment" | "pendingPaymentOverdue" | "complete";
310
353
  interface BookingTraveller {
@@ -1125,6 +1168,16 @@ interface RegistrationSuccessCardProps {
1125
1168
  /** Logo URL displayed above the title. Pass `null` to hide the logo. */
1126
1169
  logo?: string | null;
1127
1170
  logoAlt?: string;
1171
+ /**
1172
+ * Controls the green success check icon rendered above the title.
1173
+ * - `undefined` (default): legacy behavior — check renders only when `logo === undefined`
1174
+ * (i.e. only when no logo is passed at all). Preserves backward compatibility for
1175
+ * callers that pass a custom `logo` URL expecting it to replace the check.
1176
+ * - `true`: always renders the check icon, independently of `logo`. Use this when you
1177
+ * want a standalone logo (rendered outside the card) but still want the check inside.
1178
+ * - `false`: never renders the check icon.
1179
+ */
1180
+ showSuccessIcon?: boolean;
1128
1181
  /** Terms section rendered at the bottom of the card. */
1129
1182
  terms?: {
1130
1183
  markdown: string;
@@ -1181,7 +1234,7 @@ interface RegistrationSuccessCardProps {
1181
1234
  */
1182
1235
  labels?: RegistrationFormLabels;
1183
1236
  }
1184
- declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1237
+ declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1185
1238
 
1186
1239
  interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1187
1240
  label: string;
@@ -2031,4 +2084,4 @@ declare function LeadCapturePopup({ config: _config, }: {
2031
2084
  config: LeadCapturePopupConfig;
2032
2085
  }): react_jsx_runtime.JSX.Element | null;
2033
2086
 
2034
- 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 };
2087
+ 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
@@ -1455,7 +1455,9 @@ function OfferSidebar({
1455
1455
  onBook,
1456
1456
  bookLabel,
1457
1457
  bookDisabled,
1458
- labels
1458
+ labels,
1459
+ bookHref,
1460
+ bookHrefLabel
1459
1461
  }) {
1460
1462
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
1461
1463
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
@@ -1464,7 +1466,18 @@ function OfferSidebar({
1464
1466
  /* @__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
1467
  /* @__PURE__ */ jsx("p", { className: "text-3xl font-black text-primary font-heading leading-none", children: total })
1466
1468
  ] }),
1467
- /* @__PURE__ */ jsx(
1469
+ bookHref ? /* @__PURE__ */ jsx(
1470
+ "a",
1471
+ {
1472
+ href: bookHref,
1473
+ className: cn(
1474
+ "w-full inline-flex items-center justify-center rounded-full bg-primary py-3 text-sm font-bold tracking-wide uppercase",
1475
+ "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
1476
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1477
+ ),
1478
+ children: bookHrefLabel != null ? bookHrefLabel : bookLabel
1479
+ }
1480
+ ) : /* @__PURE__ */ jsx(
1468
1481
  "button",
1469
1482
  {
1470
1483
  type: "button",
@@ -1909,19 +1922,37 @@ function BookingConfirmedCard({
1909
1922
  email,
1910
1923
  message,
1911
1924
  onBack,
1912
- backLabel = "Back to offer"
1925
+ backLabel = "Back to offer",
1926
+ bookingNumber,
1927
+ bookingNumberLabel = "Your booking number is:",
1928
+ viewBookingHref,
1929
+ viewBookingLabel = "VIEW BOOKING"
1913
1930
  }) {
1931
+ const hasBookingNumber = bookingNumber !== void 0 && bookingNumber !== null && bookingNumber !== "";
1914
1932
  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
1933
  /* @__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: [
1934
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
1917
1935
  /* @__PURE__ */ jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: title }),
1918
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: message != null ? message : /* @__PURE__ */ jsxs(Fragment, { children: [
1936
+ hasBookingNumber && /* @__PURE__ */ jsxs("p", { className: "text-sm text-foreground font-sans", children: [
1937
+ bookingNumberLabel,
1938
+ " ",
1939
+ /* @__PURE__ */ jsx("span", { className: "font-bold text-foreground font-heading", children: bookingNumber })
1940
+ ] }),
1941
+ /* @__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
1942
  "A confirmation email has been sent to",
1920
1943
  " ",
1921
1944
  /* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: email || "your email" }),
1922
1945
  ". Our team will be in touch shortly."
1923
1946
  ] }) })
1924
1947
  ] }),
1948
+ viewBookingHref && /* @__PURE__ */ jsx(
1949
+ "a",
1950
+ {
1951
+ href: viewBookingHref,
1952
+ 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",
1953
+ children: viewBookingLabel
1954
+ }
1955
+ ),
1925
1956
  onBack && /* @__PURE__ */ jsx(
1926
1957
  "button",
1927
1958
  {
@@ -2203,11 +2234,12 @@ function Offer({
2203
2234
  summaryDiscountLine,
2204
2235
  continueDisabled,
2205
2236
  labels,
2237
+ confirmedState,
2206
2238
  className
2207
2239
  }) {
2208
- var _a, _b;
2240
+ var _a, _b, _c;
2209
2241
  const [showBooking, setShowBooking] = React23.useState(false);
2210
- const isShowingCheckout = !!checkoutSlot || showBooking;
2242
+ const isShowingCheckout = !confirmedState && (!!checkoutSlot || showBooking);
2211
2243
  const handleBook = () => {
2212
2244
  if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
2213
2245
  onContinue == null ? void 0 : onContinue();
@@ -2217,11 +2249,25 @@ function Offer({
2217
2249
  /* @__PURE__ */ jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
2218
2250
  subtitle && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground font-sans space-y-1 leading-relaxed", children: subtitle }),
2219
2251
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-6 lg:gap-8 items-start", children: [
2220
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6", children: [
2252
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: confirmedState ? /* @__PURE__ */ jsxs(Fragment, { children: [
2253
+ /* @__PURE__ */ jsx(
2254
+ BookingConfirmedCard,
2255
+ {
2256
+ title: (_a = confirmedState.title) != null ? _a : labels == null ? void 0 : labels.bookingConfirmed,
2257
+ email: confirmedState.email,
2258
+ message: confirmedState.message,
2259
+ bookingNumber: confirmedState.bookingNumber,
2260
+ bookingNumberLabel: confirmedState.bookingNumberLabel,
2261
+ viewBookingHref: confirmedState.viewBookingHref,
2262
+ viewBookingLabel: confirmedState.viewBookingLabel
2263
+ }
2264
+ ),
2265
+ confirmedState.belowSlot
2266
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
2221
2267
  /* @__PURE__ */ jsxs("section", { className: "flex flex-col gap-5", children: [
2222
2268
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
2223
2269
  /* @__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: (_a = labels == null ? void 0 : labels.includedAdventures) != null ? _a : "Included Adventures" })
2270
+ /* @__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
2271
  ] }),
2226
2272
  adventures.map((adventure) => /* @__PURE__ */ jsx(AdventureCard, { adventure, labels }, adventure.id))
2227
2273
  ] }),
@@ -2250,7 +2296,7 @@ function Offer({
2250
2296
  labels
2251
2297
  }
2252
2298
  ))
2253
- ] }),
2299
+ ] }) }),
2254
2300
  /* @__PURE__ */ jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsx(
2255
2301
  OfferSidebar,
2256
2302
  {
@@ -2259,13 +2305,15 @@ function Offer({
2259
2305
  onBook: handleBook,
2260
2306
  bookLabel: continueLabel,
2261
2307
  bookDisabled: continueDisabled,
2262
- labels
2308
+ labels,
2309
+ bookHref: confirmedState == null ? void 0 : confirmedState.viewBookingHref,
2310
+ bookHrefLabel: confirmedState == null ? void 0 : confirmedState.viewBookingLabel
2263
2311
  }
2264
2312
  ) })
2265
2313
  ] }),
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: [
2314
+ !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
2315
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
2268
- /* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-widest text-muted-foreground font-heading", children: (_b = labels == null ? void 0 : labels.total) != null ? _b : "Total" }),
2316
+ /* @__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
2317
  /* @__PURE__ */ jsx("span", { className: "text-xl font-black text-primary font-heading leading-tight", children: total })
2270
2318
  ] }),
2271
2319
  /* @__PURE__ */ jsx(
@@ -2273,10 +2321,12 @@ function Offer({
2273
2321
  {
2274
2322
  type: "button",
2275
2323
  onClick: handleBook,
2324
+ disabled: continueDisabled,
2276
2325
  className: cn(
2277
2326
  "rounded-full bg-primary px-6 py-3 text-sm font-bold tracking-wide uppercase",
2278
2327
  "text-primary-foreground font-heading transition-colors hover:bg-primary/90",
2279
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
2328
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
2329
+ continueDisabled && "opacity-50 pointer-events-none"
2280
2330
  ),
2281
2331
  children: continueLabel
2282
2332
  }
@@ -6045,6 +6095,7 @@ function RegistrationSuccessCard({
6045
6095
  actions,
6046
6096
  logo,
6047
6097
  logoAlt = "PlanetaEXO",
6098
+ showSuccessIcon,
6048
6099
  terms,
6049
6100
  termsLayout = "summary",
6050
6101
  termsLabels,
@@ -6098,7 +6149,7 @@ function RegistrationSuccessCard({
6098
6149
  className: "h-10 w-auto object-contain"
6099
6150
  }
6100
6151
  ),
6101
- logo === void 0 && /* @__PURE__ */ jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(CircleCheckIcon, { size: 28 }) }),
6152
+ (showSuccessIcon != null ? showSuccessIcon : logo === void 0) && /* @__PURE__ */ jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsx(CircleCheckIcon, { size: 28 }) }),
6102
6153
  /* @__PURE__ */ jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
6103
6154
  message && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-ui", children: message })
6104
6155
  ] }),