@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,97 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { motion } from "motion/react";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
/**
|
|
6
|
+
* Default services data for digital agency
|
|
7
|
+
*/
|
|
8
|
+
const defaultServicesData = [
|
|
9
|
+
{
|
|
10
|
+
icon: "💻",
|
|
11
|
+
title: "Web Design & Development",
|
|
12
|
+
description: "Custom websites that capture your brand and convert visitors into customers",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
icon: "📈",
|
|
16
|
+
title: "SEO & Digital Marketing",
|
|
17
|
+
description: "Get found on Google and drive qualified traffic to your website",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
icon: "🛒",
|
|
21
|
+
title: "E-commerce Solutions",
|
|
22
|
+
description: "Online stores that maximize sales and customer experience",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
icon: "🎨",
|
|
26
|
+
title: "Brand Identity & Design",
|
|
27
|
+
description: "Logo, branding, and visual identity that makes you stand out",
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Responsive services grid with subtle motion and slot-style overrides.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* - Motion can be disabled globally with enableMotion.
|
|
35
|
+
* - Each card uses simple emoji icons by default; replace with real icons if preferred.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* <ServicesGrid servicesData={[{ icon: '⚙️', title: 'Automation', description: '...' }]} />
|
|
39
|
+
*/
|
|
40
|
+
export function ServicesGrid({ id, className, sectionHeading = "Our Services", servicesData = defaultServicesData, enableMotion = true, section = {
|
|
41
|
+
className: "py-16 md:py-20 lg:py-24 bg-muted",
|
|
42
|
+
}, container = {
|
|
43
|
+
className: "max-w-6xl mx-auto px-4 md:px-6 lg:px-8",
|
|
44
|
+
}, heading = {
|
|
45
|
+
className: "text-3xl md:text-4xl lg:text-5xl font-bold font-poppins text-foreground text-center mb-8 md:mb-12",
|
|
46
|
+
}, grid = {
|
|
47
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8 items-stretch",
|
|
48
|
+
}, card = {
|
|
49
|
+
className: "bg-card/90 backdrop-blur p-6 md:p-8 rounded-lg border border-border shadow-sm hover:shadow-md transition-all duration-300 bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
50
|
+
}, cardContent = {
|
|
51
|
+
className: "flex flex-col h-full space-y-4",
|
|
52
|
+
}, icon = {
|
|
53
|
+
className: "text-4xl",
|
|
54
|
+
}, title = {
|
|
55
|
+
className: "text-lg md:text-xl font-semibold font-poppins text-card-foreground leading-tight text-[var(--card-title-fg)]",
|
|
56
|
+
}, description = {
|
|
57
|
+
className: "text-sm md:text-base font-inter leading-relaxed flex-1 text-[var(--card-muted-fg)]",
|
|
58
|
+
}, ariaLabel = "Services section", }) {
|
|
59
|
+
return (<section id={id} className={cn(section.className, className)} aria-label={ariaLabel}>
|
|
60
|
+
<div className={container.className}>
|
|
61
|
+
{/* Section Heading */}
|
|
62
|
+
<h2 className={heading.className}>{sectionHeading}</h2>
|
|
63
|
+
|
|
64
|
+
{/* Services Grid */}
|
|
65
|
+
<div className={grid.className}>
|
|
66
|
+
{servicesData.map((service, index) => (<motion.div key={index} initial={enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }} whileInView={enableMotion ? { opacity: 1, y: 0 } : { opacity: 1, y: 0 }} viewport={enableMotion
|
|
67
|
+
? { once: true, amount: 0.2 }
|
|
68
|
+
: { once: true, amount: 0 }} transition={enableMotion
|
|
69
|
+
? {
|
|
70
|
+
type: "spring",
|
|
71
|
+
stiffness: 125,
|
|
72
|
+
damping: 50,
|
|
73
|
+
mass: 1,
|
|
74
|
+
delay: 0.12 + index * 0.05,
|
|
75
|
+
}
|
|
76
|
+
: { type: "tween", duration: 0 }} className={cn("h-full motion-reduce:transform-none motion-reduce:transition-none")}>
|
|
77
|
+
<div className={cn(card.className, "flex h-full flex-col", enableMotion
|
|
78
|
+
? "transition-transform duration-200 hover:-translate-y-1"
|
|
79
|
+
: "transition-none hover:!translate-y-0 hover:shadow-none")}>
|
|
80
|
+
<div className={cardContent.className}>
|
|
81
|
+
{/* Service Icon */}
|
|
82
|
+
<div className={icon.className} role="img" aria-label={service.title}>
|
|
83
|
+
{service.icon}
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
{/* Service Title */}
|
|
87
|
+
<h3 className={title.className}>{service.title}</h3>
|
|
88
|
+
|
|
89
|
+
{/* Service Description */}
|
|
90
|
+
<p className={description.className}>{service.description}</p>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
</motion.div>))}
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</section>);
|
|
97
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A social link shown on a team member card.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface SocialLink {
|
|
7
|
+
/** Platform name (e.g., "LinkedIn") */
|
|
8
|
+
platform: string;
|
|
9
|
+
/** Destination URL */
|
|
10
|
+
url: string;
|
|
11
|
+
/** Icon identifier or emoji; replace with SVGs in real usage */
|
|
12
|
+
icon: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Team member data rendered by Team.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface TeamMemberData {
|
|
19
|
+
/** Member name */
|
|
20
|
+
name?: string;
|
|
21
|
+
/** Job role or title */
|
|
22
|
+
role?: string;
|
|
23
|
+
/** Short bio or description */
|
|
24
|
+
bio?: string;
|
|
25
|
+
/** Avatar content (emoji or image URL if swapped out) */
|
|
26
|
+
avatar?: string;
|
|
27
|
+
/** Optional social links */
|
|
28
|
+
socialLinks?: SocialLink[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props for the Team section component.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
35
|
+
* - Motion: enableMotion controls hover lift on cards.
|
|
36
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
37
|
+
*/
|
|
38
|
+
export interface TeamProps {
|
|
39
|
+
/** Optional id on root. @defaultValue "team" */
|
|
40
|
+
id?: string;
|
|
41
|
+
/** Top-level className override */
|
|
42
|
+
className?: string;
|
|
43
|
+
/** Section heading text or object. @defaultValue "Meet Our Team" */
|
|
44
|
+
teamHeadingText?: string | {
|
|
45
|
+
text?: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
};
|
|
48
|
+
/** Optional subheading text or object. @defaultValue "The talented people behind your success" */
|
|
49
|
+
teamSubheadingText?: string | {
|
|
50
|
+
text?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
};
|
|
53
|
+
/** Members to render. @defaultValue DefaultTeamData */
|
|
54
|
+
teamMembers?: TeamMemberData[];
|
|
55
|
+
/** Slot-style overrides */
|
|
56
|
+
section?: {
|
|
57
|
+
className?: string;
|
|
58
|
+
};
|
|
59
|
+
container?: {
|
|
60
|
+
className?: string;
|
|
61
|
+
};
|
|
62
|
+
header?: {
|
|
63
|
+
className?: string;
|
|
64
|
+
};
|
|
65
|
+
heading?: {
|
|
66
|
+
className?: string;
|
|
67
|
+
};
|
|
68
|
+
subheading?: {
|
|
69
|
+
className?: string;
|
|
70
|
+
};
|
|
71
|
+
grid?: {
|
|
72
|
+
className?: string;
|
|
73
|
+
};
|
|
74
|
+
card?: {
|
|
75
|
+
className?: string;
|
|
76
|
+
};
|
|
77
|
+
cardContent?: {
|
|
78
|
+
className?: string;
|
|
79
|
+
};
|
|
80
|
+
avatar?: {
|
|
81
|
+
className?: string;
|
|
82
|
+
};
|
|
83
|
+
name?: {
|
|
84
|
+
className?: string;
|
|
85
|
+
};
|
|
86
|
+
role?: {
|
|
87
|
+
className?: string;
|
|
88
|
+
};
|
|
89
|
+
bio?: {
|
|
90
|
+
className?: string;
|
|
91
|
+
};
|
|
92
|
+
socialLinks?: {
|
|
93
|
+
className?: string;
|
|
94
|
+
};
|
|
95
|
+
socialLink?: {
|
|
96
|
+
className?: string;
|
|
97
|
+
};
|
|
98
|
+
/** When false, removes hover lift on cards */
|
|
99
|
+
enableMotion?: boolean;
|
|
100
|
+
/** ARIA label for the section. @defaultValue "Team section" */
|
|
101
|
+
ariaLabel?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Team section with heading, subheading, and a responsive member grid.
|
|
105
|
+
*
|
|
106
|
+
* @remarks
|
|
107
|
+
* - Uses a slot-style API for className overrides merged via cn().
|
|
108
|
+
* - Motion: enableMotion toggles hover lift on cards.
|
|
109
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* <Team teamMembers={[{ name: 'Alex', role: 'Engineer' }]} />
|
|
113
|
+
*/
|
|
114
|
+
export declare function Team({ id, className, teamMembers, teamHeadingText, teamSubheadingText, section, container, header, heading, subheading, grid, card, cardContent, avatar, name, role, bio, socialLinks, socialLink, enableMotion, ariaLabel, }: TeamProps): React.JSX.Element;
|
|
115
|
+
//# sourceMappingURL=Team.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Team.d.ts","sourceRoot":"","sources":["../../src/components/Team.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
const DefaultTeamData = [
|
|
6
|
+
{
|
|
7
|
+
name: "Alex Chen",
|
|
8
|
+
role: "CEO & Founder",
|
|
9
|
+
bio: "Full-stack developer with 8+ years.",
|
|
10
|
+
avatar: "👨💼",
|
|
11
|
+
socialLinks: [{ platform: "LinkedIn", url: "#", icon: "💼" }],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "Sarah Martinez",
|
|
15
|
+
role: "Lead Designer",
|
|
16
|
+
bio: "UI/UX expert.",
|
|
17
|
+
avatar: "👩🎨",
|
|
18
|
+
socialLinks: [{ platform: "Dribbble", url: "#", icon: "🎨" }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Jordan Patel",
|
|
22
|
+
role: "DevOps Engineer",
|
|
23
|
+
bio: "Automates cloud infra and CI/CD pipelines.",
|
|
24
|
+
avatar: "🛠️",
|
|
25
|
+
socialLinks: [{ platform: "GitHub", url: "#", icon: "🐙" }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "Maya Thompson",
|
|
29
|
+
role: "Product Manager",
|
|
30
|
+
bio: "Drives roadmap and aligns cross‑functional teams.",
|
|
31
|
+
avatar: "🧭",
|
|
32
|
+
socialLinks: [{ platform: "Twitter", url: "#", icon: "🐦" }],
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Internal presentational card for a single team member.
|
|
37
|
+
* Receives already-merged className strings from the parent.
|
|
38
|
+
*/
|
|
39
|
+
function TeamCard({ member, card = { className: "" }, cardContent = { className: "" }, avatar = { className: "" }, name = { className: "" }, role = { className: "" }, bio = { className: "" }, socialLinks = { className: "" }, socialLink = { className: "" }, }) {
|
|
40
|
+
return (_jsx("div", { className: card.className, children: _jsxs("div", { className: cardContent.className, children: [_jsx("div", { className: avatar.className, children: member.avatar }), _jsx("h3", { className: name.className, children: member.name }), _jsx("p", { className: role.className, children: member.role }), _jsx("p", { className: bio.className, children: member.bio }), member.socialLinks && member.socialLinks.length > 0 && (_jsx("div", { className: socialLinks.className, children: member.socialLinks.map((social, index) => (_jsx(Link, { href: social.url, className: socialLink.className, title: social.platform, "aria-label": `${member.name}'s ${social.platform} profile`, children: social.icon }, index))) }))] }) }));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Team section with heading, subheading, and a responsive member grid.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* - Uses a slot-style API for className overrides merged via cn().
|
|
47
|
+
* - Motion: enableMotion toggles hover lift on cards.
|
|
48
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* <Team teamMembers={[{ name: 'Alex', role: 'Engineer' }]} />
|
|
52
|
+
*/
|
|
53
|
+
export function Team({ id, className, teamMembers = DefaultTeamData, teamHeadingText = "Meet Our Team", teamSubheadingText = "The talented people behind your success", section, container, header, heading, subheading, grid, card, cardContent, avatar, name, role, bio, socialLinks, socialLink, enableMotion = true, ariaLabel = "Team section", }) {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
// Defaults for slots
|
|
56
|
+
const defaultSection = "py-16 px-6 bg-muted";
|
|
57
|
+
const defaultContainer = "max-w-7xl mx-auto";
|
|
58
|
+
const defaultHeader = "space-y-12 items-center";
|
|
59
|
+
const defaultHeadingClass = "text-3xl font-bold font-poppins text-foreground text-center text-[var(--heading-fg)]";
|
|
60
|
+
const defaultSubheadingClass = "text-lg font-inter text-muted-foreground opacity-80 leading-relaxed text-center max-w-2xl text-[var(--subheading-fg)]";
|
|
61
|
+
const defaultGrid = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 w-full";
|
|
62
|
+
const defaultCardBase = "bg-card p-6 rounded-lg shadow-md text-center border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]";
|
|
63
|
+
const defaultCardContent = "flex flex-col items-center space-y-4";
|
|
64
|
+
const defaultAvatar = "text-4xl mb-2";
|
|
65
|
+
const defaultName = "text-xl font-bold font-poppins text-card-foreground text-[var(--card-fg)]";
|
|
66
|
+
const defaultRole = "text-md font-semibold font-poppins text-primary";
|
|
67
|
+
const defaultBio = "text-sm font-inter text-muted-foreground opacity-80 leading-relaxed text-[var(--card-muted-fg)]";
|
|
68
|
+
const defaultSocialLinks = "flex gap-3 mt-2";
|
|
69
|
+
const defaultSocialLink = "text-lg text-primary hover:text-accent-foreground transition-colors duration-200";
|
|
70
|
+
// Motion control for card
|
|
71
|
+
const motionCard = enableMotion
|
|
72
|
+
? "transition-transform duration-200 hover:-translate-y-1"
|
|
73
|
+
: "transition-none hover:!translate-y-0";
|
|
74
|
+
// Merge slot classes using cn (defaults first, then overrides)
|
|
75
|
+
const finalSectionClass = cn(defaultSection, section === null || section === void 0 ? void 0 : section.className, className);
|
|
76
|
+
const finalContainerClass = cn(defaultContainer, container === null || container === void 0 ? void 0 : container.className);
|
|
77
|
+
const finalHeaderClass = cn(defaultHeader, header === null || header === void 0 ? void 0 : header.className);
|
|
78
|
+
const finalGridClass = cn(defaultGrid, grid === null || grid === void 0 ? void 0 : grid.className);
|
|
79
|
+
const finalCardClass = cn(defaultCardBase, motionCard, card === null || card === void 0 ? void 0 : card.className);
|
|
80
|
+
const finalCardContentClass = cn(defaultCardContent, cardContent === null || cardContent === void 0 ? void 0 : cardContent.className);
|
|
81
|
+
const finalAvatarClass = cn(defaultAvatar, avatar === null || avatar === void 0 ? void 0 : avatar.className);
|
|
82
|
+
const finalNameClass = cn(defaultName, name === null || name === void 0 ? void 0 : name.className);
|
|
83
|
+
const finalRoleClass = cn(defaultRole, role === null || role === void 0 ? void 0 : role.className);
|
|
84
|
+
const finalBioClass = cn(defaultBio, bio === null || bio === void 0 ? void 0 : bio.className);
|
|
85
|
+
const finalSocialLinksClass = cn(defaultSocialLinks, socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.className);
|
|
86
|
+
const finalSocialLinkClass = cn(defaultSocialLink, socialLink === null || socialLink === void 0 ? void 0 : socialLink.className);
|
|
87
|
+
// Normalize heading/subheading allowing string or object, plus slot class merges
|
|
88
|
+
const normalizedHeading = typeof teamHeadingText === "string"
|
|
89
|
+
? {
|
|
90
|
+
text: teamHeadingText,
|
|
91
|
+
className: cn(defaultHeadingClass, heading === null || heading === void 0 ? void 0 : heading.className),
|
|
92
|
+
}
|
|
93
|
+
: {
|
|
94
|
+
text: (_a = teamHeadingText === null || teamHeadingText === void 0 ? void 0 : teamHeadingText.text) !== null && _a !== void 0 ? _a : "Meet Our Team",
|
|
95
|
+
className: cn(defaultHeadingClass, teamHeadingText === null || teamHeadingText === void 0 ? void 0 : teamHeadingText.className, heading === null || heading === void 0 ? void 0 : heading.className),
|
|
96
|
+
};
|
|
97
|
+
const normalizedSubheading = typeof teamSubheadingText === "string"
|
|
98
|
+
? {
|
|
99
|
+
text: teamSubheadingText,
|
|
100
|
+
className: cn(defaultSubheadingClass, subheading === null || subheading === void 0 ? void 0 : subheading.className),
|
|
101
|
+
}
|
|
102
|
+
: {
|
|
103
|
+
text: (_b = teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.text) !== null && _b !== void 0 ? _b : "The talented people behind your success",
|
|
104
|
+
className: cn(defaultSubheadingClass, teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.className, subheading === null || subheading === void 0 ? void 0 : subheading.className),
|
|
105
|
+
};
|
|
106
|
+
return (_jsx("section", { id: id || "team", className: finalSectionClass, "aria-label": ariaLabel, children: _jsx("div", { className: finalContainerClass, children: _jsxs("div", { className: finalHeaderClass, children: [_jsxs("div", { className: "mx-auto flex max-w-2xl flex-col items-center space-y-4 text-center", children: [_jsx("h2", { className: normalizedHeading.className, children: normalizedHeading.text }), _jsx("p", { className: normalizedSubheading.className, children: normalizedSubheading.text })] }), _jsx("div", { className: finalGridClass, children: teamMembers.map((member, index) => (_jsx(TeamCard, { member: member, card: { className: finalCardClass }, cardContent: { className: finalCardContentClass }, avatar: { className: finalAvatarClass }, name: { className: finalNameClass }, role: { className: finalRoleClass }, bio: { className: finalBioClass }, socialLinks: { className: finalSocialLinksClass }, socialLink: { className: finalSocialLinkClass } }, index))) })] }) }) }));
|
|
107
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
const DefaultTeamData = [
|
|
6
|
+
{
|
|
7
|
+
name: "Alex Chen",
|
|
8
|
+
role: "CEO & Founder",
|
|
9
|
+
bio: "Full-stack developer with 8+ years.",
|
|
10
|
+
avatar: "👨💼",
|
|
11
|
+
socialLinks: [{ platform: "LinkedIn", url: "#", icon: "💼" }],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: "Sarah Martinez",
|
|
15
|
+
role: "Lead Designer",
|
|
16
|
+
bio: "UI/UX expert.",
|
|
17
|
+
avatar: "👩🎨",
|
|
18
|
+
socialLinks: [{ platform: "Dribbble", url: "#", icon: "🎨" }],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "Jordan Patel",
|
|
22
|
+
role: "DevOps Engineer",
|
|
23
|
+
bio: "Automates cloud infra and CI/CD pipelines.",
|
|
24
|
+
avatar: "🛠️",
|
|
25
|
+
socialLinks: [{ platform: "GitHub", url: "#", icon: "🐙" }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "Maya Thompson",
|
|
29
|
+
role: "Product Manager",
|
|
30
|
+
bio: "Drives roadmap and aligns cross‑functional teams.",
|
|
31
|
+
avatar: "🧭",
|
|
32
|
+
socialLinks: [{ platform: "Twitter", url: "#", icon: "🐦" }],
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Internal presentational card for a single team member.
|
|
37
|
+
* Receives already-merged className strings from the parent.
|
|
38
|
+
*/
|
|
39
|
+
function TeamCard({ member, card = { className: "" }, cardContent = { className: "" }, avatar = { className: "" }, name = { className: "" }, role = { className: "" }, bio = { className: "" }, socialLinks = { className: "" }, socialLink = { className: "" }, }) {
|
|
40
|
+
return (<div className={card.className}>
|
|
41
|
+
<div className={cardContent.className}>
|
|
42
|
+
<div className={avatar.className}>{member.avatar}</div>
|
|
43
|
+
<h3 className={name.className}>{member.name}</h3>
|
|
44
|
+
<p className={role.className}>{member.role}</p>
|
|
45
|
+
<p className={bio.className}>{member.bio}</p>
|
|
46
|
+
{member.socialLinks && member.socialLinks.length > 0 && (<div className={socialLinks.className}>
|
|
47
|
+
{member.socialLinks.map((social, index) => (<Link key={index} href={social.url} className={socialLink.className} title={social.platform} aria-label={`${member.name}'s ${social.platform} profile`}>
|
|
48
|
+
{social.icon}
|
|
49
|
+
</Link>))}
|
|
50
|
+
</div>)}
|
|
51
|
+
</div>
|
|
52
|
+
</div>);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Team section with heading, subheading, and a responsive member grid.
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* - Uses a slot-style API for className overrides merged via cn().
|
|
59
|
+
* - Motion: enableMotion toggles hover lift on cards.
|
|
60
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* <Team teamMembers={[{ name: 'Alex', role: 'Engineer' }]} />
|
|
64
|
+
*/
|
|
65
|
+
export function Team({ id, className, teamMembers = DefaultTeamData, teamHeadingText = "Meet Our Team", teamSubheadingText = "The talented people behind your success", section, container, header, heading, subheading, grid, card, cardContent, avatar, name, role, bio, socialLinks, socialLink, enableMotion = true, ariaLabel = "Team section", }) {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
// Defaults for slots
|
|
68
|
+
const defaultSection = "py-16 px-6 bg-muted";
|
|
69
|
+
const defaultContainer = "max-w-7xl mx-auto";
|
|
70
|
+
const defaultHeader = "space-y-12 items-center";
|
|
71
|
+
const defaultHeadingClass = "text-3xl font-bold font-poppins text-foreground text-center text-[var(--heading-fg)]";
|
|
72
|
+
const defaultSubheadingClass = "text-lg font-inter text-muted-foreground opacity-80 leading-relaxed text-center max-w-2xl text-[var(--subheading-fg)]";
|
|
73
|
+
const defaultGrid = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8 w-full";
|
|
74
|
+
const defaultCardBase = "bg-card p-6 rounded-lg shadow-md text-center border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]";
|
|
75
|
+
const defaultCardContent = "flex flex-col items-center space-y-4";
|
|
76
|
+
const defaultAvatar = "text-4xl mb-2";
|
|
77
|
+
const defaultName = "text-xl font-bold font-poppins text-card-foreground text-[var(--card-fg)]";
|
|
78
|
+
const defaultRole = "text-md font-semibold font-poppins text-primary";
|
|
79
|
+
const defaultBio = "text-sm font-inter text-muted-foreground opacity-80 leading-relaxed text-[var(--card-muted-fg)]";
|
|
80
|
+
const defaultSocialLinks = "flex gap-3 mt-2";
|
|
81
|
+
const defaultSocialLink = "text-lg text-primary hover:text-accent-foreground transition-colors duration-200";
|
|
82
|
+
// Motion control for card
|
|
83
|
+
const motionCard = enableMotion
|
|
84
|
+
? "transition-transform duration-200 hover:-translate-y-1"
|
|
85
|
+
: "transition-none hover:!translate-y-0";
|
|
86
|
+
// Merge slot classes using cn (defaults first, then overrides)
|
|
87
|
+
const finalSectionClass = cn(defaultSection, section === null || section === void 0 ? void 0 : section.className, className);
|
|
88
|
+
const finalContainerClass = cn(defaultContainer, container === null || container === void 0 ? void 0 : container.className);
|
|
89
|
+
const finalHeaderClass = cn(defaultHeader, header === null || header === void 0 ? void 0 : header.className);
|
|
90
|
+
const finalGridClass = cn(defaultGrid, grid === null || grid === void 0 ? void 0 : grid.className);
|
|
91
|
+
const finalCardClass = cn(defaultCardBase, motionCard, card === null || card === void 0 ? void 0 : card.className);
|
|
92
|
+
const finalCardContentClass = cn(defaultCardContent, cardContent === null || cardContent === void 0 ? void 0 : cardContent.className);
|
|
93
|
+
const finalAvatarClass = cn(defaultAvatar, avatar === null || avatar === void 0 ? void 0 : avatar.className);
|
|
94
|
+
const finalNameClass = cn(defaultName, name === null || name === void 0 ? void 0 : name.className);
|
|
95
|
+
const finalRoleClass = cn(defaultRole, role === null || role === void 0 ? void 0 : role.className);
|
|
96
|
+
const finalBioClass = cn(defaultBio, bio === null || bio === void 0 ? void 0 : bio.className);
|
|
97
|
+
const finalSocialLinksClass = cn(defaultSocialLinks, socialLinks === null || socialLinks === void 0 ? void 0 : socialLinks.className);
|
|
98
|
+
const finalSocialLinkClass = cn(defaultSocialLink, socialLink === null || socialLink === void 0 ? void 0 : socialLink.className);
|
|
99
|
+
// Normalize heading/subheading allowing string or object, plus slot class merges
|
|
100
|
+
const normalizedHeading = typeof teamHeadingText === "string"
|
|
101
|
+
? {
|
|
102
|
+
text: teamHeadingText,
|
|
103
|
+
className: cn(defaultHeadingClass, heading === null || heading === void 0 ? void 0 : heading.className),
|
|
104
|
+
}
|
|
105
|
+
: {
|
|
106
|
+
text: (_a = teamHeadingText === null || teamHeadingText === void 0 ? void 0 : teamHeadingText.text) !== null && _a !== void 0 ? _a : "Meet Our Team",
|
|
107
|
+
className: cn(defaultHeadingClass, teamHeadingText === null || teamHeadingText === void 0 ? void 0 : teamHeadingText.className, heading === null || heading === void 0 ? void 0 : heading.className),
|
|
108
|
+
};
|
|
109
|
+
const normalizedSubheading = typeof teamSubheadingText === "string"
|
|
110
|
+
? {
|
|
111
|
+
text: teamSubheadingText,
|
|
112
|
+
className: cn(defaultSubheadingClass, subheading === null || subheading === void 0 ? void 0 : subheading.className),
|
|
113
|
+
}
|
|
114
|
+
: {
|
|
115
|
+
text: (_b = teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.text) !== null && _b !== void 0 ? _b : "The talented people behind your success",
|
|
116
|
+
className: cn(defaultSubheadingClass, teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.className, subheading === null || subheading === void 0 ? void 0 : subheading.className),
|
|
117
|
+
};
|
|
118
|
+
return (<section id={id || "team"} className={finalSectionClass} aria-label={ariaLabel}>
|
|
119
|
+
<div className={finalContainerClass}>
|
|
120
|
+
<div className={finalHeaderClass}>
|
|
121
|
+
<div className="mx-auto flex max-w-2xl flex-col items-center space-y-4 text-center">
|
|
122
|
+
<h2 className={normalizedHeading.className}>
|
|
123
|
+
{normalizedHeading.text}
|
|
124
|
+
</h2>
|
|
125
|
+
<p className={normalizedSubheading.className}>
|
|
126
|
+
{normalizedSubheading.text}
|
|
127
|
+
</p>
|
|
128
|
+
</div>
|
|
129
|
+
<div className={finalGridClass}>
|
|
130
|
+
{teamMembers.map((member, index) => (<TeamCard key={index} member={member} card={{ className: finalCardClass }} cardContent={{ className: finalCardContentClass }} avatar={{ className: finalAvatarClass }} name={{ className: finalNameClass }} role={{ className: finalRoleClass }} bio={{ className: finalBioClass }} socialLinks={{ className: finalSocialLinksClass }} socialLink={{ className: finalSocialLinkClass }}/>))}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</section>);
|
|
135
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Data used to render a TestimonialCard.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface TestimonialCardData {
|
|
7
|
+
/** The testimonial quote text */
|
|
8
|
+
testimonialText: string;
|
|
9
|
+
/** The author's display name (prefixed with hyphen in defaults) */
|
|
10
|
+
testimonialAuthor: string;
|
|
11
|
+
/** Author initials displayed in the avatar */
|
|
12
|
+
testimonialAuthorInitials: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Props for the Testimonials section component.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* - Styling: slot-style className overrides are merged after defaults via cn().
|
|
19
|
+
* - Motion: enableMotion toggles card hover transitions.
|
|
20
|
+
* - Accessibility: semantic <section> with aria-label.
|
|
21
|
+
*/
|
|
22
|
+
export interface TestimonialsProps {
|
|
23
|
+
/** Optional id */
|
|
24
|
+
id?: string;
|
|
25
|
+
/** Root className merged into slots */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Testimonial items to render. @defaultValue defaultTestimonialData */
|
|
28
|
+
testimonials?: TestimonialCardData[];
|
|
29
|
+
/** Heading displayed above the grid. @defaultValue "What Our Customers Say" */
|
|
30
|
+
testimonialSectionHeader?: string;
|
|
31
|
+
/** When false, disables hover transitions on cards */
|
|
32
|
+
enableMotion?: boolean;
|
|
33
|
+
/** Slot-style overrides */
|
|
34
|
+
section?: {
|
|
35
|
+
className?: string;
|
|
36
|
+
};
|
|
37
|
+
container?: {
|
|
38
|
+
className?: string;
|
|
39
|
+
};
|
|
40
|
+
header?: {
|
|
41
|
+
className?: string;
|
|
42
|
+
};
|
|
43
|
+
heading?: {
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
grid?: {
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
card?: {
|
|
50
|
+
className?: string;
|
|
51
|
+
};
|
|
52
|
+
content?: {
|
|
53
|
+
className?: string;
|
|
54
|
+
};
|
|
55
|
+
text?: {
|
|
56
|
+
className?: string;
|
|
57
|
+
};
|
|
58
|
+
author?: {
|
|
59
|
+
className?: string;
|
|
60
|
+
};
|
|
61
|
+
avatar?: {
|
|
62
|
+
className?: string;
|
|
63
|
+
};
|
|
64
|
+
avatarText?: {
|
|
65
|
+
className?: string;
|
|
66
|
+
};
|
|
67
|
+
/** ARIA label for the section. @defaultValue "Testimonials section" */
|
|
68
|
+
ariaLabel?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Testimonials section that renders a grid of TestimonialCard items.
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* - Slot-style overrides match TestimonialCard sub-slots (card, content, text, etc.).
|
|
75
|
+
* - Motion can be disabled via enableMotion.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* <Testimonials testimonials={[{ testimonialText: 'Great!', testimonialAuthor: ' - Jane', testimonialAuthorInitials: 'J' }]} />
|
|
79
|
+
*/
|
|
80
|
+
export declare function Testimonials({ id, className, testimonials, testimonialSectionHeader, enableMotion, section, container, header, heading, grid, card, content, text, author, avatar, avatarText, ariaLabel, }: TestimonialsProps): React.JSX.Element;
|
|
81
|
+
//# sourceMappingURL=Testimonials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Testimonials.d.ts","sourceRoot":"","sources":["../../src/components/Testimonials.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,mEAAmE;IACnE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8CAA8C;IAC9C,yBAAyB,EAAE,MAAM,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,wEAAwE;IACxE,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACrC,+EAA+E;IAC/E,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,sDAAsD;IACtD,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,2BAA2B;IAC3B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,SAAS,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,MAAM,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,UAAU,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEpC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAqBD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,SAAS,EACT,YAAqC,EACrC,wBAAmD,EACnD,YAAmB,EACnB,OAA8C,EAC9C,SAA8C,EAC9C,MAA2C,EAC3C,OAEC,EACD,IAA4E,EAC5E,IAGC,EACD,OAAkD,EAClD,IAGC,EACD,MAGC,EACD,MAGC,EACD,UAA+D,EAC/D,SAAkC,GACnC,EAAE,iBAAiB,qBAsCnB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@nextworks/blocks-core";
|
|
4
|
+
import { TestimonialCard } from "@nextworks/blocks-core";
|
|
5
|
+
const defaultTestimonialData = [
|
|
6
|
+
{
|
|
7
|
+
testimonialText: "Lorem ipsum dolor sit amet! Consectetur adipiscing elit.",
|
|
8
|
+
testimonialAuthor: " - Cillum Dolore",
|
|
9
|
+
testimonialAuthorInitials: "CD",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
testimonialText: "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi!",
|
|
13
|
+
testimonialAuthor: " - Voluptate Velit",
|
|
14
|
+
testimonialAuthorInitials: "VV",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
testimonialText: "Cillum dolore eu fugiat nulla pariatur!",
|
|
18
|
+
testimonialAuthor: " - Laboris Nisi",
|
|
19
|
+
testimonialAuthorInitials: "LN",
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Testimonials section that renders a grid of TestimonialCard items.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* - Slot-style overrides match TestimonialCard sub-slots (card, content, text, etc.).
|
|
27
|
+
* - Motion can be disabled via enableMotion.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <Testimonials testimonials={[{ testimonialText: 'Great!', testimonialAuthor: ' - Jane', testimonialAuthorInitials: 'J' }]} />
|
|
31
|
+
*/
|
|
32
|
+
export function Testimonials({ id, className, testimonials = defaultTestimonialData, testimonialSectionHeader = "What Our Customers Say", enableMotion = true, section = { className: "py-16 px-6 bg-muted" }, container = { className: "max-w-7xl mx-auto" }, header = { className: "text-center mb-12" }, heading = {
|
|
33
|
+
className: "text-3xl md:text-4xl font-bold font-poppins text-foreground",
|
|
34
|
+
}, grid = { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" }, card = {
|
|
35
|
+
className: "bg-card/90 backdrop-blur p-6 rounded-lg shadow-md transition-transform duration-200 hover:-translate-y-1 border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
36
|
+
}, content = { className: "flex flex-col space-y-4" }, text = {
|
|
37
|
+
className: "text-card-foreground text-base leading-relaxed italic font-inter text-[var(--card-fg)]",
|
|
38
|
+
}, author = {
|
|
39
|
+
className: "text-muted-foreground text-sm font-medium font-poppins text-[var(--card-muted-fg)]",
|
|
40
|
+
}, avatar = {
|
|
41
|
+
className: "w-12 h-12 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-lg font-bold bg-[var(--badge-bg)] text-[var(--badge-fg)] border-[var(--badge-border)]",
|
|
42
|
+
}, avatarText = { className: "text-primary-foreground font-bold" }, ariaLabel = "Testimonials section", }) {
|
|
43
|
+
return (_jsx("section", { id: id || "testimonials", className: cn(section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: container.className, children: [_jsx("div", { className: header.className, children: _jsx("h2", { className: heading.className, children: testimonialSectionHeader }) }), _jsx("div", { className: grid.className, children: testimonials.map((testimonial, index) => (_jsx(TestimonialCard, { testimonialText: testimonial.testimonialText, testimonialAuthor: testimonial.testimonialAuthor, testimonialAuthorInitials: testimonial.testimonialAuthorInitials, card: {
|
|
44
|
+
className: cn(card.className, !enableMotion && "transition-none hover:!translate-y-0"),
|
|
45
|
+
}, content: content, text: text, author: author, avatar: avatar, avatarText: avatarText }, index))) })] }) }));
|
|
46
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { cn } from "@nextworks/blocks-core";
|
|
4
|
+
import { TestimonialCard } from "@nextworks/blocks-core";
|
|
5
|
+
const defaultTestimonialData = [
|
|
6
|
+
{
|
|
7
|
+
testimonialText: "Lorem ipsum dolor sit amet! Consectetur adipiscing elit.",
|
|
8
|
+
testimonialAuthor: " - Cillum Dolore",
|
|
9
|
+
testimonialAuthorInitials: "CD",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
testimonialText: "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi!",
|
|
13
|
+
testimonialAuthor: " - Voluptate Velit",
|
|
14
|
+
testimonialAuthorInitials: "VV",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
testimonialText: "Cillum dolore eu fugiat nulla pariatur!",
|
|
18
|
+
testimonialAuthor: " - Laboris Nisi",
|
|
19
|
+
testimonialAuthorInitials: "LN",
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* Testimonials section that renders a grid of TestimonialCard items.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* - Slot-style overrides match TestimonialCard sub-slots (card, content, text, etc.).
|
|
27
|
+
* - Motion can be disabled via enableMotion.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <Testimonials testimonials={[{ testimonialText: 'Great!', testimonialAuthor: ' - Jane', testimonialAuthorInitials: 'J' }]} />
|
|
31
|
+
*/
|
|
32
|
+
export function Testimonials({ id, className, testimonials = defaultTestimonialData, testimonialSectionHeader = "What Our Customers Say", enableMotion = true, section = { className: "py-16 px-6 bg-muted" }, container = { className: "max-w-7xl mx-auto" }, header = { className: "text-center mb-12" }, heading = {
|
|
33
|
+
className: "text-3xl md:text-4xl font-bold font-poppins text-foreground",
|
|
34
|
+
}, grid = { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" }, card = {
|
|
35
|
+
className: "bg-card/90 backdrop-blur p-6 rounded-lg shadow-md transition-transform duration-200 hover:-translate-y-1 border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
36
|
+
}, content = { className: "flex flex-col space-y-4" }, text = {
|
|
37
|
+
className: "text-card-foreground text-base leading-relaxed italic font-inter text-[var(--card-fg)]",
|
|
38
|
+
}, author = {
|
|
39
|
+
className: "text-muted-foreground text-sm font-medium font-poppins text-[var(--card-muted-fg)]",
|
|
40
|
+
}, avatar = {
|
|
41
|
+
className: "w-12 h-12 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-lg font-bold bg-[var(--badge-bg)] text-[var(--badge-fg)] border-[var(--badge-border)]",
|
|
42
|
+
}, avatarText = { className: "text-primary-foreground font-bold" }, ariaLabel = "Testimonials section", }) {
|
|
43
|
+
return (<section id={id || "testimonials"} className={cn(section.className, className)} aria-label={ariaLabel}>
|
|
44
|
+
<div className={container.className}>
|
|
45
|
+
{/* Section Header */}
|
|
46
|
+
<div className={header.className}>
|
|
47
|
+
<h2 className={heading.className}>{testimonialSectionHeader}</h2>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
{/* Testimonials Grid */}
|
|
51
|
+
<div className={grid.className}>
|
|
52
|
+
{testimonials.map((testimonial, index) => (<TestimonialCard key={index} testimonialText={testimonial.testimonialText} testimonialAuthor={testimonial.testimonialAuthor} testimonialAuthorInitials={testimonial.testimonialAuthorInitials} card={{
|
|
53
|
+
className: cn(card.className, !enableMotion && "transition-none hover:!translate-y-0"),
|
|
54
|
+
}} content={content} text={text} author={author} avatar={avatar} avatarText={avatarText}/>))}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</section>);
|
|
58
|
+
}
|