@planetaexo/design-system 0.46.3 → 0.48.1
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 +109 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +108 -1
- 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;
|
|
@@ -3188,6 +3194,29 @@ type StripeAppearance = typeof LIGHT;
|
|
|
3188
3194
|
|
|
3189
3195
|
declare function cn(...inputs: ClassValue[]): string;
|
|
3190
3196
|
|
|
3197
|
+
/**
|
|
3198
|
+
* formatCpf — formata um CPF brasileiro aplicando máscara `XXX.XXX.XXX-XX`.
|
|
3199
|
+
*
|
|
3200
|
+
* Idempotente: faz strip de caracteres não-numéricos antes de reformatar.
|
|
3201
|
+
* Aceita até 11 dígitos; truncamento via `slice(0, 11)` para evitar overflow.
|
|
3202
|
+
*/
|
|
3203
|
+
declare function formatCpf(value: string): string;
|
|
3204
|
+
/**
|
|
3205
|
+
* validateCpf — verifica se uma string é um CPF brasileiro válido conforme
|
|
3206
|
+
* algoritmo de dígito verificador.
|
|
3207
|
+
*
|
|
3208
|
+
* Critérios:
|
|
3209
|
+
* - Exatamente 11 dígitos (após strip de caracteres não-numéricos).
|
|
3210
|
+
* - Não pode ser sequência de dígitos iguais (`11111111111`, `22222222222`, …).
|
|
3211
|
+
* - Os dois dígitos verificadores precisam bater com o cálculo padrão.
|
|
3212
|
+
*
|
|
3213
|
+
* Usado pelo branch `document` do `FieldRenderer` em `RegistrationForm` para
|
|
3214
|
+
* decidir quando aplicar a máscara visual `formatCpf` — não para validar
|
|
3215
|
+
* obrigatoriedade do campo. Passaporte (com letras ou número diferente de
|
|
3216
|
+
* CPF) renderiza cru.
|
|
3217
|
+
*/
|
|
3218
|
+
declare function validateCpf(value: string): boolean;
|
|
3219
|
+
|
|
3191
3220
|
/**
|
|
3192
3221
|
* emailTokens — resolved design-token values for email components.
|
|
3193
3222
|
*
|
|
@@ -3296,4 +3325,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
3296
3325
|
config: LeadCapturePopupConfig;
|
|
3297
3326
|
}): react_jsx_runtime.JSX.Element | null;
|
|
3298
3327
|
|
|
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 };
|
|
3328
|
+
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, 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;
|
|
@@ -3188,6 +3194,29 @@ type StripeAppearance = typeof LIGHT;
|
|
|
3188
3194
|
|
|
3189
3195
|
declare function cn(...inputs: ClassValue[]): string;
|
|
3190
3196
|
|
|
3197
|
+
/**
|
|
3198
|
+
* formatCpf — formata um CPF brasileiro aplicando máscara `XXX.XXX.XXX-XX`.
|
|
3199
|
+
*
|
|
3200
|
+
* Idempotente: faz strip de caracteres não-numéricos antes de reformatar.
|
|
3201
|
+
* Aceita até 11 dígitos; truncamento via `slice(0, 11)` para evitar overflow.
|
|
3202
|
+
*/
|
|
3203
|
+
declare function formatCpf(value: string): string;
|
|
3204
|
+
/**
|
|
3205
|
+
* validateCpf — verifica se uma string é um CPF brasileiro válido conforme
|
|
3206
|
+
* algoritmo de dígito verificador.
|
|
3207
|
+
*
|
|
3208
|
+
* Critérios:
|
|
3209
|
+
* - Exatamente 11 dígitos (após strip de caracteres não-numéricos).
|
|
3210
|
+
* - Não pode ser sequência de dígitos iguais (`11111111111`, `22222222222`, …).
|
|
3211
|
+
* - Os dois dígitos verificadores precisam bater com o cálculo padrão.
|
|
3212
|
+
*
|
|
3213
|
+
* Usado pelo branch `document` do `FieldRenderer` em `RegistrationForm` para
|
|
3214
|
+
* decidir quando aplicar a máscara visual `formatCpf` — não para validar
|
|
3215
|
+
* obrigatoriedade do campo. Passaporte (com letras ou número diferente de
|
|
3216
|
+
* CPF) renderiza cru.
|
|
3217
|
+
*/
|
|
3218
|
+
declare function validateCpf(value: string): boolean;
|
|
3219
|
+
|
|
3191
3220
|
/**
|
|
3192
3221
|
* emailTokens — resolved design-token values for email components.
|
|
3193
3222
|
*
|
|
@@ -3296,4 +3325,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
3296
3325
|
config: LeadCapturePopupConfig;
|
|
3297
3326
|
}): react_jsx_runtime.JSX.Element | null;
|
|
3298
3327
|
|
|
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 };
|
|
3328
|
+
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, formatCpf, getStripeAppearance, itineraryDaySpecIcons, stripeAppearance, validateCpf, wrapEmailHtml };
|
package/dist/index.js
CHANGED
|
@@ -7360,6 +7360,37 @@ function BookingForm({
|
|
|
7360
7360
|
}
|
|
7361
7361
|
);
|
|
7362
7362
|
}
|
|
7363
|
+
|
|
7364
|
+
// src/lib/cpf.ts
|
|
7365
|
+
function formatCpf(value) {
|
|
7366
|
+
const digits = value.replace(/\D/g, "").slice(0, 11);
|
|
7367
|
+
if (digits.length <= 3) return digits;
|
|
7368
|
+
if (digits.length <= 6) return `${digits.slice(0, 3)}.${digits.slice(3)}`;
|
|
7369
|
+
if (digits.length <= 9) {
|
|
7370
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6)}`;
|
|
7371
|
+
}
|
|
7372
|
+
return `${digits.slice(0, 3)}.${digits.slice(3, 6)}.${digits.slice(6, 9)}-${digits.slice(9)}`;
|
|
7373
|
+
}
|
|
7374
|
+
function validateCpf(value) {
|
|
7375
|
+
const digits = value.replace(/\D/g, "");
|
|
7376
|
+
if (digits.length !== 11) return false;
|
|
7377
|
+
if (/^(\d)\1{10}$/.test(digits)) return false;
|
|
7378
|
+
let sum = 0;
|
|
7379
|
+
for (let i = 0; i < 9; i++) {
|
|
7380
|
+
sum += parseInt(digits[i], 10) * (10 - i);
|
|
7381
|
+
}
|
|
7382
|
+
let remainder = sum % 11;
|
|
7383
|
+
const firstDigit = remainder < 2 ? 0 : 11 - remainder;
|
|
7384
|
+
if (firstDigit !== parseInt(digits[9], 10)) return false;
|
|
7385
|
+
sum = 0;
|
|
7386
|
+
for (let i = 0; i < 10; i++) {
|
|
7387
|
+
sum += parseInt(digits[i], 10) * (11 - i);
|
|
7388
|
+
}
|
|
7389
|
+
remainder = sum % 11;
|
|
7390
|
+
const secondDigit = remainder < 2 ? 0 : 11 - remainder;
|
|
7391
|
+
if (secondDigit !== parseInt(digits[10], 10)) return false;
|
|
7392
|
+
return true;
|
|
7393
|
+
}
|
|
7363
7394
|
var DEFAULT_LABELS11 = {
|
|
7364
7395
|
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
7396
|
detailsSectionTitle: "Your details",
|
|
@@ -7982,6 +8013,82 @@ function FieldRenderer({
|
|
|
7982
8013
|
}
|
|
7983
8014
|
);
|
|
7984
8015
|
}
|
|
8016
|
+
if (field.type === "address") {
|
|
8017
|
+
return /* @__PURE__ */ jsx(
|
|
8018
|
+
FloatingInput,
|
|
8019
|
+
{
|
|
8020
|
+
label: field.label,
|
|
8021
|
+
required: field.required,
|
|
8022
|
+
disabled,
|
|
8023
|
+
autoComplete: "address-line1",
|
|
8024
|
+
value: typeof value === "string" ? value : "",
|
|
8025
|
+
onChange: (e) => onChange(e.target.value),
|
|
8026
|
+
error
|
|
8027
|
+
}
|
|
8028
|
+
);
|
|
8029
|
+
}
|
|
8030
|
+
if (field.type === "addressLine2") {
|
|
8031
|
+
return /* @__PURE__ */ jsx(
|
|
8032
|
+
FloatingInput,
|
|
8033
|
+
{
|
|
8034
|
+
label: field.label,
|
|
8035
|
+
required: field.required,
|
|
8036
|
+
disabled,
|
|
8037
|
+
autoComplete: "address-line2",
|
|
8038
|
+
value: typeof value === "string" ? value : "",
|
|
8039
|
+
onChange: (e) => onChange(e.target.value),
|
|
8040
|
+
error
|
|
8041
|
+
}
|
|
8042
|
+
);
|
|
8043
|
+
}
|
|
8044
|
+
if (field.type === "city") {
|
|
8045
|
+
return /* @__PURE__ */ jsx(
|
|
8046
|
+
FloatingInput,
|
|
8047
|
+
{
|
|
8048
|
+
label: field.label,
|
|
8049
|
+
required: field.required,
|
|
8050
|
+
disabled,
|
|
8051
|
+
autoComplete: "address-level2",
|
|
8052
|
+
value: typeof value === "string" ? value : "",
|
|
8053
|
+
onChange: (e) => onChange(e.target.value),
|
|
8054
|
+
error
|
|
8055
|
+
}
|
|
8056
|
+
);
|
|
8057
|
+
}
|
|
8058
|
+
if (field.type === "postalCode") {
|
|
8059
|
+
return /* @__PURE__ */ jsx(
|
|
8060
|
+
FloatingInput,
|
|
8061
|
+
{
|
|
8062
|
+
label: field.label,
|
|
8063
|
+
required: field.required,
|
|
8064
|
+
disabled,
|
|
8065
|
+
autoComplete: "postal-code",
|
|
8066
|
+
value: typeof value === "string" ? value : "",
|
|
8067
|
+
onChange: (e) => onChange(e.target.value),
|
|
8068
|
+
error
|
|
8069
|
+
}
|
|
8070
|
+
);
|
|
8071
|
+
}
|
|
8072
|
+
if (field.type === "document") {
|
|
8073
|
+
const raw = typeof value === "string" ? value : "";
|
|
8074
|
+
const displayValue = validateCpf(raw) ? formatCpf(raw) : raw;
|
|
8075
|
+
return /* @__PURE__ */ jsx(
|
|
8076
|
+
FloatingInput,
|
|
8077
|
+
{
|
|
8078
|
+
label: field.label,
|
|
8079
|
+
required: field.required,
|
|
8080
|
+
disabled,
|
|
8081
|
+
autoComplete: "off",
|
|
8082
|
+
value: displayValue,
|
|
8083
|
+
onChange: (e) => {
|
|
8084
|
+
const next = e.target.value;
|
|
8085
|
+
const hasLetters = /[a-zA-Z]/.test(next);
|
|
8086
|
+
onChange(hasLetters ? next : next.replace(/\D/g, ""));
|
|
8087
|
+
},
|
|
8088
|
+
error
|
|
8089
|
+
}
|
|
8090
|
+
);
|
|
8091
|
+
}
|
|
7985
8092
|
const htmlType = field.label.toLowerCase().includes("mail") ? "email" : "text";
|
|
7986
8093
|
return /* @__PURE__ */ jsx(
|
|
7987
8094
|
FloatingInput,
|
|
@@ -13873,6 +13980,6 @@ function LeadCapturePopup({
|
|
|
13873
13980
|
);
|
|
13874
13981
|
}
|
|
13875
13982
|
|
|
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 };
|
|
13983
|
+
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
13984
|
//# sourceMappingURL=index.js.map
|
|
13878
13985
|
//# sourceMappingURL=index.js.map
|