@opensite/ui 3.4.3 → 3.4.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/index.cjs CHANGED
@@ -827,25 +827,6 @@ var slideVariants = {
827
827
  }
828
828
  }
829
829
  };
830
- var fadeVariants = {
831
- initial: {
832
- opacity: 0
833
- },
834
- visible: {
835
- opacity: 1,
836
- transition: {
837
- duration: 0.8,
838
- ease: [0.4, 0, 0.2, 1]
839
- }
840
- },
841
- fadeExit: {
842
- opacity: 0,
843
- transition: {
844
- duration: 0.8,
845
- ease: [0.4, 0, 0.2, 1]
846
- }
847
- }
848
- };
849
830
  var normalizeIndex = (index, length) => {
850
831
  if (!length) return 0;
851
832
  const safeIndex = index % length;
@@ -933,38 +914,55 @@ var ImageSlider = ({
933
914
  perspective: "1000px"
934
915
  },
935
916
  children: [
936
- /* @__PURE__ */ jsxRuntime.jsx(
937
- react.AnimatePresence,
917
+ transition === "fade" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0", children: images.map((image, index) => /* @__PURE__ */ jsxRuntime.jsx(
918
+ "div",
938
919
  {
939
- mode: transition === "fade" ? "sync" : "wait",
940
- initial: false,
941
- children: activeImage ? /* @__PURE__ */ jsxRuntime.jsx(
942
- react.motion.div,
920
+ "aria-hidden": index !== currentIndex,
921
+ className: cn(
922
+ "absolute inset-0 opacity-0 transition-opacity duration-1000 ease-in-out motion-reduce:transition-none",
923
+ index === currentIndex && "opacity-100"
924
+ ),
925
+ children: /* @__PURE__ */ jsxRuntime.jsx(
926
+ img.Img,
943
927
  {
944
- initial: "initial",
945
- animate: "visible",
946
- exit: transition === "fade" ? "fadeExit" : direction === "up" ? "upExit" : "downExit",
947
- variants: transition === "fade" ? fadeVariants : slideVariants,
948
- className: "absolute inset-0",
949
- children: /* @__PURE__ */ jsxRuntime.jsx(
950
- img.Img,
951
- {
952
- src: activeImage.src,
953
- alt: activeImage.alt,
954
- className: cn(
955
- "h-full w-full object-cover object-center",
956
- imageClassName,
957
- activeImage.className
958
- ),
959
- optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
960
- loading: "eager"
961
- }
962
- )
963
- },
964
- `${currentIndex}-${activeImage.src ?? "image"}`
965
- ) : null
966
- }
967
- ),
928
+ src: image.src,
929
+ alt: image.alt,
930
+ className: cn(
931
+ "h-full w-full object-cover object-center",
932
+ imageClassName,
933
+ image.className
934
+ ),
935
+ optixFlowConfig: image.optixFlowConfig ?? optixFlowConfig,
936
+ loading: "eager"
937
+ }
938
+ )
939
+ },
940
+ `${image.src ?? "image"}-${index}`
941
+ )) }) : /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: activeImage ? /* @__PURE__ */ jsxRuntime.jsx(
942
+ react.motion.div,
943
+ {
944
+ initial: "initial",
945
+ animate: "visible",
946
+ exit: direction === "up" ? "upExit" : "downExit",
947
+ variants: slideVariants,
948
+ className: "absolute inset-0",
949
+ children: /* @__PURE__ */ jsxRuntime.jsx(
950
+ img.Img,
951
+ {
952
+ src: activeImage.src,
953
+ alt: activeImage.alt,
954
+ className: cn(
955
+ "h-full w-full object-cover object-center",
956
+ imageClassName,
957
+ activeImage.className
958
+ ),
959
+ optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
960
+ loading: "eager"
961
+ }
962
+ )
963
+ },
964
+ `${currentIndex}-${activeImage.src ?? "image"}`
965
+ ) : null }),
968
966
  overlayContent,
969
967
  children ? /* @__PURE__ */ jsxRuntime.jsx(
970
968
  "div",
package/dist/index.js CHANGED
@@ -805,25 +805,6 @@ var slideVariants = {
805
805
  }
806
806
  }
807
807
  };
