@planetaexo/design-system 0.3.6 → 0.3.11
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 +345 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +263 -22
- package/dist/index.d.ts +263 -22
- package/dist/index.js +326 -127
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var lucideReact = require('lucide-react');
|
|
3
|
+
var React19 = require('react');
|
|
4
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
5
|
var clsx = require('clsx');
|
|
7
6
|
var tailwindMerge = require('tailwind-merge');
|
|
8
|
-
var separator = require('@base-ui/react/separator');
|
|
9
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var dateFns = require('date-fns');
|
|
9
|
+
var lucideReact = require('lucide-react');
|
|
10
|
+
var separator = require('@base-ui/react/separator');
|
|
10
11
|
var dialog = require('@base-ui/react/dialog');
|
|
11
12
|
var button = require('@base-ui/react/button');
|
|
12
|
-
var classVarianceAuthority = require('class-variance-authority');
|
|
13
13
|
var reactDayPicker = require('react-day-picker');
|
|
14
14
|
var popover = require('@base-ui/react/popover');
|
|
15
15
|
var checkbox = require('@base-ui/react/checkbox');
|
|
@@ -36,7 +36,7 @@ function _interopNamespace(e) {
|
|
|
36
36
|
return Object.freeze(n);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var React19__namespace = /*#__PURE__*/_interopNamespace(React19);
|
|
40
40
|
|
|
41
41
|
var __defProp = Object.defineProperty;
|
|
42
42
|
var __defProps = Object.defineProperties;
|
|
@@ -72,6 +72,48 @@ var __objRest = (source, exclude) => {
|
|
|
72
72
|
function cn(...inputs) {
|
|
73
73
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
74
74
|
}
|
|
75
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
76
|
+
// Base — shared across all variants
|
|
77
|
+
"inline-flex items-center justify-center gap-1.5 rounded-full transition-colors disabled:opacity-50 disabled:pointer-events-none",
|
|
78
|
+
{
|
|
79
|
+
variants: {
|
|
80
|
+
variant: {
|
|
81
|
+
/** Ação principal — fundo sólido primary, fonte heading */
|
|
82
|
+
primary: "bg-primary text-primary-foreground font-heading font-bold hover:bg-primary/90",
|
|
83
|
+
/** Ação secundária com destaque — borda primary, texto primary, fonte heading */
|
|
84
|
+
secondary: "border border-primary text-primary font-heading font-bold hover:bg-primary/10",
|
|
85
|
+
/** Ação neutra / cancelamento — borda border, texto foreground, fonte sans */
|
|
86
|
+
outline: "border border-border text-foreground font-sans hover:bg-muted/50",
|
|
87
|
+
/** Ação destrutiva — borda e texto destructive, fonte sans */
|
|
88
|
+
destructive: "border border-destructive/50 text-destructive font-sans hover:bg-destructive/5",
|
|
89
|
+
/** Link inline — sem borda, sublinhado, texto primary */
|
|
90
|
+
link: "underline underline-offset-2 text-primary font-sans hover:text-primary/80"
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
sm: "px-3 py-1 text-xs",
|
|
94
|
+
md: "px-6 py-2.5 text-sm",
|
|
95
|
+
lg: "px-8 py-3 text-base"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
defaultVariants: {
|
|
99
|
+
variant: "primary",
|
|
100
|
+
size: "md"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
var Button = React19__namespace.forwardRef(
|
|
105
|
+
(_a, ref) => {
|
|
106
|
+
var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
|
107
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
108
|
+
"button",
|
|
109
|
+
__spreadValues({
|
|
110
|
+
ref,
|
|
111
|
+
className: cn(buttonVariants({ variant, size }), className)
|
|
112
|
+
}, props)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
Button.displayName = "Button";
|
|
75
117
|
function Separator(_a) {
|
|
76
118
|
var _b = _a, {
|
|
77
119
|
className,
|
|
@@ -92,7 +134,7 @@ function Separator(_a) {
|
|
|
92
134
|
}, props)
|
|
93
135
|
);
|
|
94
136
|
}
|
|
95
|
-
var
|
|
137
|
+
var buttonVariants2 = classVarianceAuthority.cva(
|
|
96
138
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
97
139
|
{
|
|
98
140
|
variants: {
|
|
@@ -121,7 +163,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
121
163
|
}
|
|
122
164
|
}
|
|
123
165
|
);
|
|
124
|
-
function
|
|
166
|
+
function Button2(_a) {
|
|
125
167
|
var _b = _a, {
|
|
126
168
|
className,
|
|
127
169
|
variant = "default",
|
|
@@ -135,7 +177,7 @@ function Button(_a) {
|
|
|
135
177
|
button.Button,
|
|
136
178
|
__spreadValues({
|
|
137
179
|
"data-slot": "button",
|
|
138
|
-
className: cn(
|
|
180
|
+
className: cn(buttonVariants2({ variant, size, className }))
|
|
139
181
|
}, props)
|
|
140
182
|
);
|
|
141
183
|
}
|
|
@@ -196,7 +238,7 @@ function DialogContent(_a) {
|
|
|
196
238
|
{
|
|
197
239
|
"data-slot": "dialog-close",
|
|
198
240
|
render: /* @__PURE__ */ jsxRuntime.jsx(
|
|
199
|
-
|
|
241
|
+
Button2,
|
|
200
242
|
{
|
|
201
243
|
variant: "ghost",
|
|
202
244
|
className: "absolute top-2 right-2",
|
|
@@ -302,12 +344,12 @@ function Calendar(_a) {
|
|
|
302
344
|
defaultClassNames.nav
|
|
303
345
|
),
|
|
304
346
|
button_previous: cn(
|
|
305
|
-
|
|
347
|
+
buttonVariants2({ variant: buttonVariant }),
|
|
306
348
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
307
349
|
defaultClassNames.button_previous
|
|
308
350
|
),
|
|
309
351
|
button_next: cn(
|
|
310
|
-
|
|
352
|
+
buttonVariants2({ variant: buttonVariant }),
|
|
311
353
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
312
354
|
defaultClassNames.button_next
|
|
313
355
|
),
|
|
@@ -422,13 +464,13 @@ function CalendarDayButton(_a) {
|
|
|
422
464
|
"locale"
|
|
423
465
|
]);
|
|
424
466
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
425
|
-
const ref =
|
|
426
|
-
|
|
467
|
+
const ref = React19__namespace.useRef(null);
|
|
468
|
+
React19__namespace.useEffect(() => {
|
|
427
469
|
var _a2;
|
|
428
470
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
429
471
|
}, [modifiers.focused]);
|
|
430
472
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
431
|
-
|
|
473
|
+
Button2,
|
|
432
474
|
__spreadValues({
|
|
433
475
|
variant: "ghost",
|
|
434
476
|
size: "icon",
|
|
@@ -445,10 +487,10 @@ function CalendarDayButton(_a) {
|
|
|
445
487
|
}, props)
|
|
446
488
|
);
|
|
447
489
|
}
|
|
448
|
-
var FloatingInput =
|
|
490
|
+
var FloatingInput = React19__namespace.forwardRef(
|
|
449
491
|
(_a, ref) => {
|
|
450
492
|
var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
|
|
451
|
-
const inputId = id != null ? id :
|
|
493
|
+
const inputId = id != null ? id : React19__namespace.useId();
|
|
452
494
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
453
495
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
454
496
|
"input",
|
|
@@ -488,10 +530,10 @@ var FloatingInput = React18__namespace.forwardRef(
|
|
|
488
530
|
}
|
|
489
531
|
);
|
|
490
532
|
FloatingInput.displayName = "FloatingInput";
|
|
491
|
-
var FloatingSelect =
|
|
533
|
+
var FloatingSelect = React19__namespace.forwardRef(
|
|
492
534
|
(_a, ref) => {
|
|
493
535
|
var _b = _a, { label, error, id, className, required, children } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children"]);
|
|
494
|
-
const inputId = id != null ? id :
|
|
536
|
+
const inputId = id != null ? id : React19__namespace.useId();
|
|
495
537
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
496
538
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
497
539
|
"select",
|
|
@@ -752,11 +794,11 @@ function PhoneCountrySelect({
|
|
|
752
794
|
className
|
|
753
795
|
}) {
|
|
754
796
|
var _a;
|
|
755
|
-
const [open, setOpen] =
|
|
756
|
-
const containerRef =
|
|
757
|
-
const listRef =
|
|
797
|
+
const [open, setOpen] = React19__namespace.useState(false);
|
|
798
|
+
const containerRef = React19__namespace.useRef(null);
|
|
799
|
+
const listRef = React19__namespace.useRef(null);
|
|
758
800
|
const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
|
|
759
|
-
|
|
801
|
+
React19__namespace.useEffect(() => {
|
|
760
802
|
if (!open) return;
|
|
761
803
|
const handler = (e) => {
|
|
762
804
|
var _a2;
|
|
@@ -767,7 +809,7 @@ function PhoneCountrySelect({
|
|
|
767
809
|
document.addEventListener("mousedown", handler);
|
|
768
810
|
return () => document.removeEventListener("mousedown", handler);
|
|
769
811
|
}, [open]);
|
|
770
|
-
|
|
812
|
+
React19__namespace.useEffect(() => {
|
|
771
813
|
if (!open || !listRef.current) return;
|
|
772
814
|
const activeEl = listRef.current.querySelector("[data-selected=true]");
|
|
773
815
|
activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
|
|
@@ -976,14 +1018,14 @@ function CountrySearchField({
|
|
|
976
1018
|
}) {
|
|
977
1019
|
var _a;
|
|
978
1020
|
const list = countries != null ? countries : COUNTRIES;
|
|
979
|
-
const [query, setQuery] =
|
|
980
|
-
const [open, setOpen] =
|
|
981
|
-
const containerRef =
|
|
982
|
-
const searchRef =
|
|
1021
|
+
const [query, setQuery] = React19__namespace.useState("");
|
|
1022
|
+
const [open, setOpen] = React19__namespace.useState(false);
|
|
1023
|
+
const containerRef = React19__namespace.useRef(null);
|
|
1024
|
+
const searchRef = React19__namespace.useRef(null);
|
|
983
1025
|
const selected = list.find((c) => c.code === value);
|
|
984
1026
|
const isFloated = open || !!selected;
|
|
985
1027
|
const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
|
|
986
|
-
|
|
1028
|
+
React19__namespace.useEffect(() => {
|
|
987
1029
|
if (!open) return;
|
|
988
1030
|
const handler = (e) => {
|
|
989
1031
|
var _a2;
|
|
@@ -1071,7 +1113,7 @@ function CountrySearchField({
|
|
|
1071
1113
|
function AdventureCard({ adventure }) {
|
|
1072
1114
|
var _a, _b, _c, _d, _e;
|
|
1073
1115
|
const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
|
|
1074
|
-
const [checkedInternal, setCheckedInternal] =
|
|
1116
|
+
const [checkedInternal, setCheckedInternal] = React19__namespace.useState(
|
|
1075
1117
|
new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
|
|
1076
1118
|
);
|
|
1077
1119
|
const isChecked = (opt) => {
|
|
@@ -1378,14 +1420,14 @@ function BirthDateField({
|
|
|
1378
1420
|
value,
|
|
1379
1421
|
onChange
|
|
1380
1422
|
}) {
|
|
1381
|
-
const [open, setOpen] =
|
|
1382
|
-
const [text, setText] =
|
|
1383
|
-
const containerRef =
|
|
1384
|
-
const inputId =
|
|
1385
|
-
|
|
1423
|
+
const [open, setOpen] = React19__namespace.useState(false);
|
|
1424
|
+
const [text, setText] = React19__namespace.useState(value ? dateFns.format(value, "dd/MM/yyyy") : "");
|
|
1425
|
+
const containerRef = React19__namespace.useRef(null);
|
|
1426
|
+
const inputId = React19__namespace.useId();
|
|
1427
|
+
React19__namespace.useEffect(() => {
|
|
1386
1428
|
setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
|
|
1387
1429
|
}, [value]);
|
|
1388
|
-
|
|
1430
|
+
React19__namespace.useEffect(() => {
|
|
1389
1431
|
if (!open) return;
|
|
1390
1432
|
const handler = (e) => {
|
|
1391
1433
|
var _a;
|
|
@@ -1494,7 +1536,7 @@ function BookingShell({
|
|
|
1494
1536
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
1495
1537
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
|
|
1496
1538
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
|
|
1497
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1539
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
|
|
1498
1540
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1499
1541
|
"span",
|
|
1500
1542
|
{
|
|
@@ -1664,9 +1706,9 @@ function BookingWizard({
|
|
|
1664
1706
|
depositInfo,
|
|
1665
1707
|
onCancel
|
|
1666
1708
|
}) {
|
|
1667
|
-
const [step, setStep] =
|
|
1668
|
-
const [error, setError] =
|
|
1669
|
-
const [responsible, setResponsible] =
|
|
1709
|
+
const [step, setStep] = React19__namespace.useState("responsible");
|
|
1710
|
+
const [error, setError] = React19__namespace.useState(null);
|
|
1711
|
+
const [responsible, setResponsible] = React19__namespace.useState({
|
|
1670
1712
|
firstName: "",
|
|
1671
1713
|
lastName: "",
|
|
1672
1714
|
email: "",
|
|
@@ -1685,7 +1727,7 @@ function BookingWizard({
|
|
|
1685
1727
|
return s + ((_b = (_a = a.slots) == null ? void 0 : _a.children) != null ? _b : 0);
|
|
1686
1728
|
}, 0);
|
|
1687
1729
|
const totalPax = totalAdults + totalChildren;
|
|
1688
|
-
const [travellers, setTravellers] =
|
|
1730
|
+
const [travellers, setTravellers] = React19__namespace.useState(
|
|
1689
1731
|
Array.from({ length: Math.max(totalPax, 1) }, () => ({
|
|
1690
1732
|
firstName: "",
|
|
1691
1733
|
lastName: "",
|
|
@@ -1693,10 +1735,10 @@ function BookingWizard({
|
|
|
1693
1735
|
email: ""
|
|
1694
1736
|
}))
|
|
1695
1737
|
);
|
|
1696
|
-
const [payAmount, setPayAmount] =
|
|
1697
|
-
const [payMethod, setPayMethod] =
|
|
1698
|
-
const [termsAccepted, setTermsAccepted] =
|
|
1699
|
-
const [termsModalOpen, setTermsModalOpen] =
|
|
1738
|
+
const [payAmount, setPayAmount] = React19__namespace.useState("full");
|
|
1739
|
+
const [payMethod, setPayMethod] = React19__namespace.useState("stripe");
|
|
1740
|
+
const [termsAccepted, setTermsAccepted] = React19__namespace.useState(false);
|
|
1741
|
+
const [termsModalOpen, setTermsModalOpen] = React19__namespace.useState(false);
|
|
1700
1742
|
const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
1701
1743
|
const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
|
|
1702
1744
|
const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
|
|
@@ -1968,7 +2010,7 @@ function Offer({
|
|
|
1968
2010
|
continueDisabled,
|
|
1969
2011
|
className
|
|
1970
2012
|
}) {
|
|
1971
|
-
const [showBooking, setShowBooking] =
|
|
2013
|
+
const [showBooking, setShowBooking] = React19__namespace.useState(false);
|
|
1972
2014
|
const isShowingCheckout = !!checkoutSlot || showBooking;
|
|
1973
2015
|
const handleBook = () => {
|
|
1974
2016
|
if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
|
|
@@ -2090,9 +2132,9 @@ function AdventureSection({
|
|
|
2090
2132
|
onAddSuggestedTraveller
|
|
2091
2133
|
}) {
|
|
2092
2134
|
var _a, _b, _c;
|
|
2093
|
-
const [detailsOpen, setDetailsOpen] =
|
|
2094
|
-
const [addModalOpen, setAddModalOpen] =
|
|
2095
|
-
const [newTraveller, setNewTraveller] =
|
|
2135
|
+
const [detailsOpen, setDetailsOpen] = React19__namespace.useState(false);
|
|
2136
|
+
const [addModalOpen, setAddModalOpen] = React19__namespace.useState(false);
|
|
2137
|
+
const [newTraveller, setNewTraveller] = React19__namespace.useState({
|
|
2096
2138
|
firstName: "",
|
|
2097
2139
|
lastName: "",
|
|
2098
2140
|
passport: "",
|
|
@@ -3334,11 +3376,11 @@ function DatePickerField({
|
|
|
3334
3376
|
fromDate,
|
|
3335
3377
|
className
|
|
3336
3378
|
}) {
|
|
3337
|
-
const [open, setOpen] =
|
|
3338
|
-
const containerRef =
|
|
3339
|
-
const [calendarWidth, setCalendarWidth] =
|
|
3379
|
+
const [open, setOpen] = React19__namespace.useState(false);
|
|
3380
|
+
const containerRef = React19__namespace.useRef(null);
|
|
3381
|
+
const [calendarWidth, setCalendarWidth] = React19__namespace.useState();
|
|
3340
3382
|
const hasValue = !!value;
|
|
3341
|
-
|
|
3383
|
+
React19__namespace.useEffect(() => {
|
|
3342
3384
|
if (!containerRef.current) return;
|
|
3343
3385
|
const observer = new ResizeObserver(([entry]) => {
|
|
3344
3386
|
setCalendarWidth(entry.contentRect.width);
|
|
@@ -3447,7 +3489,7 @@ function BookingForm({
|
|
|
3447
3489
|
subtitle = "Free enquiry \u2013 no commitment",
|
|
3448
3490
|
className
|
|
3449
3491
|
}) {
|
|
3450
|
-
const [values, setValues] =
|
|
3492
|
+
const [values, setValues] = React19__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
|
|
3451
3493
|
const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
|
|
3452
3494
|
const handleSubmit = (e) => {
|
|
3453
3495
|
e.preventDefault();
|
|
@@ -3738,7 +3780,7 @@ function Checkbox(_a) {
|
|
|
3738
3780
|
})
|
|
3739
3781
|
);
|
|
3740
3782
|
}
|
|
3741
|
-
var AccordionVariantContext =
|
|
3783
|
+
var AccordionVariantContext = React19__namespace.createContext("default");
|
|
3742
3784
|
function Accordion(_a) {
|
|
3743
3785
|
var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
3744
3786
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3756,7 +3798,7 @@ function Accordion(_a) {
|
|
|
3756
3798
|
}
|
|
3757
3799
|
function AccordionItem(_a) {
|
|
3758
3800
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3759
|
-
const variant =
|
|
3801
|
+
const variant = React19__namespace.useContext(AccordionVariantContext);
|
|
3760
3802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3761
3803
|
accordion.Accordion.Item,
|
|
3762
3804
|
__spreadValues({
|
|
@@ -3777,7 +3819,7 @@ function AccordionTrigger(_a) {
|
|
|
3777
3819
|
"className",
|
|
3778
3820
|
"children"
|
|
3779
3821
|
]);
|
|
3780
|
-
const variant =
|
|
3822
|
+
const variant = React19__namespace.useContext(AccordionVariantContext);
|
|
3781
3823
|
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3782
3824
|
accordion.Accordion.Trigger,
|
|
3783
3825
|
__spreadProps(__spreadValues({
|
|
@@ -3831,7 +3873,7 @@ function AccordionContent(_a) {
|
|
|
3831
3873
|
"className",
|
|
3832
3874
|
"children"
|
|
3833
3875
|
]);
|
|
3834
|
-
const variant =
|
|
3876
|
+
const variant = React19__namespace.useContext(AccordionVariantContext);
|
|
3835
3877
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3836
3878
|
accordion.Accordion.Panel,
|
|
3837
3879
|
__spreadProps(__spreadValues({
|
|
@@ -3863,7 +3905,7 @@ function FilterPanel({
|
|
|
3863
3905
|
title = "Filters",
|
|
3864
3906
|
className
|
|
3865
3907
|
}) {
|
|
3866
|
-
const [internalValue, setInternalValue] =
|
|
3908
|
+
const [internalValue, setInternalValue] = React19__namespace.useState(
|
|
3867
3909
|
() => Object.fromEntries(groups.map((g) => [g.id, []]))
|
|
3868
3910
|
);
|
|
3869
3911
|
const selected = value != null ? value : internalValue;
|
|
@@ -4025,11 +4067,11 @@ function ItineraryModal({
|
|
|
4025
4067
|
onNext
|
|
4026
4068
|
}) {
|
|
4027
4069
|
var _a, _b, _c;
|
|
4028
|
-
const [imgIndex, setImgIndex] =
|
|
4070
|
+
const [imgIndex, setImgIndex] = React19__namespace.useState(0);
|
|
4029
4071
|
const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
|
|
4030
4072
|
const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
|
|
4031
4073
|
const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
|
|
4032
|
-
|
|
4074
|
+
React19__namespace.useEffect(() => {
|
|
4033
4075
|
setImgIndex(0);
|
|
4034
4076
|
}, [stop == null ? void 0 : stop.dayNumber]);
|
|
4035
4077
|
if (!stop) return null;
|
|
@@ -4156,8 +4198,8 @@ function ItineraryModal({
|
|
|
4156
4198
|
) });
|
|
4157
4199
|
}
|
|
4158
4200
|
function Itinerary({ title, subtitle, stops, className }) {
|
|
4159
|
-
const [activeIndex, setActiveIndex] =
|
|
4160
|
-
const scrollRef =
|
|
4201
|
+
const [activeIndex, setActiveIndex] = React19__namespace.useState(null);
|
|
4202
|
+
const scrollRef = React19__namespace.useRef(null);
|
|
4161
4203
|
const activeStop = activeIndex !== null ? stops[activeIndex] : null;
|
|
4162
4204
|
const scrollBy = (dir) => {
|
|
4163
4205
|
if (!scrollRef.current) return;
|
|
@@ -4243,8 +4285,8 @@ function MenuTrip({
|
|
|
4243
4285
|
bold = true,
|
|
4244
4286
|
className
|
|
4245
4287
|
}) {
|
|
4246
|
-
const scrollRef =
|
|
4247
|
-
|
|
4288
|
+
const scrollRef = React19__namespace.useRef(null);
|
|
4289
|
+
React19__namespace.useEffect(() => {
|
|
4248
4290
|
if (!scrollRef.current || !activeSection) return;
|
|
4249
4291
|
const container = scrollRef.current;
|
|
4250
4292
|
const btn = container.querySelector(
|
|
@@ -4390,18 +4432,18 @@ function Lightbox({
|
|
|
4390
4432
|
onClose
|
|
4391
4433
|
}) {
|
|
4392
4434
|
var _a;
|
|
4393
|
-
const [index, setIndex] =
|
|
4435
|
+
const [index, setIndex] = React19__namespace.useState(initialIndex);
|
|
4394
4436
|
const total = photos.length;
|
|
4395
4437
|
const photo = photos[index];
|
|
4396
|
-
const prev =
|
|
4438
|
+
const prev = React19__namespace.useCallback(
|
|
4397
4439
|
() => setIndex((i) => (i - 1 + total) % total),
|
|
4398
4440
|
[total]
|
|
4399
4441
|
);
|
|
4400
|
-
const next =
|
|
4442
|
+
const next = React19__namespace.useCallback(
|
|
4401
4443
|
() => setIndex((i) => (i + 1) % total),
|
|
4402
4444
|
[total]
|
|
4403
4445
|
);
|
|
4404
|
-
|
|
4446
|
+
React19__namespace.useEffect(() => {
|
|
4405
4447
|
const onKey = (e) => {
|
|
4406
4448
|
if (e.key === "Escape") onClose();
|
|
4407
4449
|
if (e.key === "ArrowLeft") prev();
|
|
@@ -4595,7 +4637,7 @@ function GridGallery({
|
|
|
4595
4637
|
initialVisible,
|
|
4596
4638
|
onOpen
|
|
4597
4639
|
}) {
|
|
4598
|
-
const [expanded, setExpanded] =
|
|
4640
|
+
const [expanded, setExpanded] = React19__namespace.useState(false);
|
|
4599
4641
|
const cols = gridCols(photos.length);
|
|
4600
4642
|
const hasMore = photos.length > initialVisible;
|
|
4601
4643
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
@@ -4625,7 +4667,7 @@ function MasonryGallery({
|
|
|
4625
4667
|
initialVisible,
|
|
4626
4668
|
onOpen
|
|
4627
4669
|
}) {
|
|
4628
|
-
const [expanded, setExpanded] =
|
|
4670
|
+
const [expanded, setExpanded] = React19__namespace.useState(false);
|
|
4629
4671
|
const hasMore = photos.length > initialVisible;
|
|
4630
4672
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
4631
4673
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -4698,7 +4740,7 @@ function FeaturedGallery({
|
|
|
4698
4740
|
photos,
|
|
4699
4741
|
onOpen
|
|
4700
4742
|
}) {
|
|
4701
|
-
const [expanded, setExpanded] =
|
|
4743
|
+
const [expanded, setExpanded] = React19__namespace.useState(false);
|
|
4702
4744
|
const featured = photos.slice(0, 3);
|
|
4703
4745
|
const extra = photos.slice(3);
|
|
4704
4746
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -4775,8 +4817,8 @@ function PhotoGallery({
|
|
|
4775
4817
|
onPhotoClick,
|
|
4776
4818
|
className
|
|
4777
4819
|
}) {
|
|
4778
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
4779
|
-
const normalised =
|
|
4820
|
+
const [lightboxIndex, setLightboxIndex] = React19__namespace.useState(null);
|
|
4821
|
+
const normalised = React19__namespace.useMemo(() => photos.map(normalise), [photos]);
|
|
4780
4822
|
const handleOpen = (index) => {
|
|
4781
4823
|
setLightboxIndex(index);
|
|
4782
4824
|
onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
|
|
@@ -4865,7 +4907,7 @@ function PricingTrip({
|
|
|
4865
4907
|
variant = "card",
|
|
4866
4908
|
className
|
|
4867
4909
|
}) {
|
|
4868
|
-
const [showPricing, setShowPricing] =
|
|
4910
|
+
const [showPricing, setShowPricing] = React19__namespace.useState(false);
|
|
4869
4911
|
if (variant === "compact") {
|
|
4870
4912
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", className), children: [
|
|
4871
4913
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -5188,14 +5230,14 @@ function SiteHeader({
|
|
|
5188
5230
|
className
|
|
5189
5231
|
}) {
|
|
5190
5232
|
const t = VARIANT[variant];
|
|
5191
|
-
const [openMenu, setOpenMenu] =
|
|
5192
|
-
const [langOpen, setLangOpen] =
|
|
5193
|
-
const [mobileOpen, setMobileOpen] =
|
|
5194
|
-
const [openMobileSection, setOpenMobileSection] =
|
|
5195
|
-
const [activeLang, setActiveLang] =
|
|
5233
|
+
const [openMenu, setOpenMenu] = React19__namespace.useState(null);
|
|
5234
|
+
const [langOpen, setLangOpen] = React19__namespace.useState(false);
|
|
5235
|
+
const [mobileOpen, setMobileOpen] = React19__namespace.useState(false);
|
|
5236
|
+
const [openMobileSection, setOpenMobileSection] = React19__namespace.useState(null);
|
|
5237
|
+
const [activeLang, setActiveLang] = React19__namespace.useState(currentLanguage);
|
|
5196
5238
|
const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
|
|
5197
|
-
const menuCloseTimer =
|
|
5198
|
-
const langCloseTimer =
|
|
5239
|
+
const menuCloseTimer = React19__namespace.useRef(void 0);
|
|
5240
|
+
const langCloseTimer = React19__namespace.useRef(void 0);
|
|
5199
5241
|
const handleMenuEnter = (label) => {
|
|
5200
5242
|
clearTimeout(menuCloseTimer.current);
|
|
5201
5243
|
setOpenMenu(label);
|
|
@@ -5216,7 +5258,7 @@ function SiteHeader({
|
|
|
5216
5258
|
setOpenMenu(null);
|
|
5217
5259
|
setLangOpen(false);
|
|
5218
5260
|
};
|
|
5219
|
-
|
|
5261
|
+
React19__namespace.useEffect(() => () => {
|
|
5220
5262
|
clearTimeout(menuCloseTimer.current);
|
|
5221
5263
|
clearTimeout(langCloseTimer.current);
|
|
5222
5264
|
}, []);
|
|
@@ -5481,7 +5523,7 @@ function SiteHeader({
|
|
|
5481
5523
|
), children: [
|
|
5482
5524
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
|
|
5483
5525
|
const isActive = lang.code === activeLang;
|
|
5484
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5526
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
|
|
5485
5527
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
5486
5528
|
"text-xs select-none",
|
|
5487
5529
|
variant === "white" ? "text-border" : "text-white/15"
|
|
@@ -5543,8 +5585,8 @@ function SiteHeader({
|
|
|
5543
5585
|
);
|
|
5544
5586
|
}
|
|
5545
5587
|
function ThemeToggle({ className }) {
|
|
5546
|
-
const [dark, setDark] =
|
|
5547
|
-
|
|
5588
|
+
const [dark, setDark] = React19__namespace.useState(false);
|
|
5589
|
+
React19__namespace.useEffect(() => {
|
|
5548
5590
|
const saved = localStorage.getItem("theme");
|
|
5549
5591
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
5550
5592
|
const isDark = saved === "dark" || !saved && prefersDark;
|
|
@@ -5695,7 +5737,7 @@ function TripCard({
|
|
|
5695
5737
|
);
|
|
5696
5738
|
}
|
|
5697
5739
|
function useHlsVideo(videoRef, src) {
|
|
5698
|
-
|
|
5740
|
+
React19__namespace.useEffect(() => {
|
|
5699
5741
|
if (!src || !videoRef.current) return;
|
|
5700
5742
|
const video = videoRef.current;
|
|
5701
5743
|
if (!src.includes(".m3u8")) return;
|
|
@@ -5737,11 +5779,11 @@ function TripHeader({
|
|
|
5737
5779
|
className
|
|
5738
5780
|
}) {
|
|
5739
5781
|
var _a;
|
|
5740
|
-
const [heroIndex, setHeroIndex] =
|
|
5741
|
-
const [videoReady, setVideoReady] =
|
|
5742
|
-
const videoRef =
|
|
5782
|
+
const [heroIndex, setHeroIndex] = React19__namespace.useState(0);
|
|
5783
|
+
const [videoReady, setVideoReady] = React19__namespace.useState(false);
|
|
5784
|
+
const videoRef = React19__namespace.useRef(null);
|
|
5743
5785
|
const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
|
|
5744
|
-
const validImages =
|
|
5786
|
+
const validImages = React19__namespace.useMemo(
|
|
5745
5787
|
() => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
|
|
5746
5788
|
[images]
|
|
5747
5789
|
);
|
|
@@ -5756,7 +5798,7 @@ function TripHeader({
|
|
|
5756
5798
|
const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
|
|
5757
5799
|
const hasMeta = !!(destination || duration);
|
|
5758
5800
|
useHlsVideo(videoRef, isHls ? videoUrl : void 0);
|
|
5759
|
-
|
|
5801
|
+
React19__namespace.useEffect(() => {
|
|
5760
5802
|
if (!videoUrl) return;
|
|
5761
5803
|
const el = videoRef.current;
|
|
5762
5804
|
if (!el) return;
|
|
@@ -5898,7 +5940,7 @@ function TripHeader({
|
|
|
5898
5940
|
siteHeader ? "-mt-44" : "-mt-36"
|
|
5899
5941
|
),
|
|
5900
5942
|
children: [
|
|
5901
|
-
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5943
|
+
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
|
|
5902
5944
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
5903
5945
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
|
|
5904
5946
|
] }, i)) }),
|
|
@@ -5998,19 +6040,19 @@ function TripPage({
|
|
|
5998
6040
|
features,
|
|
5999
6041
|
className
|
|
6000
6042
|
}) {
|
|
6001
|
-
const [activeSection, setActiveSection] =
|
|
6002
|
-
const [navFloating, setNavFloating] =
|
|
6003
|
-
const [navHidden, setNavHidden] =
|
|
6004
|
-
const [isFloating, setIsFloating] =
|
|
6005
|
-
const [sidebarPos, setSidebarPos] =
|
|
6006
|
-
const [pricingBarVisible, setPricingBarVisible] =
|
|
6007
|
-
const navRef =
|
|
6008
|
-
const navSentinelRef =
|
|
6009
|
-
const sentinelRef =
|
|
6010
|
-
const sidebarPlaceholderRef =
|
|
6011
|
-
const pricingBarRef =
|
|
6012
|
-
const galleryRef =
|
|
6013
|
-
const sections =
|
|
6043
|
+
const [activeSection, setActiveSection] = React19__namespace.useState("");
|
|
6044
|
+
const [navFloating, setNavFloating] = React19__namespace.useState(false);
|
|
6045
|
+
const [navHidden, setNavHidden] = React19__namespace.useState(false);
|
|
6046
|
+
const [isFloating, setIsFloating] = React19__namespace.useState(false);
|
|
6047
|
+
const [sidebarPos, setSidebarPos] = React19__namespace.useState(null);
|
|
6048
|
+
const [pricingBarVisible, setPricingBarVisible] = React19__namespace.useState(false);
|
|
6049
|
+
const navRef = React19__namespace.useRef(null);
|
|
6050
|
+
const navSentinelRef = React19__namespace.useRef(null);
|
|
6051
|
+
const sentinelRef = React19__namespace.useRef(null);
|
|
6052
|
+
const sidebarPlaceholderRef = React19__namespace.useRef(null);
|
|
6053
|
+
const pricingBarRef = React19__namespace.useRef(null);
|
|
6054
|
+
const galleryRef = React19__namespace.useRef(null);
|
|
6055
|
+
const sections = React19__namespace.useMemo(
|
|
6014
6056
|
() => [
|
|
6015
6057
|
{ id: "key-info", label: "Key info", show: !!(infoGroups == null ? void 0 : infoGroups.length) },
|
|
6016
6058
|
{ id: "overview", label: "Overview", show: !!overview },
|
|
@@ -6025,7 +6067,7 @@ function TripPage({
|
|
|
6025
6067
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6026
6068
|
[]
|
|
6027
6069
|
);
|
|
6028
|
-
|
|
6070
|
+
React19__namespace.useEffect(() => {
|
|
6029
6071
|
const sentinel = navSentinelRef.current;
|
|
6030
6072
|
if (!sentinel) return;
|
|
6031
6073
|
const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -6033,7 +6075,7 @@ function TripPage({
|
|
|
6033
6075
|
update();
|
|
6034
6076
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
6035
6077
|
}, []);
|
|
6036
|
-
|
|
6078
|
+
React19__namespace.useEffect(() => {
|
|
6037
6079
|
const sentinel = sentinelRef.current;
|
|
6038
6080
|
if (!sentinel) return;
|
|
6039
6081
|
const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -6041,7 +6083,7 @@ function TripPage({
|
|
|
6041
6083
|
update();
|
|
6042
6084
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
6043
6085
|
}, []);
|
|
6044
|
-
|
|
6086
|
+
React19__namespace.useEffect(() => {
|
|
6045
6087
|
const measure = () => {
|
|
6046
6088
|
if (!sidebarPlaceholderRef.current) return;
|
|
6047
6089
|
const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
|
|
@@ -6051,7 +6093,7 @@ function TripPage({
|
|
|
6051
6093
|
window.addEventListener("resize", measure);
|
|
6052
6094
|
return () => window.removeEventListener("resize", measure);
|
|
6053
6095
|
}, [isFloating]);
|
|
6054
|
-
|
|
6096
|
+
React19__namespace.useEffect(() => {
|
|
6055
6097
|
const check = () => {
|
|
6056
6098
|
var _a;
|
|
6057
6099
|
const target = (_a = galleryRef.current) != null ? _a : pricingBarRef.current;
|
|
@@ -6062,7 +6104,7 @@ function TripPage({
|
|
|
6062
6104
|
check();
|
|
6063
6105
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
6064
6106
|
}, []);
|
|
6065
|
-
|
|
6107
|
+
React19__namespace.useEffect(() => {
|
|
6066
6108
|
const check = () => {
|
|
6067
6109
|
if (!pricingBarRef.current) return;
|
|
6068
6110
|
setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
|
|
@@ -6071,7 +6113,7 @@ function TripPage({
|
|
|
6071
6113
|
check();
|
|
6072
6114
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
6073
6115
|
}, []);
|
|
6074
|
-
|
|
6116
|
+
React19__namespace.useEffect(() => {
|
|
6075
6117
|
if (sections.length === 0) return;
|
|
6076
6118
|
setActiveSection(sections[0].id);
|
|
6077
6119
|
const update = () => {
|
|
@@ -6453,6 +6495,7 @@ function PaymentModalShell({
|
|
|
6453
6495
|
closeLabel = "Cancel",
|
|
6454
6496
|
closeDisabled,
|
|
6455
6497
|
children,
|
|
6498
|
+
error,
|
|
6456
6499
|
className
|
|
6457
6500
|
}) {
|
|
6458
6501
|
if (!open) return null;
|
|
@@ -6488,6 +6531,7 @@ function PaymentModalShell({
|
|
|
6488
6531
|
"#",
|
|
6489
6532
|
bookingRef
|
|
6490
6533
|
] }),
|
|
6534
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(Alert, { variant: "error", className: "mt-3", children: error }),
|
|
6491
6535
|
busy ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 flex flex-col items-center gap-4 py-6", children: [
|
|
6492
6536
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-10 w-10 animate-spin rounded-full border-2 border-primary/30 border-t-primary" }),
|
|
6493
6537
|
busyMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-center text-sm text-muted-foreground font-sans", children: busyMessage })
|
|
@@ -6500,23 +6544,178 @@ function PaymentModalShell({
|
|
|
6500
6544
|
}
|
|
6501
6545
|
|
|
6502
6546
|
// src/lib/stripeAppearance.ts
|
|
6503
|
-
var
|
|
6504
|
-
theme: "
|
|
6547
|
+
var LIGHT = {
|
|
6548
|
+
theme: "none",
|
|
6505
6549
|
variables: {
|
|
6506
|
-
|
|
6507
|
-
colorPrimary: "#
|
|
6508
|
-
|
|
6550
|
+
// Primary — #47bca9 (brand teal)
|
|
6551
|
+
colorPrimary: "#47bca9",
|
|
6552
|
+
// Backgrounds — --card (#ffffff), --background (#fefefe)
|
|
6553
|
+
colorBackground: "#ffffff",
|
|
6554
|
+
// Text — --foreground (#2e2d2c charcoal)
|
|
6555
|
+
colorText: "#2e2d2c",
|
|
6556
|
+
// Placeholder / muted — --muted-foreground (~#787776)
|
|
6557
|
+
colorTextPlaceholder: "#787776",
|
|
6558
|
+
// Icons
|
|
6559
|
+
colorIcon: "#787776",
|
|
6560
|
+
colorIconTab: "#787776",
|
|
6561
|
+
colorIconTabSelected: "#47bca9",
|
|
6562
|
+
colorIconTabHover: "#2e2d2c",
|
|
6563
|
+
// Danger — --destructive (#ef4444)
|
|
6564
|
+
colorDanger: "#ef4444",
|
|
6565
|
+
// Border radius — --radius (0.5rem = 8px)
|
|
6509
6566
|
borderRadius: "8px",
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6567
|
+
// Font — herda do host
|
|
6568
|
+
fontFamily: "inherit"
|
|
6569
|
+
},
|
|
6570
|
+
rules: {
|
|
6571
|
+
".Input": {
|
|
6572
|
+
border: "1px solid #e3eeeb",
|
|
6573
|
+
// --border light
|
|
6574
|
+
borderRadius: "8px",
|
|
6575
|
+
padding: "10px 12px",
|
|
6576
|
+
boxShadow: "none",
|
|
6577
|
+
backgroundColor: "#ffffff",
|
|
6578
|
+
color: "#2e2d2c",
|
|
6579
|
+
fontSize: "14px",
|
|
6580
|
+
lineHeight: "1.5"
|
|
6581
|
+
},
|
|
6582
|
+
".Input:focus": {
|
|
6583
|
+
border: "1px solid #47bca9",
|
|
6584
|
+
// --primary
|
|
6585
|
+
boxShadow: "0 0 0 2px rgba(71,188,169,0.20)",
|
|
6586
|
+
outline: "none"
|
|
6587
|
+
},
|
|
6588
|
+
".Input--invalid": {
|
|
6589
|
+
border: "1px solid #ef4444",
|
|
6590
|
+
boxShadow: "0 0 0 2px rgba(239,68,68,0.15)"
|
|
6591
|
+
},
|
|
6592
|
+
".Label": {
|
|
6593
|
+
color: "#787776",
|
|
6594
|
+
// --muted-foreground
|
|
6595
|
+
fontSize: "12px",
|
|
6596
|
+
fontWeight: "500",
|
|
6597
|
+
marginBottom: "4px"
|
|
6598
|
+
},
|
|
6599
|
+
".Error": {
|
|
6600
|
+
color: "#ef4444",
|
|
6601
|
+
fontSize: "12px"
|
|
6602
|
+
},
|
|
6603
|
+
".Tab": {
|
|
6604
|
+
border: "1px solid #e3eeeb",
|
|
6605
|
+
borderRadius: "8px",
|
|
6606
|
+
boxShadow: "none",
|
|
6607
|
+
backgroundColor: "#ffffff",
|
|
6608
|
+
color: "#787776"
|
|
6609
|
+
},
|
|
6610
|
+
".Tab:hover": {
|
|
6611
|
+
color: "#2e2d2c",
|
|
6612
|
+
border: "1px solid #47bca9"
|
|
6613
|
+
},
|
|
6614
|
+
".Tab--selected": {
|
|
6615
|
+
border: "1px solid #47bca9",
|
|
6616
|
+
backgroundColor: "rgba(71,188,169,0.08)",
|
|
6617
|
+
color: "#2e2d2c",
|
|
6618
|
+
boxShadow: "none"
|
|
6619
|
+
},
|
|
6620
|
+
".TabLabel--selected": {
|
|
6621
|
+
color: "#2e2d2c"
|
|
6622
|
+
},
|
|
6623
|
+
".TabIcon--selected": {
|
|
6624
|
+
fill: "#47bca9"
|
|
6625
|
+
},
|
|
6626
|
+
".Block": {
|
|
6627
|
+
borderRadius: "8px",
|
|
6628
|
+
backgroundColor: "#f3f7f6",
|
|
6629
|
+
// --muted
|
|
6630
|
+
border: "1px solid #e3eeeb"
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6633
|
+
};
|
|
6634
|
+
var DARK = {
|
|
6635
|
+
theme: "none",
|
|
6636
|
+
variables: {
|
|
6637
|
+
colorPrimary: "#5dc9b5",
|
|
6638
|
+
// --primary dark (lightened)
|
|
6639
|
+
colorBackground: "#282726",
|
|
6640
|
+
// --card dark
|
|
6641
|
+
colorText: "#f4f8f7",
|
|
6642
|
+
// --foreground dark
|
|
6643
|
+
colorTextPlaceholder: "#999693",
|
|
6644
|
+
// --muted-foreground dark
|
|
6645
|
+
colorIcon: "#999693",
|
|
6646
|
+
colorIconTab: "#999693",
|
|
6647
|
+
colorIconTabSelected: "#5dc9b5",
|
|
6648
|
+
colorIconTabHover: "#f4f8f7",
|
|
6649
|
+
colorDanger: "#ef4444",
|
|
6650
|
+
borderRadius: "8px",
|
|
6651
|
+
fontFamily: "inherit"
|
|
6652
|
+
},
|
|
6653
|
+
rules: {
|
|
6654
|
+
".Input": {
|
|
6655
|
+
border: "1px solid rgba(255,255,255,0.10)",
|
|
6656
|
+
// --border dark
|
|
6657
|
+
borderRadius: "8px",
|
|
6658
|
+
padding: "10px 12px",
|
|
6659
|
+
boxShadow: "none",
|
|
6660
|
+
backgroundColor: "#282726",
|
|
6661
|
+
color: "#f4f8f7",
|
|
6662
|
+
fontSize: "14px",
|
|
6663
|
+
lineHeight: "1.5"
|
|
6664
|
+
},
|
|
6665
|
+
".Input:focus": {
|
|
6666
|
+
border: "1px solid #5dc9b5",
|
|
6667
|
+
boxShadow: "0 0 0 2px rgba(93,201,181,0.20)",
|
|
6668
|
+
outline: "none"
|
|
6669
|
+
},
|
|
6670
|
+
".Input--invalid": {
|
|
6671
|
+
border: "1px solid #ef4444",
|
|
6672
|
+
boxShadow: "0 0 0 2px rgba(239,68,68,0.15)"
|
|
6673
|
+
},
|
|
6674
|
+
".Label": {
|
|
6675
|
+
color: "#999693",
|
|
6676
|
+
fontSize: "12px",
|
|
6677
|
+
fontWeight: "500",
|
|
6678
|
+
marginBottom: "4px"
|
|
6679
|
+
},
|
|
6680
|
+
".Error": {
|
|
6681
|
+
color: "#ef4444",
|
|
6682
|
+
fontSize: "12px"
|
|
6683
|
+
},
|
|
6684
|
+
".Tab": {
|
|
6685
|
+
border: "1px solid rgba(255,255,255,0.10)",
|
|
6686
|
+
borderRadius: "8px",
|
|
6687
|
+
boxShadow: "none",
|
|
6688
|
+
backgroundColor: "#282726",
|
|
6689
|
+
color: "#999693"
|
|
6690
|
+
},
|
|
6691
|
+
".Tab:hover": {
|
|
6692
|
+
color: "#f4f8f7",
|
|
6693
|
+
border: "1px solid #5dc9b5"
|
|
6694
|
+
},
|
|
6695
|
+
".Tab--selected": {
|
|
6696
|
+
border: "1px solid #5dc9b5",
|
|
6697
|
+
backgroundColor: "rgba(93,201,181,0.10)",
|
|
6698
|
+
color: "#f4f8f7",
|
|
6699
|
+
boxShadow: "none"
|
|
6700
|
+
},
|
|
6701
|
+
".TabLabel--selected": {
|
|
6702
|
+
color: "#f4f8f7"
|
|
6703
|
+
},
|
|
6704
|
+
".TabIcon--selected": {
|
|
6705
|
+
fill: "#5dc9b5"
|
|
6706
|
+
},
|
|
6707
|
+
".Block": {
|
|
6708
|
+
borderRadius: "8px",
|
|
6709
|
+
backgroundColor: "#1e1d1c",
|
|
6710
|
+
// --background dark
|
|
6711
|
+
border: "1px solid rgba(255,255,255,0.10)"
|
|
6712
|
+
}
|
|
6518
6713
|
}
|
|
6519
6714
|
};
|
|
6715
|
+
function getStripeAppearance(isDark = false) {
|
|
6716
|
+
return isDark ? DARK : LIGHT;
|
|
6717
|
+
}
|
|
6718
|
+
var stripeAppearance = LIGHT;
|
|
6520
6719
|
function Input(_a) {
|
|
6521
6720
|
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
6522
6721
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -6583,21 +6782,21 @@ function LeadCapturePopup({
|
|
|
6583
6782
|
}) {
|
|
6584
6783
|
var _a;
|
|
6585
6784
|
const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
|
|
6586
|
-
const [open, setOpen] =
|
|
6587
|
-
const [closing, setClosing] =
|
|
6588
|
-
const [submitted, setSubmitted] =
|
|
6589
|
-
const [submitting, setSubmitting] =
|
|
6590
|
-
const [error, setError] =
|
|
6591
|
-
const [name, setName] =
|
|
6592
|
-
const [email, setEmail] =
|
|
6593
|
-
const [travelDate, setTravelDate] =
|
|
6594
|
-
const panelRef =
|
|
6595
|
-
const nameRef =
|
|
6596
|
-
const show =
|
|
6785
|
+
const [open, setOpen] = React19.useState(false);
|
|
6786
|
+
const [closing, setClosing] = React19.useState(false);
|
|
6787
|
+
const [submitted, setSubmitted] = React19.useState(false);
|
|
6788
|
+
const [submitting, setSubmitting] = React19.useState(false);
|
|
6789
|
+
const [error, setError] = React19.useState(null);
|
|
6790
|
+
const [name, setName] = React19.useState("");
|
|
6791
|
+
const [email, setEmail] = React19.useState("");
|
|
6792
|
+
const [travelDate, setTravelDate] = React19.useState("");
|
|
6793
|
+
const panelRef = React19.useRef(null);
|
|
6794
|
+
const nameRef = React19.useRef(null);
|
|
6795
|
+
const show = React19.useCallback(() => {
|
|
6597
6796
|
if (isDismissed()) return;
|
|
6598
6797
|
setOpen(true);
|
|
6599
6798
|
}, []);
|
|
6600
|
-
|
|
6799
|
+
React19.useEffect(() => {
|
|
6601
6800
|
var _a2;
|
|
6602
6801
|
if (isDismissed()) return;
|
|
6603
6802
|
if (config.trigger === "delay") {
|
|
@@ -6624,7 +6823,7 @@ function LeadCapturePopup({
|
|
|
6624
6823
|
return () => window.removeEventListener("scroll", handler);
|
|
6625
6824
|
}
|
|
6626
6825
|
}, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
|
|
6627
|
-
|
|
6826
|
+
React19.useEffect(() => {
|
|
6628
6827
|
if (open && !submitted) {
|
|
6629
6828
|
requestAnimationFrame(() => {
|
|
6630
6829
|
var _a2;
|
|
@@ -6632,7 +6831,7 @@ function LeadCapturePopup({
|
|
|
6632
6831
|
});
|
|
6633
6832
|
}
|
|
6634
6833
|
}, [open, submitted]);
|
|
6635
|
-
const close =
|
|
6834
|
+
const close = React19.useCallback(() => {
|
|
6636
6835
|
setClosing(true);
|
|
6637
6836
|
setDismissed(config.dismissDays);
|
|
6638
6837
|
setTimeout(() => {
|
|
@@ -6640,7 +6839,7 @@ function LeadCapturePopup({
|
|
|
6640
6839
|
setClosing(false);
|
|
6641
6840
|
}, 250);
|
|
6642
6841
|
}, [config.dismissDays]);
|
|
6643
|
-
|
|
6842
|
+
React19.useEffect(() => {
|
|
6644
6843
|
if (!open) return;
|
|
6645
6844
|
const handler = (e) => {
|
|
6646
6845
|
if (e.key === "Escape") close();
|
|
@@ -6648,7 +6847,7 @@ function LeadCapturePopup({
|
|
|
6648
6847
|
document.addEventListener("keydown", handler);
|
|
6649
6848
|
return () => document.removeEventListener("keydown", handler);
|
|
6650
6849
|
}, [open, close]);
|
|
6651
|
-
const onOverlayClick =
|
|
6850
|
+
const onOverlayClick = React19.useCallback(
|
|
6652
6851
|
(e) => {
|
|
6653
6852
|
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
6654
6853
|
close();
|
|
@@ -6809,7 +7008,7 @@ function LeadCapturePopup({
|
|
|
6809
7008
|
] }),
|
|
6810
7009
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-destructive", role: "alert", children: error }),
|
|
6811
7010
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6812
|
-
|
|
7011
|
+
Button2,
|
|
6813
7012
|
{
|
|
6814
7013
|
type: "submit",
|
|
6815
7014
|
disabled: submitting,
|
|
@@ -6841,7 +7040,7 @@ function LeadCapturePopup({
|
|
|
6841
7040
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: config.successMessage })
|
|
6842
7041
|
] }),
|
|
6843
7042
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6844
|
-
|
|
7043
|
+
Button2,
|
|
6845
7044
|
{
|
|
6846
7045
|
onClick: close,
|
|
6847
7046
|
variant: "outline",
|
|
@@ -6887,6 +7086,7 @@ exports.BookingConfirmationEmail = BookingConfirmationEmail;
|
|
|
6887
7086
|
exports.BookingDetails = BookingDetails;
|
|
6888
7087
|
exports.BookingForm = BookingForm;
|
|
6889
7088
|
exports.BookingShell = BookingShell;
|
|
7089
|
+
exports.Button = Button;
|
|
6890
7090
|
exports.COUNTRIES = COUNTRIES;
|
|
6891
7091
|
exports.CounterField = CounterField;
|
|
6892
7092
|
exports.CountrySearchField = CountrySearchField;
|
|
@@ -6913,7 +7113,9 @@ exports.ThemeToggle = ThemeToggle;
|
|
|
6913
7113
|
exports.TripCard = TripCard;
|
|
6914
7114
|
exports.TripHeader = TripHeader;
|
|
6915
7115
|
exports.TripPage = TripPage;
|
|
7116
|
+
exports.buttonVariants = buttonVariants;
|
|
6916
7117
|
exports.cn = cn;
|
|
7118
|
+
exports.getStripeAppearance = getStripeAppearance;
|
|
6917
7119
|
exports.stripeAppearance = stripeAppearance;
|
|
6918
7120
|
//# sourceMappingURL=index.cjs.map
|
|
6919
7121
|
//# sourceMappingURL=index.cjs.map
|