@opensite/ui 0.8.1 → 0.8.3
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-horizontal-cards.cjs +8 -6
- package/dist/carousel-horizontal-cards.js +8 -6
- package/dist/carousel-image-hero.cjs +119 -177
- package/dist/carousel-image-hero.d.cts +1 -5
- package/dist/carousel-image-hero.d.ts +1 -5
- package/dist/carousel-image-hero.js +119 -177
- package/dist/carousel-portfolio-hero.cjs +138 -59
- package/dist/carousel-portfolio-hero.js +138 -59
- package/dist/carousel-product-feature-showcase.cjs +148 -95
- package/dist/carousel-product-feature-showcase.js +148 -95
- package/dist/carousel-progress-slider.cjs +13 -9
- package/dist/carousel-progress-slider.js +13 -9
- package/dist/carousel-scrolling-feature-showcase.cjs +105 -54
- package/dist/carousel-scrolling-feature-showcase.js +105 -54
- package/dist/feature-accordion-image.cjs +9 -8
- package/dist/feature-accordion-image.js +9 -8
- package/dist/feature-animated-carousel.cjs +65 -49
- package/dist/feature-animated-carousel.js +65 -49
- package/dist/feature-badge-grid-six.cjs +20 -17
- package/dist/feature-badge-grid-six.js +21 -18
- package/dist/feature-bento-image-grid.cjs +12 -8
- package/dist/feature-bento-image-grid.js +12 -8
- package/dist/feature-bento-utilities.cjs +9 -5
- package/dist/feature-bento-utilities.js +9 -5
- package/dist/feature-capabilities-grid.cjs +41 -38
- package/dist/feature-capabilities-grid.js +41 -38
- package/dist/feature-card-grid-linked.cjs +18 -18
- package/dist/feature-card-grid-linked.js +19 -19
- package/dist/feature-carousel-progress.cjs +3 -3
- package/dist/feature-carousel-progress.js +4 -4
- package/dist/feature-category-image-cards.cjs +3 -3
- package/dist/feature-category-image-cards.js +4 -4
- package/dist/feature-checklist-image.cjs +2 -2
- package/dist/feature-checklist-image.js +2 -2
- package/dist/feature-checklist-three-column.cjs +6 -6
- package/dist/feature-checklist-three-column.js +7 -7
- package/dist/feature-icon-grid-accent.cjs +2 -2
- package/dist/feature-icon-grid-accent.js +2 -2
- package/dist/feature-icon-grid-bordered.cjs +29 -31
- package/dist/feature-icon-grid-bordered.d.cts +9 -9
- package/dist/feature-icon-grid-bordered.d.ts +9 -9
- package/dist/feature-icon-grid-bordered.js +30 -32
- package/dist/feature-icon-grid-muted.cjs +6 -6
- package/dist/feature-icon-grid-muted.d.cts +9 -9
- package/dist/feature-icon-grid-muted.d.ts +9 -9
- package/dist/feature-icon-grid-muted.js +7 -7
- package/dist/feature-icon-tabs-content.cjs +8 -8
- package/dist/feature-icon-tabs-content.d.cts +13 -13
- package/dist/feature-icon-tabs-content.d.ts +13 -13
- package/dist/feature-icon-tabs-content.js +9 -9
- package/dist/feature-image-cards-three-column.cjs +26 -27
- package/dist/feature-image-cards-three-column.js +27 -28
- package/dist/feature-image-overlay-badge.cjs +23 -21
- package/dist/feature-image-overlay-badge.js +24 -22
- package/dist/feature-integration-cards.cjs +19 -18
- package/dist/feature-integration-cards.js +20 -19
- package/dist/feature-numbered-cards.cjs +2 -2
- package/dist/feature-numbered-cards.js +3 -3
- package/dist/feature-pattern-grid-links.cjs +26 -29
- package/dist/feature-pattern-grid-links.d.cts +1 -5
- package/dist/feature-pattern-grid-links.d.ts +1 -5
- package/dist/feature-pattern-grid-links.js +27 -30
- package/dist/feature-showcase.cjs +441 -40
- package/dist/feature-showcase.d.cts +62 -5
- package/dist/feature-showcase.d.ts +62 -5
- package/dist/feature-showcase.js +438 -37
- package/dist/feature-split-image-reverse.cjs +15 -36
- package/dist/feature-split-image-reverse.js +16 -37
- package/dist/feature-split-image.cjs +15 -36
- package/dist/feature-split-image.js +16 -37
- package/dist/feature-stats-highlight.cjs +20 -32
- package/dist/feature-stats-highlight.js +21 -33
- package/dist/feature-tabbed-content-image.cjs +11 -6
- package/dist/feature-tabbed-content-image.js +11 -6
- package/dist/feature-three-column-values.cjs +6 -6
- package/dist/feature-three-column-values.js +6 -6
- package/dist/feature-utility-cards-grid.cjs +17 -15
- package/dist/feature-utility-cards-grid.js +18 -16
- package/dist/navbar-tabbed-sections.cjs +23 -16
- package/dist/navbar-tabbed-sections.js +23 -16
- package/dist/registry.cjs +964 -714
- package/dist/registry.js +966 -716
- package/package.json +1 -1
|
@@ -1090,19 +1090,21 @@ function CarouselHorizontalCards({
|
|
|
1090
1090
|
"div",
|
|
1091
1091
|
{
|
|
1092
1092
|
className: cn(
|
|
1093
|
-
"flex flex-row justify-start gap-
|
|
1093
|
+
"flex flex-row justify-start gap-2",
|
|
1094
1094
|
carouselClassName
|
|
1095
1095
|
),
|
|
1096
1096
|
children: [
|
|
1097
1097
|
items?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1098
1098
|
framerMotion.motion.div,
|
|
1099
1099
|
{
|
|
1100
|
-
className: cn(
|
|
1101
|
-
"rounded-lg last:pr-[5%] md:last:pr-[33%]"
|
|
1102
|
-
),
|
|
1100
|
+
className: cn("rounded-lg last:pr-[5%] md:last:pr-[33%]"),
|
|
1103
1101
|
initial: { opacity: 0, y: 20 },
|
|
1104
1102
|
animate: { opacity: 1, y: 0 },
|
|
1105
|
-
transition: {
|
|
1103
|
+
transition: {
|
|
1104
|
+
duration: 0.5,
|
|
1105
|
+
delay: 0.2 * index,
|
|
1106
|
+
ease: "easeOut"
|
|
1107
|
+
},
|
|
1106
1108
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1107
1109
|
"div",
|
|
1108
1110
|
{
|
|
@@ -1174,7 +1176,7 @@ function CarouselHorizontalCards({
|
|
|
1174
1176
|
onNext: scrollRight,
|
|
1175
1177
|
canScrollPrevious: !isAtStart,
|
|
1176
1178
|
canScrollNext: !isAtEnd,
|
|
1177
|
-
className: cn("mr-0
|
|
1179
|
+
className: cn("mr-0", navigationClassName)
|
|
1178
1180
|
}
|
|
1179
1181
|
)
|
|
1180
1182
|
] })
|
|
@@ -1069,19 +1069,21 @@ function CarouselHorizontalCards({
|
|
|
1069
1069
|
"div",
|
|
1070
1070
|
{
|
|
1071
1071
|
className: cn(
|
|
1072
|
-
"flex flex-row justify-start gap-
|
|
1072
|
+
"flex flex-row justify-start gap-2",
|
|
1073
1073
|
carouselClassName
|
|
1074
1074
|
),
|
|
1075
1075
|
children: [
|
|
1076
1076
|
items?.map((item, index) => /* @__PURE__ */ jsx(
|
|
1077
1077
|
motion.div,
|
|
1078
1078
|
{
|
|
1079
|
-
className: cn(
|
|
1080
|
-
"rounded-lg last:pr-[5%] md:last:pr-[33%]"
|
|
1081
|
-
),
|
|
1079
|
+
className: cn("rounded-lg last:pr-[5%] md:last:pr-[33%]"),
|
|
1082
1080
|
initial: { opacity: 0, y: 20 },
|
|
1083
1081
|
animate: { opacity: 1, y: 0 },
|
|
1084
|
-
transition: {
|
|
1082
|
+
transition: {
|
|
1083
|
+
duration: 0.5,
|
|
1084
|
+
delay: 0.2 * index,
|
|
1085
|
+
ease: "easeOut"
|
|
1086
|
+
},
|
|
1085
1087
|
children: /* @__PURE__ */ jsx(
|
|
1086
1088
|
"div",
|
|
1087
1089
|
{
|
|
@@ -1153,7 +1155,7 @@ function CarouselHorizontalCards({
|
|
|
1153
1155
|
onNext: scrollRight,
|
|
1154
1156
|
canScrollPrevious: !isAtStart,
|
|
1155
1157
|
canScrollNext: !isAtEnd,
|
|
1156
|
-
className: cn("mr-0
|
|
1158
|
+
className: cn("mr-0", navigationClassName)
|
|
1157
1159
|
}
|
|
1158
1160
|
)
|
|
1159
1161
|
] })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React5 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -26,7 +26,7 @@ function _interopNamespace(e) {
|
|
|
26
26
|
return Object.freeze(n);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
30
30
|
|
|
31
31
|
// components/blocks/carousel/carousel-image-hero.tsx
|
|
32
32
|
function cn(...inputs) {
|
|
@@ -107,7 +107,7 @@ function useNavigation({
|
|
|
107
107
|
href,
|
|
108
108
|
onClick
|
|
109
109
|
} = {}) {
|
|
110
|
-
const linkType =
|
|
110
|
+
const linkType = React5__namespace.useMemo(() => {
|
|
111
111
|
if (!href || href.trim() === "") {
|
|
112
112
|
return onClick ? "none" : "none";
|
|
113
113
|
}
|
|
@@ -128,7 +128,7 @@ function useNavigation({
|
|
|
128
128
|
return "internal";
|
|
129
129
|
}
|
|
130
130
|
}, [href, onClick]);
|
|
131
|
-
const normalizedHref =
|
|
131
|
+
const normalizedHref = React5__namespace.useMemo(() => {
|
|
132
132
|
if (!href || href.trim() === "") {
|
|
133
133
|
return void 0;
|
|
134
134
|
}
|
|
@@ -146,7 +146,7 @@ function useNavigation({
|
|
|
146
146
|
return trimmed;
|
|
147
147
|
}
|
|
148
148
|
}, [href, linkType]);
|
|
149
|
-
const target =
|
|
149
|
+
const target = React5__namespace.useMemo(() => {
|
|
150
150
|
switch (linkType) {
|
|
151
151
|
case "external":
|
|
152
152
|
return "_blank";
|
|
@@ -159,7 +159,7 @@ function useNavigation({
|
|
|
159
159
|
return void 0;
|
|
160
160
|
}
|
|
161
161
|
}, [linkType]);
|
|
162
|
-
const rel =
|
|
162
|
+
const rel = React5__namespace.useMemo(() => {
|
|
163
163
|
if (linkType === "external") {
|
|
164
164
|
return "noopener noreferrer";
|
|
165
165
|
}
|
|
@@ -168,7 +168,7 @@ function useNavigation({
|
|
|
168
168
|
const isExternal = linkType === "external";
|
|
169
169
|
const isInternal = linkType === "internal";
|
|
170
170
|
const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
|
|
171
|
-
const handleClick =
|
|
171
|
+
const handleClick = React5__namespace.useCallback(
|
|
172
172
|
(event) => {
|
|
173
173
|
if (onClick) {
|
|
174
174
|
try {
|
|
@@ -352,7 +352,7 @@ var buttonVariants = classVarianceAuthority.cva(baseStyles, {
|
|
|
352
352
|
size: "default"
|
|
353
353
|
}
|
|
354
354
|
});
|
|
355
|
-
var Pressable =
|
|
355
|
+
var Pressable = React5__namespace.forwardRef(
|
|
356
356
|
({
|
|
357
357
|
children,
|
|
358
358
|
className,
|
|
@@ -450,111 +450,6 @@ var Pressable = React__namespace.forwardRef(
|
|
|
450
450
|
}
|
|
451
451
|
);
|
|
452
452
|
Pressable.displayName = "Pressable";
|
|
453
|
-
var svgCache = /* @__PURE__ */ new Map();
|
|
454
|
-
function DynamicIcon({
|
|
455
|
-
name,
|
|
456
|
-
size = 28,
|
|
457
|
-
color,
|
|
458
|
-
className,
|
|
459
|
-
alt
|
|
460
|
-
}) {
|
|
461
|
-
const [svgContent, setSvgContent] = React__namespace.useState(null);
|
|
462
|
-
const [isLoading, setIsLoading] = React__namespace.useState(true);
|
|
463
|
-
const [error, setError] = React__namespace.useState(null);
|
|
464
|
-
const { url, iconName } = React__namespace.useMemo(() => {
|
|
465
|
-
const separator = name.includes("/") ? "/" : ":";
|
|
466
|
-
const [prefix, iconName2] = name.split(separator);
|
|
467
|
-
const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
|
|
468
|
-
return {
|
|
469
|
-
url: baseUrl,
|
|
470
|
-
iconName: iconName2
|
|
471
|
-
};
|
|
472
|
-
}, [name, size]);
|
|
473
|
-
React__namespace.useEffect(() => {
|
|
474
|
-
let isMounted = true;
|
|
475
|
-
const fetchSvg = async () => {
|
|
476
|
-
const cached = svgCache.get(url);
|
|
477
|
-
if (cached) {
|
|
478
|
-
if (isMounted) {
|
|
479
|
-
setSvgContent(cached);
|
|
480
|
-
setIsLoading(false);
|
|
481
|
-
}
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
try {
|
|
485
|
-
setIsLoading(true);
|
|
486
|
-
setError(null);
|
|
487
|
-
const response = await fetch(url);
|
|
488
|
-
if (!response.ok) {
|
|
489
|
-
throw new Error(`Failed to fetch icon: ${response.status}`);
|
|
490
|
-
}
|
|
491
|
-
let svg = await response.text();
|
|
492
|
-
svg = processSvgForCurrentColor(svg);
|
|
493
|
-
svgCache.set(url, svg);
|
|
494
|
-
if (isMounted) {
|
|
495
|
-
setSvgContent(svg);
|
|
496
|
-
setIsLoading(false);
|
|
497
|
-
}
|
|
498
|
-
} catch (err) {
|
|
499
|
-
if (isMounted) {
|
|
500
|
-
setError(err instanceof Error ? err.message : "Failed to load icon");
|
|
501
|
-
setIsLoading(false);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
fetchSvg();
|
|
506
|
-
return () => {
|
|
507
|
-
isMounted = false;
|
|
508
|
-
};
|
|
509
|
-
}, [url]);
|
|
510
|
-
if (isLoading) {
|
|
511
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
512
|
-
"span",
|
|
513
|
-
{
|
|
514
|
-
className: cn("inline-block", className),
|
|
515
|
-
style: { width: size, height: size },
|
|
516
|
-
"aria-hidden": "true"
|
|
517
|
-
}
|
|
518
|
-
);
|
|
519
|
-
}
|
|
520
|
-
if (error || !svgContent) {
|
|
521
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
522
|
-
"span",
|
|
523
|
-
{
|
|
524
|
-
className: cn("inline-block", className),
|
|
525
|
-
style: { width: size, height: size },
|
|
526
|
-
role: "img",
|
|
527
|
-
"aria-label": alt || iconName
|
|
528
|
-
}
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
532
|
-
"span",
|
|
533
|
-
{
|
|
534
|
-
className: cn("inline-flex items-center justify-center", className),
|
|
535
|
-
style: {
|
|
536
|
-
width: size,
|
|
537
|
-
height: size,
|
|
538
|
-
color: color || "inherit"
|
|
539
|
-
},
|
|
540
|
-
role: "img",
|
|
541
|
-
"aria-label": alt || iconName,
|
|
542
|
-
dangerouslySetInnerHTML: { __html: svgContent }
|
|
543
|
-
}
|
|
544
|
-
);
|
|
545
|
-
}
|
|
546
|
-
function processSvgForCurrentColor(svg) {
|
|
547
|
-
let processed = svg;
|
|
548
|
-
processed = processed.replace(
|
|
549
|
-
/stroke=["'](#000000|#000|black)["']/gi,
|
|
550
|
-
'stroke="currentColor"'
|
|
551
|
-
);
|
|
552
|
-
processed = processed.replace(
|
|
553
|
-
/fill=["'](#000000|#000|black)["']/gi,
|
|
554
|
-
'fill="currentColor"'
|
|
555
|
-
);
|
|
556
|
-
return processed;
|
|
557
|
-
}
|
|
558
453
|
var maxWidthStyles = {
|
|
559
454
|
sm: "max-w-screen-sm",
|
|
560
455
|
md: "max-w-screen-md",
|
|
@@ -564,7 +459,7 @@ var maxWidthStyles = {
|
|
|
564
459
|
"4xl": "max-w-[1536px]",
|
|
565
460
|
full: "max-w-full"
|
|
566
461
|
};
|
|
567
|
-
var Container =
|
|
462
|
+
var Container = React5__namespace.default.forwardRef(
|
|
568
463
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
569
464
|
const Component = as;
|
|
570
465
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -869,7 +764,7 @@ var spacingStyles = {
|
|
|
869
764
|
};
|
|
870
765
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
871
766
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
872
|
-
var Section =
|
|
767
|
+
var Section = React5__namespace.default.forwardRef(
|
|
873
768
|
({
|
|
874
769
|
id,
|
|
875
770
|
title,
|
|
@@ -937,43 +832,57 @@ function CarouselImageHero({
|
|
|
937
832
|
actions,
|
|
938
833
|
actionsSlot,
|
|
939
834
|
images,
|
|
940
|
-
autoPlayInterval =
|
|
835
|
+
autoPlayInterval = 7500,
|
|
941
836
|
className,
|
|
942
|
-
containerClassName,
|
|
837
|
+
containerClassName = "mx-none md:mx-auto w-screen md:w-full max-w-screen md:max-w-7xl relative z-10 rounded-none md:rounded-2xl overflow-hidden shadow-none md:shadow-xl",
|
|
943
838
|
contentClassName,
|
|
944
839
|
badgeClassName,
|
|
945
840
|
headingClassName,
|
|
946
841
|
descriptionClassName,
|
|
947
842
|
actionsClassName,
|
|
948
843
|
imageClassName,
|
|
949
|
-
navigationClassName,
|
|
950
844
|
indicatorsClassName,
|
|
951
845
|
optixFlowConfig,
|
|
952
|
-
background
|
|
953
|
-
spacing = "
|
|
846
|
+
background,
|
|
847
|
+
spacing = "py-0 md:py-32",
|
|
954
848
|
pattern,
|
|
955
849
|
patternOpacity
|
|
956
850
|
}) {
|
|
957
|
-
const [currentImageIndex, setCurrentImageIndex] =
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
setCurrentImageIndex((prevIndex) => (prevIndex + 1) % (images?.length ?? 1));
|
|
961
|
-
}, autoPlayInterval);
|
|
962
|
-
return () => clearInterval(interval);
|
|
963
|
-
}, [images?.length, autoPlayInterval]);
|
|
964
|
-
const goToNextImage = () => {
|
|
851
|
+
const [currentImageIndex, setCurrentImageIndex] = React5__namespace.useState(0);
|
|
852
|
+
const intervalRef = React5__namespace.useRef(null);
|
|
853
|
+
const goToNext = React5__namespace.useCallback(() => {
|
|
965
854
|
setCurrentImageIndex((prevIndex) => (prevIndex + 1) % (images?.length ?? 1));
|
|
966
|
-
};
|
|
967
|
-
const
|
|
968
|
-
|
|
969
|
-
(
|
|
970
|
-
|
|
971
|
-
|
|
855
|
+
}, [images?.length]);
|
|
856
|
+
const resetInterval = React5__namespace.useCallback(() => {
|
|
857
|
+
if (intervalRef.current) {
|
|
858
|
+
clearInterval(intervalRef.current);
|
|
859
|
+
}
|
|
860
|
+
intervalRef.current = setInterval(goToNext, autoPlayInterval);
|
|
861
|
+
}, [goToNext, autoPlayInterval]);
|
|
862
|
+
const goToSlide = React5__namespace.useCallback((index) => {
|
|
863
|
+
setCurrentImageIndex(index);
|
|
864
|
+
resetInterval();
|
|
865
|
+
}, [resetInterval]);
|
|
866
|
+
React5__namespace.useEffect(() => {
|
|
867
|
+
resetInterval();
|
|
868
|
+
return () => {
|
|
869
|
+
if (intervalRef.current) {
|
|
870
|
+
clearInterval(intervalRef.current);
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
}, [resetInterval]);
|
|
972
874
|
const renderActions = () => {
|
|
973
875
|
if (actionsSlot) return actionsSlot;
|
|
974
876
|
if (!actions || actions.length === 0) return null;
|
|
975
877
|
return actions.map((action, index) => {
|
|
976
|
-
const {
|
|
878
|
+
const {
|
|
879
|
+
label,
|
|
880
|
+
icon,
|
|
881
|
+
iconAfter,
|
|
882
|
+
children,
|
|
883
|
+
className: actionClassName,
|
|
884
|
+
...pressableProps
|
|
885
|
+
} = action;
|
|
977
886
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
978
887
|
Pressable,
|
|
979
888
|
{
|
|
@@ -995,11 +904,15 @@ function CarouselImageHero({
|
|
|
995
904
|
{
|
|
996
905
|
background,
|
|
997
906
|
spacing,
|
|
998
|
-
className: cn(
|
|
907
|
+
className: cn(
|
|
908
|
+
"relative min-h-screen md:min-h-[600px] overflow-hidden",
|
|
909
|
+
className
|
|
910
|
+
),
|
|
999
911
|
pattern,
|
|
1000
912
|
patternOpacity,
|
|
913
|
+
containerClassName,
|
|
1001
914
|
children: [
|
|
1002
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("absolute inset-0", imageClassName), children: [
|
|
915
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("absolute inset-0 bg-black", imageClassName), children: [
|
|
1003
916
|
images?.map((image, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1004
917
|
"div",
|
|
1005
918
|
{
|
|
@@ -1023,50 +936,79 @@ function CarouselImageHero({
|
|
|
1023
936
|
index
|
|
1024
937
|
)),
|
|
1025
938
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1026
|
-
|
|
1027
|
-
{
|
|
1028
|
-
onClick: goToPreviousImage,
|
|
1029
|
-
asButton: true,
|
|
1030
|
-
variant: "ghost",
|
|
1031
|
-
size: "icon",
|
|
1032
|
-
className: cn("absolute left-4 top-1/2 z-20 hidden -translate-y-1/2 rounded-full bg-background/30 p-2 backdrop-blur-sm transition-colors hover:bg-background/50 md:block", navigationClassName),
|
|
1033
|
-
"aria-label": "Previous image",
|
|
1034
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-left", size: 24, className: "text-white" })
|
|
1035
|
-
}
|
|
1036
|
-
),
|
|
1037
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1038
|
-
Pressable,
|
|
1039
|
-
{
|
|
1040
|
-
onClick: goToNextImage,
|
|
1041
|
-
asButton: true,
|
|
1042
|
-
variant: "ghost",
|
|
1043
|
-
size: "icon",
|
|
1044
|
-
className: cn("absolute right-4 top-1/2 z-20 hidden -translate-y-1/2 rounded-full bg-background/30 p-2 backdrop-blur-sm transition-colors hover:bg-background/50 md:block", navigationClassName),
|
|
1045
|
-
"aria-label": "Next image",
|
|
1046
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 24, className: "text-white" })
|
|
1047
|
-
}
|
|
1048
|
-
),
|
|
1049
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("absolute bottom-6 left-1/2 z-10 flex -translate-x-1/2 gap-3", indicatorsClassName), children: images?.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1050
|
-
"button",
|
|
939
|
+
"div",
|
|
1051
940
|
{
|
|
1052
|
-
onClick: () => setCurrentImageIndex(index),
|
|
1053
941
|
className: cn(
|
|
1054
|
-
"
|
|
1055
|
-
|
|
942
|
+
"absolute bottom-6 left-1/2 z-10 flex -translate-x-1/2 gap-3",
|
|
943
|
+
indicatorsClassName
|
|
1056
944
|
),
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
945
|
+
children: images?.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
946
|
+
"button",
|
|
947
|
+
{
|
|
948
|
+
onClick: () => goToSlide(index),
|
|
949
|
+
className: cn(
|
|
950
|
+
"flex h-4 w-4 items-center justify-center rounded-full transition-colors",
|
|
951
|
+
index === currentImageIndex ? "bg-white" : "bg-white/50 hover:bg-white/80"
|
|
952
|
+
),
|
|
953
|
+
"aria-label": `Go to image ${index + 1}`
|
|
954
|
+
},
|
|
955
|
+
index
|
|
956
|
+
))
|
|
957
|
+
}
|
|
958
|
+
)
|
|
1061
959
|
] }),
|
|
1062
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
960
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
961
|
+
"div",
|
|
962
|
+
{
|
|
963
|
+
className: cn(
|
|
964
|
+
"relative z-10 mx-auto flex min-h-[600px] flex-col items-center justify-center px-4 py-16 text-center md:px-16 md:py-20"
|
|
965
|
+
),
|
|
966
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("max-w-4xl space-y-6", contentClassName), children: [
|
|
967
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
|
|
968
|
+
badge && (typeof badge === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
969
|
+
"div",
|
|
970
|
+
{
|
|
971
|
+
className: cn(
|
|
972
|
+
"inline-flex items-center rounded-full bg-white/10 px-3 py-1 text-sm font-medium text-white backdrop-blur-sm",
|
|
973
|
+
badgeClassName
|
|
974
|
+
),
|
|
975
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: badge })
|
|
976
|
+
}
|
|
977
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: badgeClassName, children: badge })),
|
|
978
|
+
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
979
|
+
"h1",
|
|
980
|
+
{
|
|
981
|
+
className: cn(
|
|
982
|
+
"text-4xl font-bold sm:text-5xl md:text-6xl text-balance text-shadow",
|
|
983
|
+
headingClassName
|
|
984
|
+
),
|
|
985
|
+
children: heading
|
|
986
|
+
}
|
|
987
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
988
|
+
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
989
|
+
"p",
|
|
990
|
+
{
|
|
991
|
+
className: cn(
|
|
992
|
+
"text-xl text-balance text-shadow",
|
|
993
|
+
descriptionClassName
|
|
994
|
+
),
|
|
995
|
+
children: description
|
|
996
|
+
}
|
|
997
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description }))
|
|
998
|
+
] }),
|
|
999
|
+
(actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1000
|
+
"div",
|
|
1001
|
+
{
|
|
1002
|
+
className: cn(
|
|
1003
|
+
"flex flex-col justify-center gap-4 sm:flex-row",
|
|
1004
|
+
actionsClassName
|
|
1005
|
+
),
|
|
1006
|
+
children: renderActions()
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
] })
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1070
1012
|
]
|
|
1071
1013
|
}
|
|
1072
1014
|
);
|
|
@@ -82,10 +82,6 @@ interface CarouselImageHeroProps {
|
|
|
82
82
|
* Additional CSS classes for the image container
|
|
83
83
|
*/
|
|
84
84
|
imageClassName?: string;
|
|
85
|
-
/**
|
|
86
|
-
* Additional CSS classes for the navigation arrows
|
|
87
|
-
*/
|
|
88
|
-
navigationClassName?: string;
|
|
89
85
|
/**
|
|
90
86
|
* Additional CSS classes for the indicators
|
|
91
87
|
*/
|
|
@@ -111,6 +107,6 @@ interface CarouselImageHeroProps {
|
|
|
111
107
|
*/
|
|
112
108
|
patternOpacity?: number;
|
|
113
109
|
}
|
|
114
|
-
declare function CarouselImageHero({ badge, heading, description, actions, actionsSlot, images, autoPlayInterval, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, actionsClassName, imageClassName,
|
|
110
|
+
declare function CarouselImageHero({ badge, heading, description, actions, actionsSlot, images, autoPlayInterval, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, actionsClassName, imageClassName, indicatorsClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, }: CarouselImageHeroProps): React.JSX.Element;
|
|
115
111
|
|
|
116
112
|
export { CarouselImageHero, type CarouselImageHeroProps };
|
|
@@ -82,10 +82,6 @@ interface CarouselImageHeroProps {
|
|
|
82
82
|
* Additional CSS classes for the image container
|
|
83
83
|
*/
|
|
84
84
|
imageClassName?: string;
|
|
85
|
-
/**
|
|
86
|
-
* Additional CSS classes for the navigation arrows
|
|
87
|
-
*/
|
|
88
|
-
navigationClassName?: string;
|
|
89
85
|
/**
|
|
90
86
|
* Additional CSS classes for the indicators
|
|
91
87
|
*/
|
|
@@ -111,6 +107,6 @@ interface CarouselImageHeroProps {
|
|
|
111
107
|
*/
|
|
112
108
|
patternOpacity?: number;
|
|
113
109
|
}
|
|
114
|
-
declare function CarouselImageHero({ badge, heading, description, actions, actionsSlot, images, autoPlayInterval, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, actionsClassName, imageClassName,
|
|
110
|
+
declare function CarouselImageHero({ badge, heading, description, actions, actionsSlot, images, autoPlayInterval, className, containerClassName, contentClassName, badgeClassName, headingClassName, descriptionClassName, actionsClassName, imageClassName, indicatorsClassName, optixFlowConfig, background, spacing, pattern, patternOpacity, }: CarouselImageHeroProps): React.JSX.Element;
|
|
115
111
|
|
|
116
112
|
export { CarouselImageHero, type CarouselImageHeroProps };
|