@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/registry.js CHANGED
@@ -681,25 +681,6 @@ var slideVariants = {
681
681
  }
682
682
  }
683
683
  };
684
- var fadeVariants = {
685
- initial: {
686
- opacity: 0
687
- },
688
- visible: {
689
- opacity: 1,
690
- transition: {
691
- duration: 0.8,
692
- ease: [0.4, 0, 0.2, 1]
693
- }
694
- },
695
- fadeExit: {
696
- opacity: 0,
697
- transition: {
698
- duration: 0.8,
699
- ease: [0.4, 0, 0.2, 1]
700
- }
701
- }
702
- };
703
684
  var normalizeIndex = (index, length) => {
704
685
  if (!length) return 0;
705
686
  const safeIndex = index % length;
@@ -787,38 +768,55 @@ var ImageSlider = ({
787
768
  perspective: "1000px"
788
769
  },
789
770
  children: [
790
- /* @__PURE__ */ jsx(
791
- AnimatePresence$1,
771
+ transition === "fade" ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children: images.map((image, index) => /* @__PURE__ */ jsx(
772
+ "div",
792
773
  {
793
- mode: transition === "fade" ? "sync" : "wait",
794
- initial: false,
795
- children: activeImage ? /* @__PURE__ */ jsx(
796
- motion$1.div,
774
+ "aria-hidden": index !== currentIndex,
775
+ className: cn(
776
+ "absolute inset-0 opacity-0 transition-opacity duration-1000 ease-in-out motion-reduce:transition-none",
777
+ index === currentIndex && "opacity-100"
778
+ ),
779
+ children: /* @__PURE__ */ jsx(
780
+ Img,
797
781
  {
798
- initial: "initial",
799
- animate: "visible",
800
- exit: transition === "fade" ? "fadeExit" : direction === "up" ? "upExit" : "downExit",
801
- variants: transition === "fade" ? fadeVariants : slideVariants,
802
- className: "absolute inset-0",
803
- children: /* @__PURE__ */ jsx(
804
- Img,
805
- {
806
- src: activeImage.src,
807
- alt: activeImage.alt,
808
- className: cn(
809
- "h-full w-full object-cover object-center",
810
- imageClassName,
811
- activeImage.className
812
- ),
813
- optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
814
- loading: "eager"
815
- }
816
- )
817
- },
818
- `${currentIndex}-${activeImage.src ?? "image"}`
819
- ) : null
820
- }
821
- ),
782
+ src: image.src,
783
+ alt: image.alt,
784
+ className: cn(
785
+ "h-full w-full object-cover object-center",
786
+ imageClassName,
787
+ image.className
788
+ ),
789
+ optixFlowConfig: image.optixFlowConfig ?? optixFlowConfig,
790
+ loading: "eager"
791
+ }
792
+ )
793
+ },
794
+ `${image.src ?? "image"}-${index}`
795
+ )) }) : /* @__PURE__ */ jsx(AnimatePresence$1, { mode: "wait", initial: false, children: activeImage ? /* @__PURE__ */ jsx(
796
+ motion$1.div,
797
+ {
798
+ initial: "initial",
799
+ animate: "visible",
800
+ exit: direction === "up" ? "upExit" : "downExit",
801
+ variants: slideVariants,
802
+ className: "absolute inset-0",
803
+ children: /* @__PURE__ */ jsx(
804
+ Img,
805
+ {
806
+ src: activeImage.src,
807
+ alt: activeImage.alt,
808
+ className: cn(
809
+ "h-full w-full object-cover object-center",
810
+ imageClassName,
811
+ activeImage.className
812
+ ),
813
+ optixFlowConfig: activeImage.optixFlowConfig ?? optixFlowConfig,
814
+ loading: "eager"
815
+ }
816
+ )
817
+ },
818
+ `${currentIndex}-${activeImage.src ?? "image"}`
819
+ ) : null }),
822
820
  overlayContent,
823
821
  children ? /* @__PURE__ */ jsx(
824
822
  "div",
@@ -22795,6 +22793,12 @@ function FeatureIconGridBordered({
22795
22793
  }
22796
22794
  );
22797
22795
  }
