@opensite/ui 1.3.0 → 1.3.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.
@@ -935,59 +935,124 @@ var Section = React__default.forwardRef(
935
935
  );
936
936
  Section.displayName = "Section";
937
937
  function FeaturePatternGridLinks({
938
+ title,
939
+ description,
940
+ titleClassName,
941
+ descriptionClassName,
942
+ headerClassName,
938
943
  features,
939
944
  featuresSlot,
940
945
  className,
941
- containerClassName,
946
+ spacing = "py-12 md:py-32",
947
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
942
948
  gridClassName,
943
949
  cardClassName,
944
950
  background,
945
- spacing,
946
951
  pattern,
947
952
  patternOpacity,
948
953
  patternClassName
949
954
  }) {
950
- const renderFeatureIcon = useCallback((feature) => {
951
- if (feature.icon) return feature.icon;
952
- if (feature.iconName) return /* @__PURE__ */ jsx(DynamicIcon, { name: feature.iconName, size: 24, className: feature.iconClassName });
953
- return null;
954
- }, []);
955
- const renderFeatureLink = useCallback((feature) => {
956
- if (feature.linkSlot) return feature.linkSlot;
957
- if (!feature.link && !feature.linkLabel) return null;
958
- const label = feature.linkLabel || (feature.link ? "Learn more" : null);
959
- if (!label) return null;
960
- return /* @__PURE__ */ jsxs(
961
- Pressable,
962
- {
963
- href: feature.link,
964
- className: cn("flex items-center gap-2 text-sm font-medium", feature.linkClassName),
965
- children: [
966
- label,
967
- /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
968
- ]
969
- }
970
- );
971
- }, []);
955
+ const renderFeatureIcon = useCallback(
956
+ (feature) => {
957
+ if (feature.icon) return feature.icon;
958
+ if (feature.iconName)
959
+ return /* @__PURE__ */ jsx(
960
+ DynamicIcon,
961
+ {
962
+ name: feature.iconName,
963
+ size: 24,
964
+ className: feature.iconClassName
965
+ }
966
+ );
967
+ return null;
968
+ },
969
+ []
970
+ );
971
+ const renderFeatureLink = useCallback(
972
+ (feature) => {
973
+ if (feature.linkSlot) return feature.linkSlot;
974
+ if (!feature.link && !feature.linkLabel) return null;
975
+ const label = feature.linkLabel || (feature.link ? "Learn more" : null);
976
+ if (!label) return null;
977
+ return /* @__PURE__ */ jsxs(
978
+ Pressable,
979
+ {
980
+ href: feature.link,
981
+ className: cn(
982
+ "flex items-center gap-2 text-sm font-medium",
983
+ feature.linkClassName
984
+ ),
985
+ children: [
986
+ label,
987
+ /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
988
+ ]
989
+ }
990
+ );
991
+ },
992
+ []
993
+ );
972
994
  const featuresContent = useMemo(() => {
973
995
  if (featuresSlot) return featuresSlot;
974
996
  if (!features || features.length === 0) return null;
975
997
  return features.map((feature, index) => /* @__PURE__ */ jsxs(
976
998
  "div",
977
999
  {
978
- className: cn("flex flex-col gap-10 rounded-lg border p-8", cardClassName, feature.className),
1000
+ className: cn(
1001
+ "flex flex-col gap-10 rounded-lg border p-8",
1002
+ cardClassName,
1003
+ feature.className
1004
+ ),
979
1005
  children: [
980
1006
  /* @__PURE__ */ jsxs("div", { children: [
981
1007
  renderFeatureIcon(feature),
982
- feature.title && (typeof feature.title === "string" ? /* @__PURE__ */ jsx("h3", { className: cn("mt-6 mb-2 font-medium", feature.titleClassName), children: feature.title }) : /* @__PURE__ */ jsx("div", { className: cn("mt-6 mb-2 font-medium", feature.titleClassName), children: feature.title })),
983
- feature.description && (typeof feature.description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-sm", getTextColor(background, "muted"), feature.descriptionClassName), children: feature.description }) : /* @__PURE__ */ jsx("div", { className: cn("text-sm", getTextColor(background, "muted"), feature.descriptionClassName), children: feature.description }))
1008
+ feature.title && (typeof feature.title === "string" ? /* @__PURE__ */ jsx(
1009
+ "h3",
1010
+ {
1011
+ className: cn("mt-6 mb-2 font-medium", feature.titleClassName),
1012
+ children: feature.title
1013
+ }
1014
+ ) : /* @__PURE__ */ jsx(
1015
+ "div",
1016
+ {
1017
+ className: cn("mt-6 mb-2 font-medium", feature.titleClassName),
1018
+ children: feature.title
1019
+ }
1020
+ )),
1021
+ feature.description && (typeof feature.description === "string" ? /* @__PURE__ */ jsx(
1022
+ "p",
1023
+ {
1024
+ className: cn(
1025
+ "text-sm",
1026
+ getTextColor(background, "muted"),
1027
+ feature.descriptionClassName
1028
+ ),
1029
+ children: feature.description
1030
+ }
1031
+ ) : /* @__PURE__ */ jsx(
1032
+ "div",
1033
+ {
1034
+ className: cn(
1035
+ "text-sm",
1036
+ getTextColor(background, "muted"),
1037
+ feature.descriptionClassName
1038
+ ),
1039
+ children: feature.description
1040
+ }
1041
+ ))
984
1042
  ] }),
985
1043
  renderFeatureLink(feature)
986
1044
  ]
987
1045
  },
988
1046
  index
989
1047
  ));
990
- }, [featuresSlot, features, cardClassName, renderFeatureIcon, renderFeatureLink, background]);
1048
+ }, [
1049
+ featuresSlot,
1050
+ features,
1051
+ cardClassName,
1052
+ renderFeatureIcon,
1053
+ renderFeatureLink,
1054
+ background
1055
+ ]);
991
1056
  return /* @__PURE__ */ jsx(
992
1057
  Section,
993
1058
  {
@@ -998,7 +1063,55 @@ function FeaturePatternGridLinks({
998
1063
  patternClassName,
999
1064
  className,
1000
1065
  containerClassName,
1001
- children: /* @__PURE__ */ jsx("div", { className: cn("grid gap-6 md:grid-cols-2 lg:grid-cols-3", gridClassName), children: featuresContent })
1066
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-6 md:space-y-16", children: [
1067
+ title || description ? /* @__PURE__ */ jsxs(
1068
+ "div",
1069
+ {
1070
+ className: cn(
1071
+ "flex flex-col gap-4 md:gap-6 text-left",
1072
+ headerClassName
1073
+ ),
1074
+ children: [
1075
+ title && (typeof title === "string" ? /* @__PURE__ */ jsx(
1076
+ "h2",
1077
+ {
1078
+ className: cn(
1079
+ "text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
1080
+ titleClassName
1081
+ ),
1082
+ children: title
1083
+ }
1084
+ ) : /* @__PURE__ */ jsx(
1085
+ "div",
1086
+ {
1087
+ className: cn(
1088
+ "text-xl font-semibold text-balance md:text-2xl lg:text-3xl max-w-lg md:max-w-md",
1089
+ titleClassName
1090
+ ),
1091
+ children: title
1092
+ }
1093
+ )),
1094
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("max-w-lg md:max-w-md", descriptionClassName), children: description }) : /* @__PURE__ */ jsx(
1095
+ "div",
1096
+ {
1097
+ className: cn("max-w-lg md:max-w-md", descriptionClassName),
1098
+ children: description
1099
+ }
1100
+ ))
1101
+ ]
1102
+ }
1103
+ ) : null,
1104
+ /* @__PURE__ */ jsx(
1105
+ "div",
1106
+ {
1107
+ className: cn(
1108
+ "grid gap-6 md:grid-cols-2 lg:grid-cols-3",
1109
+ gridClassName
1110
+ ),
1111
+ children: featuresContent
1112
+ }
1113
+ )
1114
+ ] })
1002
1115
  }
