@harshit-wander/component-lib 1.1.0 → 1.1.2
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 +131 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +131 -7
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -240,7 +240,7 @@ function FieldShell({
|
|
|
240
240
|
children
|
|
241
241
|
] }) });
|
|
242
242
|
}
|
|
243
|
-
var cardClass = "shrink-0 flex flex-col items-center gap-sm w-[
|
|
243
|
+
var cardClass = "shrink-0 flex flex-col items-center gap-sm w-[66px] no-underline text-inherit focus-visible:outline-2 focus-visible:outline-accent focus-visible:outline-offset-2 focus-visible:rounded-md";
|
|
244
244
|
var DestinationCard = react.forwardRef(
|
|
245
245
|
({ image, alt, label, href, className, ...rest }, ref) => {
|
|
246
246
|
const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -249,7 +249,7 @@ var DestinationCard = react.forwardRef(
|
|
|
249
249
|
{
|
|
250
250
|
src: image,
|
|
251
251
|
alt,
|
|
252
|
-
className: "w-[
|
|
252
|
+
className: "w-[66px] h-[66px] rounded-full object-cover bg-border"
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
255
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium leading-5 text-secondary text-center whitespace-nowrap", children: label })
|
|
@@ -682,7 +682,7 @@ var PackageCard = react.forwardRef(
|
|
|
682
682
|
),
|
|
683
683
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative inline-flex items-center self-start gap-xs py-[4px] px-md bg-accent border border-surface rounded-full", children: [
|
|
684
684
|
originalPrice ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative text-2xs font-normal leading-18 text-strike after:content-[''] after:absolute after:left-[-2px] after:right-[-2px] after:top-1/2 after:h-px after:bg-strike after:rotate-[-8deg]", children: originalPrice }) : null,
|
|
685
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-
|
|
685
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold leading-4 text-text-deep", children: currentPrice }),
|
|
686
686
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-normal leading-4 text-text-deep", children: priceSuffix })
|
|
687
687
|
] }),
|
|
688
688
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col gap-md text-on-image", children: [
|
|
@@ -1317,7 +1317,7 @@ var CategoryNavbar = react.forwardRef(
|
|
|
1317
1317
|
{
|
|
1318
1318
|
href: logoHref,
|
|
1319
1319
|
"aria-label": "Home",
|
|
1320
|
-
className: "inline-flex items-center no-underline text-inherit h-
|
|
1320
|
+
className: "inline-flex items-center no-underline text-inherit h-[50px] shrink-0 [&>img]:h-full [&>img]:w-auto [&>img]:object-contain [&>svg]:h-full [&>svg]:w-auto [&>svg]:object-contain",
|
|
1321
1321
|
children: typeof logo === "string" ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: "" }) : logo
|
|
1322
1322
|
}
|
|
1323
1323
|
) }),
|
|
@@ -1476,7 +1476,7 @@ var ContactSection = react.forwardRef(
|
|
|
1476
1476
|
ref,
|
|
1477
1477
|
className: cn(
|
|
1478
1478
|
"flex w-full justify-center",
|
|
1479
|
-
"lg:items-center lg:
|
|
1479
|
+
"lg:items-center lg:gap-xl lg:px-xl lg:py-xl lg:bg-primary lg:rounded-lg lg:shadow-card",
|
|
1480
1480
|
className
|
|
1481
1481
|
),
|
|
1482
1482
|
...rest,
|
|
@@ -1619,7 +1619,10 @@ var useScrollSnap = (itemCount) => {
|
|
|
1619
1619
|
const scrollNext = react.useCallback(() => {
|
|
1620
1620
|
elRef.current?.scrollBy({ left: elRef.current.clientWidth, behavior: "smooth" });
|
|
1621
1621
|
}, []);
|
|
1622
|
-
|
|
1622
|
+
const scrollToStart = react.useCallback(() => {
|
|
1623
|
+
elRef.current?.scrollTo({ left: 0, behavior: "smooth" });
|
|
1624
|
+
}, []);
|
|
1625
|
+
return { ref: setRef, scrollPrev, scrollNext, scrollToStart, canPrev, canNext, activeIndex, scrollProgress };
|
|
1623
1626
|
};
|
|
1624
1627
|
var ChevronLeft = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1625
1628
|
"path",
|
|
@@ -1648,10 +1651,26 @@ var EventCarousel = react.forwardRef(
|
|
|
1648
1651
|
ref: trackRef,
|
|
1649
1652
|
scrollPrev,
|
|
1650
1653
|
scrollNext,
|
|
1654
|
+
scrollToStart,
|
|
1651
1655
|
canPrev,
|
|
1652
1656
|
canNext,
|
|
1653
1657
|
activeIndex
|
|
1654
1658
|
} = useScrollSnap(events.length);
|
|
1659
|
+
const canNextRef = react.useRef(canNext);
|
|
1660
|
+
react.useEffect(() => {
|
|
1661
|
+
canNextRef.current = canNext;
|
|
1662
|
+
}, [canNext]);
|
|
1663
|
+
react.useEffect(() => {
|
|
1664
|
+
if (events.length <= 1) return;
|
|
1665
|
+
const id = setInterval(() => {
|
|
1666
|
+
if (canNextRef.current) {
|
|
1667
|
+
scrollNext();
|
|
1668
|
+
} else {
|
|
1669
|
+
scrollToStart();
|
|
1670
|
+
}
|
|
1671
|
+
}, 3e3);
|
|
1672
|
+
return () => clearInterval(id);
|
|
1673
|
+
}, [events.length, scrollNext, scrollToStart]);
|
|
1655
1674
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1656
1675
|
"section",
|
|
1657
1676
|
{
|
|
@@ -2589,6 +2608,7 @@ var TestimonialsCarousel = react.forwardRef(
|
|
|
2589
2608
|
const isControlled = activeIndex !== void 0;
|
|
2590
2609
|
const [internalIndex, setInternalIndex] = react.useState(defaultIndex);
|
|
2591
2610
|
const currentIndex = isControlled ? activeIndex : internalIndex;
|
|
2611
|
+
const touchStartX = react.useRef(null);
|
|
2592
2612
|
const setIndex = (next) => {
|
|
2593
2613
|
if (!isControlled) setInternalIndex(next);
|
|
2594
2614
|
onActiveIndexChange?.(next);
|
|
@@ -2597,11 +2617,27 @@ var TestimonialsCarousel = react.forwardRef(
|
|
|
2597
2617
|
if (!current) return null;
|
|
2598
2618
|
const isFirst = currentIndex <= 0;
|
|
2599
2619
|
const isLast = currentIndex >= testimonials.length - 1;
|
|
2620
|
+
const handleTouchStart = (e) => {
|
|
2621
|
+
touchStartX.current = e.touches[0]?.clientX ?? null;
|
|
2622
|
+
};
|
|
2623
|
+
const handleTouchEnd = (e) => {
|
|
2624
|
+
if (touchStartX.current === null) return;
|
|
2625
|
+
const endX = e.changedTouches[0]?.clientX;
|
|
2626
|
+
if (endX === void 0) return;
|
|
2627
|
+
const delta = touchStartX.current - endX;
|
|
2628
|
+
if (Math.abs(delta) > 40) {
|
|
2629
|
+
if (delta > 0 && !isLast) setIndex(currentIndex + 1);
|
|
2630
|
+
else if (delta < 0 && !isFirst) setIndex(currentIndex - 1);
|
|
2631
|
+
}
|
|
2632
|
+
touchStartX.current = null;
|
|
2633
|
+
};
|
|
2600
2634
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2601
2635
|
"section",
|
|
2602
2636
|
{
|
|
2603
2637
|
ref,
|
|
2604
2638
|
className: cn("flex flex-col items-center gap-[28px] bg-surface", className),
|
|
2639
|
+
onTouchStart: handleTouchStart,
|
|
2640
|
+
onTouchEnd: handleTouchEnd,
|
|
2605
2641
|
...rest,
|
|
2606
2642
|
children: [
|
|
2607
2643
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2807,6 +2843,94 @@ var TripsCategorySection = react.forwardRef(
|
|
|
2807
2843
|
}
|
|
2808
2844
|
);
|
|
2809
2845
|
TripsCategorySection.displayName = "TripsCategorySection";
|
|
2846
|
+
var UCT_VIDEO_DEFAULT = "https://wanderon-video.gumlet.io/upcoming-community-trips-a.mp4";
|
|
2847
|
+
var UCT_POSTER_DEFAULT = "https://wanderon-images.gumlet.io/uct-thumbnail.jpg?updatedAt=1739361886945";
|
|
2848
|
+
var UctMobileBanner = react.forwardRef(
|
|
2849
|
+
({
|
|
2850
|
+
href,
|
|
2851
|
+
videoUrl = UCT_VIDEO_DEFAULT,
|
|
2852
|
+
posterUrl = UCT_POSTER_DEFAULT,
|
|
2853
|
+
LinkComponent,
|
|
2854
|
+
className,
|
|
2855
|
+
...rest
|
|
2856
|
+
}, ref) => {
|
|
2857
|
+
const Link = LinkComponent ?? "a";
|
|
2858
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2859
|
+
Link,
|
|
2860
|
+
{
|
|
2861
|
+
ref,
|
|
2862
|
+
href,
|
|
2863
|
+
className: cn(
|
|
2864
|
+
"flex justify-center no-underline outline-none select-none [-webkit-tap-highlight-color:transparent]",
|
|
2865
|
+
className
|
|
2866
|
+
),
|
|
2867
|
+
...rest,
|
|
2868
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full mx-4", children: [
|
|
2869
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[-15px] left-[10px] w-[51px] h-[50px] rounded-full z-[6] [box-shadow:0px_4px_10px_0px_rgba(254,230,11,0.2)]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2870
|
+
"video",
|
|
2871
|
+
{
|
|
2872
|
+
src: videoUrl,
|
|
2873
|
+
poster: posterUrl,
|
|
2874
|
+
muted: true,
|
|
2875
|
+
loop: true,
|
|
2876
|
+
autoPlay: true,
|
|
2877
|
+
playsInline: true,
|
|
2878
|
+
className: "w-full h-full object-cover rounded-full"
|
|
2879
|
+
}
|
|
2880
|
+
) }),
|
|
2881
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2882
|
+
"div",
|
|
2883
|
+
{
|
|
2884
|
+
className: "relative flex items-center justify-between overflow-hidden h-[60px] pl-[70px] pr-[10px] py-[10px] rounded-xl cursor-pointer",
|
|
2885
|
+
style: {
|
|
2886
|
+
background: "linear-gradient(90deg, #015f74 0%, #02b3da 100%)",
|
|
2887
|
+
boxShadow: "0px 4px 4px 0px rgba(1, 95, 116, 0.3) inset"
|
|
2888
|
+
},
|
|
2889
|
+
children: [
|
|
2890
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[#f5fdff] text-base font-medium leading-7 font-[inherit]", children: "Upcoming Community Trips" }),
|
|
2891
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2892
|
+
"span",
|
|
2893
|
+
{
|
|
2894
|
+
"aria-hidden": "true",
|
|
2895
|
+
className: "inline-flex",
|
|
2896
|
+
style: { animation: "uct-move-arrow 1.5s infinite" },
|
|
2897
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2898
|
+
"path",
|
|
2899
|
+
{
|
|
2900
|
+
d: "M13 6L19 12L13 18M5 6L11 12L5 18",
|
|
2901
|
+
stroke: "white",
|
|
2902
|
+
strokeWidth: "1.5",
|
|
2903
|
+
strokeLinecap: "round",
|
|
2904
|
+
strokeLinejoin: "round"
|
|
2905
|
+
}
|
|
2906
|
+
) })
|
|
2907
|
+
}
|
|
2908
|
+
),
|
|
2909
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[300px] h-[250px] pointer-events-none", children: [
|
|
2910
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2911
|
+
"div",
|
|
2912
|
+
{
|
|
2913
|
+
className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-[#ababab] w-0 h-0",
|
|
2914
|
+
style: { animation: "uct-pulse-one 2s infinite 0s ease-in-out" }
|
|
2915
|
+
}
|
|
2916
|
+
),
|
|
2917
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2918
|
+
"div",
|
|
2919
|
+
{
|
|
2920
|
+
className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full border border-[#ababab] w-0 h-0",
|
|
2921
|
+
style: { animation: "uct-pulse-two 2s infinite 1s ease-in-out" }
|
|
2922
|
+
}
|
|
2923
|
+
)
|
|
2924
|
+
] })
|
|
2925
|
+
]
|
|
2926
|
+
}
|
|
2927
|
+
)
|
|
2928
|
+
] })
|
|
2929
|
+
}
|
|
2930
|
+
);
|
|
2931
|
+
}
|
|
2932
|
+
);
|
|
2933
|
+
UctMobileBanner.displayName = "UctMobileBanner";
|
|
2810
2934
|
var ValuesSection = react.forwardRef(
|
|
2811
2935
|
({ heading: heading2, subheading, values, singleOpen = false, className, ...rest }, ref) => {
|
|
2812
2936
|
const [openIndex, setOpenIndex] = react.useState(null);
|
|
@@ -3028,6 +3152,7 @@ exports.TestimonialsCarousel = TestimonialsCarousel;
|
|
|
3028
3152
|
exports.TextSection = TextSection;
|
|
3029
3153
|
exports.TripCategoryCard = TripCategoryCard;
|
|
3030
3154
|
exports.TripsCategorySection = TripsCategorySection;
|
|
3155
|
+
exports.UctMobileBanner = UctMobileBanner;
|
|
3031
3156
|
exports.ValuesSection = ValuesSection;
|
|
3032
3157
|
exports.WarriorCard = WarriorCard;
|
|
3033
3158
|
exports.WarriorsSection = WarriorsSection;
|