@opensite/ui 0.7.3 → 0.7.5
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/carousel-fullscreen-scroll-fx.cjs +573 -113
- package/dist/carousel-fullscreen-scroll-fx.d.cts +10 -2
- package/dist/carousel-fullscreen-scroll-fx.d.ts +10 -2
- package/dist/carousel-fullscreen-scroll-fx.js +574 -114
- package/dist/registry.cjs +162 -121
- package/dist/registry.js +162 -121
- package/package.json +1 -1
package/dist/registry.cjs
CHANGED
|
@@ -18280,6 +18280,7 @@ function CarouselFullscreenScrollFx({
|
|
|
18280
18280
|
slides,
|
|
18281
18281
|
slidesSlot,
|
|
18282
18282
|
className,
|
|
18283
|
+
containerClassName = "h-full flex flex-col justify-center",
|
|
18283
18284
|
navigationClassName,
|
|
18284
18285
|
contentClassName,
|
|
18285
18286
|
subtitleClassName,
|
|
@@ -18295,40 +18296,44 @@ function CarouselFullscreenScrollFx({
|
|
|
18295
18296
|
patternOpacity = 0.033
|
|
18296
18297
|
}) {
|
|
18297
18298
|
const containerRef = React52__namespace.useRef(null);
|
|
18299
|
+
const scrollContainerRef = React52__namespace.useRef(null);
|
|
18298
18300
|
const [activeIndex, setActiveIndex] = React52__namespace.useState(0);
|
|
18299
18301
|
React52__namespace.useEffect(() => {
|
|
18300
|
-
const
|
|
18301
|
-
slides?.
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
if (entry.isIntersecting && entry.intersectionRatio > 0.5) {
|
|
18308
|
-
setActiveIndex(index);
|
|
18309
|
-
}
|
|
18310
|
-
});
|
|
18311
|
-
},
|
|
18312
|
-
{ threshold: 0.5 }
|
|
18313
|
-
);
|
|
18314
|
-
observer.observe(element);
|
|
18315
|
-
observers.push(observer);
|
|
18316
|
-
}
|
|
18317
|
-
});
|
|
18318
|
-
return () => {
|
|
18319
|
-
observers.forEach((observer) => observer.disconnect());
|
|
18302
|
+
const scrollContainer = scrollContainerRef.current;
|
|
18303
|
+
if (!scrollContainer || !slides?.length) return;
|
|
18304
|
+
const handleScroll = () => {
|
|
18305
|
+
const scrollLeft = scrollContainer.scrollLeft;
|
|
18306
|
+
const slideWidth = scrollContainer.clientWidth;
|
|
18307
|
+
const newIndex = Math.round(scrollLeft / slideWidth);
|
|
18308
|
+
setActiveIndex(newIndex);
|
|
18320
18309
|
};
|
|
18310
|
+
scrollContainer.addEventListener("scroll", handleScroll);
|
|
18311
|
+
return () => scrollContainer.removeEventListener("scroll", handleScroll);
|
|
18321
18312
|
}, [slides]);
|
|
18313
|
+
const scrollToSlide = React52__namespace.useCallback((index) => {
|
|
18314
|
+
const scrollContainer = scrollContainerRef.current;
|
|
18315
|
+
if (!scrollContainer) return;
|
|
18316
|
+
const slideWidth = scrollContainer.clientWidth;
|
|
18317
|
+
if (typeof scrollContainer.scrollTo === "function") {
|
|
18318
|
+
scrollContainer.scrollTo({
|
|
18319
|
+
left: slideWidth * index,
|
|
18320
|
+
behavior: "smooth"
|
|
18321
|
+
});
|
|
18322
|
+
} else {
|
|
18323
|
+
scrollContainer.scrollLeft = slideWidth * index;
|
|
18324
|
+
}
|
|
18325
|
+
}, []);
|
|
18322
18326
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18323
18327
|
Section,
|
|
18324
18328
|
{
|
|
18325
18329
|
ref: containerRef,
|
|
18326
18330
|
background,
|
|
18327
18331
|
spacing,
|
|
18328
|
-
className: cn(className),
|
|
18332
|
+
className: cn("relative overflow-hidden", className),
|
|
18329
18333
|
pattern,
|
|
18330
18334
|
patternOpacity,
|
|
18331
18335
|
containerMaxWidth,
|
|
18336
|
+
containerClassName: "p-0",
|
|
18332
18337
|
children: [
|
|
18333
18338
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18334
18339
|
"div",
|
|
@@ -18340,10 +18345,7 @@ function CarouselFullscreenScrollFx({
|
|
|
18340
18345
|
children: slides?.map((slide, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
18341
18346
|
"button",
|
|
18342
18347
|
{
|
|
18343
|
-
onClick: () =>
|
|
18344
|
-
const element = document.getElementById(`fullscreen-${slide.id}`);
|
|
18345
|
-
element?.scrollIntoView({ behavior: "smooth" });
|
|
18346
|
-
},
|
|
18348
|
+
onClick: () => scrollToSlide(index),
|
|
18347
18349
|
className: cn(
|
|
18348
18350
|
"h-3 w-3 rounded-full border-2 transition-all",
|
|
18349
18351
|
activeIndex === index ? "scale-125 border-white bg-white" : "border-white/50 bg-transparent hover:border-white"
|
|
@@ -18354,76 +18356,115 @@ function CarouselFullscreenScrollFx({
|
|
|
18354
18356
|
))
|
|
18355
18357
|
}
|
|
18356
18358
|
),
|
|
18357
|
-
|
|
18359
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18358
18360
|
"div",
|
|
18359
18361
|
{
|
|
18360
|
-
|
|
18361
|
-
className:
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
className:
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
|
|
18380
|
-
|
|
18381
|
-
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18362
|
+
ref: scrollContainerRef,
|
|
18363
|
+
className: "flex h-screen snap-x snap-mandatory overflow-x-auto overflow-y-hidden scroll-smooth",
|
|
18364
|
+
style: { scrollbarWidth: "none", msOverflowStyle: "none" },
|
|
18365
|
+
children: slidesSlot ? slidesSlot : slides?.map((slide, index) => {
|
|
18366
|
+
const renderActions = React52__namespace.useMemo(() => {
|
|
18367
|
+
if (!slide.actions || slide.actions.length === 0) return null;
|
|
18368
|
+
return slide.actions.map((action, actionIndex) => {
|
|
18369
|
+
const {
|
|
18370
|
+
label,
|
|
18371
|
+
icon,
|
|
18372
|
+
iconAfter,
|
|
18373
|
+
children,
|
|
18374
|
+
className: actionClassName,
|
|
18375
|
+
asButton,
|
|
18376
|
+
...pressableProps
|
|
18377
|
+
} = action;
|
|
18378
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18379
|
+
Pressable,
|
|
18380
|
+
{
|
|
18381
|
+
asButton: asButton ?? true,
|
|
18382
|
+
className: actionClassName,
|
|
18383
|
+
...pressableProps,
|
|
18384
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18385
|
+
icon,
|
|
18386
|
+
label,
|
|
18387
|
+
iconAfter
|
|
18388
|
+
] })
|
|
18389
|
+
},
|
|
18390
|
+
actionIndex
|
|
18391
|
+
);
|
|
18392
|
+
});
|
|
18393
|
+
}, [slide.actions]);
|
|
18394
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18390
18395
|
"div",
|
|
18391
18396
|
{
|
|
18397
|
+
id: `fullscreen-${slide.id}`,
|
|
18392
18398
|
className: cn(
|
|
18393
|
-
"relative
|
|
18394
|
-
|
|
18399
|
+
"relative flex h-screen min-w-full snap-start items-center justify-center overflow-hidden",
|
|
18400
|
+
slide.className
|
|
18395
18401
|
),
|
|
18396
18402
|
children: [
|
|
18397
|
-
|
|
18398
|
-
|
|
18399
|
-
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18403
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0", children: [
|
|
18404
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18405
|
+
img.Img,
|
|
18406
|
+
{
|
|
18407
|
+
src: slide.image,
|
|
18408
|
+
alt: typeof slide.title === "string" ? slide.title : `Slide ${index + 1}`,
|
|
18409
|
+
className: cn(
|
|
18410
|
+
"h-full w-full object-cover",
|
|
18411
|
+
slide.imageClassName
|
|
18412
|
+
),
|
|
18413
|
+
optixFlowConfig
|
|
18414
|
+
}
|
|
18415
|
+
),
|
|
18416
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18417
|
+
"div",
|
|
18418
|
+
{
|
|
18419
|
+
className: "absolute inset-0",
|
|
18420
|
+
style: {
|
|
18421
|
+
backgroundColor: slide.overlayColor || "rgba(0, 0, 0, 0.5)"
|
|
18422
|
+
}
|
|
18423
|
+
}
|
|
18424
|
+
)
|
|
18425
|
+
] }),
|
|
18426
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18427
|
+
"div",
|
|
18419
18428
|
{
|
|
18420
18429
|
className: cn(
|
|
18421
|
-
"mx-auto max-w-2xl text-
|
|
18422
|
-
|
|
18430
|
+
"relative z-10 mx-auto max-w-4xl md:max-w-2xl px-6 text-center text-white text-shadow",
|
|
18431
|
+
contentClassName
|
|
18423
18432
|
),
|
|
18424
|
-
children:
|
|
18433
|
+
children: [
|
|
18434
|
+
slide.subtitle && (typeof slide.subtitle === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18435
|
+
"p",
|
|
18436
|
+
{
|
|
18437
|
+
className: cn(
|
|
18438
|
+
"mb-4 text-sm font-medium uppercase tracking-widest text-white/70",
|
|
18439
|
+
subtitleClassName
|
|
18440
|
+
),
|
|
18441
|
+
children: slide.subtitle
|
|
18442
|
+
}
|
|
18443
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subtitleClassName, children: slide.subtitle })),
|
|
18444
|
+
slide.title && (typeof slide.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18445
|
+
"h2",
|
|
18446
|
+
{
|
|
18447
|
+
className: cn(
|
|
18448
|
+
"mb-6 text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl",
|
|
18449
|
+
titleClassName
|
|
18450
|
+
),
|
|
18451
|
+
children: slide.title
|
|
18452
|
+
}
|
|
18453
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: slide.title })),
|
|
18454
|
+
slide.description && (typeof slide.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18455
|
+
"p",
|
|
18456
|
+
{
|
|
18457
|
+
className: cn(
|
|
18458
|
+
"mx-auto text-lg text-white/80 md:text-xl text-balance",
|
|
18459
|
+
descriptionClassName
|
|
18460
|
+
),
|
|
18461
|
+
children: slide.description
|
|
18462
|
+
}
|
|
18463
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: slide.description })),
|
|
18464
|
+
renderActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row", children: renderActions })
|
|
18465
|
+
]
|
|
18425
18466
|
}
|
|
18426
|
-
)
|
|
18467
|
+
),
|
|
18427
18468
|
index < (slides?.length ?? 0) - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18428
18469
|
"div",
|
|
18429
18470
|
{
|
|
@@ -18433,32 +18474,32 @@ function CarouselFullscreenScrollFx({
|
|
|
18433
18474
|
),
|
|
18434
18475
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
18435
18476
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs uppercase tracking-widest text-white/50", children: "Scroll" }),
|
|
18436
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-px animate-pulse bg-
|
|
18477
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 w-px animate-pulse bg-linear-to-b from-white/50 to-transparent" })
|
|
18437
18478
|
] })
|
|
18438
18479
|
}
|
|
18480
|
+
),
|
|
18481
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
18482
|
+
"div",
|
|
18483
|
+
{
|
|
18484
|
+
className: cn(
|
|
18485
|
+
"absolute bottom-8 right-8 text-sm text-white/50",
|
|
18486
|
+
counterClassName
|
|
18487
|
+
),
|
|
18488
|
+
children: [
|
|
18489
|
+
String(index + 1).padStart(2, "0"),
|
|
18490
|
+
" /",
|
|
18491
|
+
" ",
|
|
18492
|
+
String(slides?.length ?? 0).padStart(2, "0")
|
|
18493
|
+
]
|
|
18494
|
+
}
|
|
18439
18495
|
)
|
|
18440
18496
|
]
|
|
18441
|
-
}
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
"absolute bottom-8 right-8 text-sm text-white/50",
|
|
18448
|
-
counterClassName
|
|
18449
|
-
),
|
|
18450
|
-
children: [
|
|
18451
|
-
String(index + 1).padStart(2, "0"),
|
|
18452
|
-
" /",
|
|
18453
|
-
" ",
|
|
18454
|
-
String(slides?.length ?? 0).padStart(2, "0")
|
|
18455
|
-
]
|
|
18456
|
-
}
|
|
18457
|
-
)
|
|
18458
|
-
]
|
|
18459
|
-
},
|
|
18460
|
-
slide.id
|
|
18461
|
-
))
|
|
18497
|
+
},
|
|
18498
|
+
slide.id
|
|
18499
|
+
);
|
|
18500
|
+
})
|
|
18501
|
+
}
|
|
18502
|
+
)
|
|
18462
18503
|
]
|
|
18463
18504
|
}
|
|
18464
18505
|
);
|
|
@@ -76940,7 +76981,7 @@ function ListSearchableGrid({
|
|
|
76940
76981
|
}
|
|
76941
76982
|
);
|
|
76942
76983
|
}
|
|
76943
|
-
var { useMemo:
|
|
76984
|
+
var { useMemo: useMemo441 } = React52__namespace;
|
|
76944
76985
|
function OfferModalNewsletterDiscount({
|
|
76945
76986
|
title,
|
|
76946
76987
|
emailPlaceholder,
|
|
@@ -77007,7 +77048,7 @@ function OfferModalNewsletterDiscount({
|
|
|
77007
77048
|
});
|
|
77008
77049
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
77009
77050
|
const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
77010
|
-
const renderCloseButton =
|
|
77051
|
+
const renderCloseButton = useMemo441(() => {
|
|
77011
77052
|
if (closeButtonSlot) return closeButtonSlot;
|
|
77012
77053
|
if (!closeButtonText) return null;
|
|
77013
77054
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute end-1.5 top-1.5", children: /* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -77021,12 +77062,12 @@ function OfferModalNewsletterDiscount({
|
|
|
77021
77062
|
}
|
|
77022
77063
|
) }) });
|
|
77023
77064
|
}, [closeButtonSlot, closeButtonText, closeClassName]);
|
|
77024
|
-
const renderHeader =
|
|
77065
|
+
const renderHeader = useMemo441(() => {
|
|
77025
77066
|
if (headerSlot) return headerSlot;
|
|
77026
77067
|
if (!title) return null;
|
|
77027
77068
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { className: headerClassName, children: typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) });
|
|
77028
77069
|
}, [headerSlot, title, headerClassName, titleClassName]);
|
|
77029
|
-
const renderForm =
|
|
77070
|
+
const renderForm = useMemo441(() => {
|
|
77030
77071
|
if (formSlot) return formSlot;
|
|
77031
77072
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
77032
77073
|
forms.Form,
|
|
@@ -77088,7 +77129,7 @@ function OfferModalNewsletterDiscount({
|
|
|
77088
77129
|
}
|
|
77089
77130
|
) });
|
|
77090
77131
|
}
|
|
77091
|
-
var { useMemo:
|
|
77132
|
+
var { useMemo: useMemo442 } = React52__namespace;
|
|
77092
77133
|
function OfferModalMembershipImage({
|
|
77093
77134
|
overline,
|
|
77094
77135
|
title,
|
|
@@ -77164,7 +77205,7 @@ function OfferModalMembershipImage({
|
|
|
77164
77205
|
});
|
|
77165
77206
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
77166
77207
|
const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
77167
|
-
const renderImage =
|
|
77208
|
+
const renderImage = useMemo442(() => {
|
|
77168
77209
|
if (imageSlot) return imageSlot;
|
|
77169
77210
|
if (!image) return null;
|
|
77170
77211
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("max-h-[290px] h-full overflow-hidden max-lg:hidden", imageWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -77177,7 +77218,7 @@ function OfferModalMembershipImage({
|
|
|
77177
77218
|
}
|
|
77178
77219
|
) });
|
|
77179
77220
|
}, [imageSlot, image, imageWrapperClassName, imageClassName, optixFlowConfig]);
|
|
77180
|
-
const renderCloseButton =
|
|
77221
|
+
const renderCloseButton = useMemo442(() => {
|
|
77181
77222
|
if (closeButtonSlot) return closeButtonSlot;
|
|
77182
77223
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -end-px -top-px z-10", children: /* @__PURE__ */ jsxRuntime.jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77183
77224
|
Pressable,
|
|
@@ -77193,7 +77234,7 @@ function OfferModalMembershipImage({
|
|
|
77193
77234
|
}
|
|
77194
77235
|
) }) });
|
|
77195
77236
|
}, [closeButtonSlot, closeClassName]);
|
|
77196
|
-
const renderForm =
|
|
77237
|
+
const renderForm = useMemo442(() => {
|
|
77197
77238
|
if (formSlot) return formSlot;
|
|
77198
77239
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
77199
77240
|
forms.Form,
|
|
@@ -77256,7 +77297,7 @@ function OfferModalMembershipImage({
|
|
|
77256
77297
|
}
|
|
77257
77298
|
);
|
|
77258
77299
|
}, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
|
|
77259
|
-
const renderFooter =
|
|
77300
|
+
const renderFooter = useMemo442(() => {
|
|
77260
77301
|
if (footerSlot) return footerSlot;
|
|
77261
77302
|
if (!description) return null;
|
|
77262
77303
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogFooter, { className: footerClassName, children: /* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { className: cn("text-muted-foreground text-center text-xs leading-relaxed", descriptionClassName), children: description }) });
|
|
@@ -77284,7 +77325,7 @@ function OfferModalMembershipImage({
|
|
|
77284
77325
|
}
|
|
77285
77326
|
) });
|
|
77286
77327
|
}
|
|
77287
|
-
var { useMemo:
|
|
77328
|
+
var { useMemo: useMemo443 } = React52__namespace;
|
|
77288
77329
|
function OfferModalSheetNewsletter({
|
|
77289
77330
|
logo,
|
|
77290
77331
|
logoSlot,
|
|
@@ -77366,7 +77407,7 @@ function OfferModalSheetNewsletter({
|
|
|
77366
77407
|
});
|
|
77367
77408
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
77368
77409
|
const sheetProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
77369
|
-
const renderLogo =
|
|
77410
|
+
const renderLogo = useMemo443(() => {
|
|
77370
77411
|
if (logoSlot) return logoSlot;
|
|
77371
77412
|
if (!logo) return null;
|
|
77372
77413
|
const logoSrc = typeof logo.src === "string" ? logo.src : logo.src.light;
|
|
@@ -77380,7 +77421,7 @@ function OfferModalSheetNewsletter({
|
|
|
77380
77421
|
}
|
|
77381
77422
|
);
|
|
77382
77423
|
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
77383
|
-
const renderHeader =
|
|
77424
|
+
const renderHeader = useMemo443(() => {
|
|
77384
77425
|
if (headerSlot) return headerSlot;
|
|
77385
77426
|
return /* @__PURE__ */ jsxRuntime.jsxs(SheetHeader, { className: cn("gap-8 p-0", headerClassName), children: [
|
|
77386
77427
|
renderLogo,
|
|
@@ -77390,7 +77431,7 @@ function OfferModalSheetNewsletter({
|
|
|
77390
77431
|
] })
|
|
77391
77432
|
] });
|
|
77392
77433
|
}, [headerSlot, renderLogo, headerClassName, title, titleClassName, description, descriptionClassName]);
|
|
77393
|
-
const renderForm =
|
|
77434
|
+
const renderForm = useMemo443(() => {
|
|
77394
77435
|
if (formSlot) return formSlot;
|
|
77395
77436
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
77396
77437
|
forms.Form,
|
|
@@ -77438,7 +77479,7 @@ function OfferModalSheetNewsletter({
|
|
|
77438
77479
|
}
|
|
77439
77480
|
);
|
|
77440
77481
|
}, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
|
|
77441
|
-
const renderLegal =
|
|
77482
|
+
const renderLegal = useMemo443(() => {
|
|
77442
77483
|
if (legalSlot) return legalSlot;
|
|
77443
77484
|
if (!termsUrl || !termsText || !privacyUrl || !privacyText) return null;
|
|
77444
77485
|
return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("text-muted-foreground text-xs", legalClassName), children: [
|
|
@@ -77452,7 +77493,7 @@ function OfferModalSheetNewsletter({
|
|
|
77452
77493
|
"."
|
|
77453
77494
|
] });
|
|
77454
77495
|
}, [legalSlot, termsUrl, termsText, privacyUrl, privacyText, legalClassName]);
|
|
77455
|
-
const renderImage =
|
|
77496
|
+
const renderImage = useMemo443(() => {
|
|
77456
77497
|
if (imageSlot) return imageSlot;
|
|
77457
77498
|
if (!image) return null;
|
|
77458
77499
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("h-1/2 basis-1/2", imageWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx(AspectRatio, { ratio: 1, className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|