@nextworks/blocks-sections 0.1.0-alpha.0
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/README.md +44 -0
- package/dist/components/About.d.ts +93 -0
- package/dist/components/About.d.ts.map +1 -0
- package/dist/components/About.js +129 -0
- package/dist/components/About.jsx +153 -0
- package/dist/components/CTA.d.ts +118 -0
- package/dist/components/CTA.d.ts.map +1 -0
- package/dist/components/CTA.js +58 -0
- package/dist/components/CTA.jsx +88 -0
- package/dist/components/Contact.d.ts +111 -0
- package/dist/components/Contact.d.ts.map +1 -0
- package/dist/components/Contact.js +82 -0
- package/dist/components/Contact.jsx +107 -0
- package/dist/components/FAQ.d.ts +89 -0
- package/dist/components/FAQ.d.ts.map +1 -0
- package/dist/components/FAQ.js +78 -0
- package/dist/components/FAQ.jsx +98 -0
- package/dist/components/Features.d.ts +111 -0
- package/dist/components/Features.d.ts.map +1 -0
- package/dist/components/Features.js +109 -0
- package/dist/components/Features.jsx +122 -0
- package/dist/components/Footer.d.ts +120 -0
- package/dist/components/Footer.d.ts.map +1 -0
- package/dist/components/Footer.js +101 -0
- package/dist/components/Footer.jsx +138 -0
- package/dist/components/HeroMotion.d.ts +107 -0
- package/dist/components/HeroMotion.d.ts.map +1 -0
- package/dist/components/HeroMotion.js +55 -0
- package/dist/components/HeroMotion.jsx +95 -0
- package/dist/components/HeroOverlay.d.ts +116 -0
- package/dist/components/HeroOverlay.d.ts.map +1 -0
- package/dist/components/HeroOverlay.js +111 -0
- package/dist/components/HeroOverlay.jsx +141 -0
- package/dist/components/HeroSplit.d.ts +98 -0
- package/dist/components/HeroSplit.d.ts.map +1 -0
- package/dist/components/HeroSplit.js +100 -0
- package/dist/components/HeroSplit.jsx +134 -0
- package/dist/components/Navbar.d.ts +112 -0
- package/dist/components/Navbar.d.ts.map +1 -0
- package/dist/components/Navbar.js +80 -0
- package/dist/components/Navbar.jsx +127 -0
- package/dist/components/Newsletter.d.ts +59 -0
- package/dist/components/Newsletter.d.ts.map +1 -0
- package/dist/components/Newsletter.js +34 -0
- package/dist/components/Newsletter.jsx +54 -0
- package/dist/components/PortfolioSimple.d.ts +137 -0
- package/dist/components/PortfolioSimple.d.ts.map +1 -0
- package/dist/components/PortfolioSimple.js +180 -0
- package/dist/components/PortfolioSimple.jsx +259 -0
- package/dist/components/Pricing.d.ts +96 -0
- package/dist/components/Pricing.d.ts.map +1 -0
- package/dist/components/Pricing.js +91 -0
- package/dist/components/Pricing.jsx +103 -0
- package/dist/components/ProcessTimeline.d.ts +121 -0
- package/dist/components/ProcessTimeline.d.ts.map +1 -0
- package/dist/components/ProcessTimeline.js +88 -0
- package/dist/components/ProcessTimeline.jsx +151 -0
- package/dist/components/ServicesGrid.d.ts +64 -0
- package/dist/components/ServicesGrid.d.ts.map +1 -0
- package/dist/components/ServicesGrid.js +72 -0
- package/dist/components/ServicesGrid.jsx +97 -0
- package/dist/components/Team.d.ts +115 -0
- package/dist/components/Team.d.ts.map +1 -0
- package/dist/components/Team.js +107 -0
- package/dist/components/Team.jsx +135 -0
- package/dist/components/Testimonials.d.ts +81 -0
- package/dist/components/Testimonials.d.ts.map +1 -0
- package/dist/components/Testimonials.js +46 -0
- package/dist/components/Testimonials.jsx +58 -0
- package/dist/components/TrustBadges.d.ts +80 -0
- package/dist/components/TrustBadges.d.ts.map +1 -0
- package/dist/components/TrustBadges.js +46 -0
- package/dist/components/TrustBadges.jsx +64 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/package.json +26 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
import { Facebook, Twitter, Instagram, Linkedin } from "lucide-react";
|
|
6
|
+
/**
|
|
7
|
+
* Default navigation link groups with common footer sections
|
|
8
|
+
*/
|
|
9
|
+
const defaultNavLinks = [
|
|
10
|
+
{
|
|
11
|
+
heading: "Product",
|
|
12
|
+
links: [
|
|
13
|
+
{ name: "Features", href: "#features" },
|
|
14
|
+
{ name: "Pricing", href: "#pricing" },
|
|
15
|
+
{ name: "Documentation", href: "#documentation" },
|
|
16
|
+
{ name: "FAQ", href: "#faq" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
heading: "Company",
|
|
21
|
+
links: [
|
|
22
|
+
{ name: "About", href: "#about" },
|
|
23
|
+
{ name: "Careers", href: "#careers" },
|
|
24
|
+
{ name: "Blog", href: "#blog" },
|
|
25
|
+
{ name: "Contact", href: "#contact" },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
heading: "Resources",
|
|
30
|
+
links: [
|
|
31
|
+
{ name: "Help Center", href: "#help" },
|
|
32
|
+
{ name: "Terms of Service", href: "#terms" },
|
|
33
|
+
{ name: "Privacy Policy", href: "#privacy" },
|
|
34
|
+
{ name: "Status", href: "#status" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Default social media links shown in the footer
|
|
40
|
+
*/
|
|
41
|
+
const defaultSocialLinks = [
|
|
42
|
+
{
|
|
43
|
+
name: "Facebook",
|
|
44
|
+
icon: Facebook,
|
|
45
|
+
url: "https://facebook.com",
|
|
46
|
+
external: true,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "Twitter",
|
|
50
|
+
icon: Twitter,
|
|
51
|
+
url: "https://twitter.com",
|
|
52
|
+
external: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Instagram",
|
|
56
|
+
icon: Instagram,
|
|
57
|
+
url: "https://instagram.com",
|
|
58
|
+
external: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "LinkedIn",
|
|
62
|
+
icon: Linkedin,
|
|
63
|
+
url: "https://linkedin.com",
|
|
64
|
+
external: true,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
/**
|
|
68
|
+
* Site footer with brand, grouped navigation links, social icons, and copyright.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
72
|
+
* - Accessibility: renders a semantic <footer> with aria-label and clear link
|
|
73
|
+
* names; external links open in a new tab with rel security attributes.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Footer footerBrandName="Acme" />
|
|
77
|
+
*/
|
|
78
|
+
export function Footer({ id, footerBrandName = "Brand Name", brandNode, brandHref, footerNavLinks = defaultNavLinks, footerSocialLinks = defaultSocialLinks, className, section = {
|
|
79
|
+
className: "w-full bg-muted text-foreground bg-[var(--footer-bg)] text-[var(--footer-fg)]",
|
|
80
|
+
}, container = { className: "max-w-7xl mx-auto px-6" }, brand = { className: "text-lg font-bold font-poppins text-foreground" }, brandWrapper = {
|
|
81
|
+
className: "flex flex-col items-center lg:items-start lg:pr-8",
|
|
82
|
+
}, navSection = {
|
|
83
|
+
className: "flex flex-col lg:flex-row items-start justify-center gap-8 lg:gap-12 pt-6.5 pb-8",
|
|
84
|
+
}, navGroup = {
|
|
85
|
+
className: "flex flex-col items-center lg:items-start text-center lg:text-left pt-1.5",
|
|
86
|
+
}, navHeading = {
|
|
87
|
+
className: "font-bold font-poppins text-foreground mb-3 text-sm uppercase tracking-wider text-[var(--footer-heading-fg)]",
|
|
88
|
+
}, navLink = {
|
|
89
|
+
className: "text-muted-foreground hover:text-primary transition-colors duration-200 text-sm mb-2 block font-inter text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)]",
|
|
90
|
+
}, linksList = { className: "space-y-2" }, socialSection = { className: "flex items-center justify-center gap-4 py-4" }, socialLink = {
|
|
91
|
+
className: "text-muted-foreground hover:text-primary transition-colors duration-200 p-2 rounded-md hover:bg-accent text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)] hover:bg-[var(--footer-link-hover-bg)]",
|
|
92
|
+
}, socialIcon = { className: "h-5 w-5" }, copyright = {
|
|
93
|
+
className: "text-center text-xs text-muted-foreground py-4 border-t border-border font-inter text-[var(--footer-muted-fg)] border-[var(--footer-border)]",
|
|
94
|
+
}, copyrightYear, copyrightOverride, ariaLabel = "Footer section", }) {
|
|
95
|
+
const year = copyrightYear !== null && copyrightYear !== void 0 ? copyrightYear : new Date().getFullYear();
|
|
96
|
+
return (_jsx("footer", { id: id, className: cn("w-full", section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: cn(container.className), children: [_jsxs("div", { className: cn(navSection.className), children: [_jsxs("div", { className: cn(brandWrapper.className), children: [brandNode, footerBrandName &&
|
|
97
|
+
(brandHref ? (_jsx(Link, { href: brandHref, className: cn(brand.className), "aria-label": footerBrandName, children: footerBrandName })) : (_jsx("h3", { className: cn(brand.className), children: footerBrandName })))] }), footerNavLinks.map((group) => (_jsxs("div", { className: cn(navGroup.className), children: [_jsx("h3", { className: cn(navHeading.className), children: group.heading }), _jsx("div", { className: cn(linksList.className), children: group.links.map((link) => (_jsx(Link, { href: link.href, target: link.external ? "_blank" : undefined, rel: link.external ? "noopener noreferrer" : undefined, className: cn(navLink.className), children: link.name }, link.name))) })] }, group.heading)))] }), _jsx("div", { className: cn(socialSection.className), children: footerSocialLinks.map((social) => {
|
|
98
|
+
const IconComponent = social.icon;
|
|
99
|
+
return (_jsx(Link, { href: social.url, target: social.external ? "_blank" : undefined, rel: social.external ? "noopener noreferrer" : undefined, "aria-label": social.label || social.name, className: cn(socialLink.className), children: _jsx(IconComponent, { className: cn(socialIcon.className) }) }, social.name));
|
|
100
|
+
}) }), _jsx("div", { className: cn(copyright.className), children: copyrightOverride !== null && copyrightOverride !== void 0 ? copyrightOverride : (_jsxs(_Fragment, { children: ["\u00A9 ", year, " ", footerBrandName, ". All rights reserved."] })) })] }) }));
|
|
101
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
import { Facebook, Twitter, Instagram, Linkedin } from "lucide-react";
|
|
6
|
+
/**
|
|
7
|
+
* Default navigation link groups with common footer sections
|
|
8
|
+
*/
|
|
9
|
+
const defaultNavLinks = [
|
|
10
|
+
{
|
|
11
|
+
heading: "Product",
|
|
12
|
+
links: [
|
|
13
|
+
{ name: "Features", href: "#features" },
|
|
14
|
+
{ name: "Pricing", href: "#pricing" },
|
|
15
|
+
{ name: "Documentation", href: "#documentation" },
|
|
16
|
+
{ name: "FAQ", href: "#faq" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
heading: "Company",
|
|
21
|
+
links: [
|
|
22
|
+
{ name: "About", href: "#about" },
|
|
23
|
+
{ name: "Careers", href: "#careers" },
|
|
24
|
+
{ name: "Blog", href: "#blog" },
|
|
25
|
+
{ name: "Contact", href: "#contact" },
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
heading: "Resources",
|
|
30
|
+
links: [
|
|
31
|
+
{ name: "Help Center", href: "#help" },
|
|
32
|
+
{ name: "Terms of Service", href: "#terms" },
|
|
33
|
+
{ name: "Privacy Policy", href: "#privacy" },
|
|
34
|
+
{ name: "Status", href: "#status" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* Default social media links shown in the footer
|
|
40
|
+
*/
|
|
41
|
+
const defaultSocialLinks = [
|
|
42
|
+
{
|
|
43
|
+
name: "Facebook",
|
|
44
|
+
icon: Facebook,
|
|
45
|
+
url: "https://facebook.com",
|
|
46
|
+
external: true,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "Twitter",
|
|
50
|
+
icon: Twitter,
|
|
51
|
+
url: "https://twitter.com",
|
|
52
|
+
external: true,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Instagram",
|
|
56
|
+
icon: Instagram,
|
|
57
|
+
url: "https://instagram.com",
|
|
58
|
+
external: true,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "LinkedIn",
|
|
62
|
+
icon: Linkedin,
|
|
63
|
+
url: "https://linkedin.com",
|
|
64
|
+
external: true,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
/**
|
|
68
|
+
* Site footer with brand, grouped navigation links, social icons, and copyright.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
72
|
+
* - Accessibility: renders a semantic <footer> with aria-label and clear link
|
|
73
|
+
* names; external links open in a new tab with rel security attributes.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* <Footer footerBrandName="Acme" />
|
|
77
|
+
*/
|
|
78
|
+
export function Footer({ id, footerBrandName = "Brand Name", brandNode, brandHref, footerNavLinks = defaultNavLinks, footerSocialLinks = defaultSocialLinks, className, section = {
|
|
79
|
+
className: "w-full bg-muted text-foreground bg-[var(--footer-bg)] text-[var(--footer-fg)]",
|
|
80
|
+
}, container = { className: "max-w-7xl mx-auto px-6" }, brand = { className: "text-lg font-bold font-poppins text-foreground" }, brandWrapper = {
|
|
81
|
+
className: "flex flex-col items-center lg:items-start lg:pr-8",
|
|
82
|
+
}, navSection = {
|
|
83
|
+
className: "flex flex-col lg:flex-row items-start justify-center gap-8 lg:gap-12 pt-6.5 pb-8",
|
|
84
|
+
}, navGroup = {
|
|
85
|
+
className: "flex flex-col items-center lg:items-start text-center lg:text-left pt-1.5",
|
|
86
|
+
}, navHeading = {
|
|
87
|
+
className: "font-bold font-poppins text-foreground mb-3 text-sm uppercase tracking-wider text-[var(--footer-heading-fg)]",
|
|
88
|
+
}, navLink = {
|
|
89
|
+
className: "text-muted-foreground hover:text-primary transition-colors duration-200 text-sm mb-2 block font-inter text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)]",
|
|
90
|
+
}, linksList = { className: "space-y-2" }, socialSection = { className: "flex items-center justify-center gap-4 py-4" }, socialLink = {
|
|
91
|
+
className: "text-muted-foreground hover:text-primary transition-colors duration-200 p-2 rounded-md hover:bg-accent text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)] hover:bg-[var(--footer-link-hover-bg)]",
|
|
92
|
+
}, socialIcon = { className: "h-5 w-5" }, copyright = {
|
|
93
|
+
className: "text-center text-xs text-muted-foreground py-4 border-t border-border font-inter text-[var(--footer-muted-fg)] border-[var(--footer-border)]",
|
|
94
|
+
}, copyrightYear, copyrightOverride, ariaLabel = "Footer section", }) {
|
|
95
|
+
const year = copyrightYear !== null && copyrightYear !== void 0 ? copyrightYear : new Date().getFullYear();
|
|
96
|
+
return (<footer id={id} className={cn("w-full", section.className, className)} aria-label={ariaLabel}>
|
|
97
|
+
<div className={cn(container.className)}>
|
|
98
|
+
{/* Navigation link sections */}
|
|
99
|
+
<div className={cn(navSection.className)}>
|
|
100
|
+
{/* Brand name displayed in footer */}
|
|
101
|
+
<div className={cn(brandWrapper.className)}>
|
|
102
|
+
{brandNode}
|
|
103
|
+
{footerBrandName &&
|
|
104
|
+
(brandHref ? (<Link href={brandHref} className={cn(brand.className)} aria-label={footerBrandName}>
|
|
105
|
+
{footerBrandName}
|
|
106
|
+
</Link>) : (<h3 className={cn(brand.className)}>{footerBrandName}</h3>))}
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
{/* Iterate over nav link groups */}
|
|
110
|
+
{footerNavLinks.map((group) => (<div key={group.heading} className={cn(navGroup.className)}>
|
|
111
|
+
<h3 className={cn(navHeading.className)}>{group.heading}</h3>
|
|
112
|
+
<div className={cn(linksList.className)}>
|
|
113
|
+
{group.links.map((link) => (<Link key={link.name} href={link.href} target={link.external ? "_blank" : undefined} rel={link.external ? "noopener noreferrer" : undefined} className={cn(navLink.className)}>
|
|
114
|
+
{link.name}
|
|
115
|
+
</Link>))}
|
|
116
|
+
</div>
|
|
117
|
+
</div>))}
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
{/* Social media icon links */}
|
|
121
|
+
<div className={cn(socialSection.className)}>
|
|
122
|
+
{footerSocialLinks.map((social) => {
|
|
123
|
+
const IconComponent = social.icon;
|
|
124
|
+
return (<Link key={social.name} href={social.url} target={social.external ? "_blank" : undefined} rel={social.external ? "noopener noreferrer" : undefined} aria-label={social.label || social.name} className={cn(socialLink.className)}>
|
|
125
|
+
<IconComponent className={cn(socialIcon.className)}/>
|
|
126
|
+
</Link>);
|
|
127
|
+
})}
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
{/* Copyright notice */}
|
|
131
|
+
<div className={cn(copyright.className)}>
|
|
132
|
+
{copyrightOverride !== null && copyrightOverride !== void 0 ? copyrightOverride : (<>
|
|
133
|
+
© {year} {footerBrandName}. All rights reserved.
|
|
134
|
+
</>)}
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</footer>);
|
|
138
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Transition } from "motion";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the HeroMotion component.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* - Styling: exposes slot-style className overrides merged via cn().
|
|
8
|
+
* - Motion: controlled by enableMotion and motionOptions; respects
|
|
9
|
+
* prefers-reduced-motion by allowing disabling transforms.
|
|
10
|
+
* - Accessibility: rendered as a semantic <section> with aria-label.
|
|
11
|
+
* - CTA: primary/secondary CTA can be links (href provided) or buttons.
|
|
12
|
+
*/
|
|
13
|
+
export interface HeroMotionProps {
|
|
14
|
+
/** Optional id to attach to the section root */
|
|
15
|
+
id?: string;
|
|
16
|
+
/** ARIA label for the section. @defaultValue "Hero section" */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
/** Optional top-level class to override the root */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Primary heading text. Ignored when headingNode is provided. */
|
|
21
|
+
heading?: string;
|
|
22
|
+
/** Custom heading node; use for advanced layouts or styling. */
|
|
23
|
+
headingNode?: React.ReactNode;
|
|
24
|
+
/** Inline highlight node rendered next to heading text. */
|
|
25
|
+
highlight?: React.ReactNode;
|
|
26
|
+
/** Optional description paragraph/node */
|
|
27
|
+
description?: React.ReactNode;
|
|
28
|
+
/** Primary call to action config or null to hide */
|
|
29
|
+
primaryCta?: {
|
|
30
|
+
label: string;
|
|
31
|
+
href?: string;
|
|
32
|
+
} | null;
|
|
33
|
+
/** Secondary call to action config or null to hide */
|
|
34
|
+
secondaryCta?: {
|
|
35
|
+
label: string;
|
|
36
|
+
href?: string;
|
|
37
|
+
} | null;
|
|
38
|
+
/** Slot-style overrides */
|
|
39
|
+
section?: {
|
|
40
|
+
className?: string;
|
|
41
|
+
};
|
|
42
|
+
container?: {
|
|
43
|
+
className?: string;
|
|
44
|
+
};
|
|
45
|
+
content?: {
|
|
46
|
+
className?: string;
|
|
47
|
+
};
|
|
48
|
+
headingText?: {
|
|
49
|
+
className?: string;
|
|
50
|
+
};
|
|
51
|
+
highlightText?: {
|
|
52
|
+
className?: string;
|
|
53
|
+
};
|
|
54
|
+
descriptionText?: {
|
|
55
|
+
className?: string;
|
|
56
|
+
};
|
|
57
|
+
actions?: {
|
|
58
|
+
className?: string;
|
|
59
|
+
};
|
|
60
|
+
primaryButtonStyle?: {
|
|
61
|
+
unstyled?: boolean;
|
|
62
|
+
style?: React.CSSProperties;
|
|
63
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
64
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
65
|
+
className?: string;
|
|
66
|
+
};
|
|
67
|
+
secondaryButtonStyle?: {
|
|
68
|
+
unstyled?: boolean;
|
|
69
|
+
style?: React.CSSProperties;
|
|
70
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
71
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
72
|
+
className?: string;
|
|
73
|
+
};
|
|
74
|
+
/** Optional background node (e.g., SVGs, gradients, images) */
|
|
75
|
+
backgroundNode?: React.ReactNode;
|
|
76
|
+
/** When false, disables entrance animations */
|
|
77
|
+
enableMotion?: boolean;
|
|
78
|
+
/** Motion configuration for entrance sequences */
|
|
79
|
+
motionOptions?: {
|
|
80
|
+
viewport?: {
|
|
81
|
+
once?: boolean;
|
|
82
|
+
amount?: number;
|
|
83
|
+
};
|
|
84
|
+
headingDelay?: number;
|
|
85
|
+
descriptionDelay?: number;
|
|
86
|
+
actionsDelay?: number;
|
|
87
|
+
transition: Transition;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Motion-first hero with heading/highlight, optional description and CTAs.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
95
|
+
* - Motion: enableMotion toggles entrance transitions; motionOptions controls
|
|
96
|
+
* delays and viewport.
|
|
97
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* <HeroMotion
|
|
101
|
+
* heading="Supercharge growth with"
|
|
102
|
+
* highlight="AI-powered insights"
|
|
103
|
+
* primaryCta={{ label: 'Get Started', href: '#contact' }}
|
|
104
|
+
* />
|
|
105
|
+
*/
|
|
106
|
+
export declare function HeroMotion({ id, ariaLabel, className, heading, headingNode, highlight, description, primaryCta, secondaryCta, section, container, content, headingText, highlightText, descriptionText, actions, primaryButtonStyle, secondaryButtonStyle, enableMotion, motionOptions, backgroundNode, }: HeroMotionProps): React.JSX.Element;
|
|
107
|
+
//# sourceMappingURL=HeroMotion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hero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;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,EACzB,EAAE,EACF,SAA0B,EAC1B,SAAS,EACT,OAAmC,EACnC,WAAW,EACX,SAAiC,EACjC,WAKC,EACD,UAAqC,EACrC,YAAoC,EACpC,OAAiE,EACjE,SAA2E,EAC3E,OAAwD,EACxD,WAGC,EACD,aAGC,EACD,eAGC,EACD,OAAsE,EACtE,kBAAsE,EACtE,oBAAwE,EACxE,YAAmB,EACnB,aAMC,EACD,cAAc,GACf,EAAE,eAAe,qBAsJjB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { motion } from "motion/react";
|
|
5
|
+
import { Button } from "@nextworks/blocks-core";
|
|
6
|
+
import { cn } from "@nextworks/blocks-core";
|
|
7
|
+
const defaultChildTransition = {
|
|
8
|
+
type: "tween",
|
|
9
|
+
duration: 0.5,
|
|
10
|
+
ease: [0.22, 1, 0.36, 1], // smooth easeOut
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Motion-first hero with heading/highlight, optional description and CTAs.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
17
|
+
* - Motion: enableMotion toggles entrance transitions; motionOptions controls
|
|
18
|
+
* delays and viewport.
|
|
19
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <HeroMotion
|
|
23
|
+
* heading="Supercharge growth with"
|
|
24
|
+
* highlight="AI-powered insights"
|
|
25
|
+
* primaryCta={{ label: 'Get Started', href: '#contact' }}
|
|
26
|
+
* />
|
|
27
|
+
*/
|
|
28
|
+
export function HeroMotion({ id, ariaLabel = "Hero section", className, heading = "Supercharge growth with", headingNode, highlight = "AI-powered insights", description = (_jsx(_Fragment, { children: "Real-time trends, accurate user signals, and smarter, data-driven decisions." })), primaryCta = { label: "Get Started" }, secondaryCta = { label: "See Demo" }, section = { className: "bg-background relative overflow-hidden" }, container = { className: "mx-auto max-w-7xl px-6 py-24 sm:py-28 lg:py-32" }, content = { className: "mx-auto max-w-3xl text-center" }, headingText = {
|
|
29
|
+
className: "transform-gpu will-change-transform text-foreground text-4xl font-semibold tracking-tight text-balance sm:text-5xl md:text-6xl",
|
|
30
|
+
}, highlightText = {
|
|
31
|
+
className: "from-primary via-primary/80 to-primary/60 bg-gradient-to-r bg-clip-text text-transparent",
|
|
32
|
+
}, descriptionText = {
|
|
33
|
+
className: "transform-gpu will-change-transform text-muted-foreground mt-5 text-base text-pretty sm:text-lg",
|
|
34
|
+
}, actions = { className: "mt-8 flex items-center justify-center gap-3" }, primaryButtonStyle = { size: "lg", variant: "default", className: "" }, secondaryButtonStyle = { size: "lg", variant: "outline", className: "" }, enableMotion = true, motionOptions = {
|
|
35
|
+
viewport: { once: true, amount: 0.25 },
|
|
36
|
+
headingDelay: 0.5,
|
|
37
|
+
descriptionDelay: 0.58,
|
|
38
|
+
actionsDelay: 0.66,
|
|
39
|
+
transition: defaultChildTransition,
|
|
40
|
+
}, backgroundNode, }) {
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
42
|
+
const viewport = enableMotion
|
|
43
|
+
? {
|
|
44
|
+
once: (_b = (_a = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.viewport) === null || _a === void 0 ? void 0 : _a.once) !== null && _b !== void 0 ? _b : true,
|
|
45
|
+
amount: (_d = (_c = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.viewport) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0.25,
|
|
46
|
+
}
|
|
47
|
+
: { once: true, amount: 0 };
|
|
48
|
+
const transition = Object.assign(Object.assign({}, defaultChildTransition), ((_e = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.transition) !== null && _e !== void 0 ? _e : {}));
|
|
49
|
+
return (_jsxs("section", { id: id, "aria-label": ariaLabel, className: cn(section.className, className), children: [backgroundNode, _jsx("div", { className: cn(container.className), children: _jsxs(motion.div, { className: cn(content.className), children: [_jsx(motion.h1, { initial: enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }, whileInView: { opacity: 1, y: 0 }, viewport: viewport, transition: enableMotion
|
|
50
|
+
? Object.assign(Object.assign({}, transition), { delay: (_f = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.headingDelay) !== null && _f !== void 0 ? _f : 0.5 }) : { type: "tween", duration: 0 }, className: cn(headingText.className), children: headingNode ? (headingNode) : (_jsxs(_Fragment, { children: [heading, highlight ? (_jsxs("span", { className: cn(highlightText.className), children: [" ", highlight] })) : null] })) }), description ? (_jsx(motion.p, { initial: enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }, whileInView: { opacity: 1, y: 0 }, viewport: viewport, transition: enableMotion
|
|
51
|
+
? Object.assign(Object.assign({}, transition), { delay: (_g = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.descriptionDelay) !== null && _g !== void 0 ? _g : 0.58 }) : { type: "tween", duration: 0 }, className: cn(descriptionText.className), children: description })) : null, (primaryCta || secondaryCta) && (_jsxs(motion.div, { initial: enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }, whileInView: { opacity: 1, y: 0 }, viewport: viewport, transition: enableMotion
|
|
52
|
+
? Object.assign(Object.assign({}, transition), { delay: (_h = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.actionsDelay) !== null && _h !== void 0 ? _h : 0.66 }) : { type: "tween", duration: 0 }, className: cn(actions.className), children: [primaryCta &&
|
|
53
|
+
(primaryCta.href ? (_jsx(Button, { asChild: true, unstyled: primaryButtonStyle.unstyled, variant: primaryButtonStyle.variant, size: primaryButtonStyle.size, className: cn(primaryButtonStyle.className), style: primaryButtonStyle.style, children: _jsx(Link, { href: primaryCta.href, "aria-label": primaryCta.label, children: primaryCta.label }) })) : (_jsx(Button, { variant: primaryButtonStyle.variant, size: primaryButtonStyle.size, className: cn(primaryButtonStyle.className), unstyled: primaryButtonStyle.unstyled, style: primaryButtonStyle.style, "aria-label": primaryCta.label, children: primaryCta.label }))), secondaryCta &&
|
|
54
|
+
(secondaryCta.href ? (_jsx(Button, { asChild: true, unstyled: secondaryButtonStyle.unstyled, variant: secondaryButtonStyle.variant, size: secondaryButtonStyle.size, className: cn(secondaryButtonStyle.className), style: secondaryButtonStyle.style, children: _jsx(Link, { href: secondaryCta.href, "aria-label": secondaryCta.label, children: secondaryCta.label }) })) : (_jsx(Button, { variant: secondaryButtonStyle.variant, size: secondaryButtonStyle.size, className: cn(secondaryButtonStyle.className), unstyled: secondaryButtonStyle.unstyled, style: secondaryButtonStyle.style, "aria-label": secondaryCta.label, children: secondaryCta.label })))] }))] }) })] }));
|
|
55
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { motion } from "motion/react";
|
|
5
|
+
import { Button } from "@nextworks/blocks-core";
|
|
6
|
+
import { cn } from "@nextworks/blocks-core";
|
|
7
|
+
const defaultChildTransition = {
|
|
8
|
+
type: "tween",
|
|
9
|
+
duration: 0.5,
|
|
10
|
+
ease: [0.22, 1, 0.36, 1], // smooth easeOut
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Motion-first hero with heading/highlight, optional description and CTAs.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
17
|
+
* - Motion: enableMotion toggles entrance transitions; motionOptions controls
|
|
18
|
+
* delays and viewport.
|
|
19
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <HeroMotion
|
|
23
|
+
* heading="Supercharge growth with"
|
|
24
|
+
* highlight="AI-powered insights"
|
|
25
|
+
* primaryCta={{ label: 'Get Started', href: '#contact' }}
|
|
26
|
+
* />
|
|
27
|
+
*/
|
|
28
|
+
export function HeroMotion({ id, ariaLabel = "Hero section", className, heading = "Supercharge growth with", headingNode, highlight = "AI-powered insights", description = (<>
|
|
29
|
+
Real-time trends, accurate user signals, and smarter, data-driven
|
|
30
|
+
decisions.
|
|
31
|
+
</>), primaryCta = { label: "Get Started" }, secondaryCta = { label: "See Demo" }, section = { className: "bg-background relative overflow-hidden" }, container = { className: "mx-auto max-w-7xl px-6 py-24 sm:py-28 lg:py-32" }, content = { className: "mx-auto max-w-3xl text-center" }, headingText = {
|
|
32
|
+
className: "transform-gpu will-change-transform text-foreground text-4xl font-semibold tracking-tight text-balance sm:text-5xl md:text-6xl",
|
|
33
|
+
}, highlightText = {
|
|
34
|
+
className: "from-primary via-primary/80 to-primary/60 bg-gradient-to-r bg-clip-text text-transparent",
|
|
35
|
+
}, descriptionText = {
|
|
36
|
+
className: "transform-gpu will-change-transform text-muted-foreground mt-5 text-base text-pretty sm:text-lg",
|
|
37
|
+
}, actions = { className: "mt-8 flex items-center justify-center gap-3" }, primaryButtonStyle = { size: "lg", variant: "default", className: "" }, secondaryButtonStyle = { size: "lg", variant: "outline", className: "" }, enableMotion = true, motionOptions = {
|
|
38
|
+
viewport: { once: true, amount: 0.25 },
|
|
39
|
+
headingDelay: 0.5,
|
|
40
|
+
descriptionDelay: 0.58,
|
|
41
|
+
actionsDelay: 0.66,
|
|
42
|
+
transition: defaultChildTransition,
|
|
43
|
+
}, backgroundNode, }) {
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
45
|
+
const viewport = enableMotion
|
|
46
|
+
? {
|
|
47
|
+
once: (_b = (_a = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.viewport) === null || _a === void 0 ? void 0 : _a.once) !== null && _b !== void 0 ? _b : true,
|
|
48
|
+
amount: (_d = (_c = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.viewport) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0.25,
|
|
49
|
+
}
|
|
50
|
+
: { once: true, amount: 0 };
|
|
51
|
+
const transition = Object.assign(Object.assign({}, defaultChildTransition), ((_e = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.transition) !== null && _e !== void 0 ? _e : {}));
|
|
52
|
+
return (<section id={id} aria-label={ariaLabel} className={cn(section.className, className)}>
|
|
53
|
+
{backgroundNode}
|
|
54
|
+
<div className={cn(container.className)}>
|
|
55
|
+
<motion.div className={cn(content.className)}>
|
|
56
|
+
<motion.h1 initial={enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }} whileInView={{ opacity: 1, y: 0 }} viewport={viewport} transition={enableMotion
|
|
57
|
+
? Object.assign(Object.assign({}, transition), { delay: (_f = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.headingDelay) !== null && _f !== void 0 ? _f : 0.5 }) : { type: "tween", duration: 0 }} className={cn(headingText.className)}>
|
|
58
|
+
{headingNode ? (headingNode) : (<>
|
|
59
|
+
{heading}
|
|
60
|
+
{highlight ? (<span className={cn(highlightText.className)}>
|
|
61
|
+
{" "}
|
|
62
|
+
{highlight}
|
|
63
|
+
</span>) : null}
|
|
64
|
+
</>)}
|
|
65
|
+
</motion.h1>
|
|
66
|
+
|
|
67
|
+
{description ? (<motion.p initial={enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }} whileInView={{ opacity: 1, y: 0 }} viewport={viewport} transition={enableMotion
|
|
68
|
+
? Object.assign(Object.assign({}, transition), { delay: (_g = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.descriptionDelay) !== null && _g !== void 0 ? _g : 0.58 }) : { type: "tween", duration: 0 }} className={cn(descriptionText.className)}>
|
|
69
|
+
{description}
|
|
70
|
+
</motion.p>) : null}
|
|
71
|
+
|
|
72
|
+
{(primaryCta || secondaryCta) && (<motion.div initial={enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }} whileInView={{ opacity: 1, y: 0 }} viewport={viewport} transition={enableMotion
|
|
73
|
+
? Object.assign(Object.assign({}, transition), { delay: (_h = motionOptions === null || motionOptions === void 0 ? void 0 : motionOptions.actionsDelay) !== null && _h !== void 0 ? _h : 0.66 }) : { type: "tween", duration: 0 }} className={cn(actions.className)}>
|
|
74
|
+
{primaryCta &&
|
|
75
|
+
(primaryCta.href ? (<Button asChild unstyled={primaryButtonStyle.unstyled} variant={primaryButtonStyle.variant} size={primaryButtonStyle.size} className={cn(primaryButtonStyle.className)} style={primaryButtonStyle.style}>
|
|
76
|
+
<Link href={primaryCta.href} aria-label={primaryCta.label}>
|
|
77
|
+
{primaryCta.label}
|
|
78
|
+
</Link>
|
|
79
|
+
</Button>) : (<Button variant={primaryButtonStyle.variant} size={primaryButtonStyle.size} className={cn(primaryButtonStyle.className)} unstyled={primaryButtonStyle.unstyled} style={primaryButtonStyle.style} aria-label={primaryCta.label}>
|
|
80
|
+
{primaryCta.label}
|
|
81
|
+
</Button>))}
|
|
82
|
+
|
|
83
|
+
{secondaryCta &&
|
|
84
|
+
(secondaryCta.href ? (<Button asChild unstyled={secondaryButtonStyle.unstyled} variant={secondaryButtonStyle.variant} size={secondaryButtonStyle.size} className={cn(secondaryButtonStyle.className)} style={secondaryButtonStyle.style}>
|
|
85
|
+
<Link href={secondaryCta.href} aria-label={secondaryCta.label}>
|
|
86
|
+
{secondaryCta.label}
|
|
87
|
+
</Link>
|
|
88
|
+
</Button>) : (<Button variant={secondaryButtonStyle.variant} size={secondaryButtonStyle.size} className={cn(secondaryButtonStyle.className)} unstyled={secondaryButtonStyle.unstyled} style={secondaryButtonStyle.style} aria-label={secondaryCta.label}>
|
|
89
|
+
{secondaryCta.label}
|
|
90
|
+
</Button>))}
|
|
91
|
+
</motion.div>)}
|
|
92
|
+
</motion.div>
|
|
93
|
+
</div>
|
|
94
|
+
</section>);
|
|
95
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the HeroOverlay component.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* - Prefer the structured image prop (image) over deprecated flat props.
|
|
7
|
+
* - Slot-style className overrides are merged after defaults via cn().
|
|
8
|
+
* - Motion controls affect CTA hover transitions.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface HeroOverlayProps {
|
|
13
|
+
id?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
image?: {
|
|
16
|
+
src?: string;
|
|
17
|
+
alt?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
objectFit?: React.CSSProperties["objectFit"];
|
|
20
|
+
objectPosition?: React.CSSProperties["objectPosition"];
|
|
21
|
+
};
|
|
22
|
+
/** @deprecated Use image.src instead */
|
|
23
|
+
imageSrc?: string;
|
|
24
|
+
/** @deprecated Use image.alt instead */
|
|
25
|
+
imageAlt?: string;
|
|
26
|
+
/** @deprecated Use image.objectFit instead */
|
|
27
|
+
imageObjectFit?: React.CSSProperties["objectFit"];
|
|
28
|
+
/** @deprecated Use image.objectPosition instead */
|
|
29
|
+
imageObjectPosition?: React.CSSProperties["objectPosition"];
|
|
30
|
+
heading?: string | {
|
|
31
|
+
text?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
subheading?: string | {
|
|
35
|
+
text?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
};
|
|
38
|
+
overlayRGBA?: string;
|
|
39
|
+
overlayDarkRGBA?: string;
|
|
40
|
+
section?: {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
container?: {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
imageContainer?: {
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
overlay?: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
content?: {
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
textContainer?: {
|
|
56
|
+
className?: string;
|
|
57
|
+
};
|
|
58
|
+
/** @deprecated Use heading.className */
|
|
59
|
+
headingStyle?: {
|
|
60
|
+
className?: string;
|
|
61
|
+
};
|
|
62
|
+
/** @deprecated Use subheading.className */
|
|
63
|
+
subheadingStyle?: {
|
|
64
|
+
className?: string;
|
|
65
|
+
};
|
|
66
|
+
ctaContainer?: {
|
|
67
|
+
className?: string;
|
|
68
|
+
};
|
|
69
|
+
cta1?: {
|
|
70
|
+
label?: string;
|
|
71
|
+
href?: string;
|
|
72
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
73
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
74
|
+
className?: string;
|
|
75
|
+
unstyled?: boolean;
|
|
76
|
+
style?: React.CSSProperties;
|
|
77
|
+
};
|
|
78
|
+
cta2?: {
|
|
79
|
+
label?: string;
|
|
80
|
+
href?: string;
|
|
81
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link";
|
|
82
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
83
|
+
className?: string;
|
|
84
|
+
unstyled?: boolean;
|
|
85
|
+
style?: React.CSSProperties;
|
|
86
|
+
};
|
|
87
|
+
/** @deprecated Use cta1.label instead */
|
|
88
|
+
ctaBtn1Label?: string;
|
|
89
|
+
/** @deprecated Use cta1.href instead */
|
|
90
|
+
ctaBtn1Href?: string;
|
|
91
|
+
/** @deprecated Use cta2.label instead */
|
|
92
|
+
ctaBtn2Label?: string;
|
|
93
|
+
/** @deprecated Use cta2.href instead */
|
|
94
|
+
ctaBtn2Href?: string;
|
|
95
|
+
ariaLabel?: string;
|
|
96
|
+
enableMotion?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Full-bleed image hero with color overlay, heading/subheading, and up to two CTAs.
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* - Styling: slot-style overrides for container, imageContainer, overlay, content, textContainer.
|
|
103
|
+
* - Motion: enableMotion applies hover-lift transitions to CTA buttons only.
|
|
104
|
+
* - Accessibility: uses semantic <section> with aria-label; background image is
|
|
105
|
+
* decorative with overlay and text content provided separately.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* <HeroOverlay
|
|
109
|
+
* image={{ src: "/hero.png", alt: "" }}
|
|
110
|
+
* heading="Welcome"
|
|
111
|
+
* subheading="Build faster with our blocks"
|
|
112
|
+
* cta1={{ label: "Get Started", href: "#getstarted" }}
|
|
113
|
+
* />
|
|
114
|
+
*/
|
|
115
|
+
export declare function HeroOverlay({ id, className, imageSrc, imageAlt, imageObjectFit, imageObjectPosition, image, heading, subheading, overlayRGBA, overlayDarkRGBA, ctaBtn1Label, ctaBtn1Href, ctaBtn2Label, ctaBtn2Href, container, section, imageContainer, overlay, content, textContainer, headingStyle, subheadingStyle, ctaContainer, cta1, cta2, ariaLabel, enableMotion, }: HeroOverlayProps): React.JSX.Element;
|
|
116
|
+
//# sourceMappingURL=HeroOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeroOverlay.d.ts","sourceRoot":"","sources":["../../src/components/HeroOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,KAAK,CAAC,EAAE;QACN,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC;KACxD,CAAC;IAGF,wCAAwC;IACxC,QAAQ,CAAC,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