@planetaexo/design-system 0.4.21 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +134 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -5
- package/dist/index.d.ts +19 -5
- package/dist/index.js +134 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -612,9 +612,10 @@ interface RegistrationFormProps {
|
|
|
612
612
|
dateFormatter?: (iso: string | undefined) => string;
|
|
613
613
|
labels?: RegistrationFormLabels;
|
|
614
614
|
className?: string;
|
|
615
|
+
readOnly?: boolean;
|
|
615
616
|
}
|
|
616
617
|
declare const TERMS_ACCEPT_KEY = "__registrationTermsAccepted";
|
|
617
|
-
declare function RegistrationForm({ logo, logoAlt, heroImage, heroImageAlt, title, subtitle, adventure, booking, traveller, fields, values, defaultValues, onChange, onSubmit, onValidate, externalErrors, terms, includeTerms, loading, error, defaultPhoneCountry, dateFormatter, labels, className, }: RegistrationFormProps): react_jsx_runtime.JSX.Element;
|
|
618
|
+
declare function RegistrationForm({ logo, logoAlt, heroImage, heroImageAlt, title, subtitle, adventure, booking, traveller, fields, values, defaultValues, onChange, onSubmit, onValidate, externalErrors, terms, includeTerms, loading, error, defaultPhoneCountry, dateFormatter, labels, className, readOnly, }: RegistrationFormProps): react_jsx_runtime.JSX.Element;
|
|
618
619
|
interface RegistrationSuccessCardProps {
|
|
619
620
|
title?: string;
|
|
620
621
|
message?: string;
|
|
@@ -665,16 +666,18 @@ interface CountrySearchFieldProps {
|
|
|
665
666
|
countries?: CountryOption[];
|
|
666
667
|
placeholder?: string;
|
|
667
668
|
className?: string;
|
|
669
|
+
disabled?: boolean;
|
|
668
670
|
}
|
|
669
671
|
declare const COUNTRIES: CountryOption[];
|
|
670
|
-
declare function CountrySearchField({ value, onChange, required, label, countries, placeholder, className, }: CountrySearchFieldProps): react_jsx_runtime.JSX.Element;
|
|
672
|
+
declare function CountrySearchField({ value, onChange, required, label, countries, placeholder, className, disabled, }: CountrySearchFieldProps): react_jsx_runtime.JSX.Element;
|
|
671
673
|
|
|
672
674
|
interface PhoneCountrySelectProps {
|
|
673
675
|
value: string;
|
|
674
676
|
onChange: (code: string) => void;
|
|
675
677
|
className?: string;
|
|
678
|
+
disabled?: boolean;
|
|
676
679
|
}
|
|
677
|
-
declare function PhoneCountrySelect({ value, onChange, className, }: PhoneCountrySelectProps): react_jsx_runtime.JSX.Element;
|
|
680
|
+
declare function PhoneCountrySelect({ value, onChange, className, disabled, }: PhoneCountrySelectProps): react_jsx_runtime.JSX.Element;
|
|
678
681
|
|
|
679
682
|
interface CounterFieldProps {
|
|
680
683
|
label: string;
|
|
@@ -707,8 +710,9 @@ interface BirthDateFieldProps {
|
|
|
707
710
|
onChange: (date: Date | undefined) => void;
|
|
708
711
|
error?: string;
|
|
709
712
|
className?: string;
|
|
713
|
+
disabled?: boolean;
|
|
710
714
|
}
|
|
711
|
-
declare function BirthDateField({ label, required, value, onChange, error, className, }: BirthDateFieldProps): react_jsx_runtime.JSX.Element;
|
|
715
|
+
declare function BirthDateField({ label, required, value, onChange, error, className, disabled, }: BirthDateFieldProps): react_jsx_runtime.JSX.Element;
|
|
712
716
|
|
|
713
717
|
interface FilterItem {
|
|
714
718
|
id: string;
|
|
@@ -1033,6 +1037,16 @@ interface AlertProps {
|
|
|
1033
1037
|
}
|
|
1034
1038
|
declare function Alert({ variant, children, className }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
1035
1039
|
|
|
1040
|
+
type ToastVariant = "info" | "success" | "warning" | "error";
|
|
1041
|
+
interface ToastProps {
|
|
1042
|
+
message: string;
|
|
1043
|
+
variant?: ToastVariant;
|
|
1044
|
+
onClose?: () => void;
|
|
1045
|
+
duration?: number;
|
|
1046
|
+
className?: string;
|
|
1047
|
+
}
|
|
1048
|
+
declare function Toast({ message, variant, onClose, duration, className, }: ToastProps): React.ReactPortal | null;
|
|
1049
|
+
|
|
1036
1050
|
declare function Dialog({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
1037
1051
|
declare function DialogClose({ ...props }: Dialog$1.Close.Props): react_jsx_runtime.JSX.Element;
|
|
1038
1052
|
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
@@ -1463,4 +1477,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
1463
1477
|
config: LeadCapturePopupConfig;
|
|
1464
1478
|
}): react_jsx_runtime.JSX.Element | null;
|
|
1465
1479
|
|
|
1466
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, 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 BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailLabels, 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 OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, 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, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, 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 };
|
|
1480
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, 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 BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailLabels, 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 OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, 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, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, 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
|
@@ -612,9 +612,10 @@ interface RegistrationFormProps {
|
|
|
612
612
|
dateFormatter?: (iso: string | undefined) => string;
|
|
613
613
|
labels?: RegistrationFormLabels;
|
|
614
614
|
className?: string;
|
|
615
|
+
readOnly?: boolean;
|
|
615
616
|
}
|
|
616
617
|
declare const TERMS_ACCEPT_KEY = "__registrationTermsAccepted";
|
|
617
|
-
declare function RegistrationForm({ logo, logoAlt, heroImage, heroImageAlt, title, subtitle, adventure, booking, traveller, fields, values, defaultValues, onChange, onSubmit, onValidate, externalErrors, terms, includeTerms, loading, error, defaultPhoneCountry, dateFormatter, labels, className, }: RegistrationFormProps): react_jsx_runtime.JSX.Element;
|
|
618
|
+
declare function RegistrationForm({ logo, logoAlt, heroImage, heroImageAlt, title, subtitle, adventure, booking, traveller, fields, values, defaultValues, onChange, onSubmit, onValidate, externalErrors, terms, includeTerms, loading, error, defaultPhoneCountry, dateFormatter, labels, className, readOnly, }: RegistrationFormProps): react_jsx_runtime.JSX.Element;
|
|
618
619
|
interface RegistrationSuccessCardProps {
|
|
619
620
|
title?: string;
|
|
620
621
|
message?: string;
|
|
@@ -665,16 +666,18 @@ interface CountrySearchFieldProps {
|
|
|
665
666
|
countries?: CountryOption[];
|
|
666
667
|
placeholder?: string;
|
|
667
668
|
className?: string;
|
|
669
|
+
disabled?: boolean;
|
|
668
670
|
}
|
|
669
671
|
declare const COUNTRIES: CountryOption[];
|
|
670
|
-
declare function CountrySearchField({ value, onChange, required, label, countries, placeholder, className, }: CountrySearchFieldProps): react_jsx_runtime.JSX.Element;
|
|
672
|
+
declare function CountrySearchField({ value, onChange, required, label, countries, placeholder, className, disabled, }: CountrySearchFieldProps): react_jsx_runtime.JSX.Element;
|
|
671
673
|
|
|
672
674
|
interface PhoneCountrySelectProps {
|
|
673
675
|
value: string;
|
|
674
676
|
onChange: (code: string) => void;
|
|
675
677
|
className?: string;
|
|
678
|
+
disabled?: boolean;
|
|
676
679
|
}
|
|
677
|
-
declare function PhoneCountrySelect({ value, onChange, className, }: PhoneCountrySelectProps): react_jsx_runtime.JSX.Element;
|
|
680
|
+
declare function PhoneCountrySelect({ value, onChange, className, disabled, }: PhoneCountrySelectProps): react_jsx_runtime.JSX.Element;
|
|
678
681
|
|
|
679
682
|
interface CounterFieldProps {
|
|
680
683
|
label: string;
|
|
@@ -707,8 +710,9 @@ interface BirthDateFieldProps {
|
|
|
707
710
|
onChange: (date: Date | undefined) => void;
|
|
708
711
|
error?: string;
|
|
709
712
|
className?: string;
|
|
713
|
+
disabled?: boolean;
|
|
710
714
|
}
|
|
711
|
-
declare function BirthDateField({ label, required, value, onChange, error, className, }: BirthDateFieldProps): react_jsx_runtime.JSX.Element;
|
|
715
|
+
declare function BirthDateField({ label, required, value, onChange, error, className, disabled, }: BirthDateFieldProps): react_jsx_runtime.JSX.Element;
|
|
712
716
|
|
|
713
717
|
interface FilterItem {
|
|
714
718
|
id: string;
|
|
@@ -1033,6 +1037,16 @@ interface AlertProps {
|
|
|
1033
1037
|
}
|
|
1034
1038
|
declare function Alert({ variant, children, className }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
1035
1039
|
|
|
1040
|
+
type ToastVariant = "info" | "success" | "warning" | "error";
|
|
1041
|
+
interface ToastProps {
|
|
1042
|
+
message: string;
|
|
1043
|
+
variant?: ToastVariant;
|
|
1044
|
+
onClose?: () => void;
|
|
1045
|
+
duration?: number;
|
|
1046
|
+
className?: string;
|
|
1047
|
+
}
|
|
1048
|
+
declare function Toast({ message, variant, onClose, duration, className, }: ToastProps): React.ReactPortal | null;
|
|
1049
|
+
|
|
1036
1050
|
declare function Dialog({ ...props }: Dialog$1.Root.Props): react_jsx_runtime.JSX.Element;
|
|
1037
1051
|
declare function DialogClose({ ...props }: Dialog$1.Close.Props): react_jsx_runtime.JSX.Element;
|
|
1038
1052
|
declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog$1.Popup.Props & {
|
|
@@ -1463,4 +1477,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
1463
1477
|
config: LeadCapturePopupConfig;
|
|
1464
1478
|
}): react_jsx_runtime.JSX.Element | null;
|
|
1465
1479
|
|
|
1466
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, 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 BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailLabels, 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 OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, 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, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, 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 };
|
|
1480
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, 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 BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingOtpEmail, type BookingOtpEmailLabels, 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 OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PaymentAmountSelector, type PaymentAmountSelectorProps, type PaymentMethodOption, PaymentMethodSelector, type PaymentMethodSelectorProps, PaymentModalShell, type PaymentModalShellProps, 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, TravellerFormInviteEmail, type TravellerFormInviteEmailLabels, type TravellerFormInviteEmailProps, type TravellerFormInviteLink, 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
|
@@ -15,6 +15,7 @@ import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox';
|
|
|
15
15
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
16
16
|
import { mergeProps } from '@base-ui/react/merge-props';
|
|
17
17
|
import { useRender } from '@base-ui/react/use-render';
|
|
18
|
+
import { createPortal } from 'react-dom';
|
|
18
19
|
import { Input as Input$1 } from '@base-ui/react/input';
|
|
19
20
|
|
|
20
21
|
var __defProp = Object.defineProperty;
|
|
@@ -607,7 +608,8 @@ var PHONE_COUNTRIES = [...PHONE_PRIORITY, ...PHONE_REST];
|
|
|
607
608
|
function PhoneCountrySelect({
|
|
608
609
|
value,
|
|
609
610
|
onChange,
|
|
610
|
-
className
|
|
611
|
+
className,
|
|
612
|
+
disabled
|
|
611
613
|
}) {
|
|
612
614
|
var _a;
|
|
613
615
|
const [open, setOpen] = React22.useState(false);
|
|
@@ -631,6 +633,7 @@ function PhoneCountrySelect({
|
|
|
631
633
|
activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
|
|
632
634
|
}, [open]);
|
|
633
635
|
const handleSelect = (code) => {
|
|
636
|
+
if (disabled) return;
|
|
634
637
|
onChange(code);
|
|
635
638
|
setOpen(false);
|
|
636
639
|
};
|
|
@@ -639,14 +642,19 @@ function PhoneCountrySelect({
|
|
|
639
642
|
"button",
|
|
640
643
|
{
|
|
641
644
|
type: "button",
|
|
642
|
-
onClick: () =>
|
|
645
|
+
onClick: () => {
|
|
646
|
+
if (disabled) return;
|
|
647
|
+
setOpen((v) => !v);
|
|
648
|
+
},
|
|
643
649
|
"aria-haspopup": "listbox",
|
|
644
650
|
"aria-expanded": open,
|
|
651
|
+
disabled,
|
|
645
652
|
className: cn(
|
|
646
653
|
"flex h-14 items-center gap-1.5 rounded-l-lg border border-r-0 border-border bg-muted",
|
|
647
654
|
"px-3 font-ui text-sm text-foreground transition-colors",
|
|
648
655
|
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
649
|
-
open && "border-primary ring-1 ring-primary"
|
|
656
|
+
open && "border-primary ring-1 ring-primary",
|
|
657
|
+
disabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
650
658
|
),
|
|
651
659
|
children: [
|
|
652
660
|
/* @__PURE__ */ jsx("span", { className: "text-base leading-none", children: selected.flag }),
|
|
@@ -918,7 +926,8 @@ function BirthDateField({
|
|
|
918
926
|
value,
|
|
919
927
|
onChange,
|
|
920
928
|
error,
|
|
921
|
-
className
|
|
929
|
+
className,
|
|
930
|
+
disabled
|
|
922
931
|
}) {
|
|
923
932
|
const [open, setOpen] = React22.useState(false);
|
|
924
933
|
const [text, setText] = React22.useState(
|
|
@@ -983,8 +992,9 @@ function BirthDateField({
|
|
|
983
992
|
inputMode: "numeric",
|
|
984
993
|
value: text,
|
|
985
994
|
onChange: handleTextChange,
|
|
995
|
+
disabled,
|
|
986
996
|
placeholder: "dd/mm/yyyy",
|
|
987
|
-
className: "block h-full w-full bg-transparent px-3 pt-5 pb-2 text-base text-foreground font-ui focus:outline-none placeholder:text-muted-foreground/50"
|
|
997
|
+
className: "block h-full w-full bg-transparent px-3 pt-5 pb-2 text-base text-foreground font-ui focus:outline-none placeholder:text-muted-foreground/50 disabled:opacity-50 disabled:cursor-not-allowed"
|
|
988
998
|
}
|
|
989
999
|
)
|
|
990
1000
|
] }),
|
|
@@ -992,10 +1002,14 @@ function BirthDateField({
|
|
|
992
1002
|
"button",
|
|
993
1003
|
{
|
|
994
1004
|
type: "button",
|
|
995
|
-
onClick: () =>
|
|
1005
|
+
onClick: () => {
|
|
1006
|
+
if (disabled) return;
|
|
1007
|
+
setOpen((v) => !v);
|
|
1008
|
+
},
|
|
996
1009
|
tabIndex: -1,
|
|
1010
|
+
disabled,
|
|
997
1011
|
"aria-label": "Open calendar",
|
|
998
|
-
className: "px-3 h-full flex items-center text-muted-foreground hover:text-primary transition-colors focus:outline-none",
|
|
1012
|
+
className: "px-3 h-full flex items-center text-muted-foreground hover:text-primary transition-colors focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
999
1013
|
children: /* @__PURE__ */ jsx(CalendarIcon, { className: "h-4 w-4" })
|
|
1000
1014
|
}
|
|
1001
1015
|
)
|
|
@@ -1128,7 +1142,8 @@ function CountrySearchField({
|
|
|
1128
1142
|
label = "Country",
|
|
1129
1143
|
countries,
|
|
1130
1144
|
placeholder = "Search country\u2026",
|
|
1131
|
-
className
|
|
1145
|
+
className,
|
|
1146
|
+
disabled
|
|
1132
1147
|
}) {
|
|
1133
1148
|
var _a;
|
|
1134
1149
|
const list = countries != null ? countries : COUNTRIES;
|
|
@@ -1152,6 +1167,7 @@ function CountrySearchField({
|
|
|
1152
1167
|
return () => document.removeEventListener("mousedown", handler);
|
|
1153
1168
|
}, [open]);
|
|
1154
1169
|
const handleOpen = () => {
|
|
1170
|
+
if (disabled) return;
|
|
1155
1171
|
setOpen(true);
|
|
1156
1172
|
setQuery("");
|
|
1157
1173
|
setTimeout(() => {
|
|
@@ -1170,9 +1186,11 @@ function CountrySearchField({
|
|
|
1170
1186
|
{
|
|
1171
1187
|
type: "button",
|
|
1172
1188
|
onClick: handleOpen,
|
|
1189
|
+
disabled,
|
|
1173
1190
|
className: cn(
|
|
1174
1191
|
"relative flex w-full items-center rounded-lg border border-border bg-background h-14 px-3 text-left transition-colors",
|
|
1175
|
-
open && "border-primary ring-1 ring-primary"
|
|
1192
|
+
open && "border-primary ring-1 ring-primary",
|
|
1193
|
+
disabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
1176
1194
|
),
|
|
1177
1195
|
children: [
|
|
1178
1196
|
/* @__PURE__ */ jsxs(
|
|
@@ -4182,14 +4200,15 @@ function isFieldEmpty(field, value) {
|
|
|
4182
4200
|
return typeof value === "string" ? !value.trim() : false;
|
|
4183
4201
|
}
|
|
4184
4202
|
}
|
|
4185
|
-
function PhoneInput({ id, label, required, value, onChange, error }) {
|
|
4203
|
+
function PhoneInput({ id, label, required, value, onChange, error, disabled }) {
|
|
4186
4204
|
return /* @__PURE__ */ jsxs("div", { className: "flex w-full min-w-0", children: [
|
|
4187
4205
|
/* @__PURE__ */ jsx(
|
|
4188
4206
|
PhoneCountrySelect,
|
|
4189
4207
|
{
|
|
4190
4208
|
value: value.country,
|
|
4191
4209
|
onChange: (country) => onChange(__spreadProps(__spreadValues({}, value), { country })),
|
|
4192
|
-
className: "shrink-0"
|
|
4210
|
+
className: "shrink-0",
|
|
4211
|
+
disabled
|
|
4193
4212
|
}
|
|
4194
4213
|
),
|
|
4195
4214
|
/* @__PURE__ */ jsxs("div", { className: "relative min-w-0 flex-1", children: [
|
|
@@ -4201,6 +4220,7 @@ function PhoneInput({ id, label, required, value, onChange, error }) {
|
|
|
4201
4220
|
placeholder: " ",
|
|
4202
4221
|
value: value.nationalNumber,
|
|
4203
4222
|
required,
|
|
4223
|
+
disabled,
|
|
4204
4224
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, value), { nationalNumber: e.target.value })),
|
|
4205
4225
|
className: cn(
|
|
4206
4226
|
"peer block h-14 w-full rounded-r-lg border border-border bg-background",
|
|
@@ -4237,7 +4257,8 @@ function FloatingTextarea({
|
|
|
4237
4257
|
optionalHint,
|
|
4238
4258
|
value,
|
|
4239
4259
|
onChange,
|
|
4240
|
-
error
|
|
4260
|
+
error,
|
|
4261
|
+
disabled
|
|
4241
4262
|
}) {
|
|
4242
4263
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
4243
4264
|
/* @__PURE__ */ jsx(
|
|
@@ -4248,6 +4269,7 @@ function FloatingTextarea({
|
|
|
4248
4269
|
rows: 5,
|
|
4249
4270
|
value,
|
|
4250
4271
|
required,
|
|
4272
|
+
disabled,
|
|
4251
4273
|
onChange: (e) => onChange(e.target.value),
|
|
4252
4274
|
className: cn(
|
|
4253
4275
|
"peer block w-full resize-none rounded-lg border border-border bg-background",
|
|
@@ -4276,7 +4298,7 @@ function FloatingTextarea({
|
|
|
4276
4298
|
)
|
|
4277
4299
|
] });
|
|
4278
4300
|
}
|
|
4279
|
-
function SelectField({ field, value, onChange, error }) {
|
|
4301
|
+
function SelectField({ field, value, onChange, error, disabled }) {
|
|
4280
4302
|
var _a, _b, _c;
|
|
4281
4303
|
const [open, setOpen] = React22.useState(false);
|
|
4282
4304
|
const containerRef = React22.useRef(null);
|
|
@@ -4297,11 +4319,16 @@ function SelectField({ field, value, onChange, error }) {
|
|
|
4297
4319
|
"button",
|
|
4298
4320
|
{
|
|
4299
4321
|
type: "button",
|
|
4300
|
-
onClick: () =>
|
|
4322
|
+
onClick: () => {
|
|
4323
|
+
if (disabled) return;
|
|
4324
|
+
setOpen((o) => !o);
|
|
4325
|
+
},
|
|
4326
|
+
disabled,
|
|
4301
4327
|
className: cn(
|
|
4302
4328
|
"relative flex w-full items-center rounded-lg border border-border bg-background h-14 px-3 text-left transition-colors",
|
|
4303
4329
|
open && "border-primary ring-1 ring-primary",
|
|
4304
|
-
error && !open && "border-destructive"
|
|
4330
|
+
error && !open && "border-destructive",
|
|
4331
|
+
disabled && "opacity-50 cursor-not-allowed pointer-events-none"
|
|
4305
4332
|
),
|
|
4306
4333
|
children: [
|
|
4307
4334
|
/* @__PURE__ */ jsxs(
|
|
@@ -4359,7 +4386,8 @@ function FieldRenderer({
|
|
|
4359
4386
|
onChange,
|
|
4360
4387
|
defaultPhoneCountry,
|
|
4361
4388
|
labels,
|
|
4362
|
-
error
|
|
4389
|
+
error,
|
|
4390
|
+
disabled
|
|
4363
4391
|
}) {
|
|
4364
4392
|
var _a, _b;
|
|
4365
4393
|
const fieldId = `rf-${field.id}`;
|
|
@@ -4376,6 +4404,7 @@ function FieldRenderer({
|
|
|
4376
4404
|
{
|
|
4377
4405
|
label: labels.firstNameLabel,
|
|
4378
4406
|
required: field.required,
|
|
4407
|
+
disabled,
|
|
4379
4408
|
value: v.firstName,
|
|
4380
4409
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), { firstName: e.target.value })),
|
|
4381
4410
|
error: error && !v.firstName.trim() ? error : void 0
|
|
@@ -4386,6 +4415,7 @@ function FieldRenderer({
|
|
|
4386
4415
|
{
|
|
4387
4416
|
label: labels.lastNameLabel,
|
|
4388
4417
|
required: field.required,
|
|
4418
|
+
disabled,
|
|
4389
4419
|
value: v.lastName,
|
|
4390
4420
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), { lastName: e.target.value })),
|
|
4391
4421
|
error: error && !v.lastName.trim() ? error : void 0
|
|
@@ -4404,7 +4434,8 @@ function FieldRenderer({
|
|
|
4404
4434
|
required: field.required,
|
|
4405
4435
|
value: v,
|
|
4406
4436
|
onChange,
|
|
4407
|
-
error
|
|
4437
|
+
error,
|
|
4438
|
+
disabled
|
|
4408
4439
|
}
|
|
4409
4440
|
);
|
|
4410
4441
|
}
|
|
@@ -4422,6 +4453,7 @@ function FieldRenderer({
|
|
|
4422
4453
|
{
|
|
4423
4454
|
label: labels.emergencyContactFirstName,
|
|
4424
4455
|
required: field.required,
|
|
4456
|
+
disabled,
|
|
4425
4457
|
value: v.contactName.firstName,
|
|
4426
4458
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), {
|
|
4427
4459
|
contactName: __spreadProps(__spreadValues({}, v.contactName), {
|
|
@@ -4436,6 +4468,7 @@ function FieldRenderer({
|
|
|
4436
4468
|
{
|
|
4437
4469
|
label: labels.emergencyContactLastName,
|
|
4438
4470
|
required: field.required,
|
|
4471
|
+
disabled,
|
|
4439
4472
|
value: v.contactName.lastName,
|
|
4440
4473
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), {
|
|
4441
4474
|
contactName: __spreadProps(__spreadValues({}, v.contactName), {
|
|
@@ -4454,7 +4487,8 @@ function FieldRenderer({
|
|
|
4454
4487
|
required: field.required,
|
|
4455
4488
|
value: v.phone,
|
|
4456
4489
|
onChange: (phone) => onChange(__spreadProps(__spreadValues({}, v), { phone })),
|
|
4457
|
-
error: error && !v.phone.nationalNumber.trim() ? error : void 0
|
|
4490
|
+
error: error && !v.phone.nationalNumber.trim() ? error : void 0,
|
|
4491
|
+
disabled
|
|
4458
4492
|
}
|
|
4459
4493
|
)
|
|
4460
4494
|
] })
|
|
@@ -4470,7 +4504,8 @@ function FieldRenderer({
|
|
|
4470
4504
|
optionalHint: !field.required ? labels.optionalLabel : void 0,
|
|
4471
4505
|
value: typeof value === "string" ? value : "",
|
|
4472
4506
|
onChange,
|
|
4473
|
-
error
|
|
4507
|
+
error,
|
|
4508
|
+
disabled
|
|
4474
4509
|
}
|
|
4475
4510
|
);
|
|
4476
4511
|
}
|
|
@@ -4481,7 +4516,8 @@ function FieldRenderer({
|
|
|
4481
4516
|
field,
|
|
4482
4517
|
value: typeof value === "string" ? value : "",
|
|
4483
4518
|
onChange: (v) => onChange(v),
|
|
4484
|
-
error
|
|
4519
|
+
error,
|
|
4520
|
+
disabled
|
|
4485
4521
|
}
|
|
4486
4522
|
);
|
|
4487
4523
|
}
|
|
@@ -4511,6 +4547,7 @@ function FieldRenderer({
|
|
|
4511
4547
|
value: opt.value,
|
|
4512
4548
|
checked: value === opt.value,
|
|
4513
4549
|
required: field.required,
|
|
4550
|
+
disabled,
|
|
4514
4551
|
onChange: () => onChange(opt.value),
|
|
4515
4552
|
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4516
4553
|
}
|
|
@@ -4534,6 +4571,7 @@ function FieldRenderer({
|
|
|
4534
4571
|
{
|
|
4535
4572
|
type: "checkbox",
|
|
4536
4573
|
checked: value === true,
|
|
4574
|
+
disabled,
|
|
4537
4575
|
onChange: (e) => onChange(e.target.checked),
|
|
4538
4576
|
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4539
4577
|
}
|
|
@@ -4559,6 +4597,7 @@ function FieldRenderer({
|
|
|
4559
4597
|
{
|
|
4560
4598
|
type: "checkbox",
|
|
4561
4599
|
checked,
|
|
4600
|
+
disabled,
|
|
4562
4601
|
onChange: (e) => onChange(
|
|
4563
4602
|
e.target.checked ? [...selected, opt.value] : selected.filter((x) => x !== opt.value)
|
|
4564
4603
|
),
|
|
@@ -4580,7 +4619,8 @@ function FieldRenderer({
|
|
|
4580
4619
|
label: field.label,
|
|
4581
4620
|
required: field.required,
|
|
4582
4621
|
value: typeof value === "string" ? value : "",
|
|
4583
|
-
onChange: (code) => onChange(code)
|
|
4622
|
+
onChange: (code) => onChange(code),
|
|
4623
|
+
disabled
|
|
4584
4624
|
}
|
|
4585
4625
|
);
|
|
4586
4626
|
}
|
|
@@ -4592,7 +4632,8 @@ function FieldRenderer({
|
|
|
4592
4632
|
required: field.required,
|
|
4593
4633
|
value: asDate(value),
|
|
4594
4634
|
onChange: (d) => onChange(d),
|
|
4595
|
-
error
|
|
4635
|
+
error,
|
|
4636
|
+
disabled
|
|
4596
4637
|
}
|
|
4597
4638
|
);
|
|
4598
4639
|
}
|
|
@@ -4603,6 +4644,7 @@ function FieldRenderer({
|
|
|
4603
4644
|
label: field.label,
|
|
4604
4645
|
required: field.required,
|
|
4605
4646
|
type: "number",
|
|
4647
|
+
disabled,
|
|
4606
4648
|
value: value == null ? "" : String(value),
|
|
4607
4649
|
onChange: (e) => onChange(e.target.value),
|
|
4608
4650
|
error
|
|
@@ -4616,6 +4658,7 @@ function FieldRenderer({
|
|
|
4616
4658
|
label: field.label,
|
|
4617
4659
|
required: field.required,
|
|
4618
4660
|
type: htmlType,
|
|
4661
|
+
disabled,
|
|
4619
4662
|
value: typeof value === "string" ? value : "",
|
|
4620
4663
|
onChange: (e) => onChange(e.target.value),
|
|
4621
4664
|
error
|
|
@@ -4646,7 +4689,8 @@ function RegistrationForm({
|
|
|
4646
4689
|
defaultPhoneCountry = "BR",
|
|
4647
4690
|
dateFormatter,
|
|
4648
4691
|
labels,
|
|
4649
|
-
className
|
|
4692
|
+
className,
|
|
4693
|
+
readOnly = false
|
|
4650
4694
|
}) {
|
|
4651
4695
|
var _a;
|
|
4652
4696
|
const L = React22.useMemo(
|
|
@@ -4820,7 +4864,8 @@ function RegistrationForm({
|
|
|
4820
4864
|
onChange: (v) => setField(field.id, v),
|
|
4821
4865
|
defaultPhoneCountry,
|
|
4822
4866
|
labels: L,
|
|
4823
|
-
error: fieldErrors[field.id]
|
|
4867
|
+
error: fieldErrors[field.id],
|
|
4868
|
+
disabled: readOnly
|
|
4824
4869
|
}
|
|
4825
4870
|
),
|
|
4826
4871
|
((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
|
|
@@ -4843,6 +4888,7 @@ function RegistrationForm({
|
|
|
4843
4888
|
type: "checkbox",
|
|
4844
4889
|
checked: termsAccepted,
|
|
4845
4890
|
required: true,
|
|
4891
|
+
disabled: readOnly,
|
|
4846
4892
|
onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
|
|
4847
4893
|
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4848
4894
|
}
|
|
@@ -4878,6 +4924,7 @@ function RegistrationForm({
|
|
|
4878
4924
|
name: "registration-terms-accept",
|
|
4879
4925
|
checked: termsAccepted,
|
|
4880
4926
|
required: true,
|
|
4927
|
+
disabled: readOnly,
|
|
4881
4928
|
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4882
4929
|
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4883
4930
|
}
|
|
@@ -4894,6 +4941,7 @@ function RegistrationForm({
|
|
|
4894
4941
|
type: "radio",
|
|
4895
4942
|
name: "registration-terms-accept",
|
|
4896
4943
|
checked: current[TERMS_ACCEPT_KEY] === false,
|
|
4944
|
+
disabled: readOnly,
|
|
4897
4945
|
onChange: () => setField(TERMS_ACCEPT_KEY, false),
|
|
4898
4946
|
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4899
4947
|
}
|
|
@@ -4907,7 +4955,7 @@ function RegistrationForm({
|
|
|
4907
4955
|
] })
|
|
4908
4956
|
] }) }),
|
|
4909
4957
|
error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
|
|
4910
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsx(
|
|
4958
|
+
!readOnly && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsx(
|
|
4911
4959
|
"button",
|
|
4912
4960
|
{
|
|
4913
4961
|
type: "submit",
|
|
@@ -7879,6 +7927,66 @@ function ActivityCard({
|
|
|
7879
7927
|
}
|
|
7880
7928
|
);
|
|
7881
7929
|
}
|
|
7930
|
+
var variantStyles = {
|
|
7931
|
+
info: "bg-[oklch(0.96_0.015_174)] border-[#47bca9] text-[#2e2d2c]",
|
|
7932
|
+
success: "bg-[oklch(0.96_0.055_160)] border-green-500 text-[#2e2d2c]",
|
|
7933
|
+
warning: "bg-amber-50 border-amber-400 text-[#2e2d2c]",
|
|
7934
|
+
error: "bg-red-50 border-red-400 text-[#2e2d2c]"
|
|
7935
|
+
};
|
|
7936
|
+
function Toast({
|
|
7937
|
+
message,
|
|
7938
|
+
variant = "info",
|
|
7939
|
+
onClose,
|
|
7940
|
+
duration = 6e3,
|
|
7941
|
+
className
|
|
7942
|
+
}) {
|
|
7943
|
+
const [mounted, setMounted] = React22.useState(false);
|
|
7944
|
+
const [visible, setVisible] = React22.useState(true);
|
|
7945
|
+
React22.useEffect(() => {
|
|
7946
|
+
setMounted(true);
|
|
7947
|
+
}, []);
|
|
7948
|
+
React22.useEffect(() => {
|
|
7949
|
+
if (duration === 0) return;
|
|
7950
|
+
const t = setTimeout(() => {
|
|
7951
|
+
setVisible(false);
|
|
7952
|
+
setTimeout(() => onClose == null ? void 0 : onClose(), 300);
|
|
7953
|
+
}, duration);
|
|
7954
|
+
return () => clearTimeout(t);
|
|
7955
|
+
}, [duration, onClose]);
|
|
7956
|
+
if (!mounted || !visible) return null;
|
|
7957
|
+
return createPortal(
|
|
7958
|
+
/* @__PURE__ */ jsxs(
|
|
7959
|
+
"div",
|
|
7960
|
+
{
|
|
7961
|
+
role: "alert",
|
|
7962
|
+
className: cn(
|
|
7963
|
+
"fixed top-4 left-4 z-[9999] flex items-start gap-3 rounded-lg border px-4 py-3 shadow-lg",
|
|
7964
|
+
"max-w-sm text-sm font-ui leading-snug",
|
|
7965
|
+
"animate-in fade-in slide-in-from-left-4 duration-300",
|
|
7966
|
+
variantStyles[variant],
|
|
7967
|
+
className
|
|
7968
|
+
),
|
|
7969
|
+
children: [
|
|
7970
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1", children: message }),
|
|
7971
|
+
onClose && /* @__PURE__ */ jsx(
|
|
7972
|
+
"button",
|
|
7973
|
+
{
|
|
7974
|
+
type: "button",
|
|
7975
|
+
onClick: () => {
|
|
7976
|
+
setVisible(false);
|
|
7977
|
+
setTimeout(() => onClose(), 300);
|
|
7978
|
+
},
|
|
7979
|
+
className: "shrink-0 opacity-60 hover:opacity-100 transition-opacity",
|
|
7980
|
+
"aria-label": "Fechar",
|
|
7981
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: 14 })
|
|
7982
|
+
}
|
|
7983
|
+
)
|
|
7984
|
+
]
|
|
7985
|
+
}
|
|
7986
|
+
),
|
|
7987
|
+
document.body
|
|
7988
|
+
);
|
|
7989
|
+
}
|
|
7882
7990
|
function PaymentModalShell({
|
|
7883
7991
|
open,
|
|
7884
7992
|
title,
|
|
@@ -8541,6 +8649,6 @@ function LeadCapturePopup({
|
|
|
8541
8649
|
);
|
|
8542
8650
|
}
|
|
8543
8651
|
|
|
8544
|
-
export { ActivityCard, Alert, BirthDateField, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
|
8652
|
+
export { ActivityCard, Alert, BirthDateField, BookingConfirmation, BookingConfirmationEmail, BookingConfirmedCard, BookingDetails, BookingForm, BookingOtpEmail, BookingShell, Button, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LOGO_PLANETAEXO_DATA_URI, LeadCapturePopup, MenuTrip, OTPCodeInput, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PhoneCountrySelect, PhotoGallery, PricingTrip, RegistrationForm, RegistrationSuccessCard, SiteHeader, TERMS_ACCEPT_KEY, TermsSection, ThemeToggle, Toast, TravellerFormInviteEmail, TripCard, TripHeader, TripPage, buttonVariants, cn, emailTokens, getStripeAppearance, stripeAppearance, wrapEmailHtml };
|
|
8545
8653
|
//# sourceMappingURL=index.js.map
|
|
8546
8654
|
//# sourceMappingURL=index.js.map
|