@opensite/ui 3.6.9 → 3.7.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.
@@ -401,10 +401,53 @@ var Section = React__default.forwardRef(
401
401
  }
402
402
  );
403
403
  Section.displayName = "Section";
404
+ var SIZE_CLASSES = {
405
+ sm: "max-h-6 sm:max-h-7",
406
+ md: "max-h-8 sm:max-h-9 lg:max-h-10",
407
+ lg: "max-h-10 sm:max-h-12 lg:max-h-14",
408
+ xl: "max-h-12 sm:max-h-14 lg:max-h-16"
409
+ };
410
+ var BrandLogo = ({
411
+ logo,
412
+ logoSlot,
413
+ logoClassName,
414
+ size = "md",
415
+ optixFlowConfig
416
+ }) => {
417
+ if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
418
+ if (!logo || !logo.src) return null;
419
+ const imgElement = /* @__PURE__ */ jsx(
420
+ Img,
421
+ {
422
+ src: logo.src,
423
+ className: cn(
424
+ "w-auto object-contain",
425
+ SIZE_CLASSES[size],
426
+ logo.className
427
+ ),
428
+ alt: logo.alt || "Logo",
429
+ optixFlowConfig,
430
+ loading: "eager"
431
+ }
432
+ );
433
+ if (logo.url) {
434
+ return /* @__PURE__ */ jsx(
435
+ Pressable,
436
+ {
437
+ href: logo.url,
438
+ className: cn("flex items-center", logoClassName),
439
+ children: imgElement
440
+ }
441
+ );
442
+ }
443
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
444
+ };
445
+ var brand_logo_default = BrandLogo;
404
446
  function HeroPlatformFeaturesGrid({
405
447
  sectionId = "hero-platform-features-grid",
406
448
  logo,
407
449
  logoSlot,
450
+ logoClassName,
408
451
  subtitle,
409
452
  description,
410
453
  heading,
@@ -423,23 +466,6 @@ function HeroPlatformFeaturesGrid({
423
466
  featuresClassName,
424
467
  optixFlowConfig
425
468
  }) {
426
- const renderLogo = useMemo(() => {
427
- if (logoSlot) return logoSlot;
428
- if (!logo) return null;
429
- const logoSrc = typeof logo.src === "string" ? logo.src : logo.src.light;
430
- return /* @__PURE__ */ jsx(
431
- Img,
432
- {
433
- src: logoSrc,
434
- alt: logo.alt,
435
- className: cn(
436
- "mx-auto mb-5 w-24 md:mb-6 md:w-28 lg:mb-7 lg:w-32",
437
- logo.imgClassName
438
- ),
439
- optixFlowConfig
440
- }
441
- );
442
- }, [logoSlot, logo, optixFlowConfig]);
443
469
  const renderAction = useMemo(() => {
444
470
  if (actionSlot) return actionSlot;
445
471
  if (!action) return null;
@@ -504,28 +530,35 @@ function HeroPlatformFeaturesGrid({
504
530
  headerClassName
505
531
  ),
506
532
  children: [
507
- renderLogo,
508
- subtitle && (typeof subtitle === "string" ? /* @__PURE__ */ jsx("span", { className: cn("mb-3 text-sm tracking-widest md:text-base"), children: subtitle }) : subtitle),
533
+ logo || logoSlot ? /* @__PURE__ */ jsx("div", { className: cn("flex justify-center", logoClassName), children: /* @__PURE__ */ jsx(brand_logo_default, { logo, logoSlot, size: "lg" }) }) : null,
534
+ subtitle && (typeof subtitle === "string" ? /* @__PURE__ */ jsx(
535
+ "span",
536
+ {
537
+ className: cn(
538
+ "text-sm tracking-widest md:text-base opacity-50"
539
+ ),
540
+ children: subtitle
541
+ }
542
+ ) : subtitle),
509
543
  heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
510
544
  "h1",
511
545
  {
512
546
  className: cn(
513
- "mt-4 text-4xl font-semibold text-balance lg:text-6xl",
547
+ "text-4xl font-semibold text-balance lg:text-6xl",
514
548
  headingClassName
515
549
  ),
516
550
  children: heading
517
551
  }
518
- ) : /* @__PURE__ */ jsx(
519
- "h1",
552
+ ) : heading),
553
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
554
+ "p",
520
555
  {
521
556
  className: cn(
522
- "mt-4 text-4xl font-semibold text-balance lg:text-6xl",
523
- headingClassName
557
+ "mb-6 max-w-full md:max-w-md text-base md:text-lg text-balance"
524
558
  ),
525
- children: heading
559
+ children: description
526
560
  }
527
- )),
528
- description && (typeof description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mb-6 max-w-2xl md:text-lg text-balance"), children: description }) : /* @__PURE__ */ jsx("div", { className: cn("max-w-2xl md:text-lg text-balance"), children: description })),
561
+ ) : description),
529
562
  renderAction
530
563
  ]
531
564
  }
