@opensite/ui 2.1.9 → 2.2.1

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.
@@ -831,6 +831,70 @@ var Section = React__namespace.default.forwardRef(
831
831
  }
832
832
  );
833
833
  Section.displayName = "Section";
834
+ var MOBILE_CLASSES = {
835
+ "fit-left": "items-start md:items-center",
836
+ "fit-center": "items-center",
837
+ "fit-right": "items-end md:items-center",
838
+ "full-left": "items-stretch md:items-center",
839
+ "full-center": "items-stretch md:items-center",
840
+ "full-right": "items-stretch md:items-center"
841
+ };
842
+ function BlockActions({
843
+ mobileConfig,
844
+ actionsClassName,
845
+ verticalSpacing = "mt-4 md:mt-8",
846
+ actions,
847
+ actionsSlot
848
+ }) {
849
+ const width = mobileConfig?.width ?? "full";
850
+ const position = mobileConfig?.position ?? "center";
851
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
852
+ if (actionsSlot) {
853
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { children: actionsSlot });
854
+ } else if (actions && actions?.length > 0) {
855
+ return /* @__PURE__ */ jsxRuntime.jsx(
856
+ "div",
857
+ {
858
+ className: cn(
859
+ "flex flex-col md:flex-row flex-wrap gap-4",
860
+ mobileLayoutClass,
861
+ actionsClassName,
862
+ verticalSpacing
863
+ ),
864
+ children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx(ActionComponent, { action }, index))
865
+ }
866
+ );
867
+ } else {
868
+ return null;
869
+ }
870
+ }
871
+ function ActionComponent({ action }) {
872
+ const {
873
+ label,
874
+ icon,
875
+ iconAfter,
876
+ children,
877
+ href,
878
+ onClick,
879
+ className: actionClassName,
880
+ ...pressableProps
881
+ } = action;
882
+ return /* @__PURE__ */ jsxRuntime.jsx(
883
+ Pressable,
884
+ {
885
+ href,
886
+ onClick,
887
+ asButton: action.asButton ?? true,
888
+ className: actionClassName,
889
+ ...pressableProps,
890
+ children: children ?? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
891
+ icon,
892
+ label,
893
+ iconAfter
894
+ ] })
895
+ }
896
+ );
897
+ }
834
898
  function AboutNetworkSpotlight({
835
899
  eyebrow,
836
900
  heading,
@@ -843,6 +907,7 @@ function AboutNetworkSpotlight({
843
907
  spotlightCard,
844
908
  spotlightCardSlot,
845
909
  className,
910
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
846
911
  contentClassName,
847
912
  eyebrowClassName,
848
913
  headingClassName,
@@ -852,7 +917,7 @@ function AboutNetworkSpotlight({
852
917
  imageClassName,
853
918
  spotlightCardClassName,
854
919
  background,
855
- spacing,
920
+ spacing = "py-32 md:py-32",
856
921
  pattern,
857
922
  patternOpacity,
858
923
  optixFlowConfig
@@ -873,7 +938,7 @@ function AboutNetworkSpotlight({
873
938
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: item })
874
939
  ] }, index)) });
875
940
  }, [highlightsSlot, highlights, highlightsClassName]);
876
- const actionsContent = React.useMemo(() => {
941
+ React.useMemo(() => {
877
942
  if (actionsSlot) return actionsSlot;
878
943
  if (!actions || actions.length === 0) return null;
879
944
  return actions.map((action, index) => {
@@ -937,9 +1002,10 @@ function AboutNetworkSpotlight({
937
1002
  {
938
1003
  background,
939
1004
  spacing,
940
- className: cn(className),
941
1005
  pattern,
942
1006
  patternOpacity,
1007
+ className,
1008
+ containerClassName,
943
1009
  children: /* @__PURE__ */ jsxRuntime.jsxs(
944
1010
  "div",
945
1011
  {
@@ -955,7 +1021,7 @@ function AboutNetworkSpotlight({
955
1021
  whileInView: { opacity: 1, x: 0 },
956
1022
  viewport: { once: true, margin: "-50px" },
957
1023
  transition: { duration: 0.5 },
958
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden rounded-3xl border border-white/10 shadow-2xl", children: [
1024
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative overflow-hidden rounded-3xl border border-white/10 shadow-2xl aspect-square md:aspect-auto", children: [
959
1025
  /* @__PURE__ */ jsxRuntime.jsx(
960
1026
  img.Img,
961
1027
  {
@@ -966,7 +1032,7 @@ function AboutNetworkSpotlight({
966
1032
  }
967
1033
  ),
968
1034
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-linear-to-tr from-black/70 via-transparent to-transparent" }),
969
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-6 left-6 right-6", children: spotlightCardContent })
1035
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-2 md:bottom-6 left-2 md:left-6 right-2 md:right-6", children: spotlightCardContent })
970
1036
  ] })
971
1037
  }
972
1038
  ),
@@ -987,29 +1053,33 @@ function AboutNetworkSpotlight({
987
1053
  ),
988
1054
  children: eyebrow
989
1055
  }
990
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: eyebrowClassName, children: eyebrow })),
1056
+ ) : eyebrow),
991
1057
  heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
992
1058
  "h2",
993
1059
  {
994
1060
  className: cn(
995
- "mt-2 text-3xl font-bold text-background md:text-4xl",
1061
+ "mt-2 text-3xl font-bold md:text-4xl text-pretty",
996
1062
  headingClassName
997
1063
  ),
998
1064
  children: heading
999
1065
  }
1000
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-2", headingClassName), children: heading })),
1066
+ ) : heading),
1001
1067
  description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1002
1068
  "p",
1003
1069
  {
1004
- className: cn(
1005
- "mt-4 text-lg text-background/80",
1006
- descriptionClassName
1007
- ),
1070
+ className: cn("mt-4 text-lg text-pretty", descriptionClassName),
1008
1071
  children: description
1009
1072
  }
1010
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-4", descriptionClassName), children: description })),
1073
+ ) : description),
1011
1074
  (highlightsSlot || highlights && highlights.length > 0) && highlightsContent,
1012
- (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mt-8 flex flex-wrap gap-4", actionsClassName), children: actionsContent })
1075
+ /* @__PURE__ */ jsxRuntime.jsx(
1076
+ BlockActions,
1077
+ {
1078
+ actions,
1079
+ actionsSlot,
1080
+ actionsClassName
1081
+ }
1082
+ )
1013
1083
  ]
1014
1084
  }
1015
1085
  )
@@ -111,11 +111,15 @@ interface AboutNetworkSpotlightProps {
111
111
  * Optional Optix Flow configuration for image optimization
112
112
  */
113
113
  optixFlowConfig?: OptixFlowConfig;
114
+ /**
115
+ * Additional CSS classes for the container
116
+ */
117
+ containerClassName?: string;
114
118
  }
115
119
  /**
116
120
  * AboutNetworkSpotlight - Dark spotlight section with image overlay and CTA.
117
121
  * Ideal for partner programs, network invitations, or alliance highlights.
118
122
  */
119
- declare function AboutNetworkSpotlight({ eyebrow, heading, description, highlights, highlightsSlot, actions, actionsSlot, image, spotlightCard, spotlightCardSlot, className, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, highlightsClassName, actionsClassName, imageClassName, spotlightCardClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: AboutNetworkSpotlightProps): React.JSX.Element;
123
+ declare function AboutNetworkSpotlight({ eyebrow, heading, description, highlights, highlightsSlot, actions, actionsSlot, image, spotlightCard, spotlightCardSlot, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, highlightsClassName, actionsClassName, imageClassName, spotlightCardClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: AboutNetworkSpotlightProps): React.JSX.Element;
120
124
 
121
125
  export { AboutNetworkSpotlight, type AboutNetworkSpotlightProps };
@@ -111,11 +111,15 @@ interface AboutNetworkSpotlightProps {
111
111
  * Optional Optix Flow configuration for image optimization
112
112
  */
113
113
  optixFlowConfig?: OptixFlowConfig;
114
+ /**
115
+ * Additional CSS classes for the container
116
+ */
117
+ containerClassName?: string;
114
118
  }
115
119
  /**
116
120
  * AboutNetworkSpotlight - Dark spotlight section with image overlay and CTA.
117
121
  * Ideal for partner programs, network invitations, or alliance highlights.
118
122
  */
119
- declare function AboutNetworkSpotlight({ eyebrow, heading, description, highlights, highlightsSlot, actions, actionsSlot, image, spotlightCard, spotlightCardSlot, className, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, highlightsClassName, actionsClassName, imageClassName, spotlightCardClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: AboutNetworkSpotlightProps): React.JSX.Element;
123
+ declare function AboutNetworkSpotlight({ eyebrow, heading, description, highlights, highlightsSlot, actions, actionsSlot, image, spotlightCard, spotlightCardSlot, className, containerClassName, contentClassName, eyebrowClassName, headingClassName, descriptionClassName, highlightsClassName, actionsClassName, imageClassName, spotlightCardClassName, background, spacing, pattern, patternOpacity, optixFlowConfig, }: AboutNetworkSpotlightProps): React.JSX.Element;
120
124
 
121
125
  export { AboutNetworkSpotlight, type AboutNetworkSpotlightProps };
@@ -810,6 +810,70 @@ var Section = React__default.forwardRef(
810
810
  }
811
811
  );
812
812
  Section.displayName = "Section";
813
+ var MOBILE_CLASSES = {
814
+ "fit-left": "items-start md:items-center",
815
+ "fit-center": "items-center",
816
+ "fit-right": "items-end md:items-center",
817
+ "full-left": "items-stretch md:items-center",
818
+ "full-center": "items-stretch md:items-center",
819
+ "full-right": "items-stretch md:items-center"
820
+ };
821
+ function BlockActions({
822
+ mobileConfig,
823
+ actionsClassName,
824
+ verticalSpacing = "mt-4 md:mt-8",
825
+ actions,
826
+ actionsSlot
827
+ }) {
828
+ const width = mobileConfig?.width ?? "full";
829
+ const position = mobileConfig?.position ?? "center";
830
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
831
+ if (actionsSlot) {
832
+ return /* @__PURE__ */ jsx("div", { children: actionsSlot });
833
+ } else if (actions && actions?.length > 0) {
834
+ return /* @__PURE__ */ jsx(
835
+ "div",
836
+ {
837
+ className: cn(
838
+ "flex flex-col md:flex-row flex-wrap gap-4",
839
+ mobileLayoutClass,
840
+ actionsClassName,
841
+ verticalSpacing
842
+ ),
843
+ children: actions.map((action, index) => /* @__PURE__ */ jsx(ActionComponent, { action }, index))
844
+ }
845
+ );
846
+ } else {
847
+ return null;
848
+ }
849
+ }
850
+ function ActionComponent({ action }) {
851
+ const {
852
+ label,
853
+ icon,
854
+ iconAfter,
855
+ children,
856
+ href,
857
+ onClick,
858
+ className: actionClassName,
859
+ ...pressableProps
860
+ } = action;
861
+ return /* @__PURE__ */ jsx(
862
+ Pressable,
863
+ {
864
+ href,
865
+ onClick,
866
+ asButton: action.asButton ?? true,
867
+ className: actionClassName,
868
+ ...pressableProps,
869
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
870
+ icon,
871
+ label,
872
+ iconAfter
873
+ ] })
874
+ }
875
+ );
876
+ }
813
877
  function AboutNetworkSpotlight({
814
878
  eyebrow,
815
879
  heading,
@@ -822,6 +886,7 @@ function AboutNetworkSpotlight({
822
886
  spotlightCard,
823
887
  spotlightCardSlot,
824
888
  className,
889
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
825
890
  contentClassName,
826
891
  eyebrowClassName,
827
892
  headingClassName,
@@ -831,7 +896,7 @@ function AboutNetworkSpotlight({
831
896
  imageClassName,
832
897
  spotlightCardClassName,
833
898
  background,
834
- spacing,
899
+ spacing = "py-32 md:py-32",
835
900
  pattern,
836
901
  patternOpacity,
837
902
  optixFlowConfig
@@ -852,7 +917,7 @@ function AboutNetworkSpotlight({
852
917
  /* @__PURE__ */ jsx("span", { children: item })
853
918
  ] }, index)) });
854
919
  }, [highlightsSlot, highlights, highlightsClassName]);
855
- const actionsContent = useMemo(() => {
920
+ useMemo(() => {
856
921
  if (actionsSlot) return actionsSlot;
857
922
  if (!actions || actions.length === 0) return null;
858
923
  return actions.map((action, index) => {
@@ -916,9 +981,10 @@ function AboutNetworkSpotlight({
916
981
  {
917
982
  background,
918
983
  spacing,
919
- className: cn(className),
920
984
  pattern,
921
985
  patternOpacity,
986
+ className,
987
+ containerClassName,
922
988
  children: /* @__PURE__ */ jsxs(
923
989
  "div",
924
990
  {
@@ -934,7 +1000,7 @@ function AboutNetworkSpotlight({
934
1000
  whileInView: { opacity: 1, x: 0 },
935
1001
  viewport: { once: true, margin: "-50px" },
936
1002
  transition: { duration: 0.5 },
937
- children: /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-3xl border border-white/10 shadow-2xl", children: [
1003
+ children: /* @__PURE__ */ jsxs("div", { className: "relative overflow-hidden rounded-3xl border border-white/10 shadow-2xl aspect-square md:aspect-auto", children: [
938
1004
  /* @__PURE__ */ jsx(
939
1005
  Img,
940
1006
  {
@@ -945,7 +1011,7 @@ function AboutNetworkSpotlight({
945
1011
  }
946
1012
  ),
947
1013
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-linear-to-tr from-black/70 via-transparent to-transparent" }),
948
- /* @__PURE__ */ jsx("div", { className: "absolute bottom-6 left-6 right-6", children: spotlightCardContent })
1014
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-2 md:bottom-6 left-2 md:left-6 right-2 md:right-6", children: spotlightCardContent })
949
1015
  ] })
950
1016
  }
951
1017
  ),
@@ -966,29 +1032,33 @@ function AboutNetworkSpotlight({
966
1032
  ),
967
1033
  children: eyebrow
968
1034
  }
969
- ) : /* @__PURE__ */ jsx("div", { className: eyebrowClassName, children: eyebrow })),
1035
+ ) : eyebrow),
970
1036
  heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
971
1037
  "h2",
972
1038
  {
973
1039
  className: cn(
974
- "mt-2 text-3xl font-bold text-background md:text-4xl",
1040
+ "mt-2 text-3xl font-bold md:text-4xl text-pretty",
975
1041
  headingClassName
976
1042
  ),
977
1043
  children: heading
978
1044
  }
979
- ) : /* @__PURE__ */ jsx("div", { className: cn("mt-2", headingClassName), children: heading })),
1045
+ ) : heading),
980
1046
  description && (typeof description === "string" ? /* @__PURE__ */ jsx(
981
1047
  "p",
982
1048
  {
983
- className: cn(
984
- "mt-4 text-lg text-background/80",
985
- descriptionClassName
986
- ),
1049
+ className: cn("mt-4 text-lg text-pretty", descriptionClassName),
987
1050
  children: description
988
1051
  }
989
- ) : /* @__PURE__ */ jsx("div", { className: cn("mt-4", descriptionClassName), children: description })),
1052
+ ) : description),
990
1053
  (highlightsSlot || highlights && highlights.length > 0) && highlightsContent,
991
- (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("mt-8 flex flex-wrap gap-4", actionsClassName), children: actionsContent })
1054
+ /* @__PURE__ */ jsx(
1055
+ BlockActions,
1056
+ {
1057
+ actions,
1058
+ actionsSlot,
1059
+ actionsClassName
1060
+ }
1061
+ )
992
1062
  ]
993
1063
  }
994
1064
  )