22796
+ function isRenderableNode(value) {
22797
+ return value !== null && value !== void 0 && typeof value !== "boolean" && !(typeof value === "string" && value.trim().length === 0);
22798
+ }
22799
+ function firstRenderableNode(...values) {
22800
+ return values.find(isRenderableNode);
22801
+ }
22798
22802
  function FeatureChecklistImage({
22799
22803
  sectionId = "feature-checklist-image",
22800
22804
  title,
@@ -22807,9 +22811,10 @@ function FeatureChecklistImage({
22807
22811
  actions,
22808
22812
  actionsSlot,
22809
22813
  checklistItems,
22814
+ benefits,
22810
22815
  checklistSlot,
22811
22816
  className,
22812
- containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
22817
+ containerClassName = "max-w-screen-2xl px-6 sm:px-6 md:px-6 lg:px-8",
22813
22818
  contentWrapperClassName,
22814
22819
  imageClassName,
22815
22820
  contentClassName,
@@ -22866,33 +22871,69 @@ function FeatureChecklistImage({
22866
22871
  if (imageSlot) return imageSlot;
22867
22872
  if (!imageSrc) return null;
22868
22873
  return /* @__PURE__ */ jsx(
22869
- Img,
22874
+ "div",
22870
22875
  {
22871
- src: imageSrc,
22872
- alt: imageAlt || "Feature illustration",
22873
22876
  className: cn(
22874
- "max-h-96 w-full rounded-lg object-cover md:max-h-[500px] md:w-1/2 shadow-xl",
22877
+ "relative aspect-[3/2] w-full overflow-hidden rounded-lg shadow-xl",
22875
22878
  imageClassName
22876
22879
  ),
22877
- loading: "lazy",
22878
- optixFlowConfig
22880
+ children: /* @__PURE__ */ jsx(
22881
+ Img,
22882
+ {
22883
+ src: imageSrc,
22884
+ alt: imageAlt || "Feature illustration",
22885
+ className: cn(
22886
+ "block h-full w-full object-cover object-center",
22887
+ imageClassName
22888
+ ),
22889
+ loading: "lazy",
22890
+ optixFlowConfig
22891
+ }
22892
+ )
22879
22893
  }
22880
22894
  );
22881
22895
  }, [imageSlot, imageSrc, imageAlt, imageClassName, optixFlowConfig]);
22882
22896
  const checklistContent = useMemo(() => {
22883
22897
  if (checklistSlot) return checklistSlot;
22884
- if (!checklistItems || checklistItems.length === 0) return null;
22885
- return checklistItems.map((item, index) => {
22898
+ const items = checklistItems ?? benefits;
22899
+ if (!items || items.length === 0) return null;
22900
+ const renderedItems = [];
22901
+ items.forEach((item, index) => {
22886
22902
  const isString = typeof item === "string";
22887
- const content = isString ? item : item.content;
22888
- const iconElement = isString ? /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/circle-check-big", size: 16 }) : item.icon ?? (item.iconName ? /* @__PURE__ */ jsx(DynamicIcon, { name: item.iconName, size: 16 }) : /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/circle-check-big", size: 16 }));
22903
+ const content = isString ? item : firstRenderableNode(item.content, item.text, item.label);
22904
+ const title2 = isString ? void 0 : item.title;
22905
+ const description2 = isString ? void 0 : item.description;
22906
+ if (!isRenderableNode(content) && !isRenderableNode(title2) && !isRenderableNode(description2)) {
22907
+ return;
22908
+ }
22909
+ const iconElement = isString ? /* @__PURE__ */ jsx(
22910
+ DynamicIcon,
22911
+ {
22912
+ name: "lucide/circle-check-big",
22913
+ size: 20,
22914
+ className: "h-5 w-5"
22915
+ }
22916
+ ) : item.icon ?? (item.iconName ? /* @__PURE__ */ jsx(DynamicIcon, { name: item.iconName, size: 20, className: "h-5 w-5" }) : /* @__PURE__ */ jsx(
22917
+ DynamicIcon,
22918
+ {
22919
+ name: "lucide/circle-check-big",
22920
+ size: 20,
22921
+ className: "h-5 w-5"
22922
+ }
22923
+ ));
22889
22924
  const itemClassName = isString ? void 0 : item.className;
22890
- return /* @__PURE__ */ jsxs("li", { className: cn("flex items-start gap-3", itemClassName), children: [
22891
- /* @__PURE__ */ jsx("div", { className: "mt-1", children: iconElement }),
22892
- content
22893
- ] }, index);
22925
+ renderedItems.push(
22926
+ /* @__PURE__ */ jsxs("li", { className: cn("flex items-start gap-3", itemClassName), children: [
22927
+ /* @__PURE__ */ jsx("div", { className: "mt-1 flex h-5 w-5 shrink-0 items-center justify-center", children: iconElement }),
22928
+ isRenderableNode(content) ? typeof content === "string" ? /* @__PURE__ */ jsx("span", { className: "text-base font-medium leading-relaxed md:text-lg", children: content }) : /* @__PURE__ */ jsx("div", { className: "min-w-0 text-base font-medium leading-relaxed md:text-lg", children: content }) : /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
22929
+ isRenderableNode(title2) && (typeof title2 === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold leading-snug md:text-lg", children: title2 }) : /* @__PURE__ */ jsx("div", { className: "text-base font-semibold leading-snug md:text-lg", children: title2 })),
22930
+ isRenderableNode(description2) && (typeof description2 === "string" ? /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm leading-relaxed text-current/75 md:text-base", children: description2 }) : /* @__PURE__ */ jsx("div", { className: "mt-1 text-sm leading-relaxed text-current/75 md:text-base", children: description2 }))
22931
+ ] })
22932
+ ] }, index)
22933
+ );
22894
22934
  });
22895
- }, [checklistSlot, checklistItems]);
22935
+ return renderedItems.length > 0 ? renderedItems : null;
22936
+ }, [checklistSlot, checklistItems, benefits]);
22896
22937
  return /* @__PURE__ */ jsx(
22897
22938
  Section,
22898
22939
  {
@@ -22908,7 +22949,8 @@ function FeatureChecklistImage({
22908
22949
  "div",
22909
22950
  {
22910
22951
  className: cn(
22911
- "flex flex-col gap-6 md:gap-12 md:flex-row",
22952
+ "grid gap-8 md:gap-12 lg:items-center",
22953
+ imageContent ? "lg:grid-cols-2" : "lg:grid-cols-1",
22912
22954
  contentWrapperClassName
22913
22955
  ),
22914
22956
  children: [
@@ -22917,7 +22959,8 @@ function FeatureChecklistImage({
22917
22959
  "div",
22918
22960
  {
22919
22961
  className: cn(
22920
- "px-0 md:px-6 lg:px-10 py-4 md:py-0 flex flex-col gap-6 md:gap-10",
22962
+ "flex min-w-0 flex-col gap-6 py-2 md:gap-8 md:py-0 lg:gap-10",
22963
+ imageContent && "lg:pl-8",
22921
22964
  contentClassName
22922
22965
  ),
22923
22966
  children: [
@@ -22925,7 +22968,7 @@ function FeatureChecklistImage({
22925
22968
  "h2",
22926
22969
  {
22927
22970
  className: cn(
22928
- "text-xl font-semibold text-balance md:text-2xl lg:text-3xl",
22971
+ "text-2xl font-semibold text-balance sm:text-3xl lg:text-4xl",
22929
22972
  titleClassName
22930
22973
  ),
22931
22974
  children: title
@@ -22934,18 +22977,36 @@ function FeatureChecklistImage({
22934
22977
  "div",
22935
22978
  {
22936
22979
  className: cn(
22937
- "text-xl font-semibold text-balance md:text-2xl lg:text-3xl",
22980
+ "text-2xl font-semibold text-balance sm:text-3xl lg:text-4xl",
22938
22981
  titleClassName
22939
22982
  ),
22940
22983
  children: title
22941
22984
  }
22942
22985
  )),
22943
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("relative", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("relative", descriptionClassName), children: description })),
22986
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
22987
+ "p",
22988
+ {
22989
+ className: cn(
22990
+ "relative text-base leading-relaxed md:text-lg",
22991
+ descriptionClassName
22992
+ ),
22993
+ children: description
22994
+ }
22995
+ ) : /* @__PURE__ */ jsx(
22996
+ "div",
22997
+ {
22998
+ className: cn(
22999
+ "relative text-base leading-relaxed md:text-lg",
23000
+ descriptionClassName
23001
+ ),
23002
+ children: description
23003
+ }
23004
+ )),
22944
23005
  actionsContent && /* @__PURE__ */ jsx(
22945
23006
  "div",
22946
23007
  {
22947
23008
  className: cn(
22948
- "flex flex-wrap items-center gap-4",
23009
+ "flex flex-col items-start gap-4 sm:flex-row sm:flex-wrap sm:items-center",
22949
23010
  actionsClassName
22950
23011
  ),
22951
23012
  children: actionsContent
@@ -22955,7 +23016,7 @@ function FeatureChecklistImage({
22955
23016
  "ul",
22956
23017
  {
22957
23018
  className: cn(
22958
- "flex-wrap items-center space-y-2 md:flex",
23019
+ "flex flex-col space-y-3 md:space-y-4",
22959
23020
  checklistClassName
22960
23021
  ),
22961
23022
  children: checklistContent
@@ -59712,7 +59773,7 @@ function HeroConversationIntelligence({
59712
59773
  }
59713
59774
  );
59714
59775
  }
59715
- var fadeVariants2 = {
59776
+ var fadeVariants = {
59716
59777
  initial: { opacity: 0 },
59717
59778
  animate: {
59718
59779
  opacity: 1,
@@ -59832,7 +59893,7 @@ function HeroBusinessCarouselDots({
59832
59893
  carouselSlot ? carouselSlot : activeImage ? /* @__PURE__ */ jsx("div", { className: "relative aspect-video w-full overflow-hidden ", children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx(
59833
59894
  motion.div,
59834
59895
  {
59835
- variants: fadeVariants2,
59896
+ variants: fadeVariants,
59836
59897
  initial: "initial",
59837
59898
  animate: "animate",
59838
59899
  exit: "exit",
@@ -77,6 +77,6 @@ interface SocialLinkIconProps extends Omit<PressableProps, "children">, SocialLi
77
77
  * />
78
78
  * ```
79
79
  */
80
- declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement>>;
80
+ declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
81
81
 
82
82
  export { SocialLinkIcon, type SocialLinkIconDynamicIconProps, type SocialLinkIconProps };
@@ -77,6 +77,6 @@ interface SocialLinkIconProps extends Omit<PressableProps, "children">, SocialLi
77
77
  * />
78
78
  * ```
79
79
  */
80
- declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement | HTMLSpanElement>>;
80
+ declare const SocialLinkIcon: React.ForwardRefExoticComponent<SocialLinkIconProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement | HTMLSpanElement>>;
81
81
 
82
82
  export { SocialLinkIcon, type SocialLinkIconDynamicIconProps, type SocialLinkIconProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensite/ui",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "description": "Foundational UI component library for OpenSite Semantic Site Builder with tree-shakable exports and abstract styling",
5
5
  "keywords": [
6
6
  "react",
@@ -3386,9 +3386,9 @@
3386
3386
  "prepublishOnly": "pnpm run build && pnpm run test:ci"
3387
3387
  },
3388
3388
  "peerDependencies": {
3389
- "@tailwindcss/typography": ">=0.5.0",
3390
3389
  "@page-speed/pressable": ">=0.0.9",
3391
3390
  "@page-speed/router": ">=1.0.0",
3391
+ "@tailwindcss/typography": ">=0.5.0",
3392
3392
  "react": ">=16.8.0",
3393
3393
  "react-dom": ">=16.8.0"
3394
3394
  },
@@ -3461,7 +3461,7 @@
3461
3461
  "optionalDependencies": {
3462
3462
  "valibot": "^1.2.0"
3463
3463
  },
3464
- "packageManager": "pnpm@10.28.2",
3464
+ "packageManager": "pnpm@10.33.3",
3465
3465
  "engines": {
3466
3466
  "node": ">=18.0.0",
3467
3467
  "pnpm": ">=9.0.0"