@harshit-wander/component-lib 1.1.11 → 1.1.13
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 +87 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +87 -37
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +24 -22
package/dist/index.d.cts
CHANGED
|
@@ -157,7 +157,7 @@ declare const GalleryPhoto: react.ForwardRefExoticComponent<GalleryPhotoProps &
|
|
|
157
157
|
interface LocationItem {
|
|
158
158
|
location: string;
|
|
159
159
|
address: string;
|
|
160
|
-
logo?: string | ReactNode;
|
|
160
|
+
logo?: string | ReactNode | undefined;
|
|
161
161
|
}
|
|
162
162
|
interface LocationCardProps extends HTMLAttributes<HTMLElement>, LocationItem {
|
|
163
163
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -157,7 +157,7 @@ declare const GalleryPhoto: react.ForwardRefExoticComponent<GalleryPhotoProps &
|
|
|
157
157
|
interface LocationItem {
|
|
158
158
|
location: string;
|
|
159
159
|
address: string;
|
|
160
|
-
logo?: string | ReactNode;
|
|
160
|
+
logo?: string | ReactNode | undefined;
|
|
161
161
|
}
|
|
162
162
|
interface LocationCardProps extends HTMLAttributes<HTMLElement>, LocationItem {
|
|
163
163
|
}
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,16 @@ var containerClass = "inline-flex flex-col items-center justify-center gap-sm p-
|
|
|
12
12
|
var BrandLogo = forwardRef(
|
|
13
13
|
({ logo, name, href, className, ...rest }, ref) => {
|
|
14
14
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15
|
-
/* @__PURE__ */ jsx(
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
"img",
|
|
17
|
+
{
|
|
18
|
+
src: logo,
|
|
19
|
+
alt: name,
|
|
20
|
+
loading: "lazy",
|
|
21
|
+
decoding: "async",
|
|
22
|
+
className: "h-[50px] w-auto max-w-full object-contain"
|
|
23
|
+
}
|
|
24
|
+
),
|
|
16
25
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium leading-button text-text", children: name })
|
|
17
26
|
] });
|
|
18
27
|
if (href) {
|
|
@@ -249,6 +258,8 @@ var DestinationCard = forwardRef(
|
|
|
249
258
|
{
|
|
250
259
|
src: image,
|
|
251
260
|
alt,
|
|
261
|
+
loading: "lazy",
|
|
262
|
+
decoding: "async",
|
|
252
263
|
className: "w-[66px] h-[66px] rounded-full object-cover bg-border"
|
|
253
264
|
}
|
|
254
265
|
),
|
|
@@ -536,6 +547,8 @@ var FeatureCard = forwardRef(
|
|
|
536
547
|
src: imageUrl,
|
|
537
548
|
alt: "",
|
|
538
549
|
"aria-hidden": "true",
|
|
550
|
+
loading: "lazy",
|
|
551
|
+
decoding: "async",
|
|
539
552
|
className: "absolute bottom-0 left-0 w-full pointer-events-none"
|
|
540
553
|
}
|
|
541
554
|
) : null
|
|
@@ -607,7 +620,7 @@ var LocationCard = forwardRef(
|
|
|
607
620
|
{
|
|
608
621
|
"aria-hidden": "true",
|
|
609
622
|
className: "flex items-center h-[50px] [&>img]:h-full [&>img]:w-auto [&>img]:max-w-full [&>img]:object-contain [&>svg]:h-full [&>svg]:w-auto [&>svg]:max-w-full [&>svg]:object-contain",
|
|
610
|
-
children: typeof logo === "string" ? /* @__PURE__ */ jsx("img", { src: logo, alt: "" }) : logo
|
|
623
|
+
children: typeof logo === "string" ? /* @__PURE__ */ jsx("img", { src: logo, alt: "", loading: "lazy", decoding: "async" }) : logo
|
|
611
624
|
}
|
|
612
625
|
) : null,
|
|
613
626
|
/* @__PURE__ */ jsx("h3", { className: "m-0 text-card-title", children: location }),
|
|
@@ -704,12 +717,13 @@ var PackageCard = forwardRef(
|
|
|
704
717
|
}, ref) => {
|
|
705
718
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
706
719
|
/* @__PURE__ */ jsx(
|
|
707
|
-
"
|
|
720
|
+
"img",
|
|
708
721
|
{
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
722
|
+
src: image,
|
|
723
|
+
alt,
|
|
724
|
+
loading: "lazy",
|
|
725
|
+
decoding: "async",
|
|
726
|
+
className: "absolute inset-0 w-full h-full object-cover object-center pointer-events-none"
|
|
713
727
|
}
|
|
714
728
|
),
|
|
715
729
|
/* @__PURE__ */ jsx(
|
|
@@ -789,6 +803,8 @@ var TeamInfoCard = forwardRef(
|
|
|
789
803
|
{
|
|
790
804
|
src: image,
|
|
791
805
|
alt: name,
|
|
806
|
+
loading: "lazy",
|
|
807
|
+
decoding: "async",
|
|
792
808
|
className: "w-[140px] h-[140px] rounded-full object-cover shadow-card-lg"
|
|
793
809
|
}
|
|
794
810
|
),
|
|
@@ -811,7 +827,7 @@ var TeamInfoCard = forwardRef(
|
|
|
811
827
|
target: "_blank",
|
|
812
828
|
rel: "noopener noreferrer",
|
|
813
829
|
className: "inline-flex items-center justify-center w-8 h-8 text-primary no-underline text-sm transition-opacity duration-150 ease-in [&>img]:w-full [&>img]:h-full [&>img]:object-contain [&>svg]:w-full [&>svg]:h-full [&>svg]:object-contain hover:opacity-70 focus-visible:outline-2 focus-visible:outline-primary focus-visible:outline-offset-2 focus-visible:rounded-sm",
|
|
814
|
-
children: typeof link.icon === "string" ? /* @__PURE__ */ jsx("img", { src: link.icon, alt: "" }) : link.icon ?? link.label
|
|
830
|
+
children: typeof link.icon === "string" ? /* @__PURE__ */ jsx("img", { src: link.icon, alt: "", loading: "lazy", decoding: "async" }) : link.icon ?? link.label
|
|
815
831
|
}
|
|
816
832
|
) }, link.href)) })
|
|
817
833
|
] }) : null
|
|
@@ -1567,29 +1583,39 @@ var CtaBanner = forwardRef(
|
|
|
1567
1583
|
}
|
|
1568
1584
|
cta.onClick?.();
|
|
1569
1585
|
};
|
|
1570
|
-
return /* @__PURE__ */ jsx("section", { ref, className: cn("flex justify-center bg-surface", className), ...rest, children: /* @__PURE__ */
|
|
1586
|
+
return /* @__PURE__ */ jsx("section", { ref, className: cn("flex justify-center bg-surface", className), ...rest, children: /* @__PURE__ */ jsxs(
|
|
1571
1587
|
"div",
|
|
1572
1588
|
{
|
|
1573
|
-
className: "relative flex items-center w-full min-h-[300px] pl-[50px] rounded-md
|
|
1574
|
-
style: {
|
|
1575
|
-
|
|
1576
|
-
backgroundImage
|
|
1577
|
-
|
|
1578
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xl max-w-[550px]", children: [
|
|
1579
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xs text-white", children: [
|
|
1580
|
-
/* @__PURE__ */ jsx("h2", { className: "m-0 text-xl font-semibold leading-button", children: title }),
|
|
1581
|
-
subtitle ? /* @__PURE__ */ jsx("p", { className: "m-0 text-sm font-medium leading-body", children: subtitle }) : null
|
|
1582
|
-
] }),
|
|
1583
|
-
/* @__PURE__ */ jsx(
|
|
1584
|
-
"button",
|
|
1589
|
+
className: "relative flex items-center w-full min-h-[300px] pl-[50px] rounded-md overflow-hidden max-md:px-lg",
|
|
1590
|
+
style: { backgroundColor: backgroundColor ?? "var(--color-primary)" },
|
|
1591
|
+
children: [
|
|
1592
|
+
backgroundImage ? /* @__PURE__ */ jsx(
|
|
1593
|
+
"img",
|
|
1585
1594
|
{
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1595
|
+
src: backgroundImage,
|
|
1596
|
+
alt: "",
|
|
1597
|
+
"aria-hidden": "true",
|
|
1598
|
+
loading: "lazy",
|
|
1599
|
+
decoding: "async",
|
|
1600
|
+
className: "absolute inset-0 w-full h-full object-cover object-center pointer-events-none"
|
|
1590
1601
|
}
|
|
1591
|
-
)
|
|
1592
|
-
|
|
1602
|
+
) : null,
|
|
1603
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex flex-col gap-xl max-w-[550px]", children: [
|
|
1604
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-xs text-white", children: [
|
|
1605
|
+
/* @__PURE__ */ jsx("h2", { className: "m-0 text-xl font-semibold leading-button", children: title }),
|
|
1606
|
+
subtitle ? /* @__PURE__ */ jsx("p", { className: "m-0 text-sm font-medium leading-body", children: subtitle }) : null
|
|
1607
|
+
] }),
|
|
1608
|
+
/* @__PURE__ */ jsx(
|
|
1609
|
+
"button",
|
|
1610
|
+
{
|
|
1611
|
+
type: "button",
|
|
1612
|
+
onClick: handleCtaClick,
|
|
1613
|
+
className: "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",
|
|
1614
|
+
children: cta.label
|
|
1615
|
+
}
|
|
1616
|
+
)
|
|
1617
|
+
] })
|
|
1618
|
+
]
|
|
1593
1619
|
}
|
|
1594
1620
|
) });
|
|
1595
1621
|
}
|
|
@@ -2159,7 +2185,8 @@ var RatingBadge = ({ logo, alt, rating, reviewCount }) => /* @__PURE__ */ jsxs("
|
|
|
2159
2185
|
] })
|
|
2160
2186
|
] })
|
|
2161
2187
|
] });
|
|
2162
|
-
var sectionBase = "relative flex flex-col justify-center gap-md min-h-[420px] py-xl px-xl text-white
|
|
2188
|
+
var sectionBase = "relative flex flex-col justify-center gap-md min-h-[420px] py-xl px-xl text-white overflow-hidden before:content-[''] before:absolute before:inset-0 before:pointer-events-none [&>:not(img)]:relative max-md:items-center max-md:text-center max-md:min-h-[360px] max-md:pt-xl max-md:px-md max-md:pb-0 max-md:gap-lg";
|
|
2189
|
+
var backgroundImageClass = "absolute inset-0 w-full h-full object-cover object-center pointer-events-none -z-10";
|
|
2163
2190
|
var Hero = forwardRef((props, ref) => {
|
|
2164
2191
|
const variant = props.variant ?? "centered";
|
|
2165
2192
|
if (variant === "reviews") {
|
|
@@ -2184,12 +2211,20 @@ var Hero = forwardRef((props, ref) => {
|
|
|
2184
2211
|
backgroundImage2 ? "before:bg-black/45" : "before:bg-transparent",
|
|
2185
2212
|
className2
|
|
2186
2213
|
),
|
|
2187
|
-
style: {
|
|
2188
|
-
backgroundColor: backgroundColor2 ?? "var(--color-primary)",
|
|
2189
|
-
backgroundImage: backgroundImage2 ? `url(${backgroundImage2})` : void 0
|
|
2190
|
-
},
|
|
2214
|
+
style: { backgroundColor: backgroundColor2 ?? "var(--color-primary)" },
|
|
2191
2215
|
...rest2,
|
|
2192
2216
|
children: [
|
|
2217
|
+
backgroundImage2 ? /* @__PURE__ */ jsx(
|
|
2218
|
+
"img",
|
|
2219
|
+
{
|
|
2220
|
+
src: backgroundImage2,
|
|
2221
|
+
alt: "",
|
|
2222
|
+
"aria-hidden": "true",
|
|
2223
|
+
loading: "lazy",
|
|
2224
|
+
decoding: "async",
|
|
2225
|
+
className: backgroundImageClass
|
|
2226
|
+
}
|
|
2227
|
+
) : null,
|
|
2193
2228
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "absolute top-0 left-0 right-0 h-[3px] bg-primary" }),
|
|
2194
2229
|
/* @__PURE__ */ jsx("div", { className: "flex items-stretch gap-md before:content-[''] before:w-1 before:bg-accent before:rounded-sm max-md:justify-center max-md:gap-0 max-md:before:hidden", children: /* @__PURE__ */ jsx("h1", { className: "m-0 text-2xl font-bold leading-heading max-w-[760px] max-md:text-xl", children: title2 }) }),
|
|
2195
2230
|
subtitle2 ? /* @__PURE__ */ jsx("p", { className: "inline-block m-0 py-sm px-md bg-accent text-secondary text-md font-semibold leading-button max-md:bg-transparent max-md:text-accent max-md:p-0 max-md:self-center", children: subtitle2 }) : null,
|
|
@@ -2218,12 +2253,20 @@ var Hero = forwardRef((props, ref) => {
|
|
|
2218
2253
|
backgroundImage ? "before:bg-black/45" : "before:bg-transparent",
|
|
2219
2254
|
className
|
|
2220
2255
|
),
|
|
2221
|
-
style: {
|
|
2222
|
-
backgroundColor: backgroundColor ?? "var(--color-primary)",
|
|
2223
|
-
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0
|
|
2224
|
-
},
|
|
2256
|
+
style: { backgroundColor: backgroundColor ?? "var(--color-primary)" },
|
|
2225
2257
|
...rest,
|
|
2226
2258
|
children: [
|
|
2259
|
+
backgroundImage ? /* @__PURE__ */ jsx(
|
|
2260
|
+
"img",
|
|
2261
|
+
{
|
|
2262
|
+
src: backgroundImage,
|
|
2263
|
+
alt: "",
|
|
2264
|
+
"aria-hidden": "true",
|
|
2265
|
+
loading: "lazy",
|
|
2266
|
+
decoding: "async",
|
|
2267
|
+
className: backgroundImageClass
|
|
2268
|
+
}
|
|
2269
|
+
) : null,
|
|
2227
2270
|
/* @__PURE__ */ jsx("h1", { className: "m-0 text-2xl font-bold leading-heading max-w-[760px] max-md:text-xl", children: title }),
|
|
2228
2271
|
subtitle ? /* @__PURE__ */ jsx("p", { className: "m-0 max-w-[640px] text-lg font-normal leading-body opacity-95", children: subtitle }) : null
|
|
2229
2272
|
]
|
|
@@ -3041,6 +3084,12 @@ var UctMobileBanner = forwardRef(
|
|
|
3041
3084
|
...rest
|
|
3042
3085
|
}, ref) => {
|
|
3043
3086
|
const Link = LinkComponent ?? "a";
|
|
3087
|
+
const videoRef = useRef(null);
|
|
3088
|
+
useEffect(() => {
|
|
3089
|
+
const video = videoRef.current;
|
|
3090
|
+
if (!video || !videoUrl) return;
|
|
3091
|
+
video.src = videoUrl;
|
|
3092
|
+
}, [videoUrl]);
|
|
3044
3093
|
return /* @__PURE__ */ jsx(
|
|
3045
3094
|
Link,
|
|
3046
3095
|
{
|
|
@@ -3055,12 +3104,13 @@ var UctMobileBanner = forwardRef(
|
|
|
3055
3104
|
/* @__PURE__ */ 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__ */ jsx(
|
|
3056
3105
|
"video",
|
|
3057
3106
|
{
|
|
3058
|
-
|
|
3107
|
+
ref: videoRef,
|
|
3059
3108
|
poster: posterUrl,
|
|
3060
3109
|
muted: true,
|
|
3061
3110
|
loop: true,
|
|
3062
3111
|
autoPlay: true,
|
|
3063
3112
|
playsInline: true,
|
|
3113
|
+
preload: "metadata",
|
|
3064
3114
|
className: "w-full h-full object-cover rounded-full"
|
|
3065
3115
|
}
|
|
3066
3116
|
) }),
|