@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
@@ -5,16 +5,20 @@ import AutoScroll from 'embla-carousel-auto-scroll';
5
5
  import Autoplay from 'embla-carousel-autoplay';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
- import { cva } from 'class-variance-authority';
9
- import { jsx, jsxs } from 'react/jsx-runtime';
10
8
  import { Icon } from '@page-speed/icon';
9
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
10
  import { Img } from '@page-speed/img';
12
11
  import useEmblaCarousel from 'embla-carousel-react';
12
+ import { cva } from 'class-variance-authority';
13
13
 
14
14
  // components/blocks/hero/hero-design-carousel-portfolio.tsx
15
15
  function cn(...inputs) {
16
16
  return twMerge(clsx(inputs));
17
17
  }
18
+ var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
19
+ function DynamicIcon({ apiKey, ...props }) {
20
+ return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
21
+ }
18
22
  function normalizePhoneNumber(input) {
19
23
  const trimmed = input.trim();
20
24
  if (trimmed.toLowerCase().startsWith("tel:")) {
@@ -433,10 +437,6 @@ var Pressable = React3.forwardRef(
433
437
  }
434
438
  );
435
439
  Pressable.displayName = "Pressable";
436
- var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
437
- function DynamicIcon({ apiKey, ...props }) {
438
- return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
439
- }
440
440
  var CarouselContext = React3.createContext(null);
441
441
  function useCarousel() {
442
442
  const context = React3.useContext(CarouselContext);
@@ -941,6 +941,74 @@ var Section = React3__default.forwardRef(
941
941
  }
942
942
  );
943
943
  Section.displayName = "Section";
944
+ var MOBILE_CLASSES = {
945
+ "fit-left": "items-start md:items-center",
946
+ "fit-center": "items-center",
947
+ "fit-right": "items-end md:items-center",
948
+ "full-left": "items-stretch md:items-center",
949
+ "full-center": "items-stretch md:items-center",
950
+ "full-right": "items-stretch md:items-center"
951
+ };
952
+ function BlockActions({
953
+ mobileConfig,
954
+ actionsClassName,
955
+ verticalSpacing = "mt-4 md:mt-8",
956
+ actions,
957
+ actionsSlot
958
+ }) {
959
+ const renderAction = React3.useCallback(
960
+ (action, idx) => {
961
+ const {
962
+ label,
963
+ icon,
964
+ iconAfter,
965
+ children,
966
+ href,
967
+ onClick,
968
+ className: actionClassName,
969
+ ...pressableProps
970
+ } = action;
971
+ return /* @__PURE__ */ jsx(
972
+ Pressable,
973
+ {
974
+ href,
975
+ onClick,
976
+ asButton: action.asButton || true,
977
+ className: actionClassName,
978
+ ...pressableProps,
979
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
980
+ icon,
981
+ label,
982
+ iconAfter
983
+ ] })
984
+ },
985
+ idx
986
+ );
987
+ },
988
+ []
989
+ );
990
+ const width = mobileConfig?.width ?? "full";
991
+ const position = mobileConfig?.position ?? "center";
992
+ const mobileLayoutClass = MOBILE_CLASSES[`${width}-${position}`];
993
+ if (actionsSlot) {
994
+ return /* @__PURE__ */ jsx("div", { children: actionsSlot });
995
+ } else if (actions && actions?.length > 0) {
996
+ return /* @__PURE__ */ jsx(
997
+ "div",
998
+ {
999
+ className: cn(
1000
+ "flex flex-col md:flex-row flex-wrap gap-4",
1001
+ mobileLayoutClass,
1002
+ actionsClassName,
1003
+ verticalSpacing
1004
+ ),
1005
+ children: actions.map((action, index) => renderAction(action, index))
1006
+ }
1007
+ );
1008
+ } else {
1009
+ return null;
1010
+ }
1011
+ }
944
1012
  function HeroDesignCarouselPortfolio({
945
1013
  logo,
946
1014
  logoSlot,
@@ -948,18 +1016,17 @@ function HeroDesignCarouselPortfolio({
948
1016
  featuresSlot,
949
1017
  heading,
950
1018
  description,
951
- primaryAction,
952
- primaryActionAvatar,
953
- secondaryAction,
1019
+ actions,
954
1020
  actionsSlot,
1021
+ actionsClassName,
955
1022
  carouselImages,
956
1023
  carouselSlot,
957
1024
  background,
958
- spacing,
1025
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
1026
+ spacing = "xl",
959
1027
  pattern,
960
1028
  patternOpacity,
961
1029
  className,
962
- containerClassName,
963
1030
  contentClassName,
964
1031
  headingClassName,
965
1032
  descriptionClassName,
@@ -975,7 +1042,7 @@ function HeroDesignCarouselPortfolio({
975
1042
  Img,
976
1043
  {
977
1044
  src: logoSrc,
978
- className: cn("h-12 lg:h-16", logo.className),
1045
+ className: cn("object-contain w-auto h-12 lg:h-16", logo.className),
979
1046
  alt: logo.alt,
980
1047
  optixFlowConfig
981
1048
  }
@@ -984,53 +1051,23 @@ function HeroDesignCarouselPortfolio({
984
1051
  const renderFeatures = useMemo(() => {
985
1052
  if (featuresSlot) return featuresSlot;
986
1053
  if (!features || features.length === 0) return null;
987
- return /* @__PURE__ */ jsx("div", { className: cn("hidden items-center gap-6 lg:flex", featuresClassName), children: features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 ", children: [
988
- feature.icon ?? /* @__PURE__ */ jsx(DynamicIcon, { name: feature.iconName || "lucide/check-circle", size: 24 }),
989
- /* @__PURE__ */ jsx("span", { children: feature.title })
990
- ] }, index)) });
991
- }, [featuresSlot, features, featuresClassName]);
992
- const renderPrimaryAction = useMemo(() => {
993
- if (actionsSlot) return null;
994
- if (!primaryAction) return null;
995
- const { label, className: actionClassName, ...pressableProps } = primaryAction;
996
- return /* @__PURE__ */ jsxs(
997
- Pressable,
1054
+ return /* @__PURE__ */ jsx(
1055
+ "div",
998
1056
  {
999
- asButton: true,
1000
- className: actionClassName,
1001
- ...pressableProps,
1002
- children: [
1003
- /* @__PURE__ */ jsx(
1004
- Img,
1057
+ className: cn("hidden items-center gap-6 lg:flex", featuresClassName),
1058
+ children: features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 ", children: [
1059
+ feature.icon ?? /* @__PURE__ */ jsx(
1060
+ DynamicIcon,
1005
1061
  {
1006
- src: primaryActionAvatar,
1007
- alt: "",
1008
- className: "size-9 rounded-full object-cover lg:size-11",
1009
- optixFlowConfig
1062
+ name: feature.iconName || "lucide/check-circle",
1063
+ size: 24
1010
1064
  }
1011
1065
  ),
1012
- /* @__PURE__ */ jsx("span", { children: label })
1013
- ]
1066
+ /* @__PURE__ */ jsx("span", { children: feature.title })
1067
+ ] }, index))
1014
1068
  }
1015
1069
  );
1016
- }, [actionsSlot, primaryAction, primaryActionAvatar, optixFlowConfig]);
1017
- const renderSecondaryAction = useMemo(() => {
1018
- if (actionsSlot) return null;
1019
- if (!secondaryAction) return null;
1020
- const { label, iconAfter, className: actionClassName, ...pressableProps } = secondaryAction;
1021
- return /* @__PURE__ */ jsxs(
1022
- Pressable,
1023
- {
1024
- asButton: true,
1025
- className: actionClassName,
1026
- ...pressableProps,
1027
- children: [
1028
- /* @__PURE__ */ jsx("span", { children: label }),
1029
- iconAfter
1030
- ]
1031
- }
1032
- );
1033
- }, [actionsSlot, secondaryAction]);
1070
+ }, [featuresSlot, features, featuresClassName]);
1034
1071
  const renderCarousel = useMemo(() => {
1035
1072
  if (carouselSlot) return carouselSlot;
1036
1073
  if (!carouselImages || carouselImages.length === 0) return null;
@@ -1050,7 +1087,10 @@ function HeroDesignCarouselPortfolio({
1050
1087
  delay: 1e3
1051
1088
  })
1052
1089
  ],
1053
- className: cn("relative mx-auto w-full max-w-full overflow-hidden from-white to-transparent before:absolute before:top-0 before:left-0 before:z-10 before:h-full before:w-[20%] before:bg-linear-to-r before:content-[''] after:absolute after:top-0 after:right-0 after:z-10 after:h-full after:w-[20%] after:bg-linear-to-l after:from-white after:to-transparent after:content-['']", carouselClassName),
1090
+ className: cn(
1091
+ "relative mx-auto w-full max-w-full overflow-hidden from-white to-transparent before:absolute before:top-0 before:left-0 before:z-10 before:h-full before:w-[20%] before:bg-linear-to-r before:content-[''] after:absolute after:top-0 after:right-0 after:z-10 after:h-full after:w-[20%] after:bg-linear-to-l after:from-white after:to-transparent after:content-['']",
1092
+ carouselClassName
1093
+ ),
1054
1094
  children: /* @__PURE__ */ jsx(CarouselContent, { className: "ml-5 flex gap-5 pl-4", children: carouselImages.map((image, index) => /* @__PURE__ */ jsx(CarouselItem, { className: "basis-[496px] bg-background", children: /* @__PURE__ */ jsx("div", { className: "h-[380px] basis-[480px] overflow-hidden rounded-lg", children: /* @__PURE__ */ jsx(
1055
1095
  Img,
1056
1096
  {
@@ -1071,20 +1111,72 @@ function HeroDesignCarouselPortfolio({
1071
1111
  pattern,
1072
1112
  patternOpacity,
1073
1113
  className: cn("relative", className),
1114
+ containerClassName,
1074
1115
  children: [
1075
- /* @__PURE__ */ jsxs("div", { className: cn("relative z-10 container mx-auto", containerClassName), children: [
1076
- /* @__PURE__ */ jsx("div", { className: "py-8", children: renderLogo }),
1077
- /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-10 py-10 lg:py-28", contentClassName), children: [
1078
- renderFeatures,
1079
- /* @__PURE__ */ jsx("div", { className: "flex", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-4", children: [
1080
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("max-w-6xl text-4xl tracking-tighter lg:text-7xl xl:text-9xl", headingClassName), children: heading }) : /* @__PURE__ */ jsx("h1", { className: cn("max-w-6xl text-4xl tracking-tighter lg:text-7xl xl:text-9xl", headingClassName), children: heading })),
1081
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("text-lg lg:text-2xl", descriptionClassName), children: description }) : /* @__PURE__ */ jsx("p", { className: cn("text-lg lg:text-2xl", descriptionClassName), children: description }))
1082
- ] }) }),
1083
- actionsSlot || renderPrimaryAction
1084
- ] })
1116
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1117
+ renderLogo ? /* @__PURE__ */ jsx("div", { className: "pb-8", children: renderLogo }) : null,
1118
+ /* @__PURE__ */ jsxs(
1119
+ "div",
1120
+ {
1121
+ className: cn(
1122
+ "flex flex-col gap-10 pt-12 pb-8 lg:pt-24 lg:pb-12",
1123
+ contentClassName
1124
+ ),
1125
+ children: [
1126
+ renderFeatures,
1127
+ /* @__PURE__ */ jsx("div", { className: "flex", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-4", children: [
1128
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
1129
+ "h1",
1130
+ {
1131
+ className: cn(
1132
+ "max-w-6xl text-4xl tracking-tighter lg:text-7xl xl:text-9xl font-semibold",
1133
+ headingClassName
1134
+ ),
1135
+ children: heading
1136
+ }
1137
+ ) : /* @__PURE__ */ jsx(
1138
+ "h1",
1139
+ {
1140
+ className: cn(
1141
+ "max-w-6xl text-4xl tracking-tighter lg:text-7xl xl:text-9xl font-semibold",
1142
+ headingClassName
1143
+ ),
1144
+ children: heading
1145
+ }
1146
+ )),
1147
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1148
+ "p",
1149
+ {
1150
+ className: cn(
1151
+ "text-lg lg:text-2xl text-balance",
1152
+ descriptionClassName
1153
+ ),
1154
+ children: description
1155
+ }
1156
+ ) : /* @__PURE__ */ jsx(
1157
+ "p",
1158
+ {
1159
+ className: cn(
1160
+ "text-lg lg:text-2xl text-balance",
1161
+ descriptionClassName
1162
+ ),
1163
+ children: description
1164
+ }
1165
+ ))
1166
+ ] }) }),
1167
+ /* @__PURE__ */ jsx(
1168
+ BlockActions,
1169
+ {
1170
+ actions,
1171
+ actionsSlot,
1172
+ actionsClassName
1173
+ }
1174
+ )
1175
+ ]
1176
+ }
1177
+ )
1085
1178
  ] }),
1086
- /* @__PURE__ */ jsx("div", { className: "relative flex flex-col", children: renderCarousel }),
1087
- actionsSlot || renderSecondaryAction
1179
+ /* @__PURE__ */ jsx("div", { className: "relative flex flex-col", children: renderCarousel })
1088
1180
  ]
1089
1181
  }
1090
1182
  );