@@ -668,11 +668,49 @@ function ActionComponent({ action }) {
668
668
  }
669
669
  );
670
670
  }
671
+ var SIZE_CLASSES = {
672
+ sm: "max-h-6 sm:max-h-7",
673
+ md: "max-h-8 sm:max-h-9 lg:max-h-10",
674
+ lg: "max-h-10 sm:max-h-12 lg:max-h-14",
675
+ xl: "max-h-12 sm:max-h-14 lg:max-h-16"
676
+ };
677
+ var BrandLogo = ({
678
+ logo,
679
+ logoSlot,
680
+ logoClassName,
681
+ size = "md",
682
+ optixFlowConfig
683
+ }) => {
684
+ if (logoSlot) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: logoSlot });
685
+ if (!logo || !logo.src) return null;
686
+ const imgElement = /* @__PURE__ */ jsxRuntime.jsx(
687
+ img.Img,
688
+ {
689
+ src: logo.src,
690
+ className: cn(
691
+ "w-auto object-contain",
692
+ SIZE_CLASSES[size],
693
+ logo.className
694
+ ),
695
+ alt: logo.alt || "Logo",
696
+ optixFlowConfig,
697
+ loading: "eager"
698
+ }
699
+ );
700
+ if (logo.url) {
701
+ return /* @__PURE__ */ jsxRuntime.jsx(
702
+ pressable.Pressable,
703
+ {
704
+ href: logo.url,
705
+ className: cn("flex items-center", logoClassName),
706
+ children: imgElement
707
+ }
708
+ );
709
+ }
710
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
711
+ };
712
+ var brand_logo_default = BrandLogo;
671
713
  var HERO_TECH_CAROUSEL_MAX_ITEMS = 4;
672
- function resolveLogoSrc(logo) {
673
- if (typeof logo.src === "string") return logo.src;
674
- return logo.src?.light;
675
- }
676
714
  function HeroPanel({
677
715
  item,
678
716
  defaultAutoplayIntervalMs,
@@ -682,6 +720,7 @@ function HeroPanel({
682
720
  const {
683
721
  logo,
684
722
  logoSlot,
723
+ logoClassName,
685
724
  title,
686
725
  content,
687
726
  actions,
@@ -690,7 +729,6 @@ function HeroPanel({
690
729
  id,
691
730
  className,
692
731
  contentClassName,
693
- logoClassName,
694
732
  titleClassName,
695
733
  textClassName,
696
734
  actionsClassName,
@@ -762,24 +800,18 @@ function HeroPanel({
762
800
  ]);
763
801
  const hasBackground = !!backgroundMedia && backgroundMedia.length > 0;
764
802
  const renderLogo = React3.useMemo(() => {
765
- if (logoSlot) return logoSlot;
766
- if (!logo) return null;
767
- const src = resolveLogoSrc(logo);
768
- if (!src) return null;
769
- return /* @__PURE__ */ jsxRuntime.jsx(
770
- img.Img,
803
+ if (!logoSlot && !logo?.src) return null;
804
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex justify-center", logoClassName), children: /* @__PURE__ */ jsxRuntime.jsx(
805
+ brand_logo_default,
771
806
  {
772
- src,
773
- alt: logo.alt,
774
- className: cn(
775
- "h-10 md:h-12 lg:h-14 w-auto object-contain",
776
- logo.imgClassName,
777
- logoClassName
778
- ),
807
+ logo,
808
+ logoSlot,
809
+ size: "md",
779
810
  optixFlowConfig: resolvedOptixFlow
780
811
  }
781
- );
812
+ ) });
782
813
  }, [logoSlot, logo, logoClassName, resolvedOptixFlow]);
814
+ const hasLogo = !!renderLogo;
783
815
  const renderTitle = React3.useMemo(() => {
784
816
  if (title === void 0 || title === null || title === "") return null;
785
817
  if (typeof title === "string") {
@@ -787,7 +819,8 @@ function HeroPanel({
787
819
  "h2",
788
820
  {
789
821
  className: cn(
790
- "text-2xl md:text-3xl lg:text-4xl font-semibold text-balance",
822
+ "font-semibold text-balance",
823
+ hasLogo ? "text-lg lg:text-xl" : "text-xl md:text-2xl lg:text-3xl",
791
824
  hasBackground && "text-white text-shadow-lg",
792
825
  titleClassName
793
826
  ),
@@ -796,7 +829,7 @@ function HeroPanel({
796
829
  );
797
830
  }
798
831
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title });
799
- }, [title, titleClassName, hasBackground]);
832
+ }, [title, titleClassName, hasBackground, hasLogo]);
800
833
  const renderContent = React3.useMemo(() => {
801
834
  if (content === void 0 || content === null || content === "")
802
835
  return null;
@@ -836,7 +869,7 @@ function HeroPanel({
836
869
  "div",
837
870
  {
838
871
  className: cn(
839
- "relative z-10 flex h-full w-full flex-col items-center justify-center gap-4 md:gap-6",
872
+ "relative z-10 flex h-full w-full flex-col items-center justify-center gap-4",
840
873
  // Mobile padding keeps content readable when stacked.
841
874
  "px-6 py-12 md:px-8 md:py-12 lg:px-10",
842
875
  // Center content vertically; on desktop columns can be quite tall.
@@ -1,11 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { ImageSliderImage } from './image-slider.cjs';
3
3
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Cgd-IXlI.cjs';
4
- import { L as LogoItem, A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.cjs';
4
+ import { L as LogoConfig } from './types-mWZcgKth.cjs';
5
+ import { A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.cjs';
5
6
  import 'react/jsx-runtime';
6
7
  import 'class-variance-authority';
7
8
  import '@page-speed/pressable';
8
9
  import '@opensite/hooks/usePlatformFromUrl';
10
+ import './dynamic-icon.cjs';
11
+ import '@page-speed/icon';
9
12
 
10
13
  /**
11
14
  * Configuration for a single panel in the {@link HeroTechCarousel} block.
@@ -31,15 +34,18 @@ import '@opensite/hooks/usePlatformFromUrl';
31
34
  */
32
35
  interface HeroPanelItem {
33
36
  /**
34
- * Optional logo rendered above the title.
35
- * Follows the standard {@link LogoItem} prop shape used across blocks.
36
- * Default styling applies `object-contain` so SVG/PNG logos preserve aspect ratio.
37
+ * Brand logo configuration — renders above the announcement badge.
38
+ * LOGO MEDIA ONLY. Do not use photos, hero images, or video assets.
37
39
  */
38
- logo?: LogoItem;
40
+ logo?: LogoConfig;
39
41
  /**
40
- * Custom slot for the logo (overrides the {@link logo} prop).
42
+ * Custom slot for logo (overrides logo prop)
41
43
  */
42
44
  logoSlot?: React.ReactNode;
45
+ /**
46
+ * Additional CSS classes for the logo container
47
+ */
48
+ logoClassName?: string;
43
49
  /**
44
50
  * Optional panel title.
45
51
  */
@@ -77,10 +83,6 @@ interface HeroPanelItem {
77
83
  * Additional CSS classes for the panel's content layer (above the background).
78
84
  */
79
85
  contentClassName?: string;
80
- /**
81
- * Additional CSS classes for the panel's logo element.
82
- */
83
- logoClassName?: string;
84
86
  /**
85
87
  * Additional CSS classes for the panel's title element.
86
88
  */
@@ -1,11 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { ImageSliderImage } from './image-slider.js';
3
3
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Dud0DKXB.js';
4
- import { L as LogoItem, A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.js';
4
+ import { L as LogoConfig } from './types-hJ2R0GoH.js';
5
+ import { A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.js';
5
6
  import 'react/jsx-runtime';
6
7
  import 'class-variance-authority';
7
8
  import '@page-speed/pressable';
8
9
  import '@opensite/hooks/usePlatformFromUrl';
10
+ import './dynamic-icon.js';
11
+ import '@page-speed/icon';
9
12
 
10
13
  /**
11
14
  * Configuration for a single panel in the {@link HeroTechCarousel} block.
@@ -31,15 +34,18 @@ import '@opensite/hooks/usePlatformFromUrl';
31
34
  */
32
35
  interface HeroPanelItem {
33
36
  /**
34
- * Optional logo rendered above the title.
35
- * Follows the standard {@link LogoItem} prop shape used across blocks.
36
- * Default styling applies `object-contain` so SVG/PNG logos preserve aspect ratio.
37
+ * Brand logo configuration — renders above the announcement badge.
38
+ * LOGO MEDIA ONLY. Do not use photos, hero images, or video assets.
37
39
  */
38
- logo?: LogoItem;
40
+ logo?: LogoConfig;
39
41
  /**
40
- * Custom slot for the logo (overrides the {@link logo} prop).
42
+ * Custom slot for logo (overrides logo prop)
41
43
  */
42
44
  logoSlot?: React.ReactNode;
45
+ /**
46
+ * Additional CSS classes for the logo container
47
+ */
48
+ logoClassName?: string;
43
49
  /**
44
50
  * Optional panel title.
45
51
  */
@@ -77,10 +83,6 @@ interface HeroPanelItem {
77
83
  * Additional CSS classes for the panel's content layer (above the background).
78
84
  */
79
85
  contentClassName?: string;
80
- /**
81
- * Additional CSS classes for the panel's logo element.
82
- */
83
- logoClassName?: string;
84
86
  /**
85
87
  * Additional CSS classes for the panel's title element.
86
88
  */
@@ -647,11 +647,49 @@ function ActionComponent({ action }) {
647
647
  }
648
648
  );
649
649
  }
650
+ var SIZE_CLASSES = {
651
+ sm: "max-h-6 sm:max-h-7",
652
+ md: "max-h-8 sm:max-h-9 lg:max-h-10",
653
+ lg: "max-h-10 sm:max-h-12 lg:max-h-14",
654
+ xl: "max-h-12 sm:max-h-14 lg:max-h-16"
655
+ };
656
+ var BrandLogo = ({
657
+ logo,
658
+ logoSlot,
659
+ logoClassName,
660
+ size = "md",
661
+ optixFlowConfig
662
+ }) => {
663
+ if (logoSlot) return /* @__PURE__ */ jsx(Fragment, { children: logoSlot });
664
+ if (!logo || !logo.src) return null;
665
+ const imgElement = /* @__PURE__ */ jsx(
666
+ Img,
667
+ {
668
+ src: logo.src,
669
+ className: cn(
670
+ "w-auto object-contain",
671
+ SIZE_CLASSES[size],
672
+ logo.className
673
+ ),
674
+ alt: logo.alt || "Logo",
675
+ optixFlowConfig,
676
+ loading: "eager"
677
+ }
678
+ );
679
+ if (logo.url) {
680
+ return /* @__PURE__ */ jsx(
681
+ Pressable,
682
+ {
683
+ href: logo.url,
684
+ className: cn("flex items-center", logoClassName),
685
+ children: imgElement
686
+ }
687
+ );
688
+ }
689
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center", logoClassName), children: imgElement });
690
+ };
691
+ var brand_logo_default = BrandLogo;
650
692
  var HERO_TECH_CAROUSEL_MAX_ITEMS = 4;
651
- function resolveLogoSrc(logo) {
652
- if (typeof logo.src === "string") return logo.src;
653
- return logo.src?.light;
654
- }
655
693
  function HeroPanel({
656
694
  item,
657
695
  defaultAutoplayIntervalMs,
@@ -661,6 +699,7 @@ function HeroPanel({
661
699
  const {
662
700
  logo,
663
701
  logoSlot,
702
+ logoClassName,
664
703
  title,
665
704
  content,
666
705
  actions,
@@ -669,7 +708,6 @@ function HeroPanel({
669
708
  id,
670
709
  className,
671
710
  contentClassName,
672
- logoClassName,
673
711
  titleClassName,
674
712
  textClassName,
675
713
  actionsClassName,
@@ -741,24 +779,18 @@ function HeroPanel({
741
779
  ]);
742
780
  const hasBackground = !!backgroundMedia && backgroundMedia.length > 0;
743
781
  const renderLogo = useMemo(() => {
744
- if (logoSlot) return logoSlot;
745
- if (!logo) return null;
746
- const src = resolveLogoSrc(logo);
747
- if (!src) return null;
748
- return /* @__PURE__ */ jsx(
749
- Img,
782
+ if (!logoSlot && !logo?.src) return null;
783
+ return /* @__PURE__ */ jsx("div", { className: cn("flex justify-center", logoClassName), children: /* @__PURE__ */ jsx(
784
+ brand_logo_default,
750
785
  {
751
- src,
752
- alt: logo.alt,
753
- className: cn(
754
- "h-10 md:h-12 lg:h-14 w-auto object-contain",
755
- logo.imgClassName,
756
- logoClassName
757
- ),
786
+ logo,
787
+ logoSlot,
788
+ size: "md",
758
789
  optixFlowConfig: resolvedOptixFlow
759
790
  }
760
- );
791
+ ) });
761
792
  }, [logoSlot, logo, logoClassName, resolvedOptixFlow]);
793
+ const hasLogo = !!renderLogo;
762
794
  const renderTitle = useMemo(() => {
763
795
  if (title === void 0 || title === null || title === "") return null;
764
796
  if (typeof title === "string") {
@@ -766,7 +798,8 @@ function HeroPanel({
766
798
  "h2",
767
799
  {
768
800
  className: cn(
769
- "text-2xl md:text-3xl lg:text-4xl font-semibold text-balance",
801
+ "font-semibold text-balance",
802
+ hasLogo ? "text-lg lg:text-xl" : "text-xl md:text-2xl lg:text-3xl",
770
803
  hasBackground && "text-white text-shadow-lg",
771
804
  titleClassName
772
805
  ),
@@ -775,7 +808,7 @@ function HeroPanel({
775
808
  );
776
809
  }
777
810
  return /* @__PURE__ */ jsx("div", { className: titleClassName, children: title });
778
- }, [title, titleClassName, hasBackground]);
811
+ }, [title, titleClassName, hasBackground, hasLogo]);
779
812
  const renderContent = useMemo(() => {
780
813
  if (content === void 0 || content === null || content === "")
781
814
  return null;
@@ -815,7 +848,7 @@ function HeroPanel({
815
848
  "div",
816
849
  {
817
850
  className: cn(
818
- "relative z-10 flex h-full w-full flex-col items-center justify-center gap-4 md:gap-6",
851
+ "relative z-10 flex h-full w-full flex-col items-center justify-center gap-4",
819
852
  // Mobile padding keeps content readable when stacked.
820
853
  "px-6 py-12 md:px-8 md:py-12 lg:px-10",
821
854
  // Center content vertically; on desktop columns can be quite tall.
@@ -625,8 +625,8 @@ function HeroVideoBackgroundDark({
625
625
  "div",
626
626
  {
627
627
  className: cn(
628
- "relative z-10 mx-auto flex size-full",
629
- "md:max-w-3xl lg:max-w-4xl flex-col justify-center",
628
+ "relative z-10 mx-auto flex flex-col justify-center",
629
+ "size-full max-w-full md:max-w-md lg:max-w-4xl",
630
630
  "gap-4 md:gap-6 items-center text-center px-4 md:px-6",
631
631
  contentClassName
632
632
  ),
@@ -637,7 +637,7 @@ function HeroVideoBackgroundDark({
637
637
  {
638
638
  className: cn(
639
639
  "font-bold text-5xl md:text-6xl lg:text-8xl",
640
- "text-balance text-white text-shadow-lg",
640
+ "text-pretty text-white text-shadow-lg",
641
641
  headingClassName
642
642
  ),
643
643
  children: heading
@@ -619,8 +619,8 @@ function HeroVideoBackgroundDark({
619
619
  "div",
620
620
  {
621
621
  className: cn(
622
- "relative z-10 mx-auto flex size-full",
623
- "md:max-w-3xl lg:max-w-4xl flex-col justify-center",
622
+ "relative z-10 mx-auto flex flex-col justify-center",
623
+ "size-full max-w-full md:max-w-md lg:max-w-4xl",
624
624
  "gap-4 md:gap-6 items-center text-center px-4 md:px-6",
625
625
  contentClassName
626
626
  ),
@@ -631,7 +631,7 @@ function HeroVideoBackgroundDark({
631
631
  {
632
632
  className: cn(
633
633
  "font-bold text-5xl md:text-6xl lg:text-8xl",
634
- "text-balance text-white text-shadow-lg",
634
+ "text-pretty text-white text-shadow-lg",
635
635
  headingClassName
636
636
  ),
637
637
  children: heading