@harshit-wander/component-lib 1.1.9 → 1.1.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/LICENSE +21 -21
- package/README.md +154 -154
- package/dist/index.cjs +295 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +295 -149
- package/dist/index.js.map +1 -1
- package/package.json +22 -24
package/dist/index.js
CHANGED
|
@@ -272,30 +272,65 @@ var DestinationCard = forwardRef(
|
|
|
272
272
|
DestinationCard.displayName = "DestinationCard";
|
|
273
273
|
var frameClass = "block w-full h-[300px] overflow-hidden rounded-md no-underline text-inherit focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2";
|
|
274
274
|
var EventBanner = forwardRef(
|
|
275
|
-
({ imageUrl, alt, href, className, ...rest }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("shrink-0 w-full snap-start", className), ...rest, children: href ? /* @__PURE__ */ jsx("a", { href, className: frameClass, children: /* @__PURE__ */ jsx(
|
|
275
|
+
({ imageUrl, alt, href, className, ...rest }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("shrink-0 w-full snap-start", className), ...rest, children: href ? /* @__PURE__ */ jsx("a", { href, className: frameClass, children: /* @__PURE__ */ jsx(
|
|
276
|
+
"img",
|
|
277
|
+
{
|
|
278
|
+
src: imageUrl,
|
|
279
|
+
alt,
|
|
280
|
+
loading: "lazy",
|
|
281
|
+
decoding: "async",
|
|
282
|
+
className: "block w-full h-full object-cover"
|
|
283
|
+
}
|
|
284
|
+
) }) : /* @__PURE__ */ jsx("div", { className: frameClass, children: /* @__PURE__ */ jsx(
|
|
285
|
+
"img",
|
|
286
|
+
{
|
|
287
|
+
src: imageUrl,
|
|
288
|
+
alt,
|
|
289
|
+
loading: "lazy",
|
|
290
|
+
decoding: "async",
|
|
291
|
+
className: "block w-full h-full object-cover"
|
|
292
|
+
}
|
|
293
|
+
) }) })
|
|
276
294
|
);
|
|
277
295
|
EventBanner.displayName = "EventBanner";
|
|
278
296
|
var frameClass2 = "block w-full h-[300px] overflow-hidden rounded-md no-underline text-inherit focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2";
|
|
279
|
-
var
|
|
297
|
+
var mediaClass = "block w-full h-full object-cover";
|
|
280
298
|
var EventVideoBanner = forwardRef(
|
|
281
|
-
({
|
|
299
|
+
({
|
|
300
|
+
posterUrl,
|
|
301
|
+
videoUrl,
|
|
302
|
+
alt,
|
|
303
|
+
href,
|
|
304
|
+
mobileVideoUrl,
|
|
305
|
+
mobilePosterUrl,
|
|
306
|
+
isActive = true,
|
|
307
|
+
className,
|
|
308
|
+
...rest
|
|
309
|
+
}, ref) => {
|
|
282
310
|
const videoRef = useRef(null);
|
|
283
311
|
useEffect(() => {
|
|
312
|
+
if (!isActive) return;
|
|
284
313
|
const video = videoRef.current;
|
|
285
314
|
if (!video || !videoUrl) return;
|
|
286
|
-
|
|
287
|
-
|
|
315
|
+
const isMobileViewport = typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(max-width: 767px)").matches;
|
|
316
|
+
const activeUrl = isMobileViewport && mobileVideoUrl ? mobileVideoUrl : videoUrl;
|
|
317
|
+
const activePoster = isMobileViewport && mobilePosterUrl ? mobilePosterUrl : posterUrl;
|
|
318
|
+
if (activePoster && video.poster !== activePoster) {
|
|
319
|
+
video.poster = activePoster;
|
|
320
|
+
}
|
|
321
|
+
if (!activeUrl.includes(".m3u8")) {
|
|
322
|
+
video.src = activeUrl;
|
|
288
323
|
return;
|
|
289
324
|
}
|
|
290
325
|
if (video.canPlayType("application/vnd.apple.mpegurl")) {
|
|
291
|
-
video.src =
|
|
326
|
+
video.src = activeUrl;
|
|
292
327
|
return;
|
|
293
328
|
}
|
|
294
329
|
let cancelled = false;
|
|
295
330
|
import('hls.js').then(({ default: Hls }) => {
|
|
296
331
|
if (cancelled || !Hls.isSupported()) return;
|
|
297
332
|
const hls = new Hls({ autoStartLoad: true, startLevel: -1 });
|
|
298
|
-
hls.loadSource(
|
|
333
|
+
hls.loadSource(activeUrl);
|
|
299
334
|
hls.attachMedia(video);
|
|
300
335
|
video._hls = hls;
|
|
301
336
|
});
|
|
@@ -304,12 +339,11 @@ var EventVideoBanner = forwardRef(
|
|
|
304
339
|
const stored = video._hls;
|
|
305
340
|
stored?.destroy();
|
|
306
341
|
};
|
|
307
|
-
}, [videoUrl]);
|
|
308
|
-
const
|
|
342
|
+
}, [videoUrl, mobileVideoUrl, posterUrl, mobilePosterUrl, isActive]);
|
|
343
|
+
const mediaEl = isActive ? /* @__PURE__ */ jsx(
|
|
309
344
|
"video",
|
|
310
345
|
{
|
|
311
346
|
ref: videoRef,
|
|
312
|
-
src: videoUrl?.includes(".m3u8") ? void 0 : videoUrl,
|
|
313
347
|
poster: posterUrl,
|
|
314
348
|
"aria-label": alt,
|
|
315
349
|
muted: true,
|
|
@@ -317,10 +351,16 @@ var EventVideoBanner = forwardRef(
|
|
|
317
351
|
loop: true,
|
|
318
352
|
playsInline: true,
|
|
319
353
|
preload: "metadata",
|
|
320
|
-
className:
|
|
354
|
+
className: mediaClass
|
|
321
355
|
}
|
|
356
|
+
) : (
|
|
357
|
+
// <picture> lets the browser pick mobile/desktop poster via CSS, no JS
|
|
358
|
+
/* @__PURE__ */ jsxs("picture", { children: [
|
|
359
|
+
mobilePosterUrl ? /* @__PURE__ */ jsx("source", { media: "(max-width: 767px)", srcSet: mobilePosterUrl }) : null,
|
|
360
|
+
/* @__PURE__ */ jsx("img", { src: posterUrl, alt, loading: "lazy", decoding: "async", className: mediaClass })
|
|
361
|
+
] })
|
|
322
362
|
);
|
|
323
|
-
return /* @__PURE__ */ jsx("div", { ref, className: cn("shrink-0 w-full snap-start", className), ...rest, children: href ? /* @__PURE__ */ jsx("a", { href, className: frameClass2, children:
|
|
363
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("shrink-0 w-full snap-start", className), ...rest, children: href ? /* @__PURE__ */ jsx("a", { href, className: frameClass2, children: mediaEl }) : /* @__PURE__ */ jsx("div", { className: frameClass2, children: mediaEl }) });
|
|
324
364
|
}
|
|
325
365
|
);
|
|
326
366
|
EventVideoBanner.displayName = "EventVideoBanner";
|
|
@@ -393,7 +433,16 @@ var cardClass2 = "shrink-0 w-[132px] flex flex-col bg-surface border border-bord
|
|
|
393
433
|
var ExploreCard = forwardRef(
|
|
394
434
|
({ image, alt, label, href, className, ...rest }, ref) => {
|
|
395
435
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
396
|
-
/* @__PURE__ */ jsx(
|
|
436
|
+
/* @__PURE__ */ jsx(
|
|
437
|
+
"img",
|
|
438
|
+
{
|
|
439
|
+
src: image,
|
|
440
|
+
alt,
|
|
441
|
+
loading: "lazy",
|
|
442
|
+
decoding: "async",
|
|
443
|
+
className: "block w-full h-[102px] object-cover"
|
|
444
|
+
}
|
|
445
|
+
),
|
|
397
446
|
/* @__PURE__ */ jsx("span", { className: "flex items-center justify-center min-h-[56px] py-sm px-md text-md font-medium leading-card text-secondary text-center", children: label })
|
|
398
447
|
] });
|
|
399
448
|
if (href) {
|
|
@@ -516,7 +565,16 @@ var GalleryPhoto = forwardRef(
|
|
|
516
565
|
),
|
|
517
566
|
...rest,
|
|
518
567
|
children: [
|
|
519
|
-
/* @__PURE__ */ jsx(
|
|
568
|
+
/* @__PURE__ */ jsx(
|
|
569
|
+
"img",
|
|
570
|
+
{
|
|
571
|
+
src: image,
|
|
572
|
+
alt,
|
|
573
|
+
loading: "lazy",
|
|
574
|
+
decoding: "async",
|
|
575
|
+
className: "block w-full h-full object-cover"
|
|
576
|
+
}
|
|
577
|
+
),
|
|
520
578
|
/* @__PURE__ */ jsxs("div", { className: "absolute bottom-12 left-sm inline-flex items-center gap-xs py-[2px] px-[6px] bg-black/40 border-[0.5px] border-secondary rounded-full text-on-dark text-xs font-normal leading-4 max-md:bottom-8", children: [
|
|
521
579
|
/* @__PURE__ */ jsx(
|
|
522
580
|
"span",
|
|
@@ -772,7 +830,7 @@ var TestimonialCard = forwardRef(
|
|
|
772
830
|
({ thumbnail, thumbnailAlt, logo, logoAlt, caption, videoHref, onPlayClick, className, ...rest }, ref) => {
|
|
773
831
|
const playLabel = `Play testimonial: ${caption}`;
|
|
774
832
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
775
|
-
/* @__PURE__ */ jsx("img", { src: thumbnail, alt: thumbnailAlt }),
|
|
833
|
+
/* @__PURE__ */ jsx("img", { src: thumbnail, alt: thumbnailAlt, loading: "lazy", decoding: "async" }),
|
|
776
834
|
/* @__PURE__ */ jsx("span", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 inline-flex items-center justify-center w-[56px] h-[56px] pointer-events-none z-[1] text-white", children: /* @__PURE__ */ jsx(PlaySvg, {}) })
|
|
777
835
|
] });
|
|
778
836
|
return /* @__PURE__ */ jsxs(
|
|
@@ -807,7 +865,16 @@ var TestimonialCard = forwardRef(
|
|
|
807
865
|
}
|
|
808
866
|
),
|
|
809
867
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-sm w-full py-md", children: [
|
|
810
|
-
/* @__PURE__ */ jsx(
|
|
868
|
+
/* @__PURE__ */ jsx(
|
|
869
|
+
"img",
|
|
870
|
+
{
|
|
871
|
+
src: logo,
|
|
872
|
+
alt: logoAlt,
|
|
873
|
+
loading: "lazy",
|
|
874
|
+
decoding: "async",
|
|
875
|
+
className: "w-[60px] h-[60px] object-contain shrink-0"
|
|
876
|
+
}
|
|
877
|
+
),
|
|
811
878
|
/* @__PURE__ */ jsx("p", { className: "m-0 text-md font-medium leading-8 text-secondary", children: caption })
|
|
812
879
|
] })
|
|
813
880
|
]
|
|
@@ -818,17 +885,21 @@ var TestimonialCard = forwardRef(
|
|
|
818
885
|
TestimonialCard.displayName = "TestimonialCard";
|
|
819
886
|
var cardClass4 = "relative flex flex-col justify-end shrink-0 w-[200px] h-[316px] p-[20px] border-2 border-surface rounded-lg overflow-hidden no-underline text-inherit snap-start focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2";
|
|
820
887
|
var TripCategoryCard = forwardRef(
|
|
821
|
-
({ image, alt, destination, startingPrice, href, className, ...rest }, ref) => {
|
|
888
|
+
({ image, mobileImage, alt, destination, startingPrice, href, className, ...rest }, ref) => {
|
|
822
889
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
-
"
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
890
|
+
/* @__PURE__ */ jsxs("picture", { className: "absolute inset-0 pointer-events-none", children: [
|
|
891
|
+
mobileImage ? /* @__PURE__ */ jsx("source", { media: "(max-width: 767px)", srcSet: mobileImage }) : null,
|
|
892
|
+
/* @__PURE__ */ jsx(
|
|
893
|
+
"img",
|
|
894
|
+
{
|
|
895
|
+
src: image,
|
|
896
|
+
alt,
|
|
897
|
+
loading: "lazy",
|
|
898
|
+
decoding: "async",
|
|
899
|
+
className: "absolute inset-0 w-full h-full object-cover"
|
|
900
|
+
}
|
|
901
|
+
)
|
|
902
|
+
] }),
|
|
832
903
|
/* @__PURE__ */ jsx(
|
|
833
904
|
"span",
|
|
834
905
|
{
|
|
@@ -1572,7 +1643,9 @@ var useScrollSnap = (itemCount) => {
|
|
|
1572
1643
|
setScrollProgress(maxScroll > 0 ? el.scrollLeft / maxScroll : 0);
|
|
1573
1644
|
if (itemCount > 0) {
|
|
1574
1645
|
const itemWidth = el.scrollWidth / itemCount;
|
|
1575
|
-
|
|
1646
|
+
if (itemWidth > 0) {
|
|
1647
|
+
setActiveIndex(Math.round(el.scrollLeft / itemWidth));
|
|
1648
|
+
}
|
|
1576
1649
|
}
|
|
1577
1650
|
}, [itemCount]);
|
|
1578
1651
|
const setRef = useCallback(
|
|
@@ -1674,13 +1747,16 @@ var EventCarousel = forwardRef(
|
|
|
1674
1747
|
ref: trackRef,
|
|
1675
1748
|
className: "flex w-full gap-sm overflow-x-auto snap-x [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
1676
1749
|
children: events.map(
|
|
1677
|
-
(event) => "videoUrl" in event ? /* @__PURE__ */ jsx(
|
|
1750
|
+
(event, index) => "videoUrl" in event ? /* @__PURE__ */ jsx(
|
|
1678
1751
|
EventVideoBanner,
|
|
1679
1752
|
{
|
|
1680
1753
|
posterUrl: event.posterUrl,
|
|
1681
1754
|
videoUrl: event.videoUrl,
|
|
1755
|
+
mobileVideoUrl: event.mobileVideoUrl,
|
|
1756
|
+
mobilePosterUrl: event.mobilePosterUrl,
|
|
1682
1757
|
alt: event.alt,
|
|
1683
|
-
href: event.href
|
|
1758
|
+
href: event.href,
|
|
1759
|
+
isActive: index === activeIndex
|
|
1684
1760
|
},
|
|
1685
1761
|
`${event.videoUrl}|${event.alt}`
|
|
1686
1762
|
) : /* @__PURE__ */ jsx(
|
|
@@ -2222,9 +2298,28 @@ var useTypewriter = (phrases, options) => {
|
|
|
2222
2298
|
return text;
|
|
2223
2299
|
};
|
|
2224
2300
|
var HomeHero = forwardRef(
|
|
2225
|
-
({
|
|
2301
|
+
({
|
|
2302
|
+
videoUrl,
|
|
2303
|
+
posterUrl,
|
|
2304
|
+
mobilePosterUrl,
|
|
2305
|
+
title,
|
|
2306
|
+
cyclingPhrases,
|
|
2307
|
+
typewriter,
|
|
2308
|
+
reviews,
|
|
2309
|
+
className,
|
|
2310
|
+
...rest
|
|
2311
|
+
}, ref) => {
|
|
2226
2312
|
const currentPhrase = useTypewriter(cyclingPhrases, typewriter);
|
|
2227
2313
|
const hasReviews = reviews !== void 0 && reviews.length > 0;
|
|
2314
|
+
const videoRef = useRef(null);
|
|
2315
|
+
useEffect(() => {
|
|
2316
|
+
const video = videoRef.current;
|
|
2317
|
+
if (!video || !mobilePosterUrl) return;
|
|
2318
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return;
|
|
2319
|
+
if (window.matchMedia("(max-width: 767px)").matches) {
|
|
2320
|
+
video.poster = mobilePosterUrl;
|
|
2321
|
+
}
|
|
2322
|
+
}, [mobilePosterUrl]);
|
|
2228
2323
|
return /* @__PURE__ */ jsxs(
|
|
2229
2324
|
"section",
|
|
2230
2325
|
{
|
|
@@ -2235,6 +2330,7 @@ var HomeHero = forwardRef(
|
|
|
2235
2330
|
/* @__PURE__ */ jsx(
|
|
2236
2331
|
"video",
|
|
2237
2332
|
{
|
|
2333
|
+
ref: videoRef,
|
|
2238
2334
|
src: videoUrl,
|
|
2239
2335
|
poster: posterUrl,
|
|
2240
2336
|
muted: true,
|
|
@@ -2713,6 +2809,34 @@ var TextSection = forwardRef(
|
|
|
2713
2809
|
)
|
|
2714
2810
|
);
|
|
2715
2811
|
TextSection.displayName = "TextSection";
|
|
2812
|
+
var useDesktopVideoVisible = (ref, breakpointPx = 768) => {
|
|
2813
|
+
const [shouldRender, setShouldRender] = useState(false);
|
|
2814
|
+
useEffect(() => {
|
|
2815
|
+
if (typeof window === "undefined") return;
|
|
2816
|
+
const mq = window.matchMedia(`(min-width: ${breakpointPx}px)`);
|
|
2817
|
+
if (!mq.matches) {
|
|
2818
|
+
setShouldRender(false);
|
|
2819
|
+
return;
|
|
2820
|
+
}
|
|
2821
|
+
const el = ref.current;
|
|
2822
|
+
if (!el || typeof IntersectionObserver === "undefined") {
|
|
2823
|
+
setShouldRender(true);
|
|
2824
|
+
return;
|
|
2825
|
+
}
|
|
2826
|
+
const io = new IntersectionObserver(
|
|
2827
|
+
(entries) => {
|
|
2828
|
+
if (entries[0]?.isIntersecting) {
|
|
2829
|
+
setShouldRender(true);
|
|
2830
|
+
io.disconnect();
|
|
2831
|
+
}
|
|
2832
|
+
},
|
|
2833
|
+
{ rootMargin: "200px" }
|
|
2834
|
+
);
|
|
2835
|
+
io.observe(el);
|
|
2836
|
+
return () => io.disconnect();
|
|
2837
|
+
}, [ref, breakpointPx]);
|
|
2838
|
+
return shouldRender;
|
|
2839
|
+
};
|
|
2716
2840
|
var ChevronLeft5 = () => /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
2717
2841
|
"path",
|
|
2718
2842
|
{
|
|
@@ -2744,6 +2868,8 @@ var TripsCategorySection = forwardRef(
|
|
|
2744
2868
|
canNext,
|
|
2745
2869
|
scrollProgress
|
|
2746
2870
|
} = useScrollSnap(trips.length);
|
|
2871
|
+
const heroRef = useRef(null);
|
|
2872
|
+
const showDesktopVideo = useDesktopVideoVisible(heroRef);
|
|
2747
2873
|
const handleCtaClick = () => {
|
|
2748
2874
|
if (cta.href) {
|
|
2749
2875
|
window.location.assign(cta.href);
|
|
@@ -2752,134 +2878,154 @@ var TripsCategorySection = forwardRef(
|
|
|
2752
2878
|
cta.onClick?.();
|
|
2753
2879
|
};
|
|
2754
2880
|
const progressWidth = Math.min(33 + scrollProgress * (120 - 33), 120);
|
|
2755
|
-
return /* @__PURE__ */ jsxs(
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2881
|
+
return /* @__PURE__ */ jsxs(
|
|
2882
|
+
"section",
|
|
2883
|
+
{
|
|
2884
|
+
ref,
|
|
2885
|
+
className: cn("relative flex flex-col bg-surface max-md:overflow-x-clip", className),
|
|
2886
|
+
...rest,
|
|
2887
|
+
children: [
|
|
2888
|
+
/* @__PURE__ */ jsxs(
|
|
2889
|
+
"div",
|
|
2760
2890
|
{
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2891
|
+
ref: heroRef,
|
|
2892
|
+
className: "relative h-[318px] rounded-lg overflow-hidden max-md:h-[260px]",
|
|
2893
|
+
children: [
|
|
2894
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
|
|
2895
|
+
/* @__PURE__ */ jsx(
|
|
2896
|
+
"img",
|
|
2897
|
+
{
|
|
2898
|
+
src: poster,
|
|
2899
|
+
alt: "",
|
|
2900
|
+
"aria-hidden": "true",
|
|
2901
|
+
className: "w-full h-full object-cover",
|
|
2902
|
+
loading: "lazy",
|
|
2903
|
+
decoding: "async"
|
|
2904
|
+
}
|
|
2905
|
+
),
|
|
2906
|
+
showDesktopVideo && /* @__PURE__ */ jsx(
|
|
2907
|
+
"video",
|
|
2908
|
+
{
|
|
2909
|
+
autoPlay: true,
|
|
2910
|
+
muted: true,
|
|
2911
|
+
loop: true,
|
|
2912
|
+
playsInline: true,
|
|
2913
|
+
preload: "metadata",
|
|
2914
|
+
poster,
|
|
2915
|
+
src: videoSrc,
|
|
2916
|
+
className: "hidden md:block absolute inset-0 w-full h-full object-cover"
|
|
2917
|
+
}
|
|
2918
|
+
)
|
|
2919
|
+
] }),
|
|
2920
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex flex-col justify-center gap-lg p-[44px] max-md:p-[24px] text-on-image [text-shadow:0px_6px_24px_rgba(0,0,0,0.16)]", children: [
|
|
2921
|
+
/* @__PURE__ */ jsx("h2", { className: "m-0 text-hero-title max-w-[436px] max-md:text-secondary max-md:[text-shadow:none]", children: title }),
|
|
2922
|
+
/* @__PURE__ */ jsx("p", { className: "max-md:hidden m-0 text-xs font-bold leading-5", children: description }),
|
|
2923
|
+
/* @__PURE__ */ jsx(
|
|
2924
|
+
"button",
|
|
2925
|
+
{
|
|
2926
|
+
type: "button",
|
|
2927
|
+
onClick: handleCtaClick,
|
|
2928
|
+
className: "max-md:hidden inline-flex items-center justify-center self-start h-11 px-xl bg-accent text-secondary border-none rounded-md font-[inherit] text-button cursor-pointer shadow-[inset_0_0_6px_rgba(0,0,0,0.14)] transition-colors duration-150 ease-in hover:bg-accent-hover focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2",
|
|
2929
|
+
children: cta.label
|
|
2930
|
+
}
|
|
2931
|
+
)
|
|
2932
|
+
] })
|
|
2933
|
+
]
|
|
2765
2934
|
}
|
|
2766
2935
|
),
|
|
2767
|
-
/* @__PURE__ */
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
autoPlay: true,
|
|
2771
|
-
muted: true,
|
|
2772
|
-
loop: true,
|
|
2773
|
-
playsInline: true,
|
|
2774
|
-
poster,
|
|
2775
|
-
src: videoSrc,
|
|
2776
|
-
className: "hidden md:block w-full h-full object-cover"
|
|
2777
|
-
}
|
|
2778
|
-
)
|
|
2779
|
-
] }),
|
|
2780
|
-
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0 flex flex-col justify-center gap-lg p-[44px] max-md:p-[24px] text-on-image [text-shadow:0px_6px_24px_rgba(0,0,0,0.16)]", children: [
|
|
2781
|
-
/* @__PURE__ */ jsx("h2", { className: "m-0 text-hero-title max-w-[436px] max-md:text-secondary max-md:[text-shadow:none]", children: title }),
|
|
2782
|
-
/* @__PURE__ */ jsx("p", { className: "max-md:hidden m-0 text-xs font-bold leading-5", children: description }),
|
|
2783
|
-
/* @__PURE__ */ jsx(
|
|
2784
|
-
"button",
|
|
2785
|
-
{
|
|
2786
|
-
type: "button",
|
|
2787
|
-
onClick: handleCtaClick,
|
|
2788
|
-
className: "max-md:hidden inline-flex items-center justify-center self-start h-11 px-xl bg-accent text-secondary border-none rounded-md font-[inherit] text-button cursor-pointer shadow-[inset_0_0_6px_rgba(0,0,0,0.14)] transition-colors duration-150 ease-in hover:bg-accent-hover focus-visible:outline-2 focus-visible:outline-white focus-visible:outline-offset-2",
|
|
2789
|
-
children: cta.label
|
|
2790
|
-
}
|
|
2791
|
-
)
|
|
2792
|
-
] })
|
|
2793
|
-
] }),
|
|
2794
|
-
/* @__PURE__ */ jsxs("div", { className: "relative -mt-[68px] py-sm px-[25px] hidden md:block", children: [
|
|
2795
|
-
/* @__PURE__ */ jsx(
|
|
2796
|
-
"button",
|
|
2797
|
-
{
|
|
2798
|
-
type: "button",
|
|
2799
|
-
onClick: scrollPrev,
|
|
2800
|
-
disabled: !canPrev,
|
|
2801
|
-
"aria-label": "Previous trips",
|
|
2802
|
-
className: cn(arrowBase4, "left-2"),
|
|
2803
|
-
children: /* @__PURE__ */ jsx(ChevronLeft5, {})
|
|
2804
|
-
}
|
|
2805
|
-
),
|
|
2806
|
-
/* @__PURE__ */ jsx(
|
|
2807
|
-
"div",
|
|
2808
|
-
{
|
|
2809
|
-
ref: trackRef,
|
|
2810
|
-
className: "flex gap-sm overflow-x-auto snap-x [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
2811
|
-
children: trips.map((trip) => /* @__PURE__ */ jsx(
|
|
2812
|
-
TripCategoryCard,
|
|
2936
|
+
/* @__PURE__ */ jsxs("div", { className: "relative -mt-[68px] py-sm px-[25px] hidden md:block", children: [
|
|
2937
|
+
/* @__PURE__ */ jsx(
|
|
2938
|
+
"button",
|
|
2813
2939
|
{
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
)
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
/* @__PURE__ */ jsx(
|
|
2825
|
-
"button",
|
|
2826
|
-
{
|
|
2827
|
-
type: "button",
|
|
2828
|
-
onClick: scrollNext,
|
|
2829
|
-
disabled: !canNext,
|
|
2830
|
-
"aria-label": "Next trips",
|
|
2831
|
-
className: cn(arrowBase4, "right-2"),
|
|
2832
|
-
children: /* @__PURE__ */ jsx(ChevronRight5, {})
|
|
2833
|
-
}
|
|
2834
|
-
),
|
|
2835
|
-
/* @__PURE__ */ jsx(
|
|
2836
|
-
"div",
|
|
2837
|
-
{
|
|
2838
|
-
role: "progressbar",
|
|
2839
|
-
"aria-valuenow": Math.round(scrollProgress * 100),
|
|
2840
|
-
"aria-valuemin": 0,
|
|
2841
|
-
"aria-valuemax": 100,
|
|
2842
|
-
"aria-label": "Scroll position",
|
|
2843
|
-
className: "relative w-[120px] h-[6px] mt-md mx-auto bg-track rounded-[32px] overflow-hidden",
|
|
2844
|
-
children: /* @__PURE__ */ jsx(
|
|
2845
|
-
"span",
|
|
2940
|
+
type: "button",
|
|
2941
|
+
onClick: scrollPrev,
|
|
2942
|
+
disabled: !canPrev,
|
|
2943
|
+
"aria-label": "Previous trips",
|
|
2944
|
+
className: cn(arrowBase4, "left-2"),
|
|
2945
|
+
children: /* @__PURE__ */ jsx(ChevronLeft5, {})
|
|
2946
|
+
}
|
|
2947
|
+
),
|
|
2948
|
+
/* @__PURE__ */ jsx(
|
|
2949
|
+
"div",
|
|
2846
2950
|
{
|
|
2847
|
-
|
|
2848
|
-
|
|
2951
|
+
ref: trackRef,
|
|
2952
|
+
className: "flex gap-sm overflow-x-auto snap-x [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
2953
|
+
children: trips.map((trip) => /* @__PURE__ */ jsx(
|
|
2954
|
+
TripCategoryCard,
|
|
2955
|
+
{
|
|
2956
|
+
image: trip.image,
|
|
2957
|
+
mobileImage: trip.mobileImage,
|
|
2958
|
+
alt: trip.alt,
|
|
2959
|
+
destination: trip.destination,
|
|
2960
|
+
startingPrice: trip.startingPrice,
|
|
2961
|
+
href: trip.href
|
|
2962
|
+
},
|
|
2963
|
+
`${trip.image}|${trip.destination}`
|
|
2964
|
+
))
|
|
2965
|
+
}
|
|
2966
|
+
),
|
|
2967
|
+
/* @__PURE__ */ jsx(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
type: "button",
|
|
2971
|
+
onClick: scrollNext,
|
|
2972
|
+
disabled: !canNext,
|
|
2973
|
+
"aria-label": "Next trips",
|
|
2974
|
+
className: cn(arrowBase4, "right-2"),
|
|
2975
|
+
children: /* @__PURE__ */ jsx(ChevronRight5, {})
|
|
2976
|
+
}
|
|
2977
|
+
),
|
|
2978
|
+
/* @__PURE__ */ jsx(
|
|
2979
|
+
"div",
|
|
2980
|
+
{
|
|
2981
|
+
role: "progressbar",
|
|
2982
|
+
"aria-valuenow": Math.round(scrollProgress * 100),
|
|
2983
|
+
"aria-valuemin": 0,
|
|
2984
|
+
"aria-valuemax": 100,
|
|
2985
|
+
"aria-label": "Scroll position",
|
|
2986
|
+
className: "relative w-[120px] h-[6px] mt-md mx-auto bg-track rounded-[32px] overflow-hidden",
|
|
2987
|
+
children: /* @__PURE__ */ jsx(
|
|
2988
|
+
"span",
|
|
2989
|
+
{
|
|
2990
|
+
className: "absolute top-0 left-0 h-full bg-primary rounded-[32px] transition-[width] duration-200 ease-in",
|
|
2991
|
+
style: { width: `${progressWidth}px` }
|
|
2992
|
+
}
|
|
2993
|
+
)
|
|
2849
2994
|
}
|
|
2850
2995
|
)
|
|
2851
|
-
}
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
/* @__PURE__ */ jsx("div", { className: "relative -mt-[60px] pb-md md:hidden flex justify-center", children: /* @__PURE__ */ jsx(
|
|
2855
|
-
Swiper,
|
|
2856
|
-
{
|
|
2857
|
-
effect: "cards",
|
|
2858
|
-
grabCursor: true,
|
|
2859
|
-
modules: [EffectCards],
|
|
2860
|
-
className: "w-[74vw] [aspect-ratio:289/367]",
|
|
2861
|
-
style: { overflow: "visible" },
|
|
2862
|
-
children: trips.map((trip) => /* @__PURE__ */ jsx(
|
|
2863
|
-
SwiperSlide,
|
|
2996
|
+
] }),
|
|
2997
|
+
/* @__PURE__ */ jsx("div", { className: "relative -mt-[60px] pb-md md:hidden flex justify-center", children: /* @__PURE__ */ jsx(
|
|
2998
|
+
Swiper,
|
|
2864
2999
|
{
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
3000
|
+
effect: "cards",
|
|
3001
|
+
grabCursor: true,
|
|
3002
|
+
modules: [EffectCards],
|
|
3003
|
+
className: "w-[74vw] [aspect-ratio:289/367]",
|
|
3004
|
+
style: { overflow: "visible" },
|
|
3005
|
+
children: trips.map((trip) => /* @__PURE__ */ jsx(
|
|
3006
|
+
SwiperSlide,
|
|
2868
3007
|
{
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
3008
|
+
style: { borderRadius: "12px", overflow: "hidden" },
|
|
3009
|
+
children: /* @__PURE__ */ jsx(
|
|
3010
|
+
TripCategoryCard,
|
|
3011
|
+
{
|
|
3012
|
+
image: trip.image,
|
|
3013
|
+
mobileImage: trip.mobileImage,
|
|
3014
|
+
alt: trip.alt,
|
|
3015
|
+
destination: trip.destination,
|
|
3016
|
+
startingPrice: trip.startingPrice,
|
|
3017
|
+
href: trip.href,
|
|
3018
|
+
className: "w-full h-full rounded-xl shrink-0"
|
|
3019
|
+
}
|
|
3020
|
+
)
|
|
3021
|
+
},
|
|
3022
|
+
`${trip.image}|${trip.destination}|mobile`
|
|
3023
|
+
))
|
|
3024
|
+
}
|
|
3025
|
+
) })
|
|
3026
|
+
]
|
|
3027
|
+
}
|
|
3028
|
+
);
|
|
2883
3029
|
}
|
|
2884
3030
|
);
|
|
2885
3031
|
TripsCategorySection.displayName = "TripsCategorySection";
|