@opensite/ui 0.8.4 → 0.8.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.
Files changed (51) hide show
  1. package/dist/article-breadcrumb-social.cjs +57 -73
  2. package/dist/article-breadcrumb-social.d.cts +2 -24
  3. package/dist/article-breadcrumb-social.d.ts +2 -24
  4. package/dist/article-breadcrumb-social.js +57 -73
  5. package/dist/article-compact-toc.cjs +1 -1
  6. package/dist/article-compact-toc.js +1 -1
  7. package/dist/article-sidebar-sticky.cjs +73 -26
  8. package/dist/article-sidebar-sticky.js +73 -26
  9. package/dist/blog-horizontal-timeline.cjs +7 -4
  10. package/dist/blog-horizontal-timeline.js +7 -4
  11. package/dist/faq-split-hero.cjs +704 -0
  12. package/dist/faq-split-hero.d.cts +118 -0
  13. package/dist/faq-split-hero.d.ts +118 -0
  14. package/dist/faq-split-hero.js +682 -0
  15. package/dist/feature-badge-grid-six.cjs +1 -1
  16. package/dist/feature-badge-grid-six.js +1 -1
  17. package/dist/feature-card-grid-linked.cjs +92 -22
  18. package/dist/feature-card-grid-linked.js +92 -22
  19. package/dist/feature-carousel-progress.cjs +1 -1
  20. package/dist/feature-carousel-progress.js +1 -1
  21. package/dist/feature-checklist-image.cjs +88 -15
  22. package/dist/feature-checklist-image.js +88 -15
  23. package/dist/feature-checklist-three-column.cjs +1 -1
  24. package/dist/feature-checklist-three-column.js +1 -1
  25. package/dist/feature-icon-grid-accent.cjs +50 -8
  26. package/dist/feature-icon-grid-accent.js +50 -8
  27. package/dist/feature-icon-grid-bordered.cjs +84 -14
  28. package/dist/feature-icon-grid-bordered.js +84 -14
  29. package/dist/feature-icon-tabs-content.cjs +217 -84
  30. package/dist/feature-icon-tabs-content.js +217 -84
  31. package/dist/feature-image-overlay-badge.cjs +106 -33
  32. package/dist/feature-image-overlay-badge.js +106 -33
  33. package/dist/feature-numbered-cards.cjs +154 -35
  34. package/dist/feature-numbered-cards.js +154 -35
  35. package/dist/feature-showcase.cjs +67 -71
  36. package/dist/feature-showcase.d.cts +1 -5
  37. package/dist/feature-showcase.d.ts +1 -5
  38. package/dist/feature-showcase.js +68 -72
  39. package/dist/feature-split-image-reverse.cjs +90 -15
  40. package/dist/feature-split-image-reverse.js +90 -15
  41. package/dist/feature-split-image.cjs +87 -15
  42. package/dist/feature-split-image.js +87 -15
  43. package/dist/feature-stats-highlight.cjs +2 -2
  44. package/dist/feature-stats-highlight.js +2 -2
  45. package/dist/feature-tabbed-content-image.cjs +207 -72
  46. package/dist/feature-tabbed-content-image.js +207 -72
  47. package/dist/feature-three-column-values.cjs +107 -14
  48. package/dist/feature-three-column-values.js +107 -14
  49. package/dist/registry.cjs +1460 -461
  50. package/dist/registry.js +1460 -461
  51. package/package.json +1 -1
@@ -1042,7 +1042,7 @@ function FeatureIconTabsContent({
1042
1042
  tabContentClassName,
1043
1043
  optixFlowConfig,
1044
1044
  background,
1045
- spacing,
1045
+ spacing = "py-6 md:py-32",
1046
1046
  pattern,
1047
1047
  patternOpacity,
1048
1048
  patternClassName
@@ -1052,12 +1052,28 @@ function FeatureIconTabsContent({
1052
1052
  if (tab.iconName) return /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: tab.iconName, size: 16 });
1053
1053
  return null;
1054
1054
  }, []);
1055
- const renderTabContentActions = React.useCallback((content) => {
1056
- if (content.actionsSlot) return content.actionsSlot;
1057
- if (!content.actions || content.actions.length === 0) return null;
1058
- return content.actions.map((action, index) => {
1059
- if (action.children) {
1060
- return /* @__PURE__ */ jsxRuntime.jsx(
1055
+ const renderTabContentActions = React.useCallback(
1056
+ (content) => {
1057
+ if (content.actionsSlot) return content.actionsSlot;
1058
+ if (!content.actions || content.actions.length === 0) return null;
1059
+ return content.actions.map((action, index) => {
1060
+ if (action.children) {
1061
+ return /* @__PURE__ */ jsxRuntime.jsx(
1062
+ Pressable,
1063
+ {
1064
+ href: action.href,
1065
+ onClick: action.onClick,
1066
+ variant: action.variant,
1067
+ size: action.size,
1068
+ className: cn("mt-2.5 w-fit gap-2", action.className),
1069
+ "aria-label": action["aria-label"],
1070
+ asButton: true,
1071
+ children: action.children
1072
+ },
1073
+ index
1074
+ );
1075
+ }
1076
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1061
1077
  Pressable,
1062
1078
  {
1063
1079
  href: action.href,
@@ -1067,90 +1083,174 @@ function FeatureIconTabsContent({
1067
1083
  className: cn("mt-2.5 w-fit gap-2", action.className),
1068
1084
  "aria-label": action["aria-label"],
1069
1085
  asButton: true,
1070
- children: action.children
1086
+ children: [
1087
+ action.icon,
1088
+ action.label,
1089
+ action.iconAfter
1090
+ ]
1071
1091
  },
1072
1092
  index
1073
1093
  );
1094
+ });
1095
+ },
1096
+ []
1097
+ );
1098
+ const renderTabContentImage = React.useCallback(
1099
+ (content) => {
1100
+ if (content.imageSlot) return content.imageSlot;
1101
+ if (content.imageSrc) {
1102
+ return /* @__PURE__ */ jsxRuntime.jsx(
1103
+ img.Img,
1104
+ {
1105
+ src: content.imageSrc,
1106
+ alt: content.imageAlt || "Tab content image",
1107
+ className: cn(
1108
+ "h-full w-full rounded-xl object-cover",
1109
+ content.imageClassName
1110
+ ),
1111
+ loading: "lazy",
1112
+ optixFlowConfig
1113
+ }
1114
+ );
1074
1115
  }
1075
- return /* @__PURE__ */ jsxRuntime.jsxs(
1076
- Pressable,
1077
- {
1078
- href: action.href,
1079
- onClick: action.onClick,
1080
- variant: action.variant,
1081
- size: action.size,
1082
- className: cn("mt-2.5 w-fit gap-2", action.className),
1083
- "aria-label": action["aria-label"],
1084
- asButton: true,
1085
- children: [
1086
- action.icon,
1087
- action.label,
1088
- action.iconAfter
1089
- ]
1090
- },
1091
- index
1092
- );
1093
- });
1094
- }, []);
1095
- const renderTabContentImage = React.useCallback((content) => {
1096
- if (content.imageSlot) return content.imageSlot;
1097
- if (content.imageSrc) {
1098
- return /* @__PURE__ */ jsxRuntime.jsx(
1099
- img.Img,
1100
- {
1101
- src: content.imageSrc,
1102
- alt: content.imageAlt || "Tab content image",
1103
- className: cn("h-full w-full rounded-xl object-cover", content.imageClassName),
1104
- loading: "lazy",
1105
- optixFlowConfig
1106
- }
1107
- );
1108
- }
1109
- return null;
1110
- }, [optixFlowConfig]);
1116
+ return null;
1117
+ },
1118
+ [optixFlowConfig]
1119
+ );
1111
1120
  const tabsContent = React.useMemo(() => {
1112
1121
  if (tabsSlot) return tabsSlot;
1113
1122
  if (!tabs || tabs.length === 0) return null;
1114
1123
  const activeDefaultTab = defaultTab || tabs[0]?.value;
1115
1124
  return /* @__PURE__ */ jsxRuntime.jsxs(Tabs, { defaultValue: activeDefaultTab, className: "mt-8", children: [
1116
- /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: cn("container flex flex-col items-center justify-center gap-4 bg-transparent sm:flex-row md:gap-10", tabsListClassName), children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
1117
- TabsTrigger,
1125
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "container overflow-x-auto px-4 pb-2 md:px-6", children: /* @__PURE__ */ jsxRuntime.jsx(
1126
+ TabsList,
1118
1127
  {
1119
- value: tab.value,
1120
- className: cn("flex items-center gap-2 rounded-xl px-4 py-3 text-sm font-semibold text-muted-foreground data-[state=active]:bg-muted data-[state=active]:text-primary", tabTriggerClassName, tab.className),
1121
- children: [
1122
- (tab.icon || tab.iconName) && renderTabIcon(tab),
1123
- tab.label
1124
- ]
1125
- },
1126
- tab.value
1127
- )) }),
1128
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mx-auto mt-8 max-w-7xl rounded-2xl bg-muted/70 p-6 lg:p-16", contentWrapperClassName), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: tabs.map((tab) => {
1129
- if (tab.contentSlot) {
1130
- return /* @__PURE__ */ jsxRuntime.jsx(TabsContent, { value: tab.value, className: tabContentClassName, children: tab.contentSlot }, tab.value);
1128
+ className: cn(
1129
+ "inline-flex w-auto min-w-full items-center justify-start gap-2 bg-transparent md:justify-center md:gap-4",
1130
+ tabsListClassName
1131
+ ),
1132
+ children: tabs.map((tab) => /* @__PURE__ */ jsxRuntime.jsxs(
1133
+ TabsTrigger,
1134
+ {
1135
+ value: tab.value,
1136
+ className: cn(
1137
+ "flex shrink-0 items-center gap-2 rounded-lg border border-border bg-background px-4 py-2.5 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground data-[state=active]:border-primary data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",
1138
+ tabTriggerClassName,
1139
+ tab.className
1140
+ ),
1141
+ children: [
1142
+ (tab.icon || tab.iconName) && renderTabIcon(tab),
1143
+ tab.label
1144
+ ]
1145
+ },
1146
+ tab.value
1147
+ ))
1131
1148
  }
1132
- const content = tab.content;
1133
- if (!content) return null;
1134
- return /* @__PURE__ */ jsxRuntime.jsxs(
1135
- TabsContent,
1136
- {
1137
- value: tab.value,
1138
- className: cn("grid place-items-start gap-20 lg:grid-cols-2 lg:gap-10", tabContentClassName, content.className),
1139
- children: [
1140
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
1141
- content.badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: cn("w-fit bg-background", content.badgeClassName), children: content.badge }),
1142
- content.title && (typeof content.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: cn("text-3xl font-semibold lg:text-5xl", content.titleClassName), children: content.title }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-3xl font-semibold lg:text-5xl", content.titleClassName), children: content.title })),
1143
- content.description && (typeof content.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-muted-foreground lg:text-lg", content.descriptionClassName), children: content.description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-muted-foreground lg:text-lg", content.descriptionClassName), children: content.description })),
1144
- (content.actionsSlot || content.actions && content.actions.length > 0) && renderTabContentActions(content)
1145
- ] }),
1146
- (content.imageSlot || content.imageSrc) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-[300px] w-full lg:h-[400px]", children: renderTabContentImage(content) })
1147
- ]
1148
- },
1149
- tab.value
1150
- );
1151
- }) }) })
1149
+ ) }),
1150
+ /* @__PURE__ */ jsxRuntime.jsx(
1151
+ "div",
1152
+ {
1153
+ className: cn(
1154
+ "mx-auto mt-8 max-w-7xl rounded-2xl bg-muted/70 p-6 lg:p-16",
1155
+ contentWrapperClassName
1156
+ ),
1157
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: tabs.map((tab) => {
1158
+ if (tab.contentSlot) {
1159
+ return /* @__PURE__ */ jsxRuntime.jsx(
1160
+ TabsContent,
1161
+ {
1162
+ value: tab.value,
1163
+ className: tabContentClassName,
1164
+ children: tab.contentSlot
1165
+ },
1166
+ tab.value
1167
+ );
1168
+ }
1169
+ const content = tab.content;
1170
+ if (!content) return null;
1171
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1172
+ TabsContent,
1173
+ {
1174
+ value: tab.value,
1175
+ className: cn(
1176
+ "grid place-items-start gap-20 lg:grid-cols-2 lg:gap-10",
1177
+ tabContentClassName,
1178
+ content.className
1179
+ ),
1180
+ children: [
1181
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
1182
+ content.badge && /* @__PURE__ */ jsxRuntime.jsx(
1183
+ Badge,
1184
+ {
1185
+ variant: "outline",
1186
+ className: cn(
1187
+ "w-fit bg-background",
1188
+ content.badgeClassName
1189
+ ),
1190
+ children: content.badge
1191
+ }
1192
+ ),
1193
+ content.title && (typeof content.title === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1194
+ "h3",
1195
+ {
1196
+ className: cn(
1197
+ "text-3xl font-semibold lg:text-5xl",
1198
+ content.titleClassName
1199
+ ),
1200
+ children: content.title
1201
+ }
1202
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1203
+ "div",
1204
+ {
1205
+ className: cn(
1206
+ "text-3xl font-semibold lg:text-5xl",
1207
+ content.titleClassName
1208
+ ),
1209
+ children: content.title
1210
+ }
1211
+ )),
1212
+ content.description && (typeof content.description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1213
+ "p",
1214
+ {
1215
+ className: cn(
1216
+ "text-muted-foreground lg:text-lg",
1217
+ content.descriptionClassName
1218
+ ),
1219
+ children: content.description
1220
+ }
1221
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1222
+ "div",
1223
+ {
1224
+ className: cn(
1225
+ "text-muted-foreground lg:text-lg",
1226
+ content.descriptionClassName
1227
+ ),
1228
+ children: content.description
1229
+ }
1230
+ )),
1231
+ (content.actionsSlot || content.actions && content.actions.length > 0) && renderTabContentActions(content)
1232
+ ] }),
1233
+ (content.imageSlot || content.imageSrc) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative h-[300px] w-full lg:h-[400px]", children: renderTabContentImage(content) })
1234
+ ]
1235
+ },
1236
+ tab.value
1237
+ );
1238
+ }) })
1239
+ }
1240
+ )
1152
1241
  ] });
1153
- }, [tabsSlot, tabs, defaultTab, tabsListClassName, tabTriggerClassName, contentWrapperClassName, tabContentClassName, renderTabIcon, renderTabContentActions, renderTabContentImage]);
1242
+ }, [
1243
+ tabsSlot,
1244
+ tabs,
1245
+ defaultTab,
1246
+ tabsListClassName,
1247
+ tabTriggerClassName,
1248
+ contentWrapperClassName,
1249
+ tabContentClassName,
1250
+ renderTabIcon,
1251
+ renderTabContentActions,
1252
+ renderTabContentImage
1253
+ ]);
1154
1254
  return /* @__PURE__ */ jsxRuntime.jsxs(
1155
1255
  Section,
1156
1256
  {
@@ -1162,11 +1262,44 @@ function FeatureIconTabsContent({
1162
1262
  className,
1163
1263
  containerClassName: cn("mx-auto", containerClassName),
1164
1264
  children: [
1165
- (badge || heading || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center gap-4 text-center", headerClassName), children: [
1166
- badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: badgeClassName, children: badge }),
1167
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn("max-w-2xl text-3xl font-semibold md:text-4xl", headingClassName), children: heading }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("max-w-2xl text-3xl font-semibold md:text-4xl", headingClassName), children: heading })),
1168
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-muted-foreground", descriptionClassName), children: description }))
1169
- ] }),
1265
+ (badge || heading || description) && /* @__PURE__ */ jsxRuntime.jsxs(
1266
+ "div",
1267
+ {
1268
+ className: cn(
1269
+ "flex flex-col items-center gap-4 text-center",
1270
+ headerClassName
1271
+ ),
1272
+ children: [
1273
+ badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "outline", className: badgeClassName, children: badge }),
1274
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
1275
+ "h1",
1276
+ {
1277
+ className: cn(
1278
+ "max-w-2xl text-3xl font-semibold md:text-4xl",
1279
+ headingClassName
1280
+ ),
1281
+ children: heading
1282
+ }
1283
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1284
+ "div",
1285
+ {
1286
+ className: cn(
1287
+ "max-w-2xl text-3xl font-semibold md:text-4xl",
1288
+ headingClassName
1289
+ ),
1290
+ children: heading
1291
+ }
1292
+ )),
1293
+ description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-muted-foreground", descriptionClassName), children: description }) : /* @__PURE__ */ jsxRuntime.jsx(
1294
+ "div",
1295
+ {
1296
+ className: cn("text-muted-foreground", descriptionClassName),
1297
+ children: description
1298
+ }
1299
+ ))
1300
+ ]
1301
+ }
1302
+ ),
1170
1303
  tabsContent
1171
1304
  ]
1172
1305
  }