@opensite/ui 0.7.2 → 0.7.4
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-animated-sections.cjs +32 -32
- package/dist/carousel-animated-sections.d.cts +4 -3
- package/dist/carousel-animated-sections.d.ts +4 -3
- package/dist/carousel-animated-sections.js +32 -32
- package/dist/carousel-feature-badge.cjs +59 -18
- package/dist/carousel-feature-badge.d.cts +10 -2
- package/dist/carousel-feature-badge.d.ts +10 -2
- package/dist/carousel-feature-badge.js +59 -18
- package/dist/carousel-fullscreen-scroll-fx.cjs +106 -33
- 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 +106 -33
- package/dist/registry.cjs +212 -98
- package/dist/registry.js +212 -98
- package/package.json +1 -1
package/dist/registry.js
CHANGED
|
@@ -17239,13 +17239,23 @@ function ContactHelpCenter({
|
|
|
17239
17239
|
}
|
|
17240
17240
|
);
|
|
17241
17241
|
}
|
|
17242
|
+
var BRIGHTNESS_CLASS_MAP = {
|
|
17243
|
+
"10": "brightness-[.1]",
|
|
17244
|
+
"20": "brightness-[.2]",
|
|
17245
|
+
"25": "brightness-[.25]",
|
|
17246
|
+
"30": "brightness-[.3]",
|
|
17247
|
+
"40": "brightness-[.4]",
|
|
17248
|
+
"50": "brightness-50",
|
|
17249
|
+
"75": "brightness-75",
|
|
17250
|
+
"100": "brightness-100"
|
|
17251
|
+
};
|
|
17242
17252
|
function CarouselAnimatedSections({
|
|
17243
17253
|
sections,
|
|
17244
17254
|
sectionsSlot,
|
|
17245
17255
|
actionsSlot,
|
|
17246
17256
|
actions,
|
|
17247
17257
|
className,
|
|
17248
|
-
containerClassName = "h-full",
|
|
17258
|
+
containerClassName = "h-full flex flex-col justify-center",
|
|
17249
17259
|
contentClassName,
|
|
17250
17260
|
subtitleClassName,
|
|
17251
17261
|
titleClassName,
|
|
@@ -17254,7 +17264,7 @@ function CarouselAnimatedSections({
|
|
|
17254
17264
|
navigationClassName,
|
|
17255
17265
|
arrowsClassName,
|
|
17256
17266
|
counterClassName,
|
|
17257
|
-
|
|
17267
|
+
slideMediaBrightness = "50",
|
|
17258
17268
|
optixFlowConfig,
|
|
17259
17269
|
background = "dark",
|
|
17260
17270
|
spacing = "py-0",
|
|
@@ -17309,7 +17319,7 @@ function CarouselAnimatedSections({
|
|
|
17309
17319
|
})
|
|
17310
17320
|
};
|
|
17311
17321
|
const currentSection = sections?.[currentIndex];
|
|
17312
|
-
const
|
|
17322
|
+
const actionElements = React52.useMemo(() => {
|
|
17313
17323
|
if (actionsSlot) return actionsSlot;
|
|
17314
17324
|
if (actions && actions.length > 0) {
|
|
17315
17325
|
return actions.map((action, index) => /* @__PURE__ */ jsxs(
|
|
@@ -17319,11 +17329,8 @@ function CarouselAnimatedSections({
|
|
|
17319
17329
|
onClick: action.onClick,
|
|
17320
17330
|
asButton: true,
|
|
17321
17331
|
variant: action.variant,
|
|
17322
|
-
size: action.size
|
|
17323
|
-
className: cn(
|
|
17324
|
-
"bg-white text-black hover:bg-white/90",
|
|
17325
|
-
action.className
|
|
17326
|
-
),
|
|
17332
|
+
size: action.size,
|
|
17333
|
+
className: cn(action.className),
|
|
17327
17334
|
children: [
|
|
17328
17335
|
action.label,
|
|
17329
17336
|
action.icon && /* @__PURE__ */ jsx("span", { className: "ml-2", children: action.icon }),
|
|
@@ -17334,7 +17341,7 @@ function CarouselAnimatedSections({
|
|
|
17334
17341
|
));
|
|
17335
17342
|
}
|
|
17336
17343
|
return null;
|
|
17337
|
-
};
|
|
17344
|
+
}, [actionsSlot, actions]);
|
|
17338
17345
|
return /* @__PURE__ */ jsxs(
|
|
17339
17346
|
Section,
|
|
17340
17347
|
{
|
|
@@ -17346,7 +17353,7 @@ function CarouselAnimatedSections({
|
|
|
17346
17353
|
containerMaxWidth,
|
|
17347
17354
|
containerClassName,
|
|
17348
17355
|
children: [
|
|
17349
|
-
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsx(AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */
|
|
17356
|
+
sectionsSlot ? sectionsSlot : currentSection ? /* @__PURE__ */ jsx(AnimatePresence, { initial: false, custom: direction, mode: "wait", children: /* @__PURE__ */ jsx(
|
|
17350
17357
|
motion.div,
|
|
17351
17358
|
{
|
|
17352
17359
|
custom: direction,
|
|
@@ -17357,26 +17364,19 @@ function CarouselAnimatedSections({
|
|
|
17357
17364
|
transition: { duration: 0.6, ease: [0.4, 0, 0.2, 1] },
|
|
17358
17365
|
onAnimationComplete: () => setIsAnimating(false),
|
|
17359
17366
|
className: cn("absolute inset-0", currentSection?.className),
|
|
17360
|
-
children:
|
|
17361
|
-
|
|
17362
|
-
|
|
17363
|
-
|
|
17364
|
-
|
|
17365
|
-
|
|
17366
|
-
|
|
17367
|
-
|
|
17368
|
-
|
|
17369
|
-
|
|
17370
|
-
|
|
17371
|
-
|
|
17372
|
-
|
|
17373
|
-
/* @__PURE__ */ jsx(
|
|
17374
|
-
"div",
|
|
17375
|
-
{
|
|
17376
|
-
className: cn("absolute inset-0 bg-black/50", overlayClassName)
|
|
17377
|
-
}
|
|
17378
|
-
)
|
|
17379
|
-
]
|
|
17367
|
+
children: /* @__PURE__ */ jsx(
|
|
17368
|
+
Img,
|
|
17369
|
+
{
|
|
17370
|
+
src: currentSection?.image,
|
|
17371
|
+
alt: typeof currentSection?.title === "string" ? currentSection?.title : `Section ${currentSection?.id}`,
|
|
17372
|
+
className: cn(
|
|
17373
|
+
"h-full w-full object-cover",
|
|
17374
|
+
BRIGHTNESS_CLASS_MAP[slideMediaBrightness],
|
|
17375
|
+
currentSection?.imageClassName
|
|
17376
|
+
),
|
|
17377
|
+
optixFlowConfig
|
|
17378
|
+
}
|
|
17379
|
+
)
|
|
17380
17380
|
},
|
|
17381
17381
|
currentIndex
|
|
17382
17382
|
) }) : null,
|
|
@@ -17394,7 +17394,7 @@ function CarouselAnimatedSections({
|
|
|
17394
17394
|
animate: { opacity: 1, y: 0 },
|
|
17395
17395
|
exit: { opacity: 0, y: -40 },
|
|
17396
17396
|
transition: { duration: 0.4, delay: 0.2 },
|
|
17397
|
-
className: "max-w-2xl text-white",
|
|
17397
|
+
className: "max-w-2xl text-white text-shadow",
|
|
17398
17398
|
children: [
|
|
17399
17399
|
currentSection?.subtitle && (typeof currentSection?.subtitle === "string" ? /* @__PURE__ */ jsx(
|
|
17400
17400
|
"p",
|
|
@@ -17426,7 +17426,7 @@ function CarouselAnimatedSections({
|
|
|
17426
17426
|
children: currentSection?.description
|
|
17427
17427
|
}
|
|
17428
17428
|
) : /* @__PURE__ */ jsx("div", { className: cn("mb-8", descriptionClassName), children: currentSection?.description })),
|
|
17429
|
-
/* @__PURE__ */ jsx("div", { className: actionsClassName, children:
|
|
17429
|
+
/* @__PURE__ */ jsx("div", { className: actionsClassName, children: actionElements || currentSection?.ctaText && /* @__PURE__ */ jsxs(
|
|
17430
17430
|
Pressable,
|
|
17431
17431
|
{
|
|
17432
17432
|
href: currentSection?.ctaHref,
|
|
@@ -18137,6 +18137,11 @@ function CarouselNext({
|
|
|
18137
18137
|
}
|
|
18138
18138
|
);
|
|
18139
18139
|
}
|
|
18140
|
+
var SLIDE_LAYOUT_ASPECT_MAP = {
|
|
18141
|
+
horizontal: "aspect-video",
|
|
18142
|
+
vertical: "aspect-[9/16]",
|
|
18143
|
+
square: "aspect-square"
|
|
18144
|
+
};
|
|
18140
18145
|
function CarouselFeatureBadge({
|
|
18141
18146
|
badge,
|
|
18142
18147
|
heading,
|
|
@@ -18152,23 +18157,34 @@ function CarouselFeatureBadge({
|
|
|
18152
18157
|
carouselClassName,
|
|
18153
18158
|
carouselItemClassName,
|
|
18154
18159
|
optixFlowConfig,
|
|
18155
|
-
background
|
|
18156
|
-
spacing
|
|
18160
|
+
background,
|
|
18161
|
+
spacing,
|
|
18157
18162
|
pattern,
|
|
18158
|
-
patternOpacity
|
|
18163
|
+
patternOpacity,
|
|
18164
|
+
slideLayoutVariant = "square",
|
|
18165
|
+
containerMaxWidth = "2xl"
|
|
18159
18166
|
}) {
|
|
18160
18167
|
const renderCarouselItems = () => {
|
|
18161
18168
|
if (itemsSlot) return itemsSlot;
|
|
18162
18169
|
if (!items || items.length === 0) return null;
|
|
18163
|
-
return items.map((item, index) => /* @__PURE__ */ jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsx(
|
|
18164
|
-
|
|
18170
|
+
return items.map((item, index) => /* @__PURE__ */ jsx(CarouselItem, { className: carouselItemClassName, children: /* @__PURE__ */ jsx(
|
|
18171
|
+
"div",
|
|
18165
18172
|
{
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18173
|
+
className: cn(
|
|
18174
|
+
"flex items-center justify-center overflow-hidden rounded-2xl",
|
|
18175
|
+
SLIDE_LAYOUT_ASPECT_MAP[slideLayoutVariant]
|
|
18176
|
+
),
|
|
18177
|
+
children: /* @__PURE__ */ jsx(
|
|
18178
|
+
Img,
|
|
18179
|
+
{
|
|
18180
|
+
src: item.src,
|
|
18181
|
+
alt: item.alt,
|
|
18182
|
+
className: cn("h-full w-full object-cover", item.className),
|
|
18183
|
+
optixFlowConfig
|
|
18184
|
+
}
|
|
18185
|
+
)
|
|
18170
18186
|
}
|
|
18171
|
-
) }
|
|
18187
|
+
) }, index));
|
|
18172
18188
|
};
|
|
18173
18189
|
return /* @__PURE__ */ jsx(
|
|
18174
18190
|
Section,
|
|
@@ -18178,14 +18194,39 @@ function CarouselFeatureBadge({
|
|
|
18178
18194
|
className: cn(className),
|
|
18179
18195
|
pattern,
|
|
18180
18196
|
patternOpacity,
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
18187
|
-
|
|
18188
|
-
|
|
18197
|
+
containerMaxWidth,
|
|
18198
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("mx-auto", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end justify-end gap-6 md:gap-20 lg:grid-cols-2", children: [
|
|
18199
|
+
/* @__PURE__ */ jsxs(
|
|
18200
|
+
"div",
|
|
18201
|
+
{
|
|
18202
|
+
className: cn("flex flex-col items-start gap-4", contentClassName),
|
|
18203
|
+
children: [
|
|
18204
|
+
badge && /* @__PURE__ */ jsx("div", { className: badgeClassName, children: typeof badge === "string" ? /* @__PURE__ */ jsx(Badge, { children: badge }) : badge }),
|
|
18205
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
18206
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
18207
|
+
"h2",
|
|
18208
|
+
{
|
|
18209
|
+
className: cn(
|
|
18210
|
+
"text-left text-xl font-semibold md:text-3xl lg:max-w-xl lg:text-4xl",
|
|
18211
|
+
headingClassName
|
|
18212
|
+
),
|
|
18213
|
+
children: heading
|
|
18214
|
+
}
|
|
18215
|
+
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
18216
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
18217
|
+
"p",
|
|
18218
|
+
{
|
|
18219
|
+
className: cn(
|
|
18220
|
+
"max-w-xl text-left text-lg leading-snug lg:max-w-sm",
|
|
18221
|
+
descriptionClassName
|
|
18222
|
+
),
|
|
18223
|
+
children: description
|
|
18224
|
+
}
|
|
18225
|
+
) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
|
|
18226
|
+
] })
|
|
18227
|
+
]
|
|
18228
|
+
}
|
|
18229
|
+
),
|
|
18189
18230
|
/* @__PURE__ */ jsx("div", { className: cn("w-full max-w-full px-6", carouselClassName), children: /* @__PURE__ */ jsxs(Carousel, { children: [
|
|
18190
18231
|
/* @__PURE__ */ jsx(CarouselContent, { children: renderCarouselItems() }),
|
|
18191
18232
|
/* @__PURE__ */ jsx(CarouselPrevious, {}),
|
|
@@ -18199,6 +18240,7 @@ function CarouselFullscreenScrollFx({
|
|
|
18199
18240
|
slides,
|
|
18200
18241
|
slidesSlot,
|
|
18201
18242
|
className,
|
|
18243
|
+
containerClassName = "h-full flex flex-col justify-center",
|
|
18202
18244
|
navigationClassName,
|
|
18203
18245
|
contentClassName,
|
|
18204
18246
|
subtitleClassName,
|
|
@@ -18207,10 +18249,11 @@ function CarouselFullscreenScrollFx({
|
|
|
18207
18249
|
scrollIndicatorClassName,
|
|
18208
18250
|
counterClassName,
|
|
18209
18251
|
optixFlowConfig,
|
|
18210
|
-
background = "
|
|
18211
|
-
spacing = "
|
|
18212
|
-
|
|
18213
|
-
|
|
18252
|
+
background = "dark",
|
|
18253
|
+
spacing = "py-0",
|
|
18254
|
+
containerMaxWidth = "full",
|
|
18255
|
+
pattern = "diagonalCrossBasic",
|
|
18256
|
+
patternOpacity = 0.033
|
|
18214
18257
|
}) {
|
|
18215
18258
|
const containerRef = React52.useRef(null);
|
|
18216
18259
|
const [activeIndex, setActiveIndex] = React52.useState(0);
|
|
@@ -18246,27 +18289,41 @@ function CarouselFullscreenScrollFx({
|
|
|
18246
18289
|
className: cn(className),
|
|
18247
18290
|
pattern,
|
|
18248
18291
|
patternOpacity,
|
|
18292
|
+
containerMaxWidth,
|
|
18293
|
+
containerClassName,
|
|
18249
18294
|
children: [
|
|
18250
|
-
/* @__PURE__ */ jsx(
|
|
18251
|
-
"
|
|
18295
|
+
/* @__PURE__ */ jsx(
|
|
18296
|
+
"div",
|
|
18252
18297
|
{
|
|
18253
|
-
onClick: () => {
|
|
18254
|
-
const element = document.getElementById(`fullscreen-${slide.id}`);
|
|
18255
|
-
element?.scrollIntoView({ behavior: "smooth" });
|
|
18256
|
-
},
|
|
18257
18298
|
className: cn(
|
|
18258
|
-
"
|
|
18259
|
-
|
|
18299
|
+
"fixed right-6 top-1/2 z-50 hidden -translate-y-1/2 flex-col gap-3 lg:flex",
|
|
18300
|
+
navigationClassName
|
|
18260
18301
|
),
|
|
18261
|
-
|
|
18262
|
-
|
|
18263
|
-
|
|
18264
|
-
|
|
18302
|
+
children: slides?.map((slide, index) => /* @__PURE__ */ jsx(
|
|
18303
|
+
"button",
|
|
18304
|
+
{
|
|
18305
|
+
onClick: () => {
|
|
18306
|
+
const element = document.getElementById(`fullscreen-${slide.id}`);
|
|
18307
|
+
element?.scrollIntoView({ behavior: "smooth" });
|
|
18308
|
+
},
|
|
18309
|
+
className: cn(
|
|
18310
|
+
"h-3 w-3 rounded-full border-2 transition-all",
|
|
18311
|
+
activeIndex === index ? "scale-125 border-white bg-white" : "border-white/50 bg-transparent hover:border-white"
|
|
18312
|
+
),
|
|
18313
|
+
"aria-label": `Go to ${typeof slide.title === "string" ? slide.title : `Slide ${index + 1}`}`
|
|
18314
|
+
},
|
|
18315
|
+
slide.id
|
|
18316
|
+
))
|
|
18317
|
+
}
|
|
18318
|
+
),
|
|
18265
18319
|
slidesSlot ? slidesSlot : slides?.map((slide, index) => /* @__PURE__ */ jsxs(
|
|
18266
18320
|
"div",
|
|
18267
18321
|
{
|
|
18268
18322
|
id: `fullscreen-${slide.id}`,
|
|
18269
|
-
className: cn(
|
|
18323
|
+
className: cn(
|
|
18324
|
+
"relative flex h-screen w-full items-center justify-center overflow-hidden",
|
|
18325
|
+
slide.className
|
|
18326
|
+
),
|
|
18270
18327
|
children: [
|
|
18271
18328
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0", children: [
|
|
18272
18329
|
/* @__PURE__ */ jsx(
|
|
@@ -18274,7 +18331,10 @@ function CarouselFullscreenScrollFx({
|
|
|
18274
18331
|
{
|
|
18275
18332
|
src: slide.image,
|
|
18276
18333
|
alt: typeof slide.title === "string" ? slide.title : `Slide ${index + 1}`,
|
|
18277
|
-
className: cn(
|
|
18334
|
+
className: cn(
|
|
18335
|
+
"h-full w-full object-cover",
|
|
18336
|
+
slide.imageClassName
|
|
18337
|
+
),
|
|
18278
18338
|
optixFlowConfig
|
|
18279
18339
|
}
|
|
18280
18340
|
),
|
|
@@ -18288,21 +18348,75 @@ function CarouselFullscreenScrollFx({
|
|
|
18288
18348
|
}
|
|
18289
18349
|
)
|
|
18290
18350
|
] }),
|
|
18291
|
-
/* @__PURE__ */ jsxs(
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18351
|
+
/* @__PURE__ */ jsxs(
|
|
18352
|
+
"div",
|
|
18353
|
+
{
|
|
18354
|
+
className: cn(
|
|
18355
|
+
"relative z-10 mx-auto max-w-4xl md:max-w-2xl px-6 text-center text-white text-shadow",
|
|
18356
|
+
contentClassName
|
|
18357
|
+
),
|
|
18358
|
+
children: [
|
|
18359
|
+
slide.subtitle && (typeof slide.subtitle === "string" ? /* @__PURE__ */ jsx(
|
|
18360
|
+
"p",
|
|
18361
|
+
{
|
|
18362
|
+
className: cn(
|
|
18363
|
+
"mb-4 text-sm font-medium uppercase tracking-widest text-white/70",
|
|
18364
|
+
subtitleClassName
|
|
18365
|
+
),
|
|
18366
|
+
children: slide.subtitle
|
|
18367
|
+
}
|
|
18368
|
+
) : /* @__PURE__ */ jsx("div", { className: subtitleClassName, children: slide.subtitle })),
|
|
18369
|
+
slide.title && (typeof slide.title === "string" ? /* @__PURE__ */ jsx(
|
|
18370
|
+
"h2",
|
|
18371
|
+
{
|
|
18372
|
+
className: cn(
|
|
18373
|
+
"mb-6 text-4xl font-bold tracking-tight md:text-5xl lg:text-6xl",
|
|
18374
|
+
titleClassName
|
|
18375
|
+
),
|
|
18376
|
+
children: slide.title
|
|
18377
|
+
}
|
|
18378
|
+
) : /* @__PURE__ */ jsx("div", { className: titleClassName, children: slide.title })),
|
|
18379
|
+
slide.description && (typeof slide.description === "string" ? /* @__PURE__ */ jsx(
|
|
18380
|
+
"p",
|
|
18381
|
+
{
|
|
18382
|
+
className: cn(
|
|
18383
|
+
"mx-auto text-lg text-white/80 md:text-xl text-balance",
|
|
18384
|
+
descriptionClassName
|
|
18385
|
+
),
|
|
18386
|
+
children: slide.description
|
|
18387
|
+
}
|
|
18388
|
+
) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: slide.description }))
|
|
18389
|
+
]
|
|
18390
|
+
}
|
|
18391
|
+
),
|
|
18392
|
+
index < (slides?.length ?? 0) - 1 && /* @__PURE__ */ jsx(
|
|
18393
|
+
"div",
|
|
18394
|
+
{
|
|
18395
|
+
className: cn(
|
|
18396
|
+
"absolute bottom-8 left-1/2 -translate-x-1/2",
|
|
18397
|
+
scrollIndicatorClassName
|
|
18398
|
+
),
|
|
18399
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
|
|
18400
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs uppercase tracking-widest text-white/50", children: "Scroll" }),
|
|
18401
|
+
/* @__PURE__ */ jsx("div", { className: "h-12 w-px animate-pulse bg-linear-to-b from-white/50 to-transparent" })
|
|
18402
|
+
] })
|
|
18403
|
+
}
|
|
18404
|
+
),
|
|
18405
|
+
/* @__PURE__ */ jsxs(
|
|
18406
|
+
"div",
|
|
18407
|
+
{
|
|
18408
|
+
className: cn(
|
|
18409
|
+
"absolute bottom-8 right-8 text-sm text-white/50",
|
|
18410
|
+
counterClassName
|
|
18411
|
+
),
|
|
18412
|
+
children: [
|
|
18413
|
+
String(index + 1).padStart(2, "0"),
|
|
18414
|
+
" /",
|
|
18415
|
+
" ",
|
|
18416
|
+
String(slides?.length ?? 0).padStart(2, "0")
|
|
18417
|
+
]
|
|
18418
|
+
}
|
|
18419
|
+
)
|
|
18306
18420
|
]
|
|
18307
18421
|
},
|
|
18308
18422
|
slide.id
|
|
@@ -76788,7 +76902,7 @@ function ListSearchableGrid({
|
|
|
76788
76902
|
}
|
|
76789
76903
|
);
|
|
76790
76904
|
}
|
|
76791
|
-
var { useMemo:
|
|
76905
|
+
var { useMemo: useMemo440 } = React52;
|
|
76792
76906
|
function OfferModalNewsletterDiscount({
|
|
76793
76907
|
title,
|
|
76794
76908
|
emailPlaceholder,
|
|
@@ -76855,7 +76969,7 @@ function OfferModalNewsletterDiscount({
|
|
|
76855
76969
|
});
|
|
76856
76970
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
76857
76971
|
const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
76858
|
-
const renderCloseButton =
|
|
76972
|
+
const renderCloseButton = useMemo440(() => {
|
|
76859
76973
|
if (closeButtonSlot) return closeButtonSlot;
|
|
76860
76974
|
if (!closeButtonText) return null;
|
|
76861
76975
|
return /* @__PURE__ */ jsx("div", { className: "absolute end-1.5 top-1.5", children: /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
@@ -76869,12 +76983,12 @@ function OfferModalNewsletterDiscount({
|
|
|
76869
76983
|
}
|
|
76870
76984
|
) }) });
|
|
76871
76985
|
}, [closeButtonSlot, closeButtonText, closeClassName]);
|
|
76872
|
-
const renderHeader =
|
|
76986
|
+
const renderHeader = useMemo440(() => {
|
|
76873
76987
|
if (headerSlot) return headerSlot;
|
|
76874
76988
|
if (!title) return null;
|
|
76875
76989
|
return /* @__PURE__ */ jsx(DialogHeader, { className: headerClassName, children: typeof title === "string" ? /* @__PURE__ */ jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) : /* @__PURE__ */ jsx(DialogTitle, { className: cn("text-start font-serif text-2xl font-normal leading-snug", titleClassName), children: title }) });
|
|
76876
76990
|
}, [headerSlot, title, headerClassName, titleClassName]);
|
|
76877
|
-
const renderForm =
|
|
76991
|
+
const renderForm = useMemo440(() => {
|
|
76878
76992
|
if (formSlot) return formSlot;
|
|
76879
76993
|
return /* @__PURE__ */ jsxs(
|
|
76880
76994
|
Form,
|
|
@@ -76936,7 +77050,7 @@ function OfferModalNewsletterDiscount({
|
|
|
76936
77050
|
}
|
|
76937
77051
|
) });
|
|
76938
77052
|
}
|
|
76939
|
-
var { useMemo:
|
|
77053
|
+
var { useMemo: useMemo441 } = React52;
|
|
76940
77054
|
function OfferModalMembershipImage({
|
|
76941
77055
|
overline,
|
|
76942
77056
|
title,
|
|
@@ -77012,7 +77126,7 @@ function OfferModalMembershipImage({
|
|
|
77012
77126
|
});
|
|
77013
77127
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
77014
77128
|
const dialogProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
77015
|
-
const renderImage =
|
|
77129
|
+
const renderImage = useMemo441(() => {
|
|
77016
77130
|
if (imageSlot) return imageSlot;
|
|
77017
77131
|
if (!image) return null;
|
|
77018
77132
|
return /* @__PURE__ */ jsx("div", { className: cn("max-h-[290px] h-full overflow-hidden max-lg:hidden", imageWrapperClassName), children: /* @__PURE__ */ jsx(
|
|
@@ -77025,7 +77139,7 @@ function OfferModalMembershipImage({
|
|
|
77025
77139
|
}
|
|
77026
77140
|
) });
|
|
77027
77141
|
}, [imageSlot, image, imageWrapperClassName, imageClassName, optixFlowConfig]);
|
|
77028
|
-
const renderCloseButton =
|
|
77142
|
+
const renderCloseButton = useMemo441(() => {
|
|
77029
77143
|
if (closeButtonSlot) return closeButtonSlot;
|
|
77030
77144
|
return /* @__PURE__ */ jsx("div", { className: "absolute -end-px -top-px z-10", children: /* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
77031
77145
|
Pressable,
|
|
@@ -77041,7 +77155,7 @@ function OfferModalMembershipImage({
|
|
|
77041
77155
|
}
|
|
77042
77156
|
) }) });
|
|
77043
77157
|
}, [closeButtonSlot, closeClassName]);
|
|
77044
|
-
const renderForm =
|
|
77158
|
+
const renderForm = useMemo441(() => {
|
|
77045
77159
|
if (formSlot) return formSlot;
|
|
77046
77160
|
return /* @__PURE__ */ jsxs(
|
|
77047
77161
|
Form,
|
|
@@ -77104,7 +77218,7 @@ function OfferModalMembershipImage({
|
|
|
77104
77218
|
}
|
|
77105
77219
|
);
|
|
77106
77220
|
}, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
|
|
77107
|
-
const renderFooter =
|
|
77221
|
+
const renderFooter = useMemo441(() => {
|
|
77108
77222
|
if (footerSlot) return footerSlot;
|
|
77109
77223
|
if (!description) return null;
|
|
77110
77224
|
return /* @__PURE__ */ jsx(DialogFooter, { className: footerClassName, children: /* @__PURE__ */ jsx(DialogDescription, { className: cn("text-muted-foreground text-center text-xs leading-relaxed", descriptionClassName), children: description }) });
|
|
@@ -77132,7 +77246,7 @@ function OfferModalMembershipImage({
|
|
|
77132
77246
|
}
|
|
77133
77247
|
) });
|
|
77134
77248
|
}
|
|
77135
|
-
var { useMemo:
|
|
77249
|
+
var { useMemo: useMemo442 } = React52;
|
|
77136
77250
|
function OfferModalSheetNewsletter({
|
|
77137
77251
|
logo,
|
|
77138
77252
|
logoSlot,
|
|
@@ -77214,7 +77328,7 @@ function OfferModalSheetNewsletter({
|
|
|
77214
77328
|
});
|
|
77215
77329
|
const formMethod = formConfig?.method?.toLowerCase() === "get" ? "get" : "post";
|
|
77216
77330
|
const sheetProps = open !== void 0 ? { open, onOpenChange } : { defaultOpen };
|
|
77217
|
-
const renderLogo =
|
|
77331
|
+
const renderLogo = useMemo442(() => {
|
|
77218
77332
|
if (logoSlot) return logoSlot;
|
|
77219
77333
|
if (!logo) return null;
|
|
77220
77334
|
const logoSrc = typeof logo.src === "string" ? logo.src : logo.src.light;
|
|
@@ -77228,7 +77342,7 @@ function OfferModalSheetNewsletter({
|
|
|
77228
77342
|
}
|
|
77229
77343
|
);
|
|
77230
77344
|
}, [logoSlot, logo, logoClassName, optixFlowConfig]);
|
|
77231
|
-
const renderHeader =
|
|
77345
|
+
const renderHeader = useMemo442(() => {
|
|
77232
77346
|
if (headerSlot) return headerSlot;
|
|
77233
77347
|
return /* @__PURE__ */ jsxs(SheetHeader, { className: cn("gap-8 p-0", headerClassName), children: [
|
|
77234
77348
|
renderLogo,
|
|
@@ -77238,7 +77352,7 @@ function OfferModalSheetNewsletter({
|
|
|
77238
77352
|
] })
|
|
77239
77353
|
] });
|
|
77240
77354
|
}, [headerSlot, renderLogo, headerClassName, title, titleClassName, description, descriptionClassName]);
|
|
77241
|
-
const renderForm =
|
|
77355
|
+
const renderForm = useMemo442(() => {
|
|
77242
77356
|
if (formSlot) return formSlot;
|
|
77243
77357
|
return /* @__PURE__ */ jsx(
|
|
77244
77358
|
Form,
|
|
@@ -77286,7 +77400,7 @@ function OfferModalSheetNewsletter({
|
|
|
77286
77400
|
}
|
|
77287
77401
|
);
|
|
77288
77402
|
}, [formSlot, form, formConfig, formMethod, emailPlaceholder, inputClassName, submitClassName, buttonText, formClassName]);
|
|
77289
|
-
const renderLegal =
|
|
77403
|
+
const renderLegal = useMemo442(() => {
|
|
77290
77404
|
if (legalSlot) return legalSlot;
|
|
77291
77405
|
if (!termsUrl || !termsText || !privacyUrl || !privacyText) return null;
|
|
77292
77406
|
return /* @__PURE__ */ jsxs("p", { className: cn("text-muted-foreground text-xs", legalClassName), children: [
|
|
@@ -77300,7 +77414,7 @@ function OfferModalSheetNewsletter({
|
|
|
77300
77414
|
"."
|
|
77301
77415
|
] });
|
|
77302
77416
|
}, [legalSlot, termsUrl, termsText, privacyUrl, privacyText, legalClassName]);
|
|
77303
|
-
const renderImage =
|
|
77417
|
+
const renderImage = useMemo442(() => {
|
|
77304
77418
|
if (imageSlot) return imageSlot;
|
|
77305
77419
|
if (!image) return null;
|
|
77306
77420
|
return /* @__PURE__ */ jsx("div", { className: cn("h-1/2 basis-1/2", imageWrapperClassName), children: /* @__PURE__ */ jsx(AspectRatio, { ratio: 1, className: "overflow-hidden", children: /* @__PURE__ */ jsx(
|