1003
1116
  );
1004
1117
  }
@@ -935,13 +935,13 @@ function FeatureThreeColumnValues({
935
935
  values,
936
936
  valuesSlot,
937
937
  className,
938
- containerClassName,
938
+ containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
939
939
  labelClassName,
940
940
  titleClassName,
941
941
  gridClassName,
942
942
  cardClassName,
943
943
  background,
944
- spacing = "py-6 md:py-32",
944
+ spacing = "py-12 md:py-32",
945
945
  pattern,
946
946
  patternOpacity,
947
947
  patternClassName
@@ -914,13 +914,13 @@ function FeatureThreeColumnValues({
914
914
  values,
915
915
  valuesSlot,
916
916
  className,
917
- containerClassName,
917
+ containerClassName = "px-6 sm:px-6 md:px-6 lg:px-8",
918
918
  labelClassName,
919
919
  titleClassName,
920
920
  gridClassName,
921
921
  cardClassName,
922
922
  background,
923
- spacing = "py-6 md:py-32",
923
+ spacing = "py-12 md:py-32",
924
924
  pattern,
925
925
  patternOpacity,
926
926
  patternClassName
@@ -997,7 +997,14 @@ function FeatureUtilityCardsGrid({
997
997
  const renderLabelIcon = React.useMemo(() => {
998
998
  if (labelIcon) return labelIcon;
999
999
  if (labelIconName)
1000
- return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: labelIconName, size: 20, className: getAccentColor(background) });
1000
+ return /* @__PURE__ */ jsxRuntime.jsx(
1001
+ DynamicIcon,
1002
+ {
1003
+ name: labelIconName,
1004
+ size: 20,
1005
+ className: getAccentColor(background)
1006
+ }
1007
+ );
1001
1008
  return null;
1002
1009
  }, [labelIcon, labelIconName, background]);
1003
1010
  const learnMoreContent = React.useMemo(() => {
@@ -1094,10 +1101,19 @@ function FeatureUtilityCardsGrid({
1094
1101
  headerClassName
1095
1102
  ),
1096
1103
  children: [
1097
- (label || labelIcon || labelIconName) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-1 ", labelClassName), children: [
1098
- renderLabelIcon,
1099
- label && (typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: label }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: label }))
1100
- ] }),
1104
+ (label || labelIcon || labelIconName) && /* @__PURE__ */ jsxRuntime.jsxs(
1105
+ "div",
1106
+ {
1107
+ className: cn(
1108
+ "text-lg flex items-center gap-4",
1109
+ labelClassName
1110
+ ),
1111
+ children: [
1112
+ renderLabelIcon,
1113
+ label && (typeof label === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { children: label }) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: label }))
1114
+ ]
1115
+ }
1116
+ ),
1101
1117
  learnMoreContent
1102
1118
  ]
1103
1119
  }
@@ -975,7 +975,14 @@ function FeatureUtilityCardsGrid({
975
975
  const renderLabelIcon = useMemo(() => {
976
976
  if (labelIcon) return labelIcon;
977
977
  if (labelIconName)
978
- return /* @__PURE__ */ jsx(DynamicIcon, { name: labelIconName, size: 20, className: getAccentColor(background) });
978
+ return /* @__PURE__ */ jsx(
979
+ DynamicIcon,
980
+ {
981
+ name: labelIconName,
982
+ size: 20,
983
+ className: getAccentColor(background)
984
+ }
985
+ );
979
986
  return null;
980
987
  }, [labelIcon, labelIconName, background]);
981
988
  const learnMoreContent = useMemo(() => {
@@ -1072,10 +1079,19 @@ function FeatureUtilityCardsGrid({
1072
1079
  headerClassName
1073
1080
  ),
1074
1081
  children: [
1075
- (label || labelIcon || labelIconName) && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1 ", labelClassName), children: [
1076
- renderLabelIcon,
1077
- label && (typeof label === "string" ? /* @__PURE__ */ jsx("p", { children: label }) : /* @__PURE__ */ jsx("div", { children: label }))
1078
- ] }),
1082
+ (label || labelIcon || labelIconName) && /* @__PURE__ */ jsxs(
1083
+ "div",
1084
+ {
1085
+ className: cn(
1086
+ "text-lg flex items-center gap-4",
1087
+ labelClassName
1088
+ ),
1089
+ children: [
1090
+ renderLabelIcon,
1091
+ label && (typeof label === "string" ? /* @__PURE__ */ jsx("p", { children: label }) : /* @__PURE__ */ jsx("div", { children: label }))
1092
+ ]
1093
+ }
1094
+ ),
1079
1095
  learnMoreContent
1080
1096
  ]
1081
1097
  }