@planetaexo/design-system 0.3.3 → 0.3.5
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 +206 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -1
- package/dist/index.d.ts +58 -1
- package/dist/index.js +202 -67
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -115,6 +115,37 @@ interface BookingShellProps {
|
|
|
115
115
|
successMessage?: string | null;
|
|
116
116
|
}
|
|
117
117
|
declare function BookingShell({ steps, currentStep, title, children, onNext, onBack, onCancel, nextLabel, backLabel, cancelLabel, nextDisabled, nextBlockedMessage, error, successMessage, }: BookingShellProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
interface PaymentAmountSelectorProps {
|
|
119
|
+
title?: string;
|
|
120
|
+
depositLabel: string;
|
|
121
|
+
fullLabel: string;
|
|
122
|
+
value: "deposit" | "full";
|
|
123
|
+
onChange: (value: "deposit" | "full") => void;
|
|
124
|
+
}
|
|
125
|
+
declare function PaymentAmountSelector({ title, depositLabel, fullLabel, value, onChange, }: PaymentAmountSelectorProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
interface PaymentMethodOption {
|
|
127
|
+
id: string;
|
|
128
|
+
label: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
}
|
|
132
|
+
interface PaymentMethodSelectorProps {
|
|
133
|
+
title?: string;
|
|
134
|
+
methods: PaymentMethodOption[];
|
|
135
|
+
value: string;
|
|
136
|
+
onChange: (value: string) => void;
|
|
137
|
+
}
|
|
138
|
+
declare function PaymentMethodSelector({ title, methods, value, onChange, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
139
|
+
interface TermsSectionProps {
|
|
140
|
+
title?: string;
|
|
141
|
+
checked: boolean;
|
|
142
|
+
onChange: (checked: boolean) => void;
|
|
143
|
+
/** Conteúdo do label — pode incluir links/botões do host app */
|
|
144
|
+
label: React.ReactNode;
|
|
145
|
+
/** Mensagem de aviso exibida quando não marcado */
|
|
146
|
+
warningMessage?: string | null;
|
|
147
|
+
}
|
|
148
|
+
declare function TermsSection({ title, checked, onChange, label, warningMessage, }: TermsSectionProps): react_jsx_runtime.JSX.Element;
|
|
118
149
|
/** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
|
|
119
150
|
declare function OfferAdventureCard({ adventure }: {
|
|
120
151
|
adventure: OfferAdventureItem;
|
|
@@ -749,6 +780,32 @@ interface ActivityCardProps {
|
|
|
749
780
|
}
|
|
750
781
|
declare function ActivityCard({ image, imageAlt, badge, icon, title, description, price, onClick, size, className, }: ActivityCardProps): react_jsx_runtime.JSX.Element;
|
|
751
782
|
|
|
783
|
+
type AlertVariant = "error" | "warning" | "success" | "info";
|
|
784
|
+
interface AlertProps {
|
|
785
|
+
variant?: AlertVariant;
|
|
786
|
+
children: React.ReactNode;
|
|
787
|
+
className?: string;
|
|
788
|
+
}
|
|
789
|
+
declare function Alert({ variant, children, className }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
790
|
+
|
|
791
|
+
interface PaymentModalShellProps {
|
|
792
|
+
open: boolean;
|
|
793
|
+
title: string;
|
|
794
|
+
subtitle?: string;
|
|
795
|
+
/** Referência da reserva exibida abaixo do subtitle (e.g. "#12345") */
|
|
796
|
+
bookingRef?: string | number;
|
|
797
|
+
/** Quando true exibe spinner e oculta children */
|
|
798
|
+
busy?: boolean;
|
|
799
|
+
busyMessage?: string;
|
|
800
|
+
onClose?: () => void;
|
|
801
|
+
closeLabel?: string;
|
|
802
|
+
/** Quando true desabilita o botão de fechar */
|
|
803
|
+
closeDisabled?: boolean;
|
|
804
|
+
children: React.ReactNode;
|
|
805
|
+
className?: string;
|
|
806
|
+
}
|
|
807
|
+
declare function PaymentModalShell({ open, title, subtitle, bookingRef, busy, busyMessage, onClose, closeLabel, closeDisabled, children, className, }: PaymentModalShellProps): react_jsx_runtime.JSX.Element | null;
|
|
808
|
+
|
|
752
809
|
declare function cn(...inputs: ClassValue[]): string;
|
|
753
810
|
|
|
754
811
|
interface LeadCapturePopupConfig {
|
|
@@ -801,4 +858,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
801
858
|
config: LeadCapturePopupConfig;
|
|
802
859
|
}): react_jsx_runtime.JSX.Element | null;
|
|
803
860
|
|
|
804
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, 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, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferDepositInfo, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type SuggestedTraveller, ThemeToggle, 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, cn };
|
|
861
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, Alert, type AlertProps, type AlertVariant, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, 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, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, 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, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type SuggestedTraveller, TermsSection, type TermsSectionProps, ThemeToggle, 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, cn };
|
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,37 @@ interface BookingShellProps {
|
|
|
115
115
|
successMessage?: string | null;
|
|
116
116
|
}
|
|
117
117
|
declare function BookingShell({ steps, currentStep, title, children, onNext, onBack, onCancel, nextLabel, backLabel, cancelLabel, nextDisabled, nextBlockedMessage, error, successMessage, }: BookingShellProps): react_jsx_runtime.JSX.Element;
|
|
118
|
+
interface PaymentAmountSelectorProps {
|
|
119
|
+
title?: string;
|
|
120
|
+
depositLabel: string;
|
|
121
|
+
fullLabel: string;
|
|
122
|
+
value: "deposit" | "full";
|
|
123
|
+
onChange: (value: "deposit" | "full") => void;
|
|
124
|
+
}
|
|
125
|
+
declare function PaymentAmountSelector({ title, depositLabel, fullLabel, value, onChange, }: PaymentAmountSelectorProps): react_jsx_runtime.JSX.Element;
|
|
126
|
+
interface PaymentMethodOption {
|
|
127
|
+
id: string;
|
|
128
|
+
label: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
}
|
|
132
|
+
interface PaymentMethodSelectorProps {
|
|
133
|
+
title?: string;
|
|
134
|
+
methods: PaymentMethodOption[];
|
|
135
|
+
value: string;
|
|
136
|
+
onChange: (value: string) => void;
|
|
137
|
+
}
|
|
138
|
+
declare function PaymentMethodSelector({ title, methods, value, onChange, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
139
|
+
interface TermsSectionProps {
|
|
140
|
+
title?: string;
|
|
141
|
+
checked: boolean;
|
|
142
|
+
onChange: (checked: boolean) => void;
|
|
143
|
+
/** Conteúdo do label — pode incluir links/botões do host app */
|
|
144
|
+
label: React.ReactNode;
|
|
145
|
+
/** Mensagem de aviso exibida quando não marcado */
|
|
146
|
+
warningMessage?: string | null;
|
|
147
|
+
}
|
|
148
|
+
declare function TermsSection({ title, checked, onChange, label, warningMessage, }: TermsSectionProps): react_jsx_runtime.JSX.Element;
|
|
118
149
|
/** Cartão de aventura isolado (mesmo layout que dentro de `Offer`). */
|
|
119
150
|
declare function OfferAdventureCard({ adventure }: {
|
|
120
151
|
adventure: OfferAdventureItem;
|
|
@@ -749,6 +780,32 @@ interface ActivityCardProps {
|
|
|
749
780
|
}
|
|
750
781
|
declare function ActivityCard({ image, imageAlt, badge, icon, title, description, price, onClick, size, className, }: ActivityCardProps): react_jsx_runtime.JSX.Element;
|
|
751
782
|
|
|
783
|
+
type AlertVariant = "error" | "warning" | "success" | "info";
|
|
784
|
+
interface AlertProps {
|
|
785
|
+
variant?: AlertVariant;
|
|
786
|
+
children: React.ReactNode;
|
|
787
|
+
className?: string;
|
|
788
|
+
}
|
|
789
|
+
declare function Alert({ variant, children, className }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
790
|
+
|
|
791
|
+
interface PaymentModalShellProps {
|
|
792
|
+
open: boolean;
|
|
793
|
+
title: string;
|
|
794
|
+
subtitle?: string;
|
|
795
|
+
/** Referência da reserva exibida abaixo do subtitle (e.g. "#12345") */
|
|
796
|
+
bookingRef?: string | number;
|
|
797
|
+
/** Quando true exibe spinner e oculta children */
|
|
798
|
+
busy?: boolean;
|
|
799
|
+
busyMessage?: string;
|
|
800
|
+
onClose?: () => void;
|
|
801
|
+
closeLabel?: string;
|
|
802
|
+
/** Quando true desabilita o botão de fechar */
|
|
803
|
+
closeDisabled?: boolean;
|
|
804
|
+
children: React.ReactNode;
|
|
805
|
+
className?: string;
|
|
806
|
+
}
|
|
807
|
+
declare function PaymentModalShell({ open, title, subtitle, bookingRef, busy, busyMessage, onClose, closeLabel, closeDisabled, children, className, }: PaymentModalShellProps): react_jsx_runtime.JSX.Element | null;
|
|
808
|
+
|
|
752
809
|
declare function cn(...inputs: ClassValue[]): string;
|
|
753
810
|
|
|
754
811
|
interface LeadCapturePopupConfig {
|
|
@@ -801,4 +858,4 @@ declare function LeadCapturePopup({ config: _config, }: {
|
|
|
801
858
|
config: LeadCapturePopupConfig;
|
|
802
859
|
}): react_jsx_runtime.JSX.Element | null;
|
|
803
860
|
|
|
804
|
-
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, 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, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, Offer, OfferAdventureCard, type OfferAdventureItem, type OfferAgentInfo, type OfferDepositInfo, type OfferOptionalItem, type OfferProps, type OfferSummaryLineItem, PhoneCountrySelect, PhotoGallery, type PhotoGalleryPhoto, type PhotoGalleryProps, type PhotoGalleryVariant, type PricingOption, PricingTrip, type PricingTripProps, type PricingTripVariant, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type SuggestedTraveller, ThemeToggle, 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, cn };
|
|
861
|
+
export { ActivityCard, type ActivityCardProps, type ActivityCardSize, Alert, type AlertProps, type AlertVariant, type BookingAdventure, BookingConfirmation, BookingConfirmationEmail, type BookingConfirmationEmailLabels, type BookingConfirmationEmailProps, type BookingConfirmationLabels, type BookingConfirmationProps, type BookingContact, type BookingDepositInfo, BookingDetails, type BookingDetailsProps, BookingForm, type BookingFormProps, type BookingFormValues, BookingShell, type BookingShellProps, type BookingStatus, type BookingSummaryLineItem, type BookingTraveller, 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, type FilterGroup, type FilterItem, FilterPanel, type FilterPanelProps, FloatingInput, type FloatingInputProps, FloatingSelect, type FloatingSelectProps, Itinerary, type ItineraryProps, type ItineraryRoute, type ItineraryStop, LeadCapturePopup, type LeadCapturePopupConfig, MenuTrip, type MenuTripProps, type MenuTripSection, type MenuTripVariant, 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, SiteHeader, type SiteHeaderLanguage, type SiteHeaderLink, type SiteHeaderProps, type SiteHeaderSubItem, type SiteHeaderVariant, type SuggestedTraveller, TermsSection, type TermsSectionProps, ThemeToggle, 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, cn };
|
package/dist/index.js
CHANGED
|
@@ -1535,6 +1535,103 @@ function BookingShell({
|
|
|
1535
1535
|
] })
|
|
1536
1536
|
] });
|
|
1537
1537
|
}
|
|
1538
|
+
function PaymentAmountSelector({
|
|
1539
|
+
title = "What do you want to pay now?",
|
|
1540
|
+
depositLabel,
|
|
1541
|
+
fullLabel,
|
|
1542
|
+
value,
|
|
1543
|
+
onChange
|
|
1544
|
+
}) {
|
|
1545
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1546
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-bold text-foreground font-heading", children: title }),
|
|
1547
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: ["deposit", "full"].map((opt) => /* @__PURE__ */ jsx(
|
|
1548
|
+
"button",
|
|
1549
|
+
{
|
|
1550
|
+
type: "button",
|
|
1551
|
+
onClick: () => onChange(opt),
|
|
1552
|
+
className: cn(
|
|
1553
|
+
"rounded-lg border-2 px-4 py-3 text-sm text-left font-sans transition-colors",
|
|
1554
|
+
value === opt ? "border-primary bg-primary/5 text-foreground font-semibold" : "border-border bg-background text-muted-foreground hover:border-primary/40"
|
|
1555
|
+
),
|
|
1556
|
+
children: opt === "deposit" ? depositLabel : fullLabel
|
|
1557
|
+
},
|
|
1558
|
+
opt
|
|
1559
|
+
)) })
|
|
1560
|
+
] });
|
|
1561
|
+
}
|
|
1562
|
+
function PaymentMethodSelector({
|
|
1563
|
+
title = "Payment method",
|
|
1564
|
+
methods,
|
|
1565
|
+
value,
|
|
1566
|
+
onChange
|
|
1567
|
+
}) {
|
|
1568
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1569
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
|
|
1570
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: methods.map((m) => /* @__PURE__ */ jsxs(
|
|
1571
|
+
"button",
|
|
1572
|
+
{
|
|
1573
|
+
type: "button",
|
|
1574
|
+
disabled: m.disabled,
|
|
1575
|
+
onClick: () => !m.disabled && onChange(m.id),
|
|
1576
|
+
className: cn(
|
|
1577
|
+
"flex items-start gap-3 rounded-lg border-2 px-4 py-3 text-left transition-colors",
|
|
1578
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1579
|
+
value === m.id ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/40"
|
|
1580
|
+
),
|
|
1581
|
+
children: [
|
|
1582
|
+
/* @__PURE__ */ jsx(
|
|
1583
|
+
"span",
|
|
1584
|
+
{
|
|
1585
|
+
className: cn(
|
|
1586
|
+
"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors",
|
|
1587
|
+
value === m.id ? "border-primary" : "border-border"
|
|
1588
|
+
),
|
|
1589
|
+
children: value === m.id && /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-primary" })
|
|
1590
|
+
}
|
|
1591
|
+
),
|
|
1592
|
+
/* @__PURE__ */ jsxs("span", { className: "flex flex-col gap-0.5", children: [
|
|
1593
|
+
/* @__PURE__ */ jsx(
|
|
1594
|
+
"span",
|
|
1595
|
+
{
|
|
1596
|
+
className: cn(
|
|
1597
|
+
"text-sm font-semibold font-sans",
|
|
1598
|
+
value === m.id ? "text-primary" : "text-foreground"
|
|
1599
|
+
),
|
|
1600
|
+
children: m.label
|
|
1601
|
+
}
|
|
1602
|
+
),
|
|
1603
|
+
m.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground font-sans", children: m.description })
|
|
1604
|
+
] })
|
|
1605
|
+
]
|
|
1606
|
+
},
|
|
1607
|
+
m.id
|
|
1608
|
+
)) })
|
|
1609
|
+
] });
|
|
1610
|
+
}
|
|
1611
|
+
function TermsSection({
|
|
1612
|
+
title = "Terms and conditions",
|
|
1613
|
+
checked,
|
|
1614
|
+
onChange,
|
|
1615
|
+
label,
|
|
1616
|
+
warningMessage
|
|
1617
|
+
}) {
|
|
1618
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1619
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
|
|
1620
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer", children: [
|
|
1621
|
+
/* @__PURE__ */ jsx(
|
|
1622
|
+
"input",
|
|
1623
|
+
{
|
|
1624
|
+
type: "checkbox",
|
|
1625
|
+
checked,
|
|
1626
|
+
onChange: (e) => onChange(e.target.checked),
|
|
1627
|
+
className: "h-4 w-4 shrink-0 mt-0.5 rounded border-border accent-primary cursor-pointer"
|
|
1628
|
+
}
|
|
1629
|
+
),
|
|
1630
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: label })
|
|
1631
|
+
] }),
|
|
1632
|
+
!checked && warningMessage && /* @__PURE__ */ jsx("p", { className: "text-xs text-amber-400 flex items-center gap-1", children: warningMessage })
|
|
1633
|
+
] });
|
|
1634
|
+
}
|
|
1538
1635
|
var WIZARD_STEPS = [
|
|
1539
1636
|
{ id: "responsible", label: "Responsible party details" },
|
|
1540
1637
|
{ id: "travellers", label: "Travellers" },
|
|
@@ -1751,70 +1848,33 @@ function BookingWizard({
|
|
|
1751
1848
|
] }),
|
|
1752
1849
|
step === "payment" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
1753
1850
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground font-sans", children: "When you confirm, we will open secure online payment (Stripe). Choose deposit vs full amount below when applicable." }),
|
|
1754
|
-
depositInfo && /* @__PURE__ */
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
{
|
|
1782
|
-
type: "button",
|
|
1783
|
-
onClick: () => setPayMethod(m.id),
|
|
1784
|
-
className: cn(
|
|
1785
|
-
"flex items-start gap-3 rounded-lg border-2 px-4 py-3 text-left transition-colors",
|
|
1786
|
-
payMethod === m.id ? "border-primary bg-primary/5" : "border-border bg-background hover:border-primary/40"
|
|
1787
|
-
),
|
|
1788
|
-
children: [
|
|
1789
|
-
/* @__PURE__ */ jsx("span", { className: cn(
|
|
1790
|
-
"mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors",
|
|
1791
|
-
payMethod === m.id ? "border-primary" : "border-border"
|
|
1792
|
-
), children: payMethod === m.id && /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-primary" }) }),
|
|
1793
|
-
/* @__PURE__ */ jsxs("span", { className: "flex flex-col gap-0.5", children: [
|
|
1794
|
-
/* @__PURE__ */ jsx("span", { className: cn(
|
|
1795
|
-
"text-sm font-semibold font-sans",
|
|
1796
|
-
payMethod === m.id ? "text-primary" : "text-foreground"
|
|
1797
|
-
), children: m.label }),
|
|
1798
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground font-sans", children: m.sub })
|
|
1799
|
-
] })
|
|
1800
|
-
]
|
|
1801
|
-
},
|
|
1802
|
-
m.id
|
|
1803
|
-
)) })
|
|
1804
|
-
] }),
|
|
1805
|
-
/* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1806
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Terms and conditions" }),
|
|
1807
|
-
/* @__PURE__ */ jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer", children: [
|
|
1808
|
-
/* @__PURE__ */ jsx(
|
|
1809
|
-
"input",
|
|
1810
|
-
{
|
|
1811
|
-
type: "checkbox",
|
|
1812
|
-
checked: termsAccepted,
|
|
1813
|
-
onChange: (e) => setTermsAccepted(e.target.checked),
|
|
1814
|
-
className: "h-4 w-4 shrink-0 mt-0.5 rounded border-border accent-primary cursor-pointer"
|
|
1815
|
-
}
|
|
1816
|
-
),
|
|
1817
|
-
/* @__PURE__ */ jsxs("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: [
|
|
1851
|
+
depositInfo && /* @__PURE__ */ jsx(
|
|
1852
|
+
PaymentAmountSelector,
|
|
1853
|
+
{
|
|
1854
|
+
depositLabel,
|
|
1855
|
+
fullLabel,
|
|
1856
|
+
value: payAmount,
|
|
1857
|
+
onChange: setPayAmount
|
|
1858
|
+
}
|
|
1859
|
+
),
|
|
1860
|
+
/* @__PURE__ */ jsx(
|
|
1861
|
+
PaymentMethodSelector,
|
|
1862
|
+
{
|
|
1863
|
+
methods: [
|
|
1864
|
+
{ id: "stripe", label: "Credit / Debit card", description: "Secure payment via Stripe" },
|
|
1865
|
+
{ id: "pix", label: "PIX", description: "Instant transfer \u2014 Brazil only" },
|
|
1866
|
+
{ id: "bank", label: "Bank transfer", description: "Wire / TED / DOC" }
|
|
1867
|
+
],
|
|
1868
|
+
value: payMethod,
|
|
1869
|
+
onChange: (v) => setPayMethod(v)
|
|
1870
|
+
}
|
|
1871
|
+
),
|
|
1872
|
+
/* @__PURE__ */ jsx(
|
|
1873
|
+
TermsSection,
|
|
1874
|
+
{
|
|
1875
|
+
checked: termsAccepted,
|
|
1876
|
+
onChange: setTermsAccepted,
|
|
1877
|
+
label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1818
1878
|
"I have read and accept the",
|
|
1819
1879
|
" ",
|
|
1820
1880
|
/* @__PURE__ */ jsx(
|
|
@@ -1829,8 +1889,8 @@ function BookingWizard({
|
|
|
1829
1889
|
" ",
|
|
1830
1890
|
"of the reservation."
|
|
1831
1891
|
] })
|
|
1832
|
-
|
|
1833
|
-
|
|
1892
|
+
}
|
|
1893
|
+
),
|
|
1834
1894
|
/* @__PURE__ */ jsx(Dialog, { open: termsModalOpen, onOpenChange: setTermsModalOpen, children: /* @__PURE__ */ jsxs(DialogContent, { className: "!max-w-[80vw] w-[80vw] max-h-[85vh] overflow-y-auto", children: [
|
|
1835
1895
|
/* @__PURE__ */ jsx(DialogHeader, { children: /* @__PURE__ */ jsx(DialogTitle, { className: "font-heading text-xl", children: "Terms and Conditions" }) }),
|
|
1836
1896
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 text-sm font-sans text-foreground/80 leading-relaxed", children: [
|
|
@@ -6342,6 +6402,81 @@ function ActivityCard({
|
|
|
6342
6402
|
}
|
|
6343
6403
|
);
|
|
6344
6404
|
}
|
|
6405
|
+
var VARIANT_STYLES = {
|
|
6406
|
+
error: "text-destructive border-destructive/30 bg-destructive/5",
|
|
6407
|
+
warning: "text-amber-400 border-amber-500/30 bg-amber-500/10",
|
|
6408
|
+
success: "text-primary border-primary/30 bg-primary/10",
|
|
6409
|
+
info: "text-muted-foreground border-primary/25 bg-primary/5"
|
|
6410
|
+
};
|
|
6411
|
+
function Alert({ variant = "info", children, className }) {
|
|
6412
|
+
return /* @__PURE__ */ jsx(
|
|
6413
|
+
"div",
|
|
6414
|
+
{
|
|
6415
|
+
className: cn(
|
|
6416
|
+
"rounded-lg border px-3 py-2 text-sm font-sans leading-snug",
|
|
6417
|
+
VARIANT_STYLES[variant],
|
|
6418
|
+
className
|
|
6419
|
+
),
|
|
6420
|
+
children
|
|
6421
|
+
}
|
|
6422
|
+
);
|
|
6423
|
+
}
|
|
6424
|
+
function PaymentModalShell({
|
|
6425
|
+
open,
|
|
6426
|
+
title,
|
|
6427
|
+
subtitle,
|
|
6428
|
+
bookingRef,
|
|
6429
|
+
busy,
|
|
6430
|
+
busyMessage,
|
|
6431
|
+
onClose,
|
|
6432
|
+
closeLabel = "Cancel",
|
|
6433
|
+
closeDisabled,
|
|
6434
|
+
children,
|
|
6435
|
+
className
|
|
6436
|
+
}) {
|
|
6437
|
+
if (!open) return null;
|
|
6438
|
+
return /* @__PURE__ */ jsx(
|
|
6439
|
+
"div",
|
|
6440
|
+
{
|
|
6441
|
+
className: "fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4",
|
|
6442
|
+
role: "dialog",
|
|
6443
|
+
"aria-modal": "true",
|
|
6444
|
+
children: /* @__PURE__ */ jsxs(
|
|
6445
|
+
"div",
|
|
6446
|
+
{
|
|
6447
|
+
className: cn(
|
|
6448
|
+
"relative w-full max-w-md rounded-2xl border border-border bg-card p-6 shadow-xl",
|
|
6449
|
+
"max-h-[90vh] overflow-y-auto",
|
|
6450
|
+
className
|
|
6451
|
+
),
|
|
6452
|
+
children: [
|
|
6453
|
+
onClose && /* @__PURE__ */ jsx(
|
|
6454
|
+
"button",
|
|
6455
|
+
{
|
|
6456
|
+
type: "button",
|
|
6457
|
+
onClick: () => !closeDisabled && onClose(),
|
|
6458
|
+
disabled: closeDisabled,
|
|
6459
|
+
"aria-label": closeLabel,
|
|
6460
|
+
className: "absolute right-4 top-4 text-xl leading-none text-muted-foreground hover:text-foreground disabled:opacity-40 transition-colors",
|
|
6461
|
+
children: "\xD7"
|
|
6462
|
+
}
|
|
6463
|
+
),
|
|
6464
|
+
/* @__PURE__ */ jsx("h2", { className: "pr-8 text-lg font-bold text-foreground font-heading", children: title }),
|
|
6465
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground font-sans", children: subtitle }),
|
|
6466
|
+
bookingRef != null && /* @__PURE__ */ jsxs("p", { className: "mt-1 text-xs text-muted-foreground font-sans", children: [
|
|
6467
|
+
"#",
|
|
6468
|
+
bookingRef
|
|
6469
|
+
] }),
|
|
6470
|
+
busy ? /* @__PURE__ */ jsxs("div", { className: "mt-8 flex flex-col items-center gap-4 py-6", children: [
|
|
6471
|
+
/* @__PURE__ */ jsx("span", { className: "h-10 w-10 animate-spin rounded-full border-2 border-primary/30 border-t-primary" }),
|
|
6472
|
+
busyMessage && /* @__PURE__ */ jsx("p", { className: "text-center text-sm text-muted-foreground font-sans", children: busyMessage })
|
|
6473
|
+
] }) : /* @__PURE__ */ jsx("div", { className: "mt-6", children })
|
|
6474
|
+
]
|
|
6475
|
+
}
|
|
6476
|
+
)
|
|
6477
|
+
}
|
|
6478
|
+
);
|
|
6479
|
+
}
|
|
6345
6480
|
function Input(_a) {
|
|
6346
6481
|
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
6347
6482
|
return /* @__PURE__ */ jsx(
|
|
@@ -6705,6 +6840,6 @@ function LeadCapturePopup({
|
|
|
6705
6840
|
);
|
|
6706
6841
|
}
|
|
6707
6842
|
|
|
6708
|
-
export { ActivityCard, BookingConfirmation, BookingConfirmationEmail, BookingDetails, BookingForm, BookingShell, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LeadCapturePopup, MenuTrip, Offer, OfferAdventureCard, PhoneCountrySelect, PhotoGallery, PricingTrip, SiteHeader, ThemeToggle, TripCard, TripHeader, TripPage, cn };
|
|
6843
|
+
export { ActivityCard, Alert, BookingConfirmation, BookingConfirmationEmail, BookingDetails, BookingForm, BookingShell, COUNTRIES, CounterField, CountrySearchField, DEFAULT_HEADER_LINKS, DEFAULT_LANGUAGES, DatePickerField, FilterPanel, FloatingInput, FloatingSelect, Itinerary, LeadCapturePopup, MenuTrip, Offer, OfferAdventureCard, PaymentAmountSelector, PaymentMethodSelector, PaymentModalShell, PhoneCountrySelect, PhotoGallery, PricingTrip, SiteHeader, TermsSection, ThemeToggle, TripCard, TripHeader, TripPage, cn };
|
|
6709
6844
|
//# sourceMappingURL=index.js.map
|
|
6710
6845
|
//# sourceMappingURL=index.js.map
|