@opensite/ui 2.0.2 → 2.0.4

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 (75) hide show
  1. package/dist/hero-ai-powered-carousel.cjs +152 -77
  2. package/dist/hero-ai-powered-carousel.d.cts +5 -13
  3. package/dist/hero-ai-powered-carousel.d.ts +5 -13
  4. package/dist/hero-ai-powered-carousel.js +152 -77
  5. package/dist/hero-announcement-badge.cjs +679 -665
  6. package/dist/hero-announcement-badge.d.cts +1 -1
  7. package/dist/hero-announcement-badge.d.ts +1 -1
  8. package/dist/hero-announcement-badge.js +689 -675
  9. package/dist/hero-badge-shadow-overlay.cjs +79 -32
  10. package/dist/hero-badge-shadow-overlay.js +80 -33
  11. package/dist/hero-centered-image-grid.cjs +106 -95
  12. package/dist/hero-centered-image-grid.d.cts +2 -14
  13. package/dist/hero-centered-image-grid.d.ts +2 -14
  14. package/dist/hero-centered-image-grid.js +106 -95
  15. package/dist/hero-community-survey-cta.cjs +149 -58
  16. package/dist/hero-community-survey-cta.d.cts +1 -1
  17. package/dist/hero-community-survey-cta.d.ts +1 -1
  18. package/dist/hero-community-survey-cta.js +149 -58
  19. package/dist/hero-design-carousel-portfolio.cjs +158 -66
  20. package/dist/hero-design-carousel-portfolio.d.cts +7 -11
  21. package/dist/hero-design-carousel-portfolio.d.ts +7 -11
  22. package/dist/hero-design-carousel-portfolio.js +158 -66
  23. package/dist/hero-event-registration.cjs +765 -718
  24. package/dist/hero-event-registration.js +761 -714
  25. package/dist/hero-fullscreen-background-image.cjs +746 -649
  26. package/dist/hero-fullscreen-background-image.d.cts +12 -4
  27. package/dist/hero-fullscreen-background-image.d.ts +12 -4
  28. package/dist/hero-fullscreen-background-image.js +746 -649
  29. package/dist/hero-fullscreen-logo-cta.cjs +89 -31
  30. package/dist/hero-fullscreen-logo-cta.js +89 -31
  31. package/dist/hero-gradient-avatars-rating.cjs +847 -816
  32. package/dist/hero-gradient-avatars-rating.d.cts +1 -13
  33. package/dist/hero-gradient-avatars-rating.d.ts +1 -13
  34. package/dist/hero-gradient-avatars-rating.js +844 -813
  35. package/dist/hero-gradient-client-focused.cjs +690 -629
  36. package/dist/hero-gradient-client-focused.d.cts +1 -1
  37. package/dist/hero-gradient-client-focused.d.ts +1 -1
  38. package/dist/hero-gradient-client-focused.js +689 -628
  39. package/dist/hero-grid-pattern-efficiency.cjs +59 -47
  40. package/dist/hero-grid-pattern-efficiency.d.cts +1 -8
  41. package/dist/hero-grid-pattern-efficiency.d.ts +1 -8
  42. package/dist/hero-grid-pattern-efficiency.js +59 -47
  43. package/dist/hero-logo-centered-screenshot.cjs +1 -1
  44. package/dist/hero-logo-centered-screenshot.js +1 -1
  45. package/dist/hero-marketplace-scattered-images.cjs +2 -6
  46. package/dist/hero-marketplace-scattered-images.d.cts +1 -4
  47. package/dist/hero-marketplace-scattered-images.d.ts +1 -4
  48. package/dist/hero-marketplace-scattered-images.js +2 -6
  49. package/dist/hero-pattern-logo-tech-stack.cjs +1 -1
  50. package/dist/hero-pattern-logo-tech-stack.js +1 -1
  51. package/dist/hero-platform-features-grid.cjs +5 -5
  52. package/dist/hero-platform-features-grid.js +5 -5
  53. package/dist/hero-simple-centered-image.cjs +140 -44
  54. package/dist/hero-simple-centered-image.d.cts +1 -1
  55. package/dist/hero-simple-centered-image.d.ts +1 -1
  56. package/dist/hero-simple-centered-image.js +140 -44
  57. package/dist/hero-spiral-pattern-cards.cjs +857 -809
  58. package/dist/hero-spiral-pattern-cards.d.cts +5 -1
  59. package/dist/hero-spiral-pattern-cards.d.ts +5 -1
  60. package/dist/hero-spiral-pattern-cards.js +856 -808
  61. package/dist/hero-split-geometric-shapes.cjs +754 -723
  62. package/dist/hero-split-geometric-shapes.d.cts +5 -1
  63. package/dist/hero-split-geometric-shapes.d.ts +5 -1
  64. package/dist/hero-split-geometric-shapes.js +748 -717
  65. package/dist/hero-task-timer-animated.cjs +698 -650
  66. package/dist/hero-task-timer-animated.d.cts +5 -1
  67. package/dist/hero-task-timer-animated.d.ts +5 -1
  68. package/dist/hero-task-timer-animated.js +697 -649
  69. package/dist/hero-ui-library-showcase.cjs +734 -719
  70. package/dist/hero-ui-library-showcase.d.cts +5 -1
  71. package/dist/hero-ui-library-showcase.d.ts +5 -1
  72. package/dist/hero-ui-library-showcase.js +732 -717
  73. package/dist/registry.cjs +1035 -788
  74. package/dist/registry.js +1035 -788
  75. package/package.json +1 -1
@@ -1,6 +1,4 @@
1
1
  "use client";
2
- import * as React3 from 'react';
3
- import React3__default, { useMemo } from 'react';
4
2
  import AutoScroll from 'embla-carousel-auto-scroll';
5
3
  import { clsx } from 'clsx';
6
4
  import { twMerge } from 'tailwind-merge';
@@ -8,38 +6,14 @@ import { Slot } from '@radix-ui/react-slot';
8
6
  import { cva } from 'class-variance-authority';
9
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
8
  import { Img } from '@page-speed/img';
9
+ import * as React3 from 'react';
10
+ import React3__default from 'react';
11
11
  import useEmblaCarousel from 'embla-carousel-react';
12
12
 
13
13
  // components/blocks/hero/hero-ai-powered-carousel.tsx
14
14
  function cn(...inputs) {
15
15
  return twMerge(clsx(inputs));
16
16
  }
17
- function getTextColor(parentBg, variant = "default", options) {
18
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
19
- if (isDark) {
20
- switch (variant) {
21
- case "default":
22
- return "text-foreground";
23
- case "muted":
24
- return "text-foreground/80";
25
- case "subtle":
26
- return "text-foreground/60";
27
- case "accent":
28
- return "text-accent-foreground";
29
- }
30
- } else {
31
- switch (variant) {
32
- case "default":
33
- return "text-foreground";
34
- case "muted":
35
- return "text-muted-foreground";
36
- case "subtle":
37
- return "text-muted-foreground/70";
38
- case "accent":
39
- return "text-primary";
40
- }
41
- }
42
- }
43
17
  var badgeVariants = cva(
44
18
  "inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
45
19
  {
@@ -994,6 +968,74 @@ var Section = React3__default.forwardRef(
994
968
  }
995
969
  );
996
970
  Section.displayName = "Section";
971
+ var MOBILE_CLASSES = {
972
+ "fit-left": "items-start md:items-center",
973
+ "fit-center": "items-center",
974
+ "fit-right": "items-end md:items-center",
975
+ "full-left": "items-stretch md:items-center",
976
+ "full-center": "items-stretch md:items-center",
977
+ "full-right": "items-stretch md:items-center"
978
+ };
979
+ function BlockActions({
980
+ mobileConfig,
981
+ actionsClassName,
982
+ verticalSpacing = "mt-4 md:mt-8",
983
+ actions,
984
+ actionsSlot
985
+ }) {
986
+ const renderAction = React3.useCallback(
987
+ (action, idx) => {
988
+ const {
989
+ label,
990
+ icon,
991
+ iconAfter,
992
+ children,
993
+ href,
994
+ onClick,
995
+ className: actionClassName,
996
+ ...pressableProps
997
+ } = action;
998
+ return /* @__PURE__ */ jsx(
999
+ Pressable,
1000
+ {
1001
+ href,
1002
+ onClick,
1003
+ asButton: action.asButton || true,
1004
+ className: actionClassName,
1005
+ ...pressableProps,
1006
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1007
+ icon,
1008
+ label,
1009
+ iconAfter
1010
+ ] })
1011
+ },
1012
+ idx
1013
+ );
1014
+ },
1015
+ []
1016
+ );
1017
+ const width = mobileConfig?.width ?? "full";
1018
+ const position = mobileConfig?.position ?? "center";
1019
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
1020
+ if (actionsSlot) {
1021
+ return /* @__PURE__ */ jsx("div", { children: actionsSlot });
1022
+ } else if (actions && actions?.length > 0) {
1023
+ return /* @__PURE__ */ jsx(
1024
+ "div",
1025
+ {
1026
+ className: cn(
1027
+ "flex flex-col md:flex-row flex-wrap gap-4",
1028
+ mobileLayoutClass,
1029
+ actionsClassName,
1030
+ verticalSpacing
1031
+ ),
1032
+ children: actions.map((action, index) => renderAction(action, index))
1033
+ }
1034
+ );
1035
+ } else {
1036
+ return null;
1037
+ }
1038
+ }
997
1039
  function HeroAiPoweredCarousel({
998
1040
  badge,
999
1041
  badgeTagline,
@@ -1001,17 +1043,15 @@ function HeroAiPoweredCarousel({
1001
1043
  description,
1002
1044
  actions,
1003
1045
  actionsSlot,
1004
- mobileCarouselImages1,
1005
- mobileCarouselImages2,
1006
- desktopCarouselImages1,
1007
- desktopCarouselImages2,
1046
+ carouselImages1,
1047
+ carouselImages2,
1008
1048
  carouselSlot,
1009
1049
  background,
1010
- spacing,
1050
+ spacing = "xl",
1051
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
1011
1052
  pattern,
1012
1053
  patternOpacity,
1013
1054
  className,
1014
- containerClassName,
1015
1055
  contentClassName,
1016
1056
  badgeClassName,
1017
1057
  headingClassName,
@@ -1019,27 +1059,6 @@ function HeroAiPoweredCarousel({
1019
1059
  actionsClassName,
1020
1060
  optixFlowConfig
1021
1061
  }) {
1022
- const renderActions = useMemo(() => {
1023
- if (actionsSlot) return actionsSlot;
1024
- if (!actions || actions.length === 0) return null;
1025
- return actions.map((action, index) => {
1026
- const { label, icon, iconAfter, children, className: actionClassName, ...pressableProps } = action;
1027
- return /* @__PURE__ */ jsx(
1028
- Pressable,
1029
- {
1030
- asButton: true,
1031
- className: actionClassName,
1032
- ...pressableProps,
1033
- children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1034
- icon,
1035
- label,
1036
- iconAfter
1037
- ] })
1038
- },
1039
- index
1040
- );
1041
- });
1042
- }, [actionsSlot, actions]);
1043
1062
  return /* @__PURE__ */ jsx(
1044
1063
  Section,
1045
1064
  {
@@ -1048,19 +1067,63 @@ function HeroAiPoweredCarousel({
1048
1067
  pattern,
1049
1068
  patternOpacity,
1050
1069
  className,
1051
- children: /* @__PURE__ */ jsx("div", { className: cn("container", containerClassName), children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-16 lg:grid-cols-2", children: [
1052
- /* @__PURE__ */ jsxs("div", { className: cn("mx-auto", contentClassName), children: [
1053
- (badge || badgeTagline) && /* @__PURE__ */ jsxs("div", { className: cn("flex w-fit items-center gap-2 rounded-full border px-2.5 py-1.5 text-xs font-medium", badgeClassName), children: [
1054
- badge && /* @__PURE__ */ jsx(Badge, { children: badge }),
1055
- badgeTagline
1056
- ] }),
1057
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("mt-10 mb-4 text-3xl font-semibold lg:text-5xl", headingClassName), children: heading }) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
1058
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mx-auto lg:text-lg", getTextColor(background, "muted"), descriptionClassName), children: description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1059
- (actionsSlot || actions && actions.length > 0) && /* @__PURE__ */ jsx("div", { className: cn("mt-10 flex flex-col gap-2 sm:flex-row", actionsClassName), children: renderActions })
1060
- ] }),
1070
+ containerClassName,
1071
+ children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs("div", { className: "grid items-center gap-16 lg:grid-cols-2", children: [
1072
+ /* @__PURE__ */ jsxs(
1073
+ "div",
1074
+ {
1075
+ className: cn(
1076
+ "mx-auto flex flex-col gap-4 md:gap-8",
1077
+ contentClassName
1078
+ ),
1079
+ children: [
1080
+ (badge || badgeTagline) && /* @__PURE__ */ jsxs(
1081
+ "div",
1082
+ {
1083
+ className: cn(
1084
+ "flex w-fit items-center gap-2 rounded-full border pl-2.5 pr-4 py-1.5 text-xs font-medium",
1085
+ badgeClassName
1086
+ ),
1087
+ children: [
1088
+ badge && /* @__PURE__ */ jsx(Badge, { children: badge }),
1089
+ badgeTagline
1090
+ ]
1091
+ }
1092
+ ),
1093
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
1094
+ "h1",
1095
+ {
1096
+ className: cn(
1097
+ "mt-10 mb-4 text-3xl font-semibold lg:text-5xl text-balance",
1098
+ headingClassName
1099
+ ),
1100
+ children: heading
1101
+ }
1102
+ ) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
1103
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1104
+ "p",
1105
+ {
1106
+ className: cn(
1107
+ "mx-auto lg:text-lg text-balance",
1108
+ descriptionClassName
1109
+ ),
1110
+ children: description
1111
+ }
1112
+ ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1113
+ /* @__PURE__ */ jsx(
1114
+ BlockActions,
1115
+ {
1116
+ actions,
1117
+ actionsSlot,
1118
+ actionsClassName
1119
+ }
1120
+ )
1121
+ ]
1122
+ }
1123
+ ),
1061
1124
  carouselSlot ? carouselSlot : /* @__PURE__ */ jsxs(Fragment, { children: [
1062
1125
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-8 lg:hidden", children: [
1063
- mobileCarouselImages1 && mobileCarouselImages1.length > 0 && /* @__PURE__ */ jsx(
1126
+ carouselImages1 && carouselImages1.length > 0 && /* @__PURE__ */ jsx(
1064
1127
  Carousel,
1065
1128
  {
1066
1129
  opts: {
@@ -1072,18 +1135,21 @@ function HeroAiPoweredCarousel({
1072
1135
  })
1073
1136
  ],
1074
1137
  className: "-mx-7",
1075
- children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[350px]", children: mobileCarouselImages1.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { className: "max-w-96", children: /* @__PURE__ */ jsx(
1138
+ children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[350px]", children: carouselImages1.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { className: "max-w-96", children: /* @__PURE__ */ jsx(
1076
1139
  Img,
1077
1140
  {
1078
1141
  src: image.src,
1079
1142
  alt: image.alt,
1080
- className: image.className,
1143
+ className: cn(
1144
+ "rounded-lg shadow-lg",
1145
+ image.className
1146
+ ),
1081
1147
  optixFlowConfig
1082
1148
  }
1083
1149
  ) }, index)) })
1084
1150
  }
1085
1151
  ),
1086
- mobileCarouselImages2 && mobileCarouselImages2.length > 0 && /* @__PURE__ */ jsx(
1152
+ carouselImages2 && carouselImages2.length > 0 && /* @__PURE__ */ jsx(
1087
1153
  Carousel,
1088
1154
  {
1089
1155
  opts: {
@@ -1096,12 +1162,15 @@ function HeroAiPoweredCarousel({
1096
1162
  })
1097
1163
  ],
1098
1164
  className: "-mx-7",
1099
- children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[350px]", children: mobileCarouselImages2.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { className: "max-w-96", children: /* @__PURE__ */ jsx(
1165
+ children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[350px]", children: carouselImages2.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { className: "max-w-96", children: /* @__PURE__ */ jsx(
1100
1166
  Img,
1101
1167
  {
1102
1168
  src: image.src,
1103
1169
  alt: image.alt,
1104
- className: image.className,
1170
+ className: cn(
1171
+ "rounded-lg shadow-lg",
1172
+ image.className
1173
+ ),
1105
1174
  optixFlowConfig
1106
1175
  }
1107
1176
  ) }, index)) })
@@ -1109,7 +1178,7 @@ function HeroAiPoweredCarousel({
1109
1178
  )
1110
1179
  ] }),
1111
1180
  /* @__PURE__ */ jsxs("div", { className: "hidden grid-cols-2 gap-8 lg:grid", children: [
1112
- desktopCarouselImages1 && desktopCarouselImages1.length > 0 && /* @__PURE__ */ jsx(
1181
+ carouselImages1 && carouselImages1.length > 0 && /* @__PURE__ */ jsx(
1113
1182
  Carousel,
1114
1183
  {
1115
1184
  opts: {
@@ -1121,18 +1190,21 @@ function HeroAiPoweredCarousel({
1121
1190
  })
1122
1191
  ],
1123
1192
  orientation: "vertical",
1124
- children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[600px]", children: desktopCarouselImages1.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsx(
1193
+ children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[600px]", children: carouselImages1.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsx(
1125
1194
  Img,
1126
1195
  {
1127
1196
  src: image.src,
1128
1197
  alt: image.alt,
1129
- className: image.className,
1198
+ className: cn(
1199
+ "rounded-lg shadow-lg",
1200
+ image.className
1201
+ ),
1130
1202
  optixFlowConfig
1131
1203
  }
1132
1204
  ) }, index)) })
1133
1205
  }
1134
1206
  ),
1135
- desktopCarouselImages2 && desktopCarouselImages2.length > 0 && /* @__PURE__ */ jsx(
1207
+ carouselImages2 && carouselImages2.length > 0 && /* @__PURE__ */ jsx(
1136
1208
  Carousel,
1137
1209
  {
1138
1210
  opts: {
@@ -1145,12 +1217,15 @@ function HeroAiPoweredCarousel({
1145
1217
  })
1146
1218
  ],
1147
1219
  orientation: "vertical",
1148
- children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[600px]", children: desktopCarouselImages2.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsx(
1220
+ children: /* @__PURE__ */ jsx(CarouselContent, { className: "max-h-[600px]", children: carouselImages2.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { children: /* @__PURE__ */ jsx(
1149
1221
  Img,
1150
1222
  {
1151
1223
  src: image.src,
1152
1224
  alt: image.alt,
1153
- className: image.className,
1225
+ className: cn(
1226
+ "rounded-lg shadow-lg",
1227
+ image.className
1228
+ ),
1154
1229
  optixFlowConfig
1155
1230
  }
1156
1231
  ) }, index)) })