@planetaexo/design-system 0.2.14 → 0.3.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 +467 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +105 -3
- package/dist/index.d.ts +105 -3
- package/dist/index.js +469 -70
- package/dist/index.js.map +1 -1
- package/package.json +7 -1
package/dist/index.cjs
CHANGED
|
@@ -16,6 +16,7 @@ var checkbox = require('@base-ui/react/checkbox');
|
|
|
16
16
|
var accordion = require('@base-ui/react/accordion');
|
|
17
17
|
var mergeProps = require('@base-ui/react/merge-props');
|
|
18
18
|
var useRender = require('@base-ui/react/use-render');
|
|
19
|
+
var input = require('@base-ui/react/input');
|
|
19
20
|
|
|
20
21
|
function _interopNamespace(e) {
|
|
21
22
|
if (e && e.__esModule) return e;
|
|
@@ -2654,6 +2655,42 @@ function BookingDetails({
|
|
|
2654
2655
|
}
|
|
2655
2656
|
);
|
|
2656
2657
|
}
|
|
2658
|
+
var DEFAULT_LABELS = {
|
|
2659
|
+
ctaButton: "View booking details",
|
|
2660
|
+
logoAlt: "PlanetaEXO",
|
|
2661
|
+
greeting: (recipientName) => `Hi ${recipientName},`,
|
|
2662
|
+
confirmationMessage: "Great news \u2014 your booking has been confirmed! Everything is set and we\u2019re getting ready for your adventure.",
|
|
2663
|
+
detailsIntro: "Below you\u2019ll find the full details of your reservation, including the adventures, travellers, and payment summary.",
|
|
2664
|
+
nextStepsHeading: "\u{1F4CB} Next Steps",
|
|
2665
|
+
nextSteps: [
|
|
2666
|
+
"Each traveller will receive a separate email with a link to complete their individual registration.",
|
|
2667
|
+
"Make sure everyone completes their registration so we can organise everything properly.",
|
|
2668
|
+
"You will receive a final confirmation once all travellers are registered and ready to go."
|
|
2669
|
+
],
|
|
2670
|
+
bookingSummaryHeading: "\u{1F4DD} Booking Summary",
|
|
2671
|
+
bookingNumberLabel: "Booking Number",
|
|
2672
|
+
adventuresLabel: "Adventures",
|
|
2673
|
+
totalTravellersLabel: "Total Travellers",
|
|
2674
|
+
agentLabel: "Agent",
|
|
2675
|
+
adultsUnit: "adult(s)",
|
|
2676
|
+
childrenUnit: "child(ren)",
|
|
2677
|
+
travellersLabel: "Travellers",
|
|
2678
|
+
childBadge: "child",
|
|
2679
|
+
itineraryLabel: "Itinerary",
|
|
2680
|
+
includedLabel: "O que est\xE1 incluso",
|
|
2681
|
+
notIncludedLabel: "O que n\xE3o est\xE1 incluso",
|
|
2682
|
+
pricingLabel: "Pricing",
|
|
2683
|
+
subtotalLabel: "Subtotal",
|
|
2684
|
+
totalLabel: "Total",
|
|
2685
|
+
paymentSummaryHeading: "\u{1F4B0} Payment Summary",
|
|
2686
|
+
paymentDetailsHeading: "Payment Details",
|
|
2687
|
+
depositLabel: (percent) => `Deposit (${percent}%)`,
|
|
2688
|
+
remainingBalanceLabel: "Remaining balance",
|
|
2689
|
+
balanceDueLabel: "Balance due",
|
|
2690
|
+
paidInFullLabel: "\u2705 Paid in full",
|
|
2691
|
+
footerMessage: "All travellers have been registered for this booking. Each person will receive a separate email with their individual details and any pre-departure information.",
|
|
2692
|
+
footerContact: (agent) => `If you have any questions, just reply to this email or contact ${agent} \u2014 happy to help.`
|
|
2693
|
+
};
|
|
2657
2694
|
var DEFAULT_LOGO = "/logo-planetaexo.png";
|
|
2658
2695
|
function BookingConfirmation({
|
|
2659
2696
|
recipientName,
|
|
@@ -2666,8 +2703,10 @@ function BookingConfirmation({
|
|
|
2666
2703
|
depositInfo,
|
|
2667
2704
|
agent,
|
|
2668
2705
|
viewBookingUrl,
|
|
2706
|
+
labels,
|
|
2669
2707
|
className
|
|
2670
2708
|
}) {
|
|
2709
|
+
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS), labels);
|
|
2671
2710
|
const allTravellers = adventures.flatMap((a) => {
|
|
2672
2711
|
var _a;
|
|
2673
2712
|
return (_a = a.travellers) != null ? _a : [];
|
|
@@ -2677,14 +2716,14 @@ function BookingConfirmation({
|
|
|
2677
2716
|
{
|
|
2678
2717
|
href: viewBookingUrl,
|
|
2679
2718
|
className: "inline-flex items-center justify-center rounded-lg bg-primary px-8 py-3.5 text-sm font-bold text-primary-foreground font-heading hover:bg-primary/90 transition-colors no-underline",
|
|
2680
|
-
children:
|
|
2719
|
+
children: l.ctaButton
|
|
2681
2720
|
}
|
|
2682
2721
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2683
2722
|
"span",
|
|
2684
2723
|
{
|
|
2685
2724
|
className: "inline-flex items-center justify-center rounded-lg bg-primary px-8 py-3.5 text-sm font-bold text-primary-foreground font-heading",
|
|
2686
2725
|
role: "presentation",
|
|
2687
|
-
children:
|
|
2726
|
+
children: l.ctaButton
|
|
2688
2727
|
}
|
|
2689
2728
|
);
|
|
2690
2729
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2699,50 +2738,42 @@ function BookingConfirmation({
|
|
|
2699
2738
|
"img",
|
|
2700
2739
|
{
|
|
2701
2740
|
src: logoUrl,
|
|
2702
|
-
alt:
|
|
2741
|
+
alt: l.logoAlt,
|
|
2703
2742
|
className: "h-[70px] w-auto object-contain"
|
|
2704
2743
|
}
|
|
2705
2744
|
) }),
|
|
2706
2745
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8", children: [
|
|
2707
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
","
|
|
2711
|
-
] }),
|
|
2712
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 text-base", children: "Great news \u2014 your booking has been confirmed! Everything is set and we're getting ready for your adventure." }),
|
|
2713
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-8 text-base", children: "Below you'll find the full details of your reservation, including the adventures, travellers, and payment summary." }),
|
|
2746
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 text-base", children: l.greeting(recipientName) }),
|
|
2747
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 text-base", children: l.confirmationMessage }),
|
|
2748
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-8 text-base", children: l.detailsIntro }),
|
|
2714
2749
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-10", children: ViewBookingCta })
|
|
2715
2750
|
] }),
|
|
2716
2751
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mx-8" }),
|
|
2717
2752
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8 py-8", children: [
|
|
2718
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children:
|
|
2719
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-border p-5 flex flex-col gap-4", children: [
|
|
2720
|
-
"Each traveller will receive a separate email with a link to complete their individual registration.",
|
|
2721
|
-
"Make sure everyone completes their registration so we can organise everything properly.",
|
|
2722
|
-
"You will receive a final confirmation once all travellers are registered and ready to go."
|
|
2723
|
-
].map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3.5", children: [
|
|
2753
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children: l.nextStepsHeading }),
|
|
2754
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-border p-5 flex flex-col gap-4", children: l.nextSteps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3.5", children: [
|
|
2724
2755
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-bold text-primary font-heading mt-0.5", children: i + 1 }),
|
|
2725
2756
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-relaxed", children: step })
|
|
2726
2757
|
] }, i)) })
|
|
2727
2758
|
] }),
|
|
2728
2759
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mx-8" }),
|
|
2729
2760
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8 py-8", children: [
|
|
2730
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children:
|
|
2761
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children: l.bookingSummaryHeading }),
|
|
2731
2762
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-border overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full text-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
2732
2763
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2733
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children:
|
|
2764
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children: l.bookingNumberLabel }),
|
|
2734
2765
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 font-semibold text-primary", children: bookingReference })
|
|
2735
2766
|
] }),
|
|
2736
2767
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2737
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children:
|
|
2768
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children: l.adventuresLabel }),
|
|
2738
2769
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 font-medium text-foreground", children: adventures.length })
|
|
2739
2770
|
] }),
|
|
2740
2771
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2741
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children:
|
|
2772
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children: l.totalTravellersLabel }),
|
|
2742
2773
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 font-medium text-foreground", children: allTravellers.length })
|
|
2743
2774
|
] }),
|
|
2744
2775
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2745
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children:
|
|
2776
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 text-muted-foreground font-ui bg-muted/30", children: l.agentLabel }),
|
|
2746
2777
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-3 px-5 font-medium text-foreground", children: agent })
|
|
2747
2778
|
] })
|
|
2748
2779
|
] }) }) })
|
|
@@ -2792,8 +2823,8 @@ function BookingConfirmation({
|
|
|
2792
2823
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
|
|
2793
2824
|
] }),
|
|
2794
2825
|
[
|
|
2795
|
-
adventure.slots.adults ? `${adventure.slots.adults}
|
|
2796
|
-
adventure.slots.children ? `${adventure.slots.children}
|
|
2826
|
+
adventure.slots.adults ? `${adventure.slots.adults} ${l.adultsUnit}` : null,
|
|
2827
|
+
adventure.slots.children ? `${adventure.slots.children} ${l.childrenUnit}` : null
|
|
2797
2828
|
].filter(Boolean).join(" \xB7 ")
|
|
2798
2829
|
] }),
|
|
2799
2830
|
adventure.partner && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-sm text-muted-foreground font-sans leading-none", children: [
|
|
@@ -2806,7 +2837,7 @@ function BookingConfirmation({
|
|
|
2806
2837
|
adventure.travellers && adventure.travellers.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2807
2838
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border my-1" }),
|
|
2808
2839
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2809
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children:
|
|
2840
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children: l.travellersLabel }),
|
|
2810
2841
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5", children: adventure.travellers.map((t) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2811
2842
|
"div",
|
|
2812
2843
|
{
|
|
@@ -2817,7 +2848,7 @@ function BookingConfirmation({
|
|
|
2817
2848
|
" ",
|
|
2818
2849
|
t.lastName
|
|
2819
2850
|
] }),
|
|
2820
|
-
t.isChild && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold text-muted-foreground bg-muted rounded-full px-2 py-0.5 font-heading uppercase tracking-wide", children:
|
|
2851
|
+
t.isChild && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold text-muted-foreground bg-muted rounded-full px-2 py-0.5 font-heading uppercase tracking-wide", children: l.childBadge })
|
|
2821
2852
|
]
|
|
2822
2853
|
},
|
|
2823
2854
|
t.id
|
|
@@ -2827,12 +2858,12 @@ function BookingConfirmation({
|
|
|
2827
2858
|
adventure.description && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2828
2859
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border my-1" }),
|
|
2829
2860
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2830
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children:
|
|
2861
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children: l.itineraryLabel }),
|
|
2831
2862
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground/80 leading-relaxed font-sans", children: adventure.description })
|
|
2832
2863
|
] })
|
|
2833
2864
|
] }),
|
|
2834
2865
|
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
|
|
2835
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children:
|
|
2866
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: l.includedLabel }),
|
|
2836
2867
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2837
2868
|
"li",
|
|
2838
2869
|
{
|
|
@@ -2846,7 +2877,7 @@ function BookingConfirmation({
|
|
|
2846
2877
|
)) })
|
|
2847
2878
|
] }),
|
|
2848
2879
|
adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2.5 mt-1", children: [
|
|
2849
|
-
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children:
|
|
2880
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: l.notIncludedLabel }),
|
|
2850
2881
|
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2851
2882
|
"li",
|
|
2852
2883
|
{
|
|
@@ -2865,7 +2896,7 @@ function BookingConfirmation({
|
|
|
2865
2896
|
adventure.lineItems && adventure.lineItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2866
2897
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border my-1" }),
|
|
2867
2898
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2868
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children:
|
|
2899
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children: l.pricingLabel }),
|
|
2869
2900
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
2870
2901
|
adventure.lineItems.map((item, j) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2871
2902
|
"div",
|
|
@@ -2891,7 +2922,7 @@ function BookingConfirmation({
|
|
|
2891
2922
|
j
|
|
2892
2923
|
)),
|
|
2893
2924
|
adventure.subtotal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-2 mt-1 border-t border-border", children: [
|
|
2894
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-heading", children:
|
|
2925
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-heading", children: l.subtotalLabel }),
|
|
2895
2926
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-heading whitespace-nowrap", children: adventure.subtotal })
|
|
2896
2927
|
] })
|
|
2897
2928
|
] })
|
|
@@ -2905,7 +2936,7 @@ function BookingConfirmation({
|
|
|
2905
2936
|
}) }),
|
|
2906
2937
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mx-8" }),
|
|
2907
2938
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8 py-8", children: [
|
|
2908
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children:
|
|
2939
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 font-heading font-bold text-foreground text-lg", children: l.paymentSummaryHeading }),
|
|
2909
2940
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-border overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full text-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
2910
2941
|
summaryLineItems && summaryLineItems.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2911
2942
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children: item.label }),
|
|
@@ -2924,27 +2955,23 @@ function BookingConfirmation({
|
|
|
2924
2955
|
)
|
|
2925
2956
|
] }, i)),
|
|
2926
2957
|
subtotal && /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2927
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground font-ui", children:
|
|
2958
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground font-ui", children: l.subtotalLabel }),
|
|
2928
2959
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-right font-medium text-foreground whitespace-nowrap", children: subtotal })
|
|
2929
2960
|
] }),
|
|
2930
2961
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "bg-muted/30", children: [
|
|
2931
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-4 px-4 font-bold text-foreground font-heading text-base", children:
|
|
2962
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-4 px-4 font-bold text-foreground font-heading text-base", children: l.totalLabel }),
|
|
2932
2963
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-4 px-4 text-right font-bold text-primary font-heading text-xl whitespace-nowrap", children: total })
|
|
2933
2964
|
] })
|
|
2934
2965
|
] }) }) }),
|
|
2935
2966
|
depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border mt-4 overflow-hidden", children: [
|
|
2936
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 bg-muted/30 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children:
|
|
2967
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 py-3 bg-muted/30 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: l.paymentDetailsHeading }) }),
|
|
2937
2968
|
/* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full text-sm", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
2938
2969
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2939
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2940
|
-
"Deposit (",
|
|
2941
|
-
depositInfo.depositPercent,
|
|
2942
|
-
"%)"
|
|
2943
|
-
] }),
|
|
2970
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children: l.depositLabel(depositInfo.depositPercent) }),
|
|
2944
2971
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-right font-medium text-foreground whitespace-nowrap", children: depositInfo.depositAmount })
|
|
2945
2972
|
] }),
|
|
2946
2973
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-border", children: [
|
|
2947
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children:
|
|
2974
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children: l.remainingBalanceLabel }),
|
|
2948
2975
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-right font-medium text-foreground whitespace-nowrap", children: depositInfo.remainingAmount })
|
|
2949
2976
|
] }),
|
|
2950
2977
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2954,7 +2981,7 @@ function BookingConfirmation({
|
|
|
2954
2981
|
depositInfo.isPaidInFull && "border-b border-border"
|
|
2955
2982
|
),
|
|
2956
2983
|
children: [
|
|
2957
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children:
|
|
2984
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-muted-foreground", children: l.balanceDueLabel }),
|
|
2958
2985
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-2.5 px-4 text-right font-medium text-foreground whitespace-nowrap", children: depositInfo.balanceDueDate })
|
|
2959
2986
|
]
|
|
2960
2987
|
}
|
|
@@ -2964,7 +2991,7 @@ function BookingConfirmation({
|
|
|
2964
2991
|
{
|
|
2965
2992
|
colSpan: 2,
|
|
2966
2993
|
className: "py-3 px-4 text-center font-semibold text-green-600 bg-green-50",
|
|
2967
|
-
children:
|
|
2994
|
+
children: l.paidInFullLabel
|
|
2968
2995
|
}
|
|
2969
2996
|
) })
|
|
2970
2997
|
] }) })
|
|
@@ -2972,18 +2999,29 @@ function BookingConfirmation({
|
|
|
2972
2999
|
] }),
|
|
2973
3000
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mx-8" }),
|
|
2974
3001
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-8 py-8 pb-10", children: [
|
|
2975
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 text-base", children:
|
|
2976
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2977
|
-
"If you have any questions, just reply to this email or contact",
|
|
2978
|
-
" ",
|
|
2979
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: agent }),
|
|
2980
|
-
" \u2014 happy to help."
|
|
2981
|
-
] })
|
|
3002
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-5 text-base", children: l.footerMessage }),
|
|
3003
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base", children: l.footerContact(agent) })
|
|
2982
3004
|
] })
|
|
2983
3005
|
]
|
|
2984
3006
|
}
|
|
2985
3007
|
);
|
|
2986
3008
|
}
|
|
3009
|
+
var DEFAULT_LABELS2 = {
|
|
3010
|
+
ctaButton: "Add travellers to your booking",
|
|
3011
|
+
logoAlt: "PlanetaEXO",
|
|
3012
|
+
greeting: (recipientName) => `Hi ${recipientName},`,
|
|
3013
|
+
thankYouMessage: "Thank you for booking your adventure with PlanetaEXO \u2014 we\u2019re really looking forward to your adventure.",
|
|
3014
|
+
addTravellersInstruction: "To move forward, the first step is to add all travellers included in your booking. Once you do this, each person \u2014 including you \u2014 will receive an email with a link to complete their individual registration.",
|
|
3015
|
+
summaryHeading: "\u{1F4DD} Here\u2019s a quick summary of your booking:",
|
|
3016
|
+
bookingNumberLabel: "Booking Number:",
|
|
3017
|
+
activityLabel: "Activity:",
|
|
3018
|
+
adventureLabel: "Adventure:",
|
|
3019
|
+
startingDateLabel: "Starting Date:",
|
|
3020
|
+
numberOfPeopleLabel: "Number of People:",
|
|
3021
|
+
hostLabel: "Host:",
|
|
3022
|
+
postCtaMessage: "After adding everyone, you will also receive your own registration email, just like the other travellers. Please make sure everyone completes this step so we can organise everything properly.",
|
|
3023
|
+
closingMessage: "If you have any questions, just reply to this email \u2014 happy to help."
|
|
3024
|
+
};
|
|
2987
3025
|
var DEFAULT_LOGO2 = "/logo-planetaexo.png";
|
|
2988
3026
|
function BookingConfirmationEmail({
|
|
2989
3027
|
recipientName,
|
|
@@ -2995,21 +3033,23 @@ function BookingConfirmationEmail({
|
|
|
2995
3033
|
startingDate,
|
|
2996
3034
|
numberOfPeople,
|
|
2997
3035
|
host,
|
|
3036
|
+
labels,
|
|
2998
3037
|
className
|
|
2999
3038
|
}) {
|
|
3039
|
+
const l = __spreadValues(__spreadValues({}, DEFAULT_LABELS2), labels);
|
|
3000
3040
|
const AddTravellersCta = addTravellersUrl ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3001
3041
|
"a",
|
|
3002
3042
|
{
|
|
3003
3043
|
href: addTravellersUrl,
|
|
3004
3044
|
className: "inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 text-sm font-bold text-primary-foreground font-heading hover:bg-primary-800 transition-colors no-underline",
|
|
3005
|
-
children:
|
|
3045
|
+
children: l.ctaButton
|
|
3006
3046
|
}
|
|
3007
3047
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3008
3048
|
"span",
|
|
3009
3049
|
{
|
|
3010
3050
|
className: "inline-flex items-center justify-center rounded-lg bg-primary px-6 py-3 text-sm font-bold text-primary-foreground font-heading",
|
|
3011
3051
|
role: "presentation",
|
|
3012
|
-
children:
|
|
3052
|
+
children: l.ctaButton
|
|
3013
3053
|
}
|
|
3014
3054
|
);
|
|
3015
3055
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3024,49 +3064,45 @@ function BookingConfirmationEmail({
|
|
|
3024
3064
|
"img",
|
|
3025
3065
|
{
|
|
3026
3066
|
src: logoUrl,
|
|
3027
|
-
alt:
|
|
3067
|
+
alt: l.logoAlt,
|
|
3028
3068
|
className: "h-[70px] w-auto object-contain"
|
|
3029
3069
|
}
|
|
3030
3070
|
) }),
|
|
3031
|
-
/* @__PURE__ */ jsxRuntime.
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
","
|
|
3035
|
-
] }),
|
|
3036
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: "Thank you for booking your adventure with PlanetaEXO \u2014 we're really looking forward to your adventure." }),
|
|
3037
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: "To move forward, the first step is to add all travellers included in your booking. Once you do this, each person \u2014 including you \u2014 will receive an email with a link to complete their individual registration." }),
|
|
3071
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.greeting(recipientName) }),
|
|
3072
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.thankYouMessage }),
|
|
3073
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.addTravellersInstruction }),
|
|
3038
3074
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-8", children: AddTravellersCta }),
|
|
3039
3075
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
|
|
3040
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4 font-heading font-bold text-foreground", children:
|
|
3076
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4 font-heading font-bold text-foreground", children: l.summaryHeading }),
|
|
3041
3077
|
/* @__PURE__ */ jsxRuntime.jsx("table", { className: "w-full text-sm mb-8", children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: "divide-y divide-border", children: [
|
|
3042
3078
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3043
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3079
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.bookingNumberLabel }),
|
|
3044
3080
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: bookingNumber })
|
|
3045
3081
|
] }),
|
|
3046
3082
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3047
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3083
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.activityLabel }),
|
|
3048
3084
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: activity })
|
|
3049
3085
|
] }),
|
|
3050
3086
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3051
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3087
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.adventureLabel }),
|
|
3052
3088
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: adventure })
|
|
3053
3089
|
] }),
|
|
3054
3090
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3055
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3091
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.startingDateLabel }),
|
|
3056
3092
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: startingDate })
|
|
3057
3093
|
] }),
|
|
3058
3094
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3059
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3095
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.numberOfPeopleLabel }),
|
|
3060
3096
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: numberOfPeople })
|
|
3061
3097
|
] }),
|
|
3062
3098
|
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
3063
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children:
|
|
3099
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.hostLabel }),
|
|
3064
3100
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: host })
|
|
3065
3101
|
] })
|
|
3066
3102
|
] }) }),
|
|
3067
3103
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
|
|
3068
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children:
|
|
3069
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { children:
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.postCtaMessage }),
|
|
3105
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: l.closingMessage })
|
|
3070
3106
|
]
|
|
3071
3107
|
}
|
|
3072
3108
|
);
|
|
@@ -6274,6 +6310,368 @@ function ActivityCard({
|
|
|
6274
6310
|
}
|
|
6275
6311
|
);
|
|
6276
6312
|
}
|
|
6313
|
+
function Input(_a) {
|
|
6314
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
6315
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6316
|
+
input.Input,
|
|
6317
|
+
__spreadValues({
|
|
6318
|
+
type,
|
|
6319
|
+
"data-slot": "input",
|
|
6320
|
+
className: cn(
|
|
6321
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
6322
|
+
className
|
|
6323
|
+
)
|
|
6324
|
+
}, props)
|
|
6325
|
+
);
|
|
6326
|
+
}
|
|
6327
|
+
function Label(_a) {
|
|
6328
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6329
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6330
|
+
"label",
|
|
6331
|
+
__spreadValues({
|
|
6332
|
+
"data-slot": "label",
|
|
6333
|
+
className: cn(
|
|
6334
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
6335
|
+
className
|
|
6336
|
+
)
|
|
6337
|
+
}, props)
|
|
6338
|
+
);
|
|
6339
|
+
}
|
|
6340
|
+
var DEFAULTS = {
|
|
6341
|
+
heading: "Where will your next adventure take you?",
|
|
6342
|
+
subtitle: "Tell us about your dream trip and our travel experts will craft the perfect itinerary for you.",
|
|
6343
|
+
nameLabel: "Your name",
|
|
6344
|
+
namePlaceholder: "e.g. Maria Silva",
|
|
6345
|
+
emailLabel: "Email",
|
|
6346
|
+
emailPlaceholder: "you@example.com",
|
|
6347
|
+
travelDateLabel: "When are you planning to travel?",
|
|
6348
|
+
travelDateOptions: [
|
|
6349
|
+
"In the next 30 days",
|
|
6350
|
+
"1 \u2013 3 months from now",
|
|
6351
|
+
"3 \u2013 6 months from now",
|
|
6352
|
+
"6 \u2013 12 months from now",
|
|
6353
|
+
"I'm just exploring"
|
|
6354
|
+
],
|
|
6355
|
+
submitLabel: "Send my request",
|
|
6356
|
+
successHeading: "Thank you!",
|
|
6357
|
+
successMessage: "One of our travel experts will reach out soon to help plan your perfect trip.",
|
|
6358
|
+
privacyText: 'By submitting you agree to our <a href="/privacy-policy" target="_blank" rel="noopener">Privacy Policy</a>.',
|
|
6359
|
+
trigger: "delay",
|
|
6360
|
+
delaySeconds: 5,
|
|
6361
|
+
scrollPercent: 50,
|
|
6362
|
+
dismissDays: 7,
|
|
6363
|
+
overlayOpacity: 40,
|
|
6364
|
+
position: "center"
|
|
6365
|
+
};
|
|
6366
|
+
var COOKIE_NAME = "pexo_lead_popup_dismissed";
|
|
6367
|
+
function isDismissed() {
|
|
6368
|
+
return document.cookie.includes(`${COOKIE_NAME}=1`);
|
|
6369
|
+
}
|
|
6370
|
+
function setDismissed(days) {
|
|
6371
|
+
const expires = new Date(Date.now() + days * 864e5).toUTCString();
|
|
6372
|
+
document.cookie = `${COOKIE_NAME}=1; expires=${expires}; path=/; SameSite=Lax`;
|
|
6373
|
+
}
|
|
6374
|
+
function LeadCapturePopup({
|
|
6375
|
+
config: _config
|
|
6376
|
+
}) {
|
|
6377
|
+
var _a;
|
|
6378
|
+
const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
|
|
6379
|
+
const [open, setOpen] = React18.useState(false);
|
|
6380
|
+
const [closing, setClosing] = React18.useState(false);
|
|
6381
|
+
const [submitted, setSubmitted] = React18.useState(false);
|
|
6382
|
+
const [submitting, setSubmitting] = React18.useState(false);
|
|
6383
|
+
const [error, setError] = React18.useState(null);
|
|
6384
|
+
const [name, setName] = React18.useState("");
|
|
6385
|
+
const [email, setEmail] = React18.useState("");
|
|
6386
|
+
const [travelDate, setTravelDate] = React18.useState("");
|
|
6387
|
+
const panelRef = React18.useRef(null);
|
|
6388
|
+
const nameRef = React18.useRef(null);
|
|
6389
|
+
const show = React18.useCallback(() => {
|
|
6390
|
+
if (isDismissed()) return;
|
|
6391
|
+
setOpen(true);
|
|
6392
|
+
}, []);
|
|
6393
|
+
React18.useEffect(() => {
|
|
6394
|
+
var _a2;
|
|
6395
|
+
if (isDismissed()) return;
|
|
6396
|
+
if (config.trigger === "delay") {
|
|
6397
|
+
const t = setTimeout(show, ((_a2 = config.delaySeconds) != null ? _a2 : 5) * 1e3);
|
|
6398
|
+
return () => clearTimeout(t);
|
|
6399
|
+
}
|
|
6400
|
+
if (config.trigger === "exit_intent") {
|
|
6401
|
+
const handler = (e) => {
|
|
6402
|
+
if (e.clientY <= 5) show();
|
|
6403
|
+
};
|
|
6404
|
+
document.addEventListener("mouseout", handler);
|
|
6405
|
+
return () => document.removeEventListener("mouseout", handler);
|
|
6406
|
+
}
|
|
6407
|
+
if (config.trigger === "scroll") {
|
|
6408
|
+
const handler = () => {
|
|
6409
|
+
var _a3;
|
|
6410
|
+
const pct = window.scrollY / (document.documentElement.scrollHeight - window.innerHeight) * 100;
|
|
6411
|
+
if (pct >= ((_a3 = config.scrollPercent) != null ? _a3 : 50)) {
|
|
6412
|
+
show();
|
|
6413
|
+
window.removeEventListener("scroll", handler);
|
|
6414
|
+
}
|
|
6415
|
+
};
|
|
6416
|
+
window.addEventListener("scroll", handler, { passive: true });
|
|
6417
|
+
return () => window.removeEventListener("scroll", handler);
|
|
6418
|
+
}
|
|
6419
|
+
}, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
|
|
6420
|
+
React18.useEffect(() => {
|
|
6421
|
+
if (open && !submitted) {
|
|
6422
|
+
requestAnimationFrame(() => {
|
|
6423
|
+
var _a2;
|
|
6424
|
+
return (_a2 = nameRef.current) == null ? void 0 : _a2.focus();
|
|
6425
|
+
});
|
|
6426
|
+
}
|
|
6427
|
+
}, [open, submitted]);
|
|
6428
|
+
const close = React18.useCallback(() => {
|
|
6429
|
+
setClosing(true);
|
|
6430
|
+
setDismissed(config.dismissDays);
|
|
6431
|
+
setTimeout(() => {
|
|
6432
|
+
setOpen(false);
|
|
6433
|
+
setClosing(false);
|
|
6434
|
+
}, 250);
|
|
6435
|
+
}, [config.dismissDays]);
|
|
6436
|
+
React18.useEffect(() => {
|
|
6437
|
+
if (!open) return;
|
|
6438
|
+
const handler = (e) => {
|
|
6439
|
+
if (e.key === "Escape") close();
|
|
6440
|
+
};
|
|
6441
|
+
document.addEventListener("keydown", handler);
|
|
6442
|
+
return () => document.removeEventListener("keydown", handler);
|
|
6443
|
+
}, [open, close]);
|
|
6444
|
+
const onOverlayClick = React18.useCallback(
|
|
6445
|
+
(e) => {
|
|
6446
|
+
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
6447
|
+
close();
|
|
6448
|
+
}
|
|
6449
|
+
},
|
|
6450
|
+
[close]
|
|
6451
|
+
);
|
|
6452
|
+
const handleSubmit = async (e) => {
|
|
6453
|
+
var _a2;
|
|
6454
|
+
e.preventDefault();
|
|
6455
|
+
setError(null);
|
|
6456
|
+
if (!name.trim() || !email.trim() || !travelDate) {
|
|
6457
|
+
setError("Please fill in all fields.");
|
|
6458
|
+
return;
|
|
6459
|
+
}
|
|
6460
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
|
|
6461
|
+
setError("Please enter a valid email address.");
|
|
6462
|
+
return;
|
|
6463
|
+
}
|
|
6464
|
+
setSubmitting(true);
|
|
6465
|
+
try {
|
|
6466
|
+
if (config.ajaxUrl) {
|
|
6467
|
+
const res = await fetch(config.ajaxUrl, {
|
|
6468
|
+
method: "POST",
|
|
6469
|
+
headers: { "Content-Type": "application/json" },
|
|
6470
|
+
body: JSON.stringify({
|
|
6471
|
+
name: name.trim(),
|
|
6472
|
+
email: email.trim(),
|
|
6473
|
+
travel_date: travelDate,
|
|
6474
|
+
nonce: (_a2 = config.nonce) != null ? _a2 : ""
|
|
6475
|
+
})
|
|
6476
|
+
});
|
|
6477
|
+
if (!res.ok) throw new Error("Server error");
|
|
6478
|
+
}
|
|
6479
|
+
setSubmitted(true);
|
|
6480
|
+
setDismissed(config.dismissDays);
|
|
6481
|
+
} catch (e2) {
|
|
6482
|
+
setError("Something went wrong. Please try again.");
|
|
6483
|
+
} finally {
|
|
6484
|
+
setSubmitting(false);
|
|
6485
|
+
}
|
|
6486
|
+
};
|
|
6487
|
+
if (!open) return null;
|
|
6488
|
+
const accentStyle = config.accentColor ? { "--popup-accent": config.accentColor } : void 0;
|
|
6489
|
+
const isCenter = config.position === "center";
|
|
6490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6491
|
+
"div",
|
|
6492
|
+
{
|
|
6493
|
+
className: cn(
|
|
6494
|
+
"pexo-lead-popup fixed inset-0 z-[99999] flex",
|
|
6495
|
+
isCenter ? "items-center justify-center" : "items-end justify-end",
|
|
6496
|
+
closing ? "animate-fade-out" : "animate-fade-in"
|
|
6497
|
+
),
|
|
6498
|
+
style: {
|
|
6499
|
+
backgroundColor: `rgba(0,0,0,${((_a = config.overlayOpacity) != null ? _a : 40) / 100})`,
|
|
6500
|
+
backdropFilter: "blur(4px)",
|
|
6501
|
+
WebkitBackdropFilter: "blur(4px)"
|
|
6502
|
+
},
|
|
6503
|
+
onClick: onOverlayClick,
|
|
6504
|
+
role: "dialog",
|
|
6505
|
+
"aria-modal": "true",
|
|
6506
|
+
"aria-label": config.heading,
|
|
6507
|
+
children: [
|
|
6508
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6509
|
+
"div",
|
|
6510
|
+
{
|
|
6511
|
+
ref: panelRef,
|
|
6512
|
+
className: cn(
|
|
6513
|
+
"relative flex flex-col overflow-hidden bg-background text-foreground shadow-2xl ring-1 ring-foreground/5",
|
|
6514
|
+
isCenter ? "m-4 w-full max-w-md rounded-2xl sm:max-w-lg" : "m-4 w-full max-w-sm rounded-2xl sm:m-6",
|
|
6515
|
+
closing ? isCenter ? "animate-zoom-out" : "animate-slide-out-right" : isCenter ? "animate-zoom-in" : "animate-slide-in-right"
|
|
6516
|
+
),
|
|
6517
|
+
style: accentStyle,
|
|
6518
|
+
children: [
|
|
6519
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6520
|
+
"button",
|
|
6521
|
+
{
|
|
6522
|
+
onClick: close,
|
|
6523
|
+
className: "absolute top-3 right-3 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-black/30 text-white backdrop-blur-sm transition-colors hover:bg-black/50",
|
|
6524
|
+
"aria-label": "Close",
|
|
6525
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-4 w-4" })
|
|
6526
|
+
}
|
|
6527
|
+
),
|
|
6528
|
+
config.imageUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative h-44 w-full shrink-0 overflow-hidden sm:h-52", children: [
|
|
6529
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6530
|
+
"img",
|
|
6531
|
+
{
|
|
6532
|
+
src: config.imageUrl,
|
|
6533
|
+
alt: "",
|
|
6534
|
+
className: "h-full w-full object-cover",
|
|
6535
|
+
loading: "eager"
|
|
6536
|
+
}
|
|
6537
|
+
),
|
|
6538
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent" })
|
|
6539
|
+
] }),
|
|
6540
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col gap-5 p-5 sm:p-6", children: !submitted ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6541
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
6542
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-heading text-lg font-bold leading-tight tracking-tight text-foreground sm:text-xl", children: config.heading }),
|
|
6543
|
+
config.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: config.subtitle })
|
|
6544
|
+
] }),
|
|
6545
|
+
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [
|
|
6546
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
6547
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "pexo-lead-name", className: "text-xs uppercase tracking-wider text-muted-foreground", children: config.nameLabel }),
|
|
6548
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6549
|
+
Input,
|
|
6550
|
+
{
|
|
6551
|
+
ref: nameRef,
|
|
6552
|
+
id: "pexo-lead-name",
|
|
6553
|
+
type: "text",
|
|
6554
|
+
placeholder: config.namePlaceholder,
|
|
6555
|
+
value: name,
|
|
6556
|
+
onChange: (e) => setName(e.target.value),
|
|
6557
|
+
autoComplete: "name",
|
|
6558
|
+
className: "h-10 rounded-lg border-border/60 bg-muted/30 px-3 text-sm focus-visible:border-primary focus-visible:ring-primary/30"
|
|
6559
|
+
}
|
|
6560
|
+
)
|
|
6561
|
+
] }),
|
|
6562
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
6563
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "pexo-lead-email", className: "text-xs uppercase tracking-wider text-muted-foreground", children: config.emailLabel }),
|
|
6564
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6565
|
+
Input,
|
|
6566
|
+
{
|
|
6567
|
+
id: "pexo-lead-email",
|
|
6568
|
+
type: "email",
|
|
6569
|
+
placeholder: config.emailPlaceholder,
|
|
6570
|
+
value: email,
|
|
6571
|
+
onChange: (e) => setEmail(e.target.value),
|
|
6572
|
+
autoComplete: "email",
|
|
6573
|
+
className: "h-10 rounded-lg border-border/60 bg-muted/30 px-3 text-sm focus-visible:border-primary focus-visible:ring-primary/30"
|
|
6574
|
+
}
|
|
6575
|
+
)
|
|
6576
|
+
] }),
|
|
6577
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
6578
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "pexo-lead-travel", className: "text-xs uppercase tracking-wider text-muted-foreground", children: config.travelDateLabel }),
|
|
6579
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6580
|
+
"select",
|
|
6581
|
+
{
|
|
6582
|
+
id: "pexo-lead-travel",
|
|
6583
|
+
value: travelDate,
|
|
6584
|
+
onChange: (e) => setTravelDate(e.target.value),
|
|
6585
|
+
className: cn(
|
|
6586
|
+
"h-10 w-full appearance-none rounded-lg border border-border/60 bg-muted/30 px-3 text-sm text-foreground outline-none transition-colors",
|
|
6587
|
+
"focus-visible:border-primary focus-visible:ring-3 focus-visible:ring-primary/30",
|
|
6588
|
+
!travelDate && "text-muted-foreground"
|
|
6589
|
+
),
|
|
6590
|
+
style: {
|
|
6591
|
+
backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,
|
|
6592
|
+
backgroundRepeat: "no-repeat",
|
|
6593
|
+
backgroundPosition: "right 0.75rem center",
|
|
6594
|
+
paddingRight: "2.5rem"
|
|
6595
|
+
},
|
|
6596
|
+
children: [
|
|
6597
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: "Select a timeframe\u2026" }),
|
|
6598
|
+
config.travelDateOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt, children: opt }, opt))
|
|
6599
|
+
]
|
|
6600
|
+
}
|
|
6601
|
+
)
|
|
6602
|
+
] }),
|
|
6603
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-destructive", role: "alert", children: error }),
|
|
6604
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6605
|
+
Button,
|
|
6606
|
+
{
|
|
6607
|
+
type: "submit",
|
|
6608
|
+
disabled: submitting,
|
|
6609
|
+
className: cn(
|
|
6610
|
+
"h-11 w-full gap-2 rounded-lg text-sm font-bold tracking-wide",
|
|
6611
|
+
config.accentColor ? "border-transparent text-white" : "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
6612
|
+
),
|
|
6613
|
+
style: config.accentColor ? { backgroundColor: config.accentColor } : void 0,
|
|
6614
|
+
children: [
|
|
6615
|
+
submitting ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2Icon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendIcon, { className: "h-4 w-4" }),
|
|
6616
|
+
submitting ? "Sending\u2026" : config.submitLabel
|
|
6617
|
+
]
|
|
6618
|
+
}
|
|
6619
|
+
),
|
|
6620
|
+
config.privacyText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6621
|
+
"p",
|
|
6622
|
+
{
|
|
6623
|
+
className: "text-center text-[11px] leading-relaxed text-muted-foreground [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:text-foreground",
|
|
6624
|
+
dangerouslySetInnerHTML: { __html: config.privacyText }
|
|
6625
|
+
}
|
|
6626
|
+
)
|
|
6627
|
+
] })
|
|
6628
|
+
] }) : (
|
|
6629
|
+
/* ---- Success state ---- */
|
|
6630
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-4 py-8 text-center", children: [
|
|
6631
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircleIcon, { className: "h-8 w-8 text-primary" }) }),
|
|
6632
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
6633
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-heading text-lg font-bold text-foreground", children: config.successHeading }),
|
|
6634
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: config.successMessage })
|
|
6635
|
+
] }),
|
|
6636
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6637
|
+
Button,
|
|
6638
|
+
{
|
|
6639
|
+
onClick: close,
|
|
6640
|
+
variant: "outline",
|
|
6641
|
+
className: "mt-2 h-10 px-6 text-sm",
|
|
6642
|
+
children: "Close"
|
|
6643
|
+
}
|
|
6644
|
+
)
|
|
6645
|
+
] })
|
|
6646
|
+
) })
|
|
6647
|
+
]
|
|
6648
|
+
}
|
|
6649
|
+
),
|
|
6650
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
6651
|
+
@keyframes pexo-fade-in { from { opacity: 0 } to { opacity: 1 } }
|
|
6652
|
+
@keyframes pexo-fade-out { from { opacity: 1 } to { opacity: 0 } }
|
|
6653
|
+
@keyframes pexo-zoom-in { from { opacity: 0; transform: scale(0.92) } to { opacity: 1; transform: scale(1) } }
|
|
6654
|
+
@keyframes pexo-zoom-out { from { opacity: 1; transform: scale(1) } to { opacity: 0; transform: scale(0.92) } }
|
|
6655
|
+
@keyframes pexo-slide-in-right { from { opacity: 0; transform: translateX(100%) } to { opacity: 1; transform: translateX(0) } }
|
|
6656
|
+
@keyframes pexo-slide-out-right { from { opacity: 1; transform: translateX(0) } to { opacity: 0; transform: translateX(100%) } }
|
|
6657
|
+
|
|
6658
|
+
.pexo-lead-popup .animate-fade-in { animation: pexo-fade-in 0.3s ease-out both }
|
|
6659
|
+
.pexo-lead-popup .animate-fade-out { animation: pexo-fade-out 0.25s ease-in both }
|
|
6660
|
+
.pexo-lead-popup .animate-zoom-in { animation: pexo-zoom-in 0.35s cubic-bezier(0.16,1,0.3,1) both }
|
|
6661
|
+
.pexo-lead-popup .animate-zoom-out { animation: pexo-zoom-out 0.25s ease-in both }
|
|
6662
|
+
.pexo-lead-popup .animate-slide-in-right { animation: pexo-slide-in-right 0.4s cubic-bezier(0.16,1,0.3,1) both }
|
|
6663
|
+
.pexo-lead-popup .animate-slide-out-right { animation: pexo-slide-out-right 0.3s ease-in both }
|
|
6664
|
+
|
|
6665
|
+
/* Ensure popup fonts inherit from design system */
|
|
6666
|
+
.pexo-lead-popup { font-family: var(--font-sans, "Literata", Georgia, serif); }
|
|
6667
|
+
.pexo-lead-popup h1, .pexo-lead-popup h2, .pexo-lead-popup h3 { font-family: var(--font-heading, "ArcaMajora3", sans-serif); }
|
|
6668
|
+
.pexo-lead-popup button, .pexo-lead-popup label { font-family: var(--font-ui, "ArcaMajora3", sans-serif); }
|
|
6669
|
+
.pexo-lead-popup select { font-family: var(--font-sans, "Literata", Georgia, serif); }
|
|
6670
|
+
` })
|
|
6671
|
+
]
|
|
6672
|
+
}
|
|
6673
|
+
);
|
|
6674
|
+
}
|
|
6277
6675
|
|
|
6278
6676
|
exports.ActivityCard = ActivityCard;
|
|
6279
6677
|
exports.BookingConfirmation = BookingConfirmation;
|
|
@@ -6290,6 +6688,7 @@ exports.FilterPanel = FilterPanel;
|
|
|
6290
6688
|
exports.FloatingInput = FloatingInput;
|
|
6291
6689
|
exports.FloatingSelect = FloatingSelect;
|
|
6292
6690
|
exports.Itinerary = Itinerary;
|
|
6691
|
+
exports.LeadCapturePopup = LeadCapturePopup;
|
|
6293
6692
|
exports.MenuTrip = MenuTrip;
|
|
6294
6693
|
exports.Offer = Offer;
|
|
6295
6694
|
exports.OfferAdventureCard = OfferAdventureCard;
|