@opensite/ui 1.4.0 → 1.4.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.
Files changed (51) hide show
  1. package/dist/components.cjs +90 -90
  2. package/dist/components.js +90 -90
  3. package/dist/feature-bento-image-grid.cjs +219 -114
  4. package/dist/feature-bento-image-grid.js +219 -114
  5. package/dist/feature-icon-grid-bordered.cjs +1 -1
  6. package/dist/feature-icon-grid-bordered.js +1 -1
  7. package/dist/footer-accordion-social.cjs +6 -6
  8. package/dist/footer-accordion-social.js +6 -6
  9. package/dist/footer-animated-social.cjs +7 -7
  10. package/dist/footer-animated-social.js +7 -7
  11. package/dist/footer-background-card.cjs +13 -13
  12. package/dist/footer-background-card.js +13 -13
  13. package/dist/footer-brand-description.cjs +12 -10
  14. package/dist/footer-brand-description.d.cts +5 -1
  15. package/dist/footer-brand-description.d.ts +5 -1
  16. package/dist/footer-brand-description.js +12 -10
  17. package/dist/footer-brand-links-contact.cjs +9 -9
  18. package/dist/footer-brand-links-contact.js +9 -9
  19. package/dist/footer-comprehensive-links.cjs +1 -1
  20. package/dist/footer-comprehensive-links.js +1 -1
  21. package/dist/footer-contact-card.cjs +7 -39
  22. package/dist/footer-contact-card.js +7 -39
  23. package/dist/footer-cta-banner.cjs +10 -10
  24. package/dist/footer-cta-banner.js +10 -10
  25. package/dist/footer-cta-social.cjs +7 -7
  26. package/dist/footer-cta-social.js +7 -7
  27. package/dist/footer-info-cards-accordion.cjs +9 -9
  28. package/dist/footer-info-cards-accordion.js +9 -9
  29. package/dist/footer-links-grid.cjs +1 -1
  30. package/dist/footer-links-grid.js +1 -1
  31. package/dist/footer-nav-social.cjs +8 -8
  32. package/dist/footer-nav-social.js +8 -8
  33. package/dist/footer-newsletter-contact.cjs +5 -5
  34. package/dist/footer-newsletter-contact.js +5 -5
  35. package/dist/footer-newsletter-grid.cjs +9 -9
  36. package/dist/footer-newsletter-grid.js +9 -9
  37. package/dist/footer-newsletter-minimal.cjs +6 -6
  38. package/dist/footer-newsletter-minimal.js +6 -6
  39. package/dist/footer-simple-centered.cjs +6 -6
  40. package/dist/footer-simple-centered.js +6 -6
  41. package/dist/footer-social-apps.cjs +2 -2
  42. package/dist/footer-social-apps.js +2 -2
  43. package/dist/footer-social-newsletter.cjs +2 -2
  44. package/dist/footer-social-newsletter.js +2 -2
  45. package/dist/footer-split-image-accordion.cjs +6 -6
  46. package/dist/footer-split-image-accordion.js +6 -6
  47. package/dist/index.cjs +90 -90
  48. package/dist/index.js +90 -90
  49. package/dist/registry.cjs +346 -215
  50. package/dist/registry.js +346 -215
  51. package/package.json +1 -1
@@ -32,32 +32,6 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
32
  function cn(...inputs) {
33
33
  return tailwindMerge.twMerge(clsx.clsx(inputs));
34
34
  }
35
- function getTextColor(parentBg, variant = "default", options) {
36
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
37
- if (isDark) {
38
- switch (variant) {
39
- case "default":
40
- return "text-foreground";
41
- case "muted":
42
- return "text-foreground/80";
43
- case "subtle":
44
- return "text-foreground/60";
45
- case "accent":
46
- return "text-accent-foreground";
47
- }
48
- } else {
49
- switch (variant) {
50
- case "default":
51
- return "text-foreground";
52
- case "muted":
53
- return "text-muted-foreground";
54
- case "subtle":
55
- return "text-muted-foreground/70";
56
- case "accent":
57
- return "text-primary";
58
- }
59
- }
60
- }
61
35
  var svgCache = /* @__PURE__ */ new Map();
62
36
  function DynamicIcon({
63
37
  name,
@@ -975,87 +949,203 @@ function FeatureBentoImageGrid({
975
949
  patternOpacity,
976
950
  patternClassName
977
951
  }) {
978
- const renderItemIcon = React__namespace.useCallback((item) => {
979
- if (item.icon) return item.icon;
980
- if (item.iconName) return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 24 });
981
- return null;
982
- }, []);
983
- const renderItemImage = React__namespace.useCallback((item, imageClassName) => {
984
- if (item.imageSlot) return item.imageSlot;
985
- if (item.imageSrc) {
986
- return /* @__PURE__ */ jsxRuntime.jsx(
987
- img.Img,
988
- {
989
- src: item.imageSrc,
990
- alt: item.imageAlt || (typeof item.title === "string" ? item.title : "Feature image"),
991
- className: cn(imageClassName, item.imageClassName),
992
- loading: "lazy",
993
- optixFlowConfig
994
- }
995
- );
996
- }
997
- return null;
998
- }, [optixFlowConfig]);
999
- const renderLargeCard = React__namespace.useCallback((item) => {
1000
- const iconContent = renderItemIcon(item);
1001
- const hasIconBadgeContent = iconContent || item.iconBadge;
1002
- const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1003
- renderItemImage(item, "h-full max-h-[580px] w-full rounded-xl object-cover object-center"),
1004
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-20 rounded-xl bg-linear-to-t from-primary to-transparent transition-transform duration-300 group-hover:translate-y-0" }),
1005
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-7", children: [
1006
- hasIconBadgeContent && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("ml-auto flex w-fit items-center gap-1 p-2.5 text-sm font-semibold text-background", item.iconBadgeClassName), children: [
1007
- iconContent,
1008
- item.iconBadge
1009
- ] }),
1010
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 text-background", children: [
1011
- item.title && (typeof item.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn("text-2xl font-semibold lg:text-3xl", item.titleClassName), children: item.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-2xl font-semibold lg:text-3xl", item.titleClassName), children: item.title })),
1012
- item.linkText && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("flex items-center gap-1 font-medium", item.linkTextClassName), children: [
1013
- item.linkText,
1014
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
952
+ const renderItemIcon = React__namespace.useCallback(
953
+ (item) => {
954
+ if (item.icon) return item.icon;
955
+ if (item.iconName) return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: item.iconName, size: 24 });
956
+ return null;
957
+ },
958
+ []
959
+ );
960
+ const renderItemImage = React__namespace.useCallback(
961
+ (item, imageClassName) => {
962
+ if (item.imageSlot) return item.imageSlot;
963
+ if (item.imageSrc) {
964
+ return /* @__PURE__ */ jsxRuntime.jsx(
965
+ img.Img,
966
+ {
967
+ src: item.imageSrc,
968
+ alt: item.imageAlt || (typeof item.title === "string" ? item.title : "Feature image"),
969
+ className: cn(imageClassName, item.imageClassName),
970
+ loading: "lazy",
971
+ optixFlowConfig
972
+ }
973
+ );
974
+ }
975
+ return null;
976
+ },
977
+ [optixFlowConfig]
978
+ );
979
+ const renderLargeCard = React__namespace.useCallback(
980
+ (item) => {
981
+ const iconContent = renderItemIcon(item);
982
+ const hasIconBadgeContent = iconContent || item.iconBadge;
983
+ const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
984
+ renderItemImage(
985
+ item,
986
+ "h-full max-h-[580px] w-full rounded-xl object-cover object-center"
987
+ ),
988
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-10 rounded-xl bg-linear-to-t from-black to-transparent transition-transform duration-300 group-hover:translate-y-0" }),
989
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between px-5 md:px-8 py-6 md:py-6", children: [
990
+ hasIconBadgeContent && /* @__PURE__ */ jsxRuntime.jsxs(
991
+ "span",
992
+ {
993
+ className: cn(
994
+ "ml-auto flex w-fit items-center gap-2 p-0 text-sm font-semibold text-white",
995
+ item.iconBadgeClassName
996
+ ),
997
+ children: [
998
+ iconContent,
999
+ item.iconBadge
1000
+ ]
1001
+ }
1002
+ ),
1003
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 md:gap-5 text-white", children: [
1004
+ item.title && (typeof item.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1005
+ "h4",
1006
+ {
1007
+ className: cn(
1008
+ "text-2xl font-medium lg:text-3xl",
1009
+ item.titleClassName
1010
+ ),
1011
+ children: item.title
1012
+ }
1013
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1014
+ "div",
1015
+ {
1016
+ className: cn(
1017
+ "text-2xl font-medium lg:text-3xl",
1018
+ item.titleClassName
1019
+ ),
1020
+ children: item.title
1021
+ }
1022
+ )),
1023
+ item.linkText && /* @__PURE__ */ jsxRuntime.jsxs(
1024
+ "p",
1025
+ {
1026
+ className: cn(
1027
+ "flex items-center gap-1 font-bold text-sm uppercase",
1028
+ item.linkTextClassName
1029
+ ),
1030
+ children: [
1031
+ item.linkText,
1032
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
1033
+ ]
1034
+ }
1035
+ )
1015
1036
  ] })
1016
1037
  ] })
1017
- ] })
1018
- ] });
1019
- if (item.link) {
1038
+ ] });
1039
+ if (item.link) {
1040
+ return /* @__PURE__ */ jsxRuntime.jsx(
1041
+ Pressable,
1042
+ {
1043
+ href: item.link,
1044
+ className: cn(
1045
+ "group relative col-span-2 row-span-3 overflow-hidden rounded-xl",
1046
+ largeCardClassName,
1047
+ item.className
1048
+ ),
1049
+ children: cardContent
1050
+ }
1051
+ );
1052
+ }
1020
1053
  return /* @__PURE__ */ jsxRuntime.jsx(
1021
- Pressable,
1054
+ "div",
1022
1055
  {
1023
- href: item.link,
1024
- className: cn("group relative col-span-2 row-span-3 overflow-hidden rounded-xl", largeCardClassName, item.className),
1056
+ className: cn(
1057
+ "group relative col-span-2 row-span-3 overflow-hidden rounded-xl",
1058
+ largeCardClassName,
1059
+ item.className
1060
+ ),
1025
1061
  children: cardContent
1026
1062
  }
1027
1063
  );
1028
- }
1029
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("group relative col-span-2 row-span-3 overflow-hidden rounded-xl", largeCardClassName, item.className), children: cardContent });
1030
- }, [largeCardClassName, renderItemImage, renderItemIcon]);
1031
- const renderSmallCard = React__namespace.useCallback((item, index) => {
1032
- const iconContent = renderItemIcon(item);
1033
- const hasIconBadgeContent = iconContent || item.iconBadge;
1034
- const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1035
- renderItemImage(item, cn(
1036
- "h-full w-full rounded-xl object-cover object-center",
1037
- index === 0 ? "max-h-44" : "max-h-96"
1038
- )),
1039
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-10 rounded-xl bg-linear-to-t from-primary to-transparent opacity-80 transition-transform duration-300 group-hover:translate-y-0" }),
1040
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-7", children: [
1041
- hasIconBadgeContent && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("ml-auto flex w-fit items-center gap-1 p-2.5 text-sm font-semibold text-background", item.iconBadgeClassName), children: [
1042
- iconContent,
1043
- item.iconBadge
1044
- ] }),
1045
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 text-background", children: [
1046
- item.title && (typeof item.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn("text-2xl font-semibold lg:text-3xl", item.titleClassName), children: item.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-2xl font-semibold lg:text-3xl", item.titleClassName), children: item.title })),
1047
- item.linkText && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn("flex items-center gap-1 font-medium", item.linkTextClassName), children: [
1048
- item.linkText,
1049
- /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
1064
+ },
1065
+ [largeCardClassName, renderItemImage, renderItemIcon]
1066
+ );
1067
+ const renderSmallCard = React__namespace.useCallback(
1068
+ (item, index) => {
1069
+ const iconContent = renderItemIcon(item);
1070
+ const hasIconBadgeContent = iconContent || item.iconBadge;
1071
+ const cardContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1072
+ renderItemImage(
1073
+ item,
1074
+ cn(
1075
+ "h-full w-full rounded-xl object-cover object-center",
1076
+ index === 0 ? "max-h-44" : "max-h-96"
1077
+ )
1078
+ ),
1079
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-0 right-0 bottom-0 left-0 translate-y-10 rounded-xl bg-linear-to-t from-black to-transparent opacity-80 transition-transform duration-300 group-hover:translate-y-0" }),
1080
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute top-0 flex h-full w-full flex-col justify-between p-7", children: [
1081
+ hasIconBadgeContent && /* @__PURE__ */ jsxRuntime.jsxs(
1082
+ "span",
1083
+ {
1084
+ className: cn(
1085
+ "ml-auto flex w-fit items-center gap-1 p-2.5 text-sm font-semibold ",
1086
+ item.iconBadgeClassName
1087
+ ),
1088
+ children: [
1089
+ iconContent,
1090
+ item.iconBadge
1091
+ ]
1092
+ }
1093
+ ),
1094
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5 ", children: [
1095
+ item.title && (typeof item.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1096
+ "h4",
1097
+ {
1098
+ className: cn(
1099
+ "text-2xl font-semibold lg:text-3xl",
1100
+ item.titleClassName
1101
+ ),
1102
+ children: item.title
1103
+ }
1104
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1105
+ "div",
1106
+ {
1107
+ className: cn(
1108
+ "text-2xl font-semibold lg:text-3xl",
1109
+ item.titleClassName
1110
+ ),
1111
+ children: item.title
1112
+ }
1113
+ )),
1114
+ item.linkText && /* @__PURE__ */ jsxRuntime.jsxs(
1115
+ "p",
1116
+ {
1117
+ className: cn(
1118
+ "flex items-center gap-1 font-medium",
1119
+ item.linkTextClassName
1120
+ ),
1121
+ children: [
1122
+ item.linkText,
1123
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/chevron-right", size: 16 })
1124
+ ]
1125
+ }
1126
+ )
1050
1127
  ] })
1051
1128
  ] })
1052
- ] })
1053
- ] });
1054
- if (item.link) {
1129
+ ] });
1130
+ if (item.link) {
1131
+ return /* @__PURE__ */ jsxRuntime.jsx(
1132
+ Pressable,
1133
+ {
1134
+ href: item.link,
1135
+ className: cn(
1136
+ "group relative overflow-hidden rounded-xl",
1137
+ index === 1 && "row-span-2",
1138
+ smallCardClassName,
1139
+ item.className
1140
+ ),
1141
+ children: cardContent
1142
+ },
1143
+ index
1144
+ );
1145
+ }
1055
1146
  return /* @__PURE__ */ jsxRuntime.jsx(
1056
- Pressable,
1147
+ "div",
1057
1148
  {
1058
- href: item.link,
1059
1149
  className: cn(
1060
1150
  "group relative overflow-hidden rounded-xl",
1061
1151
  index === 1 && "row-span-2",
@@ -1066,21 +1156,9 @@ function FeatureBentoImageGrid({
1066
1156
  },
1067
1157
  index
1068
1158
  );
1069
- }
1070
- return /* @__PURE__ */ jsxRuntime.jsx(
1071
- "div",
1072
- {
1073
- className: cn(
1074
- "group relative overflow-hidden rounded-xl",
1075
- index === 1 && "row-span-2",
1076
- smallCardClassName,
1077
- item.className
1078
- ),
1079
- children: cardContent
1080
- },
1081
- index
1082
- );
1083
- }, [smallCardClassName, renderItemImage, renderItemIcon]);
1159
+ },
1160
+ [smallCardClassName, renderItemImage, renderItemIcon]
1161
+ );
1084
1162
  const itemsContent = React.useMemo(() => {
1085
1163
  if (itemsSlot) return itemsSlot;
1086
1164
  if (!items || items.length === 0) return null;
@@ -1102,9 +1180,36 @@ function FeatureBentoImageGrid({
1102
1180
  className,
1103
1181
  containerClassName,
1104
1182
  children: [
1105
- title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("mb-4 text-center text-4xl font-semibold", titleClassName), children: title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-4 text-center text-4xl font-semibold", titleClassName), children: title })),
1106
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-center", getTextColor(background, "muted"), descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-center", getTextColor(background, "muted"), descriptionClassName), children: description })),
1107
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-1 gap-y-5 pt-14 xl:grid-cols-3 xl:grid-rows-2 xl:gap-x-5 xl:gap-y-0", gridClassName), children: itemsContent })
1183
+ title && (typeof title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1184
+ "h2",
1185
+ {
1186
+ className: cn(
1187
+ "mb-4 text-center text-4xl font-semibold text-balance",
1188
+ titleClassName
1189
+ ),
1190
+ children: title
1191
+ }
1192
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1193
+ "div",
1194
+ {
1195
+ className: cn(
1196
+ "mb-4 text-center text-4xl font-semibold text-balance",
1197
+ titleClassName
1198
+ ),
1199
+ children: title
1200
+ }
1201
+ )),
1202
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-center text-balance", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-center text-balance", descriptionClassName), children: description })),
1203
+ /* @__PURE__ */ jsxRuntime.jsx(
1204
+ "div",
1205
+ {
1206
+ className: cn(
1207
+ "grid grid-cols-1 gap-y-5 pt-14 xl:grid-cols-3 xl:grid-rows-2 xl:gap-x-5 xl:gap-y-0",
1208
+ gridClassName
1209
+ ),
1210
+ children: itemsContent
1211
+ }
1212
+ )
1108
1213
  ]
1109
1214
  }
1110
1215
  );