@olwiba/ui 0.2.18 → 0.2.19
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.
- package/dist/index.d.ts +15 -2
- package/dist/index.js +23 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/marketing/HeroSection.tsx +35 -11
package/dist/index.d.ts
CHANGED
|
@@ -583,7 +583,8 @@ interface HeroSectionProps {
|
|
|
583
583
|
heading: string;
|
|
584
584
|
badge?: string;
|
|
585
585
|
description: string;
|
|
586
|
-
|
|
586
|
+
/** Ignored when `primarySlot` is given. */
|
|
587
|
+
primaryCta?: {
|
|
587
588
|
label: string;
|
|
588
589
|
href: string;
|
|
589
590
|
};
|
|
@@ -591,6 +592,18 @@ interface HeroSectionProps {
|
|
|
591
592
|
label: string;
|
|
592
593
|
href: string;
|
|
593
594
|
};
|
|
595
|
+
/**
|
|
596
|
+
* Replaces the primary button with your own control — a search field, a
|
|
597
|
+
* short form, an email capture.
|
|
598
|
+
*
|
|
599
|
+
* A hero whose first action *is* the product converts better than one that
|
|
600
|
+
* links to a page where the product starts. `secondaryCta` still renders
|
|
601
|
+
* beside it, so "…or see pricing" survives.
|
|
602
|
+
*
|
|
603
|
+
* Rendered full-width above the secondary CTA on small screens, since a
|
|
604
|
+
* field sharing a row with a button gets squeezed to nothing on a phone.
|
|
605
|
+
*/
|
|
606
|
+
primarySlot?: React.ReactNode;
|
|
594
607
|
heroImage?: React.ReactNode;
|
|
595
608
|
media?: 'image' | 'phone' | 'none';
|
|
596
609
|
phoneSize?: 'sm' | 'md' | 'lg';
|
|
@@ -598,7 +611,7 @@ interface HeroSectionProps {
|
|
|
598
611
|
socialProofText?: string;
|
|
599
612
|
renderLink?: AppShellRenderLink;
|
|
600
613
|
}
|
|
601
|
-
declare function HeroSection({ heading, badge, description, primaryCta, secondaryCta, heroImage, media, phoneSize, avatarUrls, socialProofText, renderLink, }: HeroSectionProps): react_jsx_runtime.JSX.Element;
|
|
614
|
+
declare function HeroSection({ heading, badge, description, primaryCta, secondaryCta, primarySlot, heroImage, media, phoneSize, avatarUrls, socialProofText, renderLink, }: HeroSectionProps): react_jsx_runtime.JSX.Element;
|
|
602
615
|
|
|
603
616
|
interface FeaturesSectionProps {
|
|
604
617
|
title?: string;
|
package/dist/index.js
CHANGED
|
@@ -1619,6 +1619,7 @@ function HeroSection({
|
|
|
1619
1619
|
description,
|
|
1620
1620
|
primaryCta,
|
|
1621
1621
|
secondaryCta,
|
|
1622
|
+
primarySlot,
|
|
1622
1623
|
heroImage,
|
|
1623
1624
|
media = "image",
|
|
1624
1625
|
phoneSize = "lg",
|
|
@@ -1633,19 +1634,28 @@ function HeroSection({
|
|
|
1633
1634
|
badge && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: badge }) }),
|
|
1634
1635
|
/* @__PURE__ */ jsx("h1", { className: "text-balance text-4xl font-semibold tracking-tight sm:text-5xl lg:text-6xl", children: heading }),
|
|
1635
1636
|
/* @__PURE__ */ jsx("p", { className: "max-w-lg text-pretty text-lg text-muted-foreground", children: description }),
|
|
1636
|
-
/* @__PURE__ */ jsxs(
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1637
|
+
/* @__PURE__ */ jsxs(
|
|
1638
|
+
"div",
|
|
1639
|
+
{
|
|
1640
|
+
className: cn$1(
|
|
1641
|
+
"flex gap-3",
|
|
1642
|
+
primarySlot ? "flex-col items-stretch sm:flex-row sm:items-center" : "flex-wrap items-center"
|
|
1643
|
+
),
|
|
1644
|
+
children: [
|
|
1645
|
+
primarySlot ?? (primaryCta && renderLink({
|
|
1646
|
+
href: primaryCta.href,
|
|
1647
|
+
children: /* @__PURE__ */ jsxs(Button, { size: "lg", children: [
|
|
1648
|
+
primaryCta.label,
|
|
1649
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "ml-2 size-4" })
|
|
1650
|
+
] })
|
|
1651
|
+
})),
|
|
1652
|
+
secondaryCta && renderLink({
|
|
1653
|
+
href: secondaryCta.href,
|
|
1654
|
+
children: /* @__PURE__ */ jsx(Button, { size: "lg", variant: "outline", children: secondaryCta.label })
|
|
1655
|
+
})
|
|
1656
|
+
]
|
|
1657
|
+
}
|
|
1658
|
+
)
|
|
1649
1659
|
] }) }),
|
|
1650
1660
|
media !== "none" && /* @__PURE__ */ jsx(FadeIn, { direction: "right", delay: 200, children: media === "phone" ? /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(PhoneFrame, { size: phoneSize, children: heroImage }) }) : /* @__PURE__ */ jsx("div", { className: cn$1("overflow-hidden", mode === "smooth" ? "rounded-3xl" : "rounded-2xl"), children: heroImage }) })
|
|
1651
1661
|
] }),
|