@opensite/ui 3.6.4 → 3.6.6

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.
@@ -8,6 +8,7 @@ var video = require('@page-speed/video');
8
8
  var icon = require('@page-speed/icon');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var pressable = require('@page-speed/pressable');
11
+ var img = require('@page-speed/img');
11
12
 
12
13
  function _interopNamespace(e) {
13
14
  if (e && e.__esModule) return e;
@@ -46,6 +47,47 @@ var DynamicIcon = React__namespace.memo(function DynamicIcon2({
46
47
  return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, name, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
47
48
  });
48
49
  DynamicIcon.displayName = "DynamicIcon";
50
+ var SIZE_CLASSES = {
51
+ sm: "max-h-6 sm:max-h-7",
52
+ md: "max-h-8 sm:max-h-9 lg:max-h-10",
53
+ lg: "max-h-10 sm:max-h-12 lg:max-h-14",
54
+ xl: "max-h-12 sm:max-h-14 lg:max-h-16"
55
+ };
56
+ var BrandLogo = ({
57
+ logo,
58
+ logoSlot,
59
+ logoClassName,
60
+ size = "md",
61
+ optixFlowConfig
62
+ }) => {
63
+ if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
64
+ if (!logo || !logo.src) return null;
65
+ const imgElement = /* @__PURE__ */ jsxRuntime.jsx(
66
+ img.Img,
67
+ {
68
+ src: logo.src,
69
+ className: cn(
70
+ "w-auto object-contain",
71
+ SIZE_CLASSES[size],
72
+ logo.className
73
+ ),
74
+ alt: logo.alt || "Logo",
75
+ optixFlowConfig,
76
+ loading: "eager"
77
+ }
78
+ );
79
+ if (logo.url) {
80
+ return /* @__PURE__ */ jsxRuntime.jsx(
81
+ pressable.Pressable,
82
+ {
83
+ href: logo.url,
84
+ className: cn("flex items-center", logoClassName),
85
+ children: imgElement
86
+ }
87
+ );
88
+ }
89
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
90
+ };
49
91
  var maxWidthStyles = {
50
92
  sm: "max-w-screen-sm",
51
93
  md: "max-w-screen-md",
@@ -502,6 +544,9 @@ function ActionComponent({ action }) {
502
544
  }
503
545
  function HeroVideoOverlayStars({
504
546
  sectionId = "hero-video-overlay-stars",
547
+ logo,
548
+ logoSlot,
549
+ logoClassName,
505
550
  heading,
506
551
  actions,
507
552
  actionsSlot,
@@ -565,6 +610,7 @@ function HeroVideoOverlayStars({
565
610
  containerClassName,
566
611
  children: [
567
612
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative z-10 flex size-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "m-auto flex max-w-100 flex-col items-center gap-9 sm:max-w-125 md:max-w-200 text-center", children: [
613
+ (logo || logoSlot) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("mb-2 flex justify-center", logoClassName), children: /* @__PURE__ */ jsxRuntime.jsx(BrandLogo, { logo, logoSlot, size: "lg" }) }),
568
614
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex w-full flex-col gap-8", contentClassName), children: [
569
615
  heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
570
616
  "h1",
@@ -1,7 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Cgd-IXlI.cjs';
3
+ import { L as LogoConfig } from './types-mWZcgKth.cjs';
3
4
  import { A as ActionConfig, M as MediaItem } from './blocks-DyouPohq.cjs';
4
5
  import 'react/jsx-runtime';
6
+ import './dynamic-icon.cjs';
7
+ import '@page-speed/icon';
5
8
  import 'class-variance-authority';
6
9
  import '@page-speed/pressable';
7
10
  import '@opensite/hooks/usePlatformFromUrl';
@@ -20,6 +23,19 @@ interface TrustConfig {
20
23
  message?: string;
21
24
  }
22
25
  interface HeroVideoOverlayStarsProps {
26
+ /**
27
+ * Brand logo configuration — renders centered above the heading.
28
+ * LOGO MEDIA ONLY. Do not use photos, hero images, or video assets.
29
+ */
30
+ logo?: LogoConfig;
31
+ /**
32
+ * Custom slot for logo (overrides logo prop)
33
+ */
34
+ logoSlot?: React.ReactNode;
35
+ /**
36
+ * Additional CSS classes for the logo container
37
+ */
38
+ logoClassName?: string;
23
39
  /**
24
40
  * Main heading text
25
41
  */
@@ -103,6 +119,6 @@ interface HeroVideoOverlayStarsProps {
103
119
  * HeroVideoOverlayStars - A full-screen hero with video background, gradient text heading,
104
120
  * prominent CTA button, and star rating trust indicator. Ideal for product launches.
105
121
  */
106
- declare function HeroVideoOverlayStars({ sectionId, heading, actions, actionsSlot, actionsClassName, description, descriptionClassName, trust, trustSlot, background, spacing, pattern, patternOpacity, containerClassName, contentClassName, className, headingClassName, backgroundVideo, videoSrc, videoSlot, }: HeroVideoOverlayStarsProps): React.JSX.Element;
122
+ declare function HeroVideoOverlayStars({ sectionId, logo, logoSlot, logoClassName, heading, actions, actionsSlot, actionsClassName, description, descriptionClassName, trust, trustSlot, background, spacing, pattern, patternOpacity, containerClassName, contentClassName, className, headingClassName, backgroundVideo, videoSrc, videoSlot, }: HeroVideoOverlayStarsProps): React.JSX.Element;
107
123
 
108
124
  export { HeroVideoOverlayStars, type HeroVideoOverlayStarsProps };
@@ -1,7 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Dud0DKXB.js';
3
+ import { L as LogoConfig } from './types-hJ2R0GoH.js';
3
4
  import { A as ActionConfig, M as MediaItem } from './blocks-DyouPohq.js';
4
5
  import 'react/jsx-runtime';
6
+ import './dynamic-icon.js';
7
+ import '@page-speed/icon';
5
8
  import 'class-variance-authority';
6
9
  import '@page-speed/pressable';
7
10
  import '@opensite/hooks/usePlatformFromUrl';
@@ -20,6 +23,19 @@ interface TrustConfig {
20
23
  message?: string;
21
24
  }
22
25
  interface HeroVideoOverlayStarsProps {
26
+ /**
27
+ * Brand logo configuration — renders centered above the heading.
28
+ * LOGO MEDIA ONLY. Do not use photos, hero images, or video assets.
29
+ */
30
+ logo?: LogoConfig;
31
+ /**
32
+ * Custom slot for logo (overrides logo prop)
33
+ */
34
+ logoSlot?: React.ReactNode;
35
+ /**
36
+ * Additional CSS classes for the logo container
37
+ */
38
+ logoClassName?: string;
23
39
  /**
24
40
  * Main heading text
25
41
  */
@@ -103,6 +119,6 @@ interface HeroVideoOverlayStarsProps {
103
119
  * HeroVideoOverlayStars - A full-screen hero with video background, gradient text heading,
104
120
  * prominent CTA button, and star rating trust indicator. Ideal for product launches.
105
121
  */
106
- declare function HeroVideoOverlayStars({ sectionId, heading, actions, actionsSlot, actionsClassName, description, descriptionClassName, trust, trustSlot, background, spacing, pattern, patternOpacity, containerClassName, contentClassName, className, headingClassName, backgroundVideo, videoSrc, videoSlot, }: HeroVideoOverlayStarsProps): React.JSX.Element;
122
+ declare function HeroVideoOverlayStars({ sectionId, logo, logoSlot, logoClassName, heading, actions, actionsSlot, actionsClassName, description, descriptionClassName, trust, trustSlot, background, spacing, pattern, patternOpacity, containerClassName, contentClassName, className, headingClassName, backgroundVideo, videoSrc, videoSlot, }: HeroVideoOverlayStarsProps): React.JSX.Element;
107
123
 
108
124
  export { HeroVideoOverlayStars, type HeroVideoOverlayStarsProps };
@@ -7,6 +7,7 @@ import { Video } from '@page-speed/video';
7
7
  import { Icon } from '@page-speed/icon';
8
8
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
9
9
  import { Pressable, buttonVariants } from '@page-speed/pressable';
10
+ import { Img } from '@page-speed/img';
10
11
 
11
12
  // components/blocks/hero/hero-video-overlay-stars.tsx
12
13
  function cn(...inputs) {
@@ -25,6 +26,47 @@ var DynamicIcon = React.memo(function DynamicIcon2({
25
26
  return /* @__PURE__ */ jsx(Icon, { ...props, name, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
26
27
  });
27
28
  DynamicIcon.displayName = "DynamicIcon";
29
+ var SIZE_CLASSES = {
30
+ sm: "max-h-6 sm:max-h-7",
31
+ md: "max-h-8 sm:max-h-9 lg:max-h-10",
32
+ lg: "max-h-10 sm:max-h-12 lg:max-h-14",
33
+ xl: "max-h-12 sm:max-h-14 lg:max-h-16"
34
+ };
35
+ var BrandLogo = ({
36
+ logo,
37
+ logoSlot,
38
+ logoClassName,
39
+ size = "md",
40
+ optixFlowConfig
41
+ }) => {
42
+ if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
43
+ if (!logo || !logo.src) return null;
44
+ const imgElement = /* @__PURE__ */ jsx(
45
+ Img,
46
+ {
47
+ src: logo.src,
48
+ className: cn(
49
+ "w-auto object-contain",
50
+ SIZE_CLASSES[size],
51
+ logo.className
52
+ ),
53
+ alt: logo.alt || "Logo",
54
+ optixFlowConfig,
55
+ loading: "eager"
56
+ }
57
+ );
58
+ if (logo.url) {
59
+ return /* @__PURE__ */ jsx(
60
+ Pressable,
61
+ {
62
+ href: logo.url,
63
+ className: cn("flex items-center", logoClassName),
64
+ children: imgElement
65
+ }
66
+ );
67
+ }
68
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
69
+ };
28
70
  var maxWidthStyles = {
29
71
  sm: "max-w-screen-sm",
30
72
  md: "max-w-screen-md",
@@ -481,6 +523,9 @@ function ActionComponent({ action }) {
481
523
  }
482
524
  function HeroVideoOverlayStars({
483
525
  sectionId = "hero-video-overlay-stars",
526
+ logo,
527
+ logoSlot,
528
+ logoClassName,
484
529
  heading,
485
530
  actions,
486
531
  actionsSlot,
@@ -544,6 +589,7 @@ function HeroVideoOverlayStars({
544
589
  containerClassName,
545
590
  children: [
546
591
  /* @__PURE__ */ jsx("div", { className: "relative z-10 flex size-full", children: /* @__PURE__ */ jsxs("div", { className: "m-auto flex max-w-100 flex-col items-center gap-9 sm:max-w-125 md:max-w-200 text-center", children: [
592
+ (logo || logoSlot) && /* @__PURE__ */ jsx("div", { className: cn("mb-2 flex justify-center", logoClassName), children: /* @__PURE__ */ jsx(BrandLogo, { logo, logoSlot, size: "lg" }) }),
547
593
  /* @__PURE__ */ jsxs("div", { className: cn("flex w-full flex-col gap-8", contentClassName), children: [
548
594
  heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
549
595
  "h1",