808
- var fadeVariants = {
809
- initial: {
810
- opacity: 0
811
- },
812
- visible: {
813
- opacity: 1,
814
- transition: {
815
- duration: 0.8,
816
- ease: [0.4, 0, 0.2, 1]
817
- }
818
- },
819
- fadeExit: {
820
- opacity: 0,
821
- transition: {
822
- duration: 0.8,
823
- ease: [0.4, 0, 0.2, 1]
824
- }
825
- }
826
- };
827
808
  var normalizeIndex = (index, length) => {
828
809
  if (!length) return 0;
829
810
  const safeIndex = index % length;
@@ -911,38 +892,55 @@ var ImageSlider = ({
911
892
  perspective: "1000px"
912
893
  },
913
894
  children: [
914
- /* @__PURE__ */ jsx(
915
- AnimatePresence$1,
895
+ transition === "fade" ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children: images.map((image, index) => /* @__PURE__ */ jsx(
896
+ "div",
916
897
  {
917
- mode: transition === "fade" ? "sync" : "wait",
918
- initial: false,
919
- children: activeImage ? /* @__PURE__ */ jsx(
920
- motion$1.div,
898
+ "aria-hidden": index !== currentIndex,
899
+ className: cn(
900
+ "absolute inset-0 opacity-0 transition-opacity duration-1000 ease-in-out motion-reduce:transition-none",
901
+ index === currentIndex && "opacity-100"
902
+ ),
903
+ children: /* @__PURE__ */ jsx(
904
+ Img,
921
905
  {
922
- initial: "initial",
923
- animate: "visible",
924
- exit: transition === "fade" ? "fadeExit" : direction === "up" ? "upExit" : "downExit",
925
- variants: transition === "fade" ? fadeVariants : slideVariants,
926
- className: "absolute inset-0",
927
- children: /* @__PURE__ */ jsx(
928
- Img,
929
- {
930
- src: activeImage.src,
931
- alt: activeImage.alt,
932
- className: cn(
933
- "h-full w-full object-cover object-center",
934
- imageClassName,
935
- activeImage.className
936
- ),
937
- optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
938
- loading: "eager"
939
- }
940
- )
941
- },
942
- `${currentIndex}-${activeImage.src ?? "image"}`
943
- ) : null
944
- }
945
- ),
906
+ src: image.src,
907
+ alt: image.alt,
908
+ className: cn(
909
+ "h-full w-full object-cover object-center",
910
+ imageClassName,
911
+ image.className
912
+ ),
913
+ optixFlowConfig: image.optixFlowConfig ?? optixFlowConfig,
914
+ loading: "eager"
915
+ }
916
+ )
917
+ },
918
+ `${image.src ?? "image"}-${index}`
919
+ )) }) : /* @__PURE__ */ jsx(AnimatePresence$1, { mode: "wait", initial: false, children: activeImage ? /* @__PURE__ */ jsx(
920
+ motion$1.div,
921
+ {
922
+ initial: "initial",
923
+ animate: "visible",
924
+ exit: direction === "up" ? "upExit" : "downExit",
925
+ variants: slideVariants,
926
+ className: "absolute inset-0",
927
+ children: /* @__PURE__ */ jsx(
928
+ Img,
929
+ {
930
+ src: activeImage.src,
931
+ alt: activeImage.alt,
932
+ className: cn(
933
+ "h-full w-full object-cover object-center",
934
+ imageClassName,
935
+ activeImage.className
936
+ ),
937
+ optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
938
+ loading: "eager"
939
+ }
940
+ )
941
+ },
942
+ `${currentIndex}-${activeImage.src ?? "image"}`
943
+ ) : null }),
946
944
  overlayContent,
947
945
  children ? /* @__PURE__ */ jsx(
948
946
  "div",
package/dist/registry.cjs CHANGED
@@ -721,25 +721,6 @@ var slideVariants = {
721
721
  }
722
722
  }
723
723
  };
724
- var fadeVariants = {
725
- initial: {
726
- opacity: 0
727
- },
728
- visible: {
729
- opacity: 1,
730
- transition: {
731
- duration: 0.8,
732
- ease: [0.4, 0, 0.2, 1]
733
- }
734
- },
735
- fadeExit: {
736
- opacity: 0,
737
- transition: {
738
- duration: 0.8,
739
- ease: [0.4, 0, 0.2, 1]
740
- }
741
- }
742
- };
743
724
  var normalizeIndex = (index, length) => {
744
725
  if (!length) return 0;
745
726
  const safeIndex = index % length;
@@ -827,38 +808,55 @@ var ImageSlider = ({
827
808
  perspective: "1000px"
828
809
  },
829
810
  children: [
830
- /* @__PURE__ */ jsxRuntime.jsx(
831
- react.AnimatePresence,
811
+ transition === "fade" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0", children: images.map((image, index) => /* @__PURE__ */ jsxRuntime.jsx(
812
+ "div",
832
813
  {
833
- mode: transition === "fade" ? "sync" : "wait",
834
- initial: false,
835
- children: activeImage ? /* @__PURE__ */ jsxRuntime.jsx(
836
- react.motion.div,
814
+ "aria-hidden": index !== currentIndex,
815
+ className: cn(
816
+ "absolute inset-0 opacity-0 transition-opacity duration-1000 ease-in-out motion-reduce:transition-none",
817
+ index === currentIndex && "opacity-100"
818
+ ),
819
+ children: /* @__PURE__ */ jsxRuntime.jsx(
820
+ img.Img,
837
821
  {
838
- initial: "initial",
839
- animate: "visible",
840
- exit: transition === "fade" ? "fadeExit" : direction === "up" ? "upExit" : "downExit",
841
- variants: transition === "fade" ? fadeVariants : slideVariants,
842
- className: "absolute inset-0",
843
- children: /* @__PURE__ */ jsxRuntime.jsx(
844
- img.Img,
845
- {
846
- src: activeImage.src,
847
- alt: activeImage.alt,
848
- className: cn(
849
- "h-full w-full object-cover object-center",
850
- imageClassName,
851
- activeImage.className
852
- ),
853
- optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
854
- loading: "eager"
855
- }
856
- )
857
- },
858
- `${currentIndex}-${activeImage.src ?? "image"}`
859
- ) : null
860
- }
861
- ),
822
+ src: image.src,
823
+ alt: image.alt,
824
+ className: cn(
825
+ "h-full w-full object-cover object-center",
826
+ imageClassName,
827
+ image.className
828
+ ),
829
+ optixFlowConfig: image.optixFlowConfig ?? optixFlowConfig,
830
+ loading: "eager"
831
+ }
832
+ )
833
+ },
834
+ `${image.src ?? "image"}-${index}`
835
+ )) }) : /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: activeImage ? /* @__PURE__ */ jsxRuntime.jsx(
836
+ react.motion.div,
837
+ {
838
+ initial: "initial",
839
+ animate: "visible",
840
+ exit: direction === "up" ? "upExit" : "downExit",
841
+ variants: slideVariants,
842
+ className: "absolute inset-0",
843
+ children: /* @__PURE__ */ jsxRuntime.jsx(
844
+ img.Img,
845
+ {
846
+ src: activeImage.src,
847
+ alt: activeImage.alt,
848
+ className: cn(
849
+ "h-full w-full object-cover object-center",
850
+ imageClassName,
851
+ activeImage.className
852
+ ),
853
+ optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
854
+ loading: "eager"
855
+ }
856
+ )
857
+ },
858
+ `${currentIndex}-${activeImage.src ?? "image"}`
859
+ ) : null }),
862
860
  overlayContent,
863
861
  children ? /* @__PURE__ */ jsxRuntime.jsx(
864
862
  "div",
@@ -22835,6 +22833,12 @@ function FeatureIconGridBordered({
22835
22833
  }
22836
22834
  );
22837
22835
  }
22836
+ function isRenderableNode(value) {
22837
+ return value !== null && value !== void 0 && typeof value !== "boolean" && !(typeof value === "string" && value.trim().length === 0);
22838
+ }
22839
+ function firstRenderableNode(...values) {
22840
+ return values.find(isRenderableNode);
22841
+ }
22838
22842
  function FeatureChecklistImage({
22839
22843
  sectionId = "feature-checklist-image",
22840
22844
  title,
@@ -22847,9 +22851,10 @@ function FeatureChecklistImage({
22847
22851
  actions,
22848
22852
  actionsSlot,
22849
22853
  checklistItems,
22854
+ benefits,
22850
22855
  checklistSlot,
22851
22856
  className,
22852
- containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
22857
+ containerClassName = "max-w-screen-2xl px-6 sm:px-6 md:px-6 lg:px-8",
22853
22858
  contentWrapperClassName,
22854
22859
  imageClassName,
22855
22860
  contentClassName,
@@ -22906,33 +22911,69 @@ function FeatureChecklistImage({
22906
22911
  if (imageSlot) return imageSlot;
22907
22912
  if (!imageSrc) return null;
22908
22913
  return /* @__PURE__ */ jsxRuntime.jsx(
22909
- img.Img,
22914
+ "div",
22910
22915
  {
22911
- src: imageSrc,
22912
- alt: imageAlt || "Feature illustration",
22913
22916
  className: cn(
22914
- "max-h-96 w-full rounded-lg object-cover md:max-h-[500px] md:w-1/2 shadow-xl",
22917
+ "relative aspect-[3/2] w-full overflow-hidden rounded-lg shadow-xl",
22915
22918
  imageClassName
22916
22919
  ),
22917
- loading: "lazy",
22918
- optixFlowConfig
22920
+ children: /* @__PURE__ */ jsxRuntime.jsx(
22921
+ img.Img,
22922
+ {
22923
+ src: imageSrc,
22924
+ alt: imageAlt || "Feature illustration",
22925
+ className: cn(
22926
+ "block h-full w-full object-cover object-center",
22927
+ imageClassName
22928
+ ),
22929
+ loading: "lazy",
22930
+ optixFlowConfig
22931
+ }
22932
+ )
22919
22933
  }
22920
22934
  );
22921
22935
  }, [imageSlot, imageSrc, imageAlt, imageClassName, optixFlowConfig]);
22922
22936
  const checklistContent = React30.useMemo(() => {
22923
22937
  if (checklistSlot) return checklistSlot;
22924
- if (!checklistItems || checklistItems.length === 0) return null;
22925
- return checklistItems.map((item, index) => {
22938
+ const items = checklistItems ?? benefits;
22939
+ if (!items || items.length === 0) return null;
22940
+ const renderedItems = [];
22941
+ items.forEach((item, index) => {
22926
22942
  const isString = typeof item === "string";
22927
- const content = isString ? item : item.content;
22928
- const iconElement = isString ? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/circle-check-big", size: 16 }) : item.icon ?? (item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/circle-check-big", size: 16 }));
22943
+ const content = isString ? item : firstRenderableNode(item.content, item.text, item.label);
22944
+ const title2 = isString ? void 0 : item.title;
22945
+ const description2 = isString ? void 0 : item.description;
22946
+ if (!isRenderableNode(content) && !isRenderableNode(title2) && !isRenderableNode(description2)) {
22947
+ return;
22948
+ }
22949
+ const iconElement = isString ? /* @__PURE__ */ jsxRuntime.jsx(
22950
+ DynamicIcon,
22951
+ {
22952
+ name: "lucide/circle-check-big",
22953
+ size: 20,
22954
+ className: "h-5 w-5"
22955
+ }
22956
+ ) : item.icon ?? (item.iconName ? /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 20, className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(
22957
+ DynamicIcon,
22958
+ {
22959
+ name: "lucide/circle-check-big",
22960
+ size: 20,
22961
+ className: "h-5 w-5"
22962
+ }
22963
+ ));
22929
22964
  const itemClassName = isString ? void 0 : item.className;
22930
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cn("flex items-start gap-3", itemClassName), children: [
22931
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1", children: iconElement }),
22932
- content
22933
- ] }, index);
22965
+ renderedItems.push(
22966
+ /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cn("flex items-start gap-3", itemClassName), children: [
22967
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 flex h-5 w-5 shrink-0 items-center justify-center", children: iconElement }),
22968
+ isRenderableNode(content) ? typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-medium leading-relaxed md:text-lg", children: content }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 text-base font-medium leading-relaxed md:text-lg", children: content }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
22969
+ isRenderableNode(title2) && (typeof title2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold leading-snug md:text-lg", children: title2 }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base font-semibold leading-snug md:text-lg", children: title2 })),
22970
+ isRenderableNode(description2) && (typeof description2 === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm leading-relaxed text-current/75 md:text-base", children: description2 }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-sm leading-relaxed text-current/75 md:text-base", children: description2 }))
22971
+ ] })
22972
+ ] }, index)
22973
+ );
22934
22974
  });
22935
- }, [checklistSlot, checklistItems]);
22975
+ return renderedItems.length > 0 ? renderedItems : null;
22976
+ }, [checklistSlot, checklistItems, benefits]);
22936
22977
  return /* @__PURE__ */ jsxRuntime.jsx(
22937
22978
  Section,
22938
22979
  {
@@ -22948,7 +22989,8 @@ function FeatureChecklistImage({
22948
22989
  "div",
22949
22990
  {
22950
22991
  className: cn(
22951
- "flex flex-col gap-6 md:gap-12 md:flex-row",
22992
+ "grid gap-8 md:gap-12 lg:items-center",
22993
+ imageContent ? "lg:grid-cols-2" : "lg:grid-cols-1",
22952
22994
  contentWrapperClassName
22953
22995
  ),
22954
22996
  children: [
@@ -22957,7 +22999,8 @@ function FeatureChecklistImage({
22957
22999
  "div",
22958
23000
  {
22959
23001
  className: cn(
22960
- "px-0 md:px-6 lg:px-10 py-4 md:py-0 flex flex-col gap-6 md:gap-10",
23002
+ "flex min-w-0 flex-col gap-6 py-2 md:gap-8 md:py-0 lg:gap-10",
23003
+ imageContent && "lg:pl-8",
22961
23004
  contentClassName
22962
23005
  ),
22963
23006
  children: [
@@ -22965,7 +23008,7 @@ function FeatureChecklistImage({
22965
23008
  "h2",
22966
23009
  {
22967
23010
  className: cn(
22968
- "text-xl font-semibold text-balance md:text-2xl lg:text-3xl",
23011
+ "text-2xl font-semibold text-balance sm:text-3xl lg:text-4xl",
22969
23012
  titleClassName
22970
23013
  ),
22971
23014
  children: title
@@ -22974,18 +23017,36 @@ function FeatureChecklistImage({
22974
23017
  "div",
22975
23018
  {
22976
23019
  className: cn(
22977
- "text-xl font-semibold text-balance md:text-2xl lg:text-3xl",
23020
+ "text-2xl font-semibold text-balance sm:text-3xl lg:text-4xl",
22978
23021
  titleClassName
22979
23022
  ),
22980
23023
  children: title
22981
23024
  }
22982
23025
  )),
22983
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("relative", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative", descriptionClassName), children: description })),
23026
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
23027
+ "p",
23028
+ {
23029
+ className: cn(
23030
+ "relative text-base leading-relaxed md:text-lg",
23031
+ descriptionClassName
23032
+ ),
23033
+ children: description
23034
+ }
23035
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
23036
+ "div",
23037
+ {
23038
+ className: cn(
23039
+ "relative text-base leading-relaxed md:text-lg",
23040
+ descriptionClassName
23041
+ ),
23042
+ children: description
23043
+ }
23044
+ )),
22984
23045
  actionsContent && /* @__PURE__ */ jsxRuntime.jsx(
22985
23046
  "div",
22986
23047
  {
22987
23048
  className: cn(
22988
- "flex flex-wrap items-center gap-4",
23049
+ "flex flex-col items-start gap-4 sm:flex-row sm:flex-wrap sm:items-center",
22989
23050
  actionsClassName
22990
23051
  ),
22991
23052
  children: actionsContent
@@ -22995,7 +23056,7 @@ function FeatureChecklistImage({
22995
23056
  "ul",
22996
23057
  {
22997
23058
  className: cn(
22998
- "flex-wrap items-center space-y-2 md:flex",
23059
+ "flex flex-col space-y-3 md:space-y-4",
22999
23060
  checklistClassName
23000
23061
  ),
23001
23062
  children: checklistContent
@@ -59752,7 +59813,7 @@ function HeroConversationIntelligence({
59752
59813
  }
59753
59814
  );
59754
59815
  }
59755
- var fadeVariants2 = {
59816
+ var fadeVariants = {
59756
59817
  initial: { opacity: 0 },
59757
59818
  animate: {
59758
59819
  opacity: 1,
@@ -59872,7 +59933,7 @@ function HeroBusinessCarouselDots({
59872
59933
  carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative aspect-video w-full overflow-hidden ", children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: /* @__PURE__ */ jsxRuntime.jsx(
59873
59934
  framerMotion.motion.div,
59874
59935
  {
59875
- variants: fadeVariants2,
59936
+ variants: fadeVariants,
59876
59937
  initial: "initial",
59877
59938
  animate: "animate",
59878
59939
  exit: "exit",