@planetaexo/design-system 0.46.3 → 0.48.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 +119 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -8
- package/dist/index.d.ts +66 -8
- package/dist/index.js +118 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1856,7 +1856,13 @@ declare function BookingForm({ defaultValues, onSubmit, submitLabel, loading, sh
|
|
|
1856
1856
|
type RegistrationFieldType = "text" | "textarea" | "number" | "date" | "birthDate" | "select" | "radio" | "checkbox" | "name" | "phone" | "nationality" | "emergencyContact"
|
|
1857
1857
|
/** Texto longo semântico: a resposta do viajante a "expectativas" da aventura.
|
|
1858
1858
|
* Renderiza como `textarea`; identificado pelo tipo (não por id/label). */
|
|
1859
|
-
| "travellersExpectations"
|
|
1859
|
+
| "travellersExpectations"
|
|
1860
|
+
/** Tipos semânticos de endereço/identidade. Renderizam como FloatingInput com
|
|
1861
|
+
* `autoComplete` hint apropriado para acelerar preenchimento (D4/D7 do PRD
|
|
1862
|
+
* semantic-types-form-fields). `document` aplica máscara CPF condicional
|
|
1863
|
+
* (D3): só formata quando valor não tem letras e ≤11 dígitos — preserva
|
|
1864
|
+
* passport/internacional sem alteração. */
|
|
1865
|
+
| "city" | "address" | "addressLine2" | "postalCode" | "document";
|
|
1860
1866
|
interface RegistrationFieldOption {
|
|
1861
1867
|
value: string;
|
|
1862
1868
|
label: string;
|
|
@@ -2565,6 +2571,18 @@ interface TripCardProps {
|
|
|
2565
2571
|
}
|
|
2566
2572
|
declare function TripCard(props: TripCardProps): react_jsx_runtime.JSX.Element;
|
|
2567
2573
|
|
|
2574
|
+
/**
|
|
2575
|
+
* Rich configuration for the overlay `<SiteHeader>` rendered inside the
|
|
2576
|
+
* hero. Accepts everything `<SiteHeader>` accepts EXCEPT `position` and
|
|
2577
|
+
* `className`: position is hardcoded to `"overlay"` so the header scrolls
|
|
2578
|
+
* away with the hero, and the hero composes its own layout around it.
|
|
2579
|
+
*
|
|
2580
|
+
* Use this shape (instead of `boolean | SiteHeaderLink[]`) when you need
|
|
2581
|
+
* more than just a links array — e.g. to wire the language switcher
|
|
2582
|
+
* (`languages` + `currentLanguage` + `onLanguageChange`) or override the
|
|
2583
|
+
* logo / variant from a consuming page.
|
|
2584
|
+
*/
|
|
2585
|
+
type TripSiteHeaderConfig = Omit<SiteHeaderProps, "position" | "className">;
|
|
2568
2586
|
interface TripDuration {
|
|
2569
2587
|
/** Total number of days */
|
|
2570
2588
|
days: number;
|
|
@@ -2600,8 +2618,15 @@ interface TripHeaderProps {
|
|
|
2600
2618
|
* row. Use it to slot in a small Trustpilot widget, sponsor badge, etc.
|
|
2601
2619
|
*/
|
|
2602
2620
|
belowMeta?: React.ReactNode;
|
|
2603
|
-
/**
|
|
2604
|
-
|
|
2621
|
+
/**
|
|
2622
|
+
* Render an overlay `<SiteHeader>` inside the hero. Accepts:
|
|
2623
|
+
* - `boolean` — minimal: just renders the header with the default
|
|
2624
|
+
* link list (used by the styleguide showcase).
|
|
2625
|
+
* - `SiteHeaderLink[]` — a custom links array (existing simple usage).
|
|
2626
|
+
* - {@link TripSiteHeaderConfig} — full SiteHeaderProps minus
|
|
2627
|
+
* `position`/`className`, e.g. to wire languages + onLanguageChange.
|
|
2628
|
+
*/
|
|
2629
|
+
siteHeader?: boolean | SiteHeaderLink[] | TripSiteHeaderConfig;
|
|
2605
2630
|
/** Alinhado ao TripPage — reservado para densidade / hero v2 */
|
|
2606
2631
|
uiVariant?: "v1" | "v2";
|
|
2607
2632
|
className?: string;
|
|
@@ -2815,8 +2840,16 @@ interface TripPageProps {
|
|
|
2815
2840
|
priceInfo?: React.ReactNode;
|
|
2816
2841
|
onBook?: () => void;
|
|
2817
2842
|
bookLabel?: string;
|
|
2818
|
-
/**
|
|
2819
|
-
|
|
2843
|
+
/**
|
|
2844
|
+
* Render an overlay SiteHeader inside the hero. Accepts:
|
|
2845
|
+
* - `boolean` — minimal: default link list (styleguide usage).
|
|
2846
|
+
* - `SiteHeaderLink[]` — custom links only.
|
|
2847
|
+
* - {@link TripSiteHeaderConfig} — full SiteHeader config minus
|
|
2848
|
+
* `position`/`className`. Use this to wire the language switcher
|
|
2849
|
+
* (`languages` + `currentLanguage` + `onLanguageChange`) or to
|
|
2850
|
+
* override variant / logo from a consuming page.
|
|
2851
|
+
*/
|
|
2852
|
+
siteHeader?: boolean | SiteHeaderLink[] | TripSiteHeaderConfig;
|
|
2820
2853
|
/** Preset de layout (ilha WP / styleguide). @default v1 */
|
|
2821
2854
|
uiVariant?: "v1" | "v2";
|
|
2822
2855
|
/** Feature flags para ramos de UI sem duplicar componentes. */
|
|
@@ -2868,12 +2901,14 @@ declare function Toast({ message, variant, onClose, duration, className, }: Toas
|
|
|
2868
2901
|
|
|
2869
2902
|
declare function Dialog({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
2870
2903
|
declare function DialogClose({ ...props }: Dialog$1.Close.Props): react_jsx_runtime.JSX.Element;
|
|
2871
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
2904
|
+
declare function DialogContent({ className, children, showCloseButton, closeLabel, ...props }: Dialog$1.Popup.Props & {
|
|
2872
2905
|
showCloseButton?: boolean;
|
|
2906
|
+
closeLabel?: string;
|
|
2873
2907
|
}): react_jsx_runtime.JSX.Element;
|
|
2874
2908
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2875
|
-
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
2909
|
+
declare function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }: React.ComponentProps<"div"> & {
|
|
2876
2910
|
showCloseButton?: boolean;
|
|
2911
|
+
closeLabel?: string;
|
|
2877
2912
|
}): react_jsx_runtime.JSX.Element;
|
|
2878
2913
|
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): react_jsx_runtime.JSX.Element;
|
|
2879
2914
|
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): react_jsx_runtime.JSX.Element;
|
|
@@ -3188,6 +3223,29 @@ type StripeAppearance = typeof LIGHT;
|
|
|
3188
3223
|
|
|
3189
3224
|
declare function cn(...inputs: ClassValue[]): string;
|
|
3190
3225
|
|
|
3226
|
+
/**
|
|
3227
|
+
* formatCpf — formata um CPF brasileiro aplicando máscara `XXX.XXX.XXX-XX`.
|
|
3228
|
+
*
|
|
3229
|
+
* Idempotente: faz strip de caracteres não-numéricos antes de reformatar.
|
|
3230
|
+
* Aceita até 11 dígitos; truncamento via `slice(0, 11)` para evitar overflow.
|
|
3231
|
+
*/
|
|
3232
|
+
declare function formatCpf(value: string): string;
|
|
3233
|
+
/**
|
|
3234
|
+
* validateCpf — verifica se uma string é um CPF brasileiro válido conforme
|
|
3235
|
+
* algoritmo de dígito verificador.
|
|
3236
|
+
*
|
|
3237
|
+
* Critérios:
|
|
3238
|
+
* - Exatamente 11 dígitos (após strip de caracteres não-numéricos).
|
|
3239
|
+
* - Não pode ser sequência de dígitos iguais (`11111111111`, `22222222222`, …).
|
|
3240
|
+
* - Os dois dígitos verificadores precisam bater com o cálculo padrão.
|
|
3241
|
+
*
|
|
3242
|
+
* Usado pelo branch `document` do `FieldRenderer` em `RegistrationForm` para
|
|
3243
|
+
* decidir quando aplicar a máscara visual `formatCpf` — não para validar
|
|
3244
|
+
* obrigatoriedade do campo. Passaporte (com letras ou número diferente de
|
|
3245
|
+
* CPF) renderiza cru.
|
|
3246
|
+
*/
|
|
3247
|
+
declare function validateCpf(value: string): boolean;
|
|
3248
|
+
|
|
3191
3249
|
/**
|
|
3192
3250
|
* emailTokens — resolved design-token values for email components.
|
|
3193
3251
|
*
|
|
@@ -3296,4 +3354,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
3296
3354
|
config: LeadCapturePopupConfig;
|
|
3297
3355
|
}): react_jsx_runtime.JSX.Element | null;
|
|
3298
3356
|
|
|
3299
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingAdventureCard, type BookingAdventureCardLabels, type BookingAdventureCardLineItem, type BookingAdventureCardProps, type BookingAdventureCardSlots, type BookingAdventureCardTraveller, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, BookingCreatedEmail, type BookingCreatedEmailLabels, type BookingCreatedEmailProps, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingPaymentConfirmationEmail, type BookingPaymentConfirmationEmailLabels, type BookingPaymentConfirmationEmailProps, BookingShell, type BookingShellProps, type BookingStatus, BookingSummary, type BookingSummaryLineItem, type BookingSummaryProps, type BookingSummaryRow, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, type CurrencyEstimate, 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, ItineraryDay, type ItineraryDayPhoto, type ItineraryDayPhotoLayout, type ItineraryDayProps, type ItineraryDaySpec, 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, type PartnerBookingCreatedAgentContactLinks, PartnerBookingCreatedEmail, type PartnerBookingCreatedEmailLabels, type PartnerBookingCreatedEmailProps, type PartnerConfirmationAgentContactLinks, PartnerConfirmationEmail, type PartnerConfirmationEmailExpectationRow, type PartnerConfirmationEmailLabels, type PartnerConfirmationEmailProps, PaymentAmountSelector, type PaymentAmountSelectorProps, PaymentDetailsBlock, type PaymentDetailsBlockFooterBanner, type PaymentDetailsBlockLabels, type PaymentDetailsBlockProps, type PaymentDetailsBlockRow, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, type PaymentReceiptAdventure, type PaymentReceiptAdventureLineItem, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, type PaymentReminderAgentContactLinks, PaymentReminderEmail, type PaymentReminderEmailAdventure, type PaymentReminderEmailLabels, type PaymentReminderEmailLineItem, type PaymentReminderEmailProps, type PaymentReminderEmailVariantLabels, type PaymentReminderVariant, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, 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, RegistrationProgressBar, type RegistrationProgressBarProps, type RegistrationProgressTone, type RegistrationReminderAdventureBlock, type RegistrationReminderAgentContactLinks, RegistrationReminderEmail, type RegistrationReminderEmailLabels, type RegistrationReminderEmailProps, type RegistrationReminderEmailVariantLabels, type RegistrationReminderIndividualAgentContactLinks, RegistrationReminderIndividualEmail, type RegistrationReminderIndividualEmailLabels, type RegistrationReminderIndividualEmailProps, type RegistrationReminderIndividualRoute, type RegistrationReminderIndividualSlug, type RegistrationReminderIndividualVariantLabels, type RegistrationReminderSlug, 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, TransferDetailsBlock, type TransferDetailsBlockProps, 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 TripItineraryDay, type TripItineraryStep, type TripMeetingPoint, type TripOverviewHighlight, TripPage, type TripPageLabels, type TripPageProps, type TripReview, type TripSectionIcons, type TripTrustpilotWidget, TrustpilotEmbed, type TrustpilotWidgetConfig, buttonVariants, cn, emailTokens, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, wrapEmailHtml };
|
|
3357
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingAdventureCard, type BookingAdventureCardLabels, type BookingAdventureCardLineItem, type BookingAdventureCardProps, type BookingAdventureCardSlots, type BookingAdventureCardTraveller, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, BookingCreatedEmail, type BookingCreatedEmailLabels, type BookingCreatedEmailProps, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingPaymentConfirmationEmail, type BookingPaymentConfirmationEmailLabels, type BookingPaymentConfirmationEmailProps, BookingShell, type BookingShellProps, type BookingStatus, BookingSummary, type BookingSummaryLineItem, type BookingSummaryProps, type BookingSummaryRow, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, type CurrencyEstimate, 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, ItineraryDay, type ItineraryDayPhoto, type ItineraryDayPhotoLayout, type ItineraryDayProps, type ItineraryDaySpec, 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, type PartnerBookingCreatedAgentContactLinks, PartnerBookingCreatedEmail, type PartnerBookingCreatedEmailLabels, type PartnerBookingCreatedEmailProps, type PartnerConfirmationAgentContactLinks, PartnerConfirmationEmail, type PartnerConfirmationEmailExpectationRow, type PartnerConfirmationEmailLabels, type PartnerConfirmationEmailProps, PaymentAmountSelector, type PaymentAmountSelectorProps, PaymentDetailsBlock, type PaymentDetailsBlockFooterBanner, type PaymentDetailsBlockLabels, type PaymentDetailsBlockProps, type PaymentDetailsBlockRow, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, type PaymentReceiptAdventure, type PaymentReceiptAdventureLineItem, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, type PaymentReminderAgentContactLinks, PaymentReminderEmail, type PaymentReminderEmailAdventure, type PaymentReminderEmailLabels, type PaymentReminderEmailLineItem, type PaymentReminderEmailProps, type PaymentReminderEmailVariantLabels, type PaymentReminderVariant, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, 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, RegistrationProgressBar, type RegistrationProgressBarProps, type RegistrationProgressTone, type RegistrationReminderAdventureBlock, type RegistrationReminderAgentContactLinks, RegistrationReminderEmail, type RegistrationReminderEmailLabels, type RegistrationReminderEmailProps, type RegistrationReminderEmailVariantLabels, type RegistrationReminderIndividualAgentContactLinks, RegistrationReminderIndividualEmail, type RegistrationReminderIndividualEmailLabels, type RegistrationReminderIndividualEmailProps, type RegistrationReminderIndividualRoute, type RegistrationReminderIndividualSlug, type RegistrationReminderIndividualVariantLabels, type RegistrationReminderSlug, 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, TransferDetailsBlock, type TransferDetailsBlockProps, 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 TripItineraryDay, type TripItineraryStep, type TripMeetingPoint, type TripOverviewHighlight, TripPage, type TripPageLabels, type TripPageProps, type TripReview, type TripSectionIcons, type TripSiteHeaderConfig, type TripTrustpilotWidget, TrustpilotEmbed, type TrustpilotWidgetConfig, buttonVariants, cn, emailTokens, formatCpf, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, validateCpf, wrapEmailHtml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1856,7 +1856,13 @@ declare function BookingForm({ defaultValues, onSubmit, submitLabel, loading, sh
|
|
|
1856
1856
|
type RegistrationFieldType = "text" | "textarea" | "number" | "date" | "birthDate" | "select" | "radio" | "checkbox" | "name" | "phone" | "nationality" | "emergencyContact"
|
|
1857
1857
|
/** Texto longo semântico: a resposta do viajante a "expectativas" da aventura.
|
|
1858
1858
|
* Renderiza como `textarea`; identificado pelo tipo (não por id/label). */
|
|
1859
|
-
| "travellersExpectations"
|
|
1859
|
+
| "travellersExpectations"
|
|
1860
|
+
/** Tipos semânticos de endereço/identidade. Renderizam como FloatingInput com
|
|
1861
|
+
* `autoComplete` hint apropriado para acelerar preenchimento (D4/D7 do PRD
|
|
1862
|
+
* semantic-types-form-fields). `document` aplica máscara CPF condicional
|
|
1863
|
+
* (D3): só formata quando valor não tem letras e ≤11 dígitos — preserva
|
|
1864
|
+
* passport/internacional sem alteração. */
|
|
1865
|
+
| "city" | "address" | "addressLine2" | "postalCode" | "document";
|
|
1860
1866
|
interface RegistrationFieldOption {
|
|
1861
1867
|
value: string;
|
|
1862
1868
|
label: string;
|
|
@@ -2565,6 +2571,18 @@ interface TripCardProps {
|
|
|
2565
2571
|
}
|
|
2566
2572
|
declare function TripCard(props: TripCardProps): react_jsx_runtime.JSX.Element;
|
|
2567
2573
|
|
|
2574
|
+
/**
|
|
2575
|
+
* Rich configuration for the overlay `<SiteHeader>` rendered inside the
|
|
2576
|
+
* hero. Accepts everything `<SiteHeader>` accepts EXCEPT `position` and
|
|
2577
|
+
* `className`: position is hardcoded to `"overlay"` so the header scrolls
|
|
2578
|
+
* away with the hero, and the hero composes its own layout around it.
|
|
2579
|
+
*
|
|
2580
|
+
* Use this shape (instead of `boolean | SiteHeaderLink[]`) when you need
|
|
2581
|
+
* more than just a links array — e.g. to wire the language switcher
|
|
2582
|
+
* (`languages` + `currentLanguage` + `onLanguageChange`) or override the
|
|
2583
|
+
* logo / variant from a consuming page.
|
|
2584
|
+
*/
|
|
2585
|
+
type TripSiteHeaderConfig = Omit<SiteHeaderProps, "position" | "className">;
|
|
2568
2586
|
interface TripDuration {
|
|
2569
2587
|
/** Total number of days */
|
|
2570
2588
|
days: number;
|
|
@@ -2600,8 +2618,15 @@ interface TripHeaderProps {
|
|
|
2600
2618
|
* row. Use it to slot in a small Trustpilot widget, sponsor badge, etc.
|
|
2601
2619
|
*/
|
|
2602
2620
|
belowMeta?: React.ReactNode;
|
|
2603
|
-
/**
|
|
2604
|
-
|
|
2621
|
+
/**
|
|
2622
|
+
* Render an overlay `<SiteHeader>` inside the hero. Accepts:
|
|
2623
|
+
* - `boolean` — minimal: just renders the header with the default
|
|
2624
|
+
* link list (used by the styleguide showcase).
|
|
2625
|
+
* - `SiteHeaderLink[]` — a custom links array (existing simple usage).
|
|
2626
|
+
* - {@link TripSiteHeaderConfig} — full SiteHeaderProps minus
|
|
2627
|
+
* `position`/`className`, e.g. to wire languages + onLanguageChange.
|
|
2628
|
+
*/
|
|
2629
|
+
siteHeader?: boolean | SiteHeaderLink[] | TripSiteHeaderConfig;
|
|
2605
2630
|
/** Alinhado ao TripPage — reservado para densidade / hero v2 */
|
|
2606
2631
|
uiVariant?: "v1" | "v2";
|
|
2607
2632
|
className?: string;
|
|
@@ -2815,8 +2840,16 @@ interface TripPageProps {
|
|
|
2815
2840
|
priceInfo?: React.ReactNode;
|
|
2816
2841
|
onBook?: () => void;
|
|
2817
2842
|
bookLabel?: string;
|
|
2818
|
-
/**
|
|
2819
|
-
|
|
2843
|
+
/**
|
|
2844
|
+
* Render an overlay SiteHeader inside the hero. Accepts:
|
|
2845
|
+
* - `boolean` — minimal: default link list (styleguide usage).
|
|
2846
|
+
* - `SiteHeaderLink[]` — custom links only.
|
|
2847
|
+
* - {@link TripSiteHeaderConfig} — full SiteHeader config minus
|
|
2848
|
+
* `position`/`className`. Use this to wire the language switcher
|
|
2849
|
+
* (`languages` + `currentLanguage` + `onLanguageChange`) or to
|
|
2850
|
+
* override variant / logo from a consuming page.
|
|
2851
|
+
*/
|
|
2852
|
+
siteHeader?: boolean | SiteHeaderLink[] | TripSiteHeaderConfig;
|
|
2820
2853
|
/** Preset de layout (ilha WP / styleguide). @default v1 */
|
|
2821
2854
|
uiVariant?: "v1" | "v2";
|
|
2822
2855
|
/** Feature flags para ramos de UI sem duplicar componentes. */
|
|
@@ -2868,12 +2901,14 @@ declare function Toast({ message, variant, onClose, duration, className, }: Toas
|
|
|
2868
2901
|
|
|
2869
2902
|
declare function Dialog({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
2870
2903
|
declare function DialogClose({ ...props }: Dialog$1.Close.Props): react_jsx_runtime.JSX.Element;
|
|
2871
|
-
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
2904
|
+
declare function DialogContent({ className, children, showCloseButton, closeLabel, ...props }: Dialog$1.Popup.Props & {
|
|
2872
2905
|
showCloseButton?: boolean;
|
|
2906
|
+
closeLabel?: string;
|
|
2873
2907
|
}): react_jsx_runtime.JSX.Element;
|
|
2874
2908
|
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
2875
|
-
declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
|
|
2909
|
+
declare function DialogFooter({ className, showCloseButton, closeLabel, children, ...props }: React.ComponentProps<"div"> & {
|
|
2876
2910
|
showCloseButton?: boolean;
|
|
2911
|
+
closeLabel?: string;
|
|
2877
2912
|
}): react_jsx_runtime.JSX.Element;
|
|
2878
2913
|
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): react_jsx_runtime.JSX.Element;
|
|
2879
2914
|
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): react_jsx_runtime.JSX.Element;
|
|
@@ -3188,6 +3223,29 @@ type StripeAppearance = typeof LIGHT;
|
|
|
3188
3223
|
|
|
3189
3224
|
declare function cn(...inputs: ClassValue[]): string;
|
|
3190
3225
|
|
|
3226
|
+
/**
|
|
3227
|
+
* formatCpf — formata um CPF brasileiro aplicando máscara `XXX.XXX.XXX-XX`.
|
|
3228
|
+
*
|
|
3229
|
+
* Idempotente: faz strip de caracteres não-numéricos antes de reformatar.
|
|
3230
|
+
* Aceita até 11 dígitos; truncamento via `slice(0, 11)` para evitar overflow.
|
|
3231
|
+
*/
|
|
3232
|
+
declare function formatCpf(value: string): string;
|
|
3233
|
+
/**
|
|
3234
|
+
* validateCpf — verifica se uma string é um CPF brasileiro válido conforme
|
|
3235
|
+
* algoritmo de dígito verificador.
|
|
3236
|
+
*
|
|
3237
|
+
* Critérios:
|
|
3238
|
+
* - Exatamente 11 dígitos (após strip de caracteres não-numéricos).
|
|
3239
|
+
* - Não pode ser sequência de dígitos iguais (`11111111111`, `22222222222`, …).
|
|
3240
|
+
* - Os dois dígitos verificadores precisam bater com o cálculo padrão.
|
|
3241
|
+
*
|
|
3242
|
+
* Usado pelo branch `document` do `FieldRenderer` em `RegistrationForm` para
|
|
3243
|
+
* decidir quando aplicar a máscara visual `formatCpf` — não para validar
|
|
3244
|
+
* obrigatoriedade do campo. Passaporte (com letras ou número diferente de
|
|
3245
|
+
* CPF) renderiza cru.
|
|
3246
|
+
*/
|
|
3247
|
+
declare function validateCpf(value: string): boolean;
|
|
3248
|
+
|
|
3191
3249
|
/**
|
|
3192
3250
|
* emailTokens — resolved design-token values for email components.
|
|
3193
3251
|
*
|
|
@@ -3296,4 +3354,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
3296
3354
|
config: LeadCapturePopupConfig;
|
|
3297
3355
|
}): react_jsx_runtime.JSX.Element | null;
|
|
3298
3356
|
|
|
3299
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingAdventureCard, type BookingAdventureCardLabels, type BookingAdventureCardLineItem, type BookingAdventureCardProps, type BookingAdventureCardSlots, type BookingAdventureCardTraveller, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, BookingCreatedEmail, type BookingCreatedEmailLabels, type BookingCreatedEmailProps, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingPaymentConfirmationEmail, type BookingPaymentConfirmationEmailLabels, type BookingPaymentConfirmationEmailProps, BookingShell, type BookingShellProps, type BookingStatus, BookingSummary, type BookingSummaryLineItem, type BookingSummaryProps, type BookingSummaryRow, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, type CurrencyEstimate, 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, ItineraryDay, type ItineraryDayPhoto, type ItineraryDayPhotoLayout, type ItineraryDayProps, type ItineraryDaySpec, 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, type PartnerBookingCreatedAgentContactLinks, PartnerBookingCreatedEmail, type PartnerBookingCreatedEmailLabels, type PartnerBookingCreatedEmailProps, type PartnerConfirmationAgentContactLinks, PartnerConfirmationEmail, type PartnerConfirmationEmailExpectationRow, type PartnerConfirmationEmailLabels, type PartnerConfirmationEmailProps, PaymentAmountSelector, type PaymentAmountSelectorProps, PaymentDetailsBlock, type PaymentDetailsBlockFooterBanner, type PaymentDetailsBlockLabels, type PaymentDetailsBlockProps, type PaymentDetailsBlockRow, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, type PaymentReceiptAdventure, type PaymentReceiptAdventureLineItem, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, type PaymentReminderAgentContactLinks, PaymentReminderEmail, type PaymentReminderEmailAdventure, type PaymentReminderEmailLabels, type PaymentReminderEmailLineItem, type PaymentReminderEmailProps, type PaymentReminderEmailVariantLabels, type PaymentReminderVariant, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, 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, RegistrationProgressBar, type RegistrationProgressBarProps, type RegistrationProgressTone, type RegistrationReminderAdventureBlock, type RegistrationReminderAgentContactLinks, RegistrationReminderEmail, type RegistrationReminderEmailLabels, type RegistrationReminderEmailProps, type RegistrationReminderEmailVariantLabels, type RegistrationReminderIndividualAgentContactLinks, RegistrationReminderIndividualEmail, type RegistrationReminderIndividualEmailLabels, type RegistrationReminderIndividualEmailProps, type RegistrationReminderIndividualRoute, type RegistrationReminderIndividualSlug, type RegistrationReminderIndividualVariantLabels, type RegistrationReminderSlug, 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, TransferDetailsBlock, type TransferDetailsBlockProps, 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 TripItineraryDay, type TripItineraryStep, type TripMeetingPoint, type TripOverviewHighlight, TripPage, type TripPageLabels, type TripPageProps, type TripReview, type TripSectionIcons, type TripTrustpilotWidget, TrustpilotEmbed, type TrustpilotWidgetConfig, buttonVariants, cn, emailTokens, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, wrapEmailHtml };
|
|
3357
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, AgentContactCard, type AgentContactCardProps, Alert, type AlertProps, type AlertVariant, BirthDateField, type BirthDateFieldProps, type BookingAdventure, BookingAdventureCard, type BookingAdventureCardLabels, type BookingAdventureCardLineItem, type BookingAdventureCardProps, type BookingAdventureCardSlots, type BookingAdventureCardTraveller, BookingConfirmedCard, type BookingConfirmedCardProps, type BookingContact, BookingCreatedEmail, type BookingCreatedEmailLabels, type BookingCreatedEmailProps, type BookingDepositInfo, BookingDetails, type BookingDetailsLabels, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailProps, BookingPaymentConfirmationEmail, type BookingPaymentConfirmationEmailLabels, type BookingPaymentConfirmationEmailProps, BookingShell, type BookingShellProps, type BookingStatus, BookingSummary, type BookingSummaryLineItem, type BookingSummaryProps, type BookingSummaryRow, type BookingTraveller, Button, type ButtonProps, COUNTRIES, type ConfirmationAdventure, type ConfirmationDepositInfo, type ConfirmationLineItem, type ConfirmationTraveller, CounterField, type CounterFieldProps, type CountryOption, CountrySearchField, type CountrySearchFieldProps, type CurrencyEstimate, 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, ItineraryDay, type ItineraryDayPhoto, type ItineraryDayPhotoLayout, type ItineraryDayProps, type ItineraryDaySpec, 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, type PartnerBookingCreatedAgentContactLinks, PartnerBookingCreatedEmail, type PartnerBookingCreatedEmailLabels, type PartnerBookingCreatedEmailProps, type PartnerConfirmationAgentContactLinks, PartnerConfirmationEmail, type PartnerConfirmationEmailExpectationRow, type PartnerConfirmationEmailLabels, type PartnerConfirmationEmailProps, PaymentAmountSelector, type PaymentAmountSelectorProps, PaymentDetailsBlock, type PaymentDetailsBlockFooterBanner, type PaymentDetailsBlockLabels, type PaymentDetailsBlockProps, type PaymentDetailsBlockRow, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, type PaymentReceiptAdventure, type PaymentReceiptAdventureLineItem, PaymentReceiptEmail, type PaymentReceiptEmailLabels, type PaymentReceiptEmailProps, type PaymentReminderAgentContactLinks, PaymentReminderEmail, type PaymentReminderEmailAdventure, type PaymentReminderEmailLabels, type PaymentReminderEmailLineItem, type PaymentReminderEmailProps, type PaymentReminderEmailVariantLabels, type PaymentReminderVariant, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, 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, RegistrationProgressBar, type RegistrationProgressBarProps, type RegistrationProgressTone, type RegistrationReminderAdventureBlock, type RegistrationReminderAgentContactLinks, RegistrationReminderEmail, type RegistrationReminderEmailLabels, type RegistrationReminderEmailProps, type RegistrationReminderEmailVariantLabels, type RegistrationReminderIndividualAgentContactLinks, RegistrationReminderIndividualEmail, type RegistrationReminderIndividualEmailLabels, type RegistrationReminderIndividualEmailProps, type RegistrationReminderIndividualRoute, type RegistrationReminderIndividualSlug, type RegistrationReminderIndividualVariantLabels, type RegistrationReminderSlug, 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, TransferDetailsBlock, type TransferDetailsBlockProps, 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 TripItineraryDay, type TripItineraryStep, type TripMeetingPoint, type TripOverviewHighlight, TripPage, type TripPageLabels, type TripPageProps, type TripReview, type TripSectionIcons, type TripSiteHeaderConfig, type TripTrustpilotWidget, TrustpilotEmbed, type TrustpilotWidgetConfig, buttonVariants, cn, emailTokens, formatCpf, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, validateCpf, wrapEmailHtml };
|
package/dist/index.js
CHANGED
|
@@ -198,11 +198,13 @@ function DialogContent(_a) {
|
|
|
198
198
|
var _b = _a, {
|
|
199
199
|
className,
|
|
200
200
|
children,
|
|
201
|
-
showCloseButton = true
|
|
201
|
+
showCloseButton = true,
|
|
202
|
+
closeLabel = "Close"
|
|
202
203
|
} = _b, props = __objRest(_b, [
|
|
203
204
|
"className",
|
|
204
205
|
"children",
|
|
205
|
-
"showCloseButton"
|
|
206
|
+
"showCloseButton",
|
|
207
|
+
"closeLabel"
|
|
206
208
|
]);
|
|
207
209
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
208
210
|
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
@@ -234,7 +236,7 @@ function DialogContent(_a) {
|
|
|
234
236
|
XIcon,
|
|
235
237
|
{}
|
|
236
238
|
),
|
|
237
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
239
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: closeLabel })
|
|
238
240
|
]
|
|
239
241
|
}
|
|
240
242
|
)
|
|
@@ -257,10 +259,12 @@ function DialogFooter(_a) {
|
|
|
257
259
|
var _b = _a, {
|
|
258
260
|
className,
|
|
259
261
|
showCloseButton = false,
|
|
262
|
+
closeLabel = "Close",
|
|
260
263
|
children
|
|
261
264
|
} = _b, props = __objRest(_b, [
|
|
262
265
|
"className",
|
|
263
266
|
"showCloseButton",
|
|
267
|
+
"closeLabel",
|
|
264
268
|
"children"
|
|
265
269
|
]);
|
|
266
270
|
return /* @__PURE__ */ jsxs(
|
|
@@ -274,7 +278,7 @@ function DialogFooter(_a) {
|
|
|
274
278
|
}, props), {
|
|
275
279
|
children: [
|
|
276
280
|
children,
|
|
277
|
-
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { render: /* @__PURE__ */ jsx(Button2, { variant: "outline" }), children:
|
|
281
|
+
showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { render: /* @__PURE__ */ jsx(Button2, { variant: "outline" }), children: closeLabel })
|
|
278
282
|
]
|
|
279
283
|
})
|
|
280
284
|
);
|
|
@@ -7360,6 +7364,37 @@ function BookingForm({
|
|
|
7360
7364
|
}
|
|
7361
7365
|
);
|
|
7362
7366
|
}
|
|
7367
|
+
|
|
7368
|
+
// src/lib/cpf.ts
|
|
7369
|
+
function formatCpf(value) {
|
|
7370
|
+
const digits = value.replace(/\D/g, "").slice(0, 11);
|
|
7371
|
+
if (digits.length <= 3) return digits;
|
|
7372
|
+
if (digits.length <= 6) return `${digits.slice(0, 3)}.${digits.slice(3)}`;
|
|
7373
|
+
if (digits.length <= 9) {
|
|
7374
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6)}`;
|
|
7375
|
+
}
|
|
7376
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6, 9)}-${digits.slice(9)}`;
|
|
7377
|
+
}
|
|
7378
|
+
function validateCpf(value) {
|
|
7379
|
+
const digits = value.replace(/\D/g, "");
|
|
7380
|
+
if (digits.length !== 11) return false;
|
|
7381
|
+
if (/^(\d)\1{10}$/.test(digits)) return false;
|
|
7382
|
+
let sum = 0;
|
|
7383
|
+
for (let i = 0; i < 9; i++) {
|
|
7384
|
+
sum += parseInt(digits[i], 10) * (10 - i);
|
|
7385
|
+
}
|
|
7386
|
+
let remainder = sum % 11;
|
|
7387
|
+
const firstDigit = remainder < 2 ? 0 : 11 - remainder;
|
|
7388
|
+
if (firstDigit !== parseInt(digits[9], 10)) return false;
|
|
7389
|
+
sum = 0;
|
|
7390
|
+
for (let i = 0; i < 10; i++) {
|
|
7391
|
+
sum += parseInt(digits[i], 10) * (11 - i);
|
|
7392
|
+
}
|
|
7393
|
+
remainder = sum % 11;
|
|
7394
|
+
const secondDigit = remainder < 2 ? 0 : 11 - remainder;
|
|
7395
|
+
if (secondDigit !== parseInt(digits[10], 10)) return false;
|
|
7396
|
+
return true;
|
|
7397
|
+
}
|
|
7363
7398
|
var DEFAULT_LABELS11 = {
|
|
7364
7399
|
formSubtitle: "To confirm your participation, please complete this short form. It's required for all travellers and helps us coordinate logistics with our local partners and tailor the experience to you.",
|
|
7365
7400
|
detailsSectionTitle: "Your details",
|
|
@@ -7982,6 +8017,82 @@ function FieldRenderer({
|
|
|
7982
8017
|
}
|
|
7983
8018
|
);
|
|
7984
8019
|
}
|
|
8020
|
+
if (field.type === "address") {
|
|
8021
|
+
return /* @__PURE__ */ jsx(
|
|
8022
|
+
FloatingInput,
|
|
8023
|
+
{
|
|
8024
|
+
label: field.label,
|
|
8025
|
+
required: field.required,
|
|
8026
|
+
disabled,
|
|
8027
|
+
autoComplete: "address-line1",
|
|
8028
|
+
value: typeof value === "string" ? value : "",
|
|
8029
|
+
onChange: (e) => onChange(e.target.value),
|
|
8030
|
+
error
|
|
8031
|
+
}
|
|
8032
|
+
);
|
|
8033
|
+
}
|
|
8034
|
+
if (field.type === "addressLine2") {
|
|
8035
|
+
return /* @__PURE__ */ jsx(
|
|
8036
|
+
FloatingInput,
|
|
8037
|
+
{
|
|
8038
|
+
label: field.label,
|
|
8039
|
+
required: field.required,
|
|
8040
|
+
disabled,
|
|
8041
|
+
autoComplete: "address-line2",
|
|
8042
|
+
value: typeof value === "string" ? value : "",
|
|
8043
|
+
onChange: (e) => onChange(e.target.value),
|
|
8044
|
+
error
|
|
8045
|
+
}
|
|
8046
|
+
);
|
|
8047
|
+
}
|
|
8048
|
+
if (field.type === "city") {
|
|
8049
|
+
return /* @__PURE__ */ jsx(
|
|
8050
|
+
FloatingInput,
|
|
8051
|
+
{
|
|
8052
|
+
label: field.label,
|
|
8053
|
+
required: field.required,
|
|
8054
|
+
disabled,
|
|
8055
|
+
autoComplete: "address-level2",
|
|
8056
|
+
value: typeof value === "string" ? value : "",
|
|
8057
|
+
onChange: (e) => onChange(e.target.value),
|
|
8058
|
+
error
|
|
8059
|
+
}
|
|
8060
|
+
);
|
|
8061
|
+
}
|
|
8062
|
+
if (field.type === "postalCode") {
|
|
8063
|
+
return /* @__PURE__ */ jsx(
|
|
8064
|
+
FloatingInput,
|
|
8065
|
+
{
|
|
8066
|
+
label: field.label,
|
|
8067
|
+
required: field.required,
|
|
8068
|
+
disabled,
|
|
8069
|
+
autoComplete: "postal-code",
|
|
8070
|
+
value: typeof value === "string" ? value : "",
|
|
8071
|
+
onChange: (e) => onChange(e.target.value),
|
|
8072
|
+
error
|
|
8073
|
+
}
|
|
8074
|
+
);
|
|
8075
|
+
}
|
|
8076
|
+
if (field.type === "document") {
|
|
8077
|
+
const raw = typeof value === "string" ? value : "";
|
|
8078
|
+
const displayValue = validateCpf(raw) ? formatCpf(raw) : raw;
|
|
8079
|
+
return /* @__PURE__ */ jsx(
|
|
8080
|
+
FloatingInput,
|
|
8081
|
+
{
|
|
8082
|
+
label: field.label,
|
|
8083
|
+
required: field.required,
|
|
8084
|
+
disabled,
|
|
8085
|
+
autoComplete: "off",
|
|
8086
|
+
value: displayValue,
|
|
8087
|
+
onChange: (e) => {
|
|
8088
|
+
const next = e.target.value;
|
|
8089
|
+
const hasLetters = /[a-zA-Z]/.test(next);
|
|
8090
|
+
onChange(hasLetters ? next : next.replace(/\D/g, ""));
|
|
8091
|
+
},
|
|
8092
|
+
error
|
|
8093
|
+
}
|
|
8094
|
+
);
|
|
8095
|
+
}
|
|
7985
8096
|
const htmlType = field.label.toLowerCase().includes("mail") ? "email" : "text";
|
|
7986
8097
|
return /* @__PURE__ */ jsx(
|
|
7987
8098
|
FloatingInput,
|
|
@@ -11918,10 +12029,9 @@ function TripHeader({
|
|
|
11918
12029
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" }),
|
|
11919
12030
|
siteHeader && /* @__PURE__ */ jsx(
|
|
11920
12031
|
SiteHeader,
|
|
11921
|
-
{
|
|
11922
|
-
links: Array.isArray(siteHeader) ? siteHeader : void 0,
|
|
12032
|
+
__spreadProps(__spreadValues({}, Array.isArray(siteHeader) ? { links: siteHeader } : typeof siteHeader === "object" ? siteHeader : {}), {
|
|
11923
12033
|
position: "overlay"
|
|
11924
|
-
}
|
|
12034
|
+
})
|
|
11925
12035
|
),
|
|
11926
12036
|
!videoUrl && showCarousel && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11927
12037
|
/* @__PURE__ */ jsx(
|
|
@@ -13873,6 +13983,6 @@ function LeadCapturePopup({
|
|
|
13873
13983
|
);
|
|
13874
13984
|
}
|
|
13875
13985
|
|
|
13876
|
-
export { ActivityCard, AgentContactCard, Alert, BirthDateField, BookingAdventureCard, BookingConfirmedCard, BookingCreatedEmail, BookingDetails, BookingForm, BookingOtpEmail, BookingPaymentConfirmationEmail, BookingShell, BookingSummary, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, ItineraryDay, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PartnerBookingCreatedEmail, PartnerConfirmationEmail, PaymentAmountSelector, PaymentDetailsBlock, PaymentMethodSelector, PaymentModalShell, PaymentReceiptEmail, PaymentReminderEmail, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationProgressBar, RegistrationReminderEmail, RegistrationReminderIndividualEmail, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TransferDetailsBlock, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, TrustpilotEmbed, buttonVariants, cn, emailTokens, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, wrapEmailHtml };
|
|
13986
|
+
export { ActivityCard, AgentContactCard, Alert, BirthDateField, BookingAdventureCard, BookingConfirmedCard, BookingCreatedEmail, BookingDetails, BookingForm, BookingOtpEmail, BookingPaymentConfirmationEmail, BookingShell, BookingSummary, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, ItineraryDay, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PartnerBookingCreatedEmail, PartnerConfirmationEmail, PaymentAmountSelector, PaymentDetailsBlock, PaymentMethodSelector, PaymentModalShell, PaymentReceiptEmail, PaymentReminderEmail, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationProgressBar, RegistrationReminderEmail, RegistrationReminderIndividualEmail, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TransferDetailsBlock, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, TrustpilotEmbed, buttonVariants, cn, emailTokens, formatCpf, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, validateCpf, wrapEmailHtml };
|
|
13877
13987
|
//# sourceMappingURL=index.js.map
|
|
13878
13988
|
//# sourceMappingURL=index.js.map
|