@nextworks/blocks-sections 0.2.0-alpha.11 → 0.2.0-alpha.13
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/components/About.d.ts.map +1 -1
- package/dist/components/About.jsx +27 -25
- package/dist/components/CTA.d.ts.map +1 -1
- package/dist/components/CTA.jsx +33 -31
- package/dist/components/Contact.d.ts.map +1 -1
- package/dist/components/Contact.jsx +31 -26
- package/dist/components/FAQ.d.ts.map +1 -1
- package/dist/components/FAQ.jsx +24 -22
- package/dist/components/Features.d.ts.map +1 -1
- package/dist/components/Features.jsx +15 -13
- package/dist/components/Footer.d.ts +3 -0
- package/dist/components/Footer.d.ts.map +1 -1
- package/dist/components/Footer.jsx +39 -37
- package/dist/components/HeroMotion.d.ts.map +1 -1
- package/dist/components/HeroMotion.jsx +43 -41
- package/dist/components/HeroOverlay.d.ts.map +1 -1
- package/dist/components/HeroOverlay.jsx +33 -31
- package/dist/components/HeroProductDemo.d.ts +54 -0
- package/dist/components/HeroProductDemo.d.ts.map +1 -0
- package/dist/components/HeroProductDemo.jsx +81 -0
- package/dist/components/HeroSplit.d.ts.map +1 -1
- package/dist/components/HeroSplit.jsx +37 -35
- package/dist/components/Navbar.d.ts.map +1 -1
- package/dist/components/Navbar.jsx +51 -51
- package/dist/components/Newsletter.d.ts +3 -2
- package/dist/components/Newsletter.d.ts.map +1 -1
- package/dist/components/Newsletter.jsx +25 -22
- package/dist/components/PortfolioSimple.d.ts.map +1 -1
- package/dist/components/PortfolioSimple.jsx +82 -80
- package/dist/components/Pricing.d.ts.map +1 -1
- package/dist/components/Pricing.jsx +14 -12
- package/dist/components/ProcessTimeline.d.ts.map +1 -1
- package/dist/components/ProcessTimeline.jsx +65 -63
- package/dist/components/ServicesGrid.d.ts.map +1 -1
- package/dist/components/ServicesGrid.jsx +27 -25
- package/dist/components/Team.d.ts.map +1 -1
- package/dist/components/Team.jsx +30 -28
- package/dist/components/Testimonials.d.ts.map +1 -1
- package/dist/components/Testimonials.jsx +14 -12
- package/dist/components/TrustBadges.d.ts.map +1 -1
- package/dist/components/TrustBadges.jsx +20 -18
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/product-demo/ApprovalInboxPanel.d.ts +7 -0
- package/dist/components/product-demo/ApprovalInboxPanel.d.ts.map +1 -0
- package/dist/components/product-demo/ApprovalInboxPanel.jsx +70 -0
- package/dist/components/product-demo/DemoStage.d.ts +14 -0
- package/dist/components/product-demo/DemoStage.d.ts.map +1 -0
- package/dist/components/product-demo/DemoStage.jsx +226 -0
- package/dist/components/product-demo/DemoWindow.d.ts +17 -0
- package/dist/components/product-demo/DemoWindow.d.ts.map +1 -0
- package/dist/components/product-demo/DemoWindow.jsx +57 -0
- package/dist/components/product-demo/KnowledgePanel.d.ts +7 -0
- package/dist/components/product-demo/KnowledgePanel.d.ts.map +1 -0
- package/dist/components/product-demo/KnowledgePanel.jsx +75 -0
- package/dist/components/product-demo/RunConsolePanel.d.ts +7 -0
- package/dist/components/product-demo/RunConsolePanel.d.ts.map +1 -0
- package/dist/components/product-demo/RunConsolePanel.jsx +89 -0
- package/dist/components/product-demo/WorkflowStudioPanel.d.ts +7 -0
- package/dist/components/product-demo/WorkflowStudioPanel.d.ts.map +1 -0
- package/dist/components/product-demo/WorkflowStudioPanel.jsx +109 -0
- package/dist/components/product-demo/types.d.ts +162 -0
- package/dist/components/product-demo/types.d.ts.map +1 -0
- package/dist/components/product-demo/types.js +3 -0
- package/dist-types/components/About.d.ts.map +1 -1
- package/dist-types/components/CTA.d.ts.map +1 -1
- package/dist-types/components/Contact.d.ts.map +1 -1
- package/dist-types/components/FAQ.d.ts.map +1 -1
- package/dist-types/components/Features.d.ts.map +1 -1
- package/dist-types/components/Footer.d.ts +3 -0
- package/dist-types/components/Footer.d.ts.map +1 -1
- package/dist-types/components/HeroMotion.d.ts.map +1 -1
- package/dist-types/components/HeroOverlay.d.ts.map +1 -1
- package/dist-types/components/HeroProductDemo.d.ts +54 -0
- package/dist-types/components/HeroProductDemo.d.ts.map +1 -0
- package/dist-types/components/HeroSplit.d.ts.map +1 -1
- package/dist-types/components/Navbar.d.ts.map +1 -1
- package/dist-types/components/Newsletter.d.ts +3 -2
- package/dist-types/components/Newsletter.d.ts.map +1 -1
- package/dist-types/components/PortfolioSimple.d.ts.map +1 -1
- package/dist-types/components/Pricing.d.ts.map +1 -1
- package/dist-types/components/ProcessTimeline.d.ts.map +1 -1
- package/dist-types/components/ServicesGrid.d.ts.map +1 -1
- package/dist-types/components/Team.d.ts.map +1 -1
- package/dist-types/components/Testimonials.d.ts.map +1 -1
- package/dist-types/components/TrustBadges.d.ts.map +1 -1
- package/dist-types/components/index.d.ts +1 -0
- package/dist-types/components/index.d.ts.map +1 -1
- package/dist-types/components/product-demo/ApprovalInboxPanel.d.ts +7 -0
- package/dist-types/components/product-demo/ApprovalInboxPanel.d.ts.map +1 -0
- package/dist-types/components/product-demo/DemoStage.d.ts +14 -0
- package/dist-types/components/product-demo/DemoStage.d.ts.map +1 -0
- package/dist-types/components/product-demo/DemoWindow.d.ts +17 -0
- package/dist-types/components/product-demo/DemoWindow.d.ts.map +1 -0
- package/dist-types/components/product-demo/KnowledgePanel.d.ts +7 -0
- package/dist-types/components/product-demo/KnowledgePanel.d.ts.map +1 -0
- package/dist-types/components/product-demo/RunConsolePanel.d.ts +7 -0
- package/dist-types/components/product-demo/RunConsolePanel.d.ts.map +1 -0
- package/dist-types/components/product-demo/WorkflowStudioPanel.d.ts +7 -0
- package/dist-types/components/product-demo/WorkflowStudioPanel.d.ts.map +1 -0
- package/dist-types/components/product-demo/types.d.ts +162 -0
- package/dist-types/components/product-demo/types.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/components/Team.jsx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
1
3
|
"use client";
|
|
2
4
|
import React from "react";
|
|
3
5
|
import Link from "next/link";
|
|
@@ -37,18 +39,18 @@ const DefaultTeamData = [
|
|
|
37
39
|
* Receives already-merged className strings from the parent.
|
|
38
40
|
*/
|
|
39
41
|
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>
|
|
42
|
+
return (<div className={card.className}>
|
|
43
|
+
<div className={cardContent.className}>
|
|
44
|
+
<div className={avatar.className}>{member.avatar}</div>
|
|
45
|
+
<h3 className={name.className}>{member.name}</h3>
|
|
46
|
+
<p className={role.className}>{member.role}</p>
|
|
47
|
+
<p className={bio.className}>{member.bio}</p>
|
|
48
|
+
{member.socialLinks && member.socialLinks.length > 0 && (<div className={socialLinks.className}>
|
|
49
|
+
{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`}>
|
|
50
|
+
{social.icon}
|
|
51
|
+
</Link>))}
|
|
52
|
+
</div>)}
|
|
53
|
+
</div>
|
|
52
54
|
</div>);
|
|
53
55
|
}
|
|
54
56
|
/**
|
|
@@ -115,21 +117,21 @@ export function Team({ id, className, teamMembers = DefaultTeamData, teamHeading
|
|
|
115
117
|
text: (_b = teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.text) !== null && _b !== void 0 ? _b : "The talented people behind your success",
|
|
116
118
|
className: cn(defaultSubheadingClass, teamSubheadingText === null || teamSubheadingText === void 0 ? void 0 : teamSubheadingText.className, subheading === null || subheading === void 0 ? void 0 : subheading.className),
|
|
117
119
|
};
|
|
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>
|
|
120
|
+
return (<section id={id || "team"} className={finalSectionClass} aria-label={ariaLabel}>
|
|
121
|
+
<div className={finalContainerClass}>
|
|
122
|
+
<div className={finalHeaderClass}>
|
|
123
|
+
<div className="mx-auto flex max-w-2xl flex-col items-center space-y-4 text-center">
|
|
124
|
+
<h2 className={normalizedHeading.className}>
|
|
125
|
+
{normalizedHeading.text}
|
|
126
|
+
</h2>
|
|
127
|
+
<p className={normalizedSubheading.className}>
|
|
128
|
+
{normalizedSubheading.text}
|
|
129
|
+
</p>
|
|
130
|
+
</div>
|
|
131
|
+
<div className={finalGridClass}>
|
|
132
|
+
{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 }}/>))}
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
134
136
|
</section>);
|
|
135
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Testimonials.d.ts","sourceRoot":"","sources":["../../src/components/Testimonials.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Testimonials.d.ts","sourceRoot":"","sources":["../../src/components/Testimonials.tsx"],"names":[],"mappings":"AAKA,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"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
1
3
|
"use client";
|
|
2
4
|
import React from "react";
|
|
3
5
|
import { cn } from "@nextworks/blocks-core";
|
|
@@ -40,19 +42,19 @@ export function Testimonials({ id, className, testimonials = defaultTestimonialD
|
|
|
40
42
|
}, avatar = {
|
|
41
43
|
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
44
|
}, 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}>
|
|
45
|
+
return (<section id={id || "testimonials"} className={cn(section.className, className)} aria-label={ariaLabel}>
|
|
46
|
+
<div className={container.className}>
|
|
47
|
+
{/* Section Header */}
|
|
48
|
+
<div className={header.className}>
|
|
49
|
+
<h2 className={heading.className}>{testimonialSectionHeader}</h2>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
{/* Testimonials Grid */}
|
|
53
|
+
<div className={grid.className}>
|
|
52
54
|
{testimonials.map((testimonial, index) => (<TestimonialCard key={index} testimonialText={testimonial.testimonialText} testimonialAuthor={testimonial.testimonialAuthor} testimonialAuthorInitials={testimonial.testimonialAuthorInitials} card={{
|
|
53
55
|
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>
|
|
56
|
+
}} content={content} text={text} author={author} avatar={avatar} avatarText={avatarText}/>))}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
57
59
|
</section>);
|
|
58
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustBadges.d.ts","sourceRoot":"","sources":["../../src/components/TrustBadges.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TrustBadges.d.ts","sourceRoot":"","sources":["../../src/components/TrustBadges.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,oCAAoC;IACpC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,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,eAAe,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9B,WAAW,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,IAAI,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE9B,qDAAqD;IACrD,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACnC,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoBD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,SAAS,EACT,MAA8B,EAC9B,wBAAwB,EACxB,OAA6C,EAC7C,SAA8C,EAC9C,MAA0C,EAC1C,OAEC,EACD,eAGC,EACD,KAGC,EACD,YAAoE,EACpE,IAAqC,EACrC,WAGC,EACD,IAEC,EACD,MAAqB,EACrB,YAAmB,EACnB,SAAkC,GACnC,EAAE,gBAAgB,qBA6ClB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
1
3
|
"use client";
|
|
2
4
|
import React from "react";
|
|
3
5
|
import { cn } from "@nextworks/blocks-core";
|
|
@@ -42,23 +44,23 @@ export function TrustBadges({ id, className, badges = defaultTrustBadgeData, tru
|
|
|
42
44
|
const containerClasses = layout === "vertical"
|
|
43
45
|
? "flex flex-col justify-center items-center gap-8"
|
|
44
46
|
: badgesContainer.className;
|
|
45
|
-
return (<section id={id || "trust-badges"} className={cn(section.className, className)} aria-label={ariaLabel}>
|
|
46
|
-
<div className={container.className}>
|
|
47
|
-
{trustBadgesSectionHeader && (<div className={header.className}>
|
|
48
|
-
<h2 className={heading.className}>{trustBadgesSectionHeader}</h2>
|
|
49
|
-
</div>)}
|
|
50
|
-
|
|
51
|
-
<div className={containerClasses}>
|
|
52
|
-
{badges.map((badgeData, index) => (<div key={index} className={cn(badge.className, !enableMotion && "transition-none hover:!scale-100")}>
|
|
53
|
-
<div className={badgeContent.className}>
|
|
54
|
-
{badgeData.badgeIcon && (<div className={icon.className}>{badgeData.badgeIcon}</div>)}
|
|
55
|
-
{badgeData.badgeDescription && (<p className={description.className}>
|
|
56
|
-
{badgeData.badgeDescription}
|
|
57
|
-
</p>)}
|
|
58
|
-
<p className={text.className}>{badgeData.badgeText}</p>
|
|
59
|
-
</div>
|
|
60
|
-
</div>))}
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
47
|
+
return (<section id={id || "trust-badges"} className={cn(section.className, className)} aria-label={ariaLabel}>
|
|
48
|
+
<div className={container.className}>
|
|
49
|
+
{trustBadgesSectionHeader && (<div className={header.className}>
|
|
50
|
+
<h2 className={heading.className}>{trustBadgesSectionHeader}</h2>
|
|
51
|
+
</div>)}
|
|
52
|
+
|
|
53
|
+
<div className={containerClasses}>
|
|
54
|
+
{badges.map((badgeData, index) => (<div key={index} className={cn(badge.className, !enableMotion && "transition-none hover:!scale-100")}>
|
|
55
|
+
<div className={badgeContent.className}>
|
|
56
|
+
{badgeData.badgeIcon && (<div className={icon.className}>{badgeData.badgeIcon}</div>)}
|
|
57
|
+
{badgeData.badgeDescription && (<p className={description.className}>
|
|
58
|
+
{badgeData.badgeDescription}
|
|
59
|
+
</p>)}
|
|
60
|
+
<p className={text.className}>{badgeData.badgeText}</p>
|
|
61
|
+
</div>
|
|
62
|
+
</div>))}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
63
65
|
</section>);
|
|
64
66
|
}
|
|
@@ -8,6 +8,7 @@ export type { FooterProps, NavLinkItem, NavLinkGroup, SocialLink, } from "./Foot
|
|
|
8
8
|
export { Footer } from "./Footer";
|
|
9
9
|
export * from "./HeroMotion";
|
|
10
10
|
export * from "./HeroOverlay";
|
|
11
|
+
export * from "./HeroProductDemo";
|
|
11
12
|
export * from "./HeroSplit";
|
|
12
13
|
export * from "./Navbar";
|
|
13
14
|
export * from "./Newsletter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,YAAY,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,YAAY,EACV,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,GACX,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ProductDemoApprovalInboxState } from "./types";
|
|
3
|
+
export interface ApprovalInboxPanelProps {
|
|
4
|
+
state: ProductDemoApprovalInboxState;
|
|
5
|
+
}
|
|
6
|
+
export declare function ApprovalInboxPanel({ state }: ApprovalInboxPanelProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ApprovalInboxPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApprovalInboxPanel.d.ts","sourceRoot":"","sources":["../../../src/components/product-demo/ApprovalInboxPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,6BAA6B,EAE9B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,6BAA6B,CAAC;CACtC;AAgBD,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,qBAmGpE"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { cn } from "@nextworks/blocks-core";
|
|
5
|
+
const STATUS_TONE_CLASSES = {
|
|
6
|
+
neutral: "border-border/60 bg-muted/55 text-muted-foreground",
|
|
7
|
+
info: "border-sky-500/30 bg-sky-500/10 text-sky-600 dark:text-sky-300",
|
|
8
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300",
|
|
9
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
10
|
+
danger: "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-300",
|
|
11
|
+
};
|
|
12
|
+
function getStatusClass(tone = "neutral") {
|
|
13
|
+
return STATUS_TONE_CLASSES[tone];
|
|
14
|
+
}
|
|
15
|
+
export function ApprovalInboxPanel({ state }) {
|
|
16
|
+
var _a;
|
|
17
|
+
return (<div className="flex h-full flex-col gap-4">
|
|
18
|
+
<div className="space-y-1.5">
|
|
19
|
+
{state.title && (<h4 className="text-sm font-semibold text-card-foreground">
|
|
20
|
+
{state.title}
|
|
21
|
+
</h4>)}
|
|
22
|
+
{state.subtitle && (<p className="text-xs leading-relaxed text-muted-foreground">
|
|
23
|
+
{state.subtitle}
|
|
24
|
+
</p>)}
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
{((_a = state.counts) === null || _a === void 0 ? void 0 : _a.length) ? (<div className="flex flex-wrap gap-2">
|
|
28
|
+
{state.counts.map((count) => (<div key={count.id} className={cn("rounded-xl border px-3 py-2", getStatusClass(count.tone))}>
|
|
29
|
+
<div className="text-[10px] font-medium uppercase tracking-[0.14em] opacity-80">
|
|
30
|
+
{count.label}
|
|
31
|
+
</div>
|
|
32
|
+
<div className="mt-1 text-sm font-semibold">{count.value}</div>
|
|
33
|
+
</div>))}
|
|
34
|
+
</div>) : null}
|
|
35
|
+
|
|
36
|
+
<div className="space-y-3">
|
|
37
|
+
{state.items.map((item) => {
|
|
38
|
+
var _a;
|
|
39
|
+
const isActive = item.id === state.activeItemId || item.highlighted;
|
|
40
|
+
return (<div key={item.id} className={cn("rounded-2xl border border-border/60 bg-background/80 p-3", isActive && "border-primary/45 bg-primary/6 shadow-sm")}>
|
|
41
|
+
<div className="flex items-start justify-between gap-3">
|
|
42
|
+
<div>
|
|
43
|
+
<div className="text-sm font-semibold text-card-foreground">
|
|
44
|
+
{item.title}
|
|
45
|
+
</div>
|
|
46
|
+
{item.description && (<p className="mt-1 text-xs leading-relaxed text-muted-foreground">
|
|
47
|
+
{item.description}
|
|
48
|
+
</p>)}
|
|
49
|
+
</div>
|
|
50
|
+
{item.status && (<span className={cn("rounded-full border px-2 py-1 text-[10px] font-medium uppercase tracking-[0.14em]", getStatusClass(item.status))}>
|
|
51
|
+
{item.status}
|
|
52
|
+
</span>)}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{(item.requester || item.priorityLabel || item.dueLabel) && (<div className="mt-3 flex flex-wrap gap-2 text-[11px] text-muted-foreground">
|
|
56
|
+
{item.requester && <span>By {item.requester}</span>}
|
|
57
|
+
{item.priorityLabel && <span>{item.priorityLabel}</span>}
|
|
58
|
+
{item.dueLabel && <span>{item.dueLabel}</span>}
|
|
59
|
+
</div>)}
|
|
60
|
+
|
|
61
|
+
{((_a = item.actions) === null || _a === void 0 ? void 0 : _a.length) ? (<div className="mt-3 flex flex-wrap gap-2">
|
|
62
|
+
{item.actions.map((action) => (<span key={action.id} className={cn("rounded-full border px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.14em]", getStatusClass(action.tone))}>
|
|
63
|
+
{action.label}
|
|
64
|
+
</span>))}
|
|
65
|
+
</div>) : null}
|
|
66
|
+
</div>);
|
|
67
|
+
})}
|
|
68
|
+
</div>
|
|
69
|
+
</div>);
|
|
70
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ProductDemoScenario } from "./types";
|
|
3
|
+
export interface DemoStageProps {
|
|
4
|
+
scenarios?: ProductDemoScenario[];
|
|
5
|
+
initialScenarioIndex?: number;
|
|
6
|
+
activeScenarioKey?: string;
|
|
7
|
+
autoCycle?: boolean;
|
|
8
|
+
cycleIntervalMs?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
enableMotion?: boolean;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function DemoStage({ scenarios, initialScenarioIndex, activeScenarioKey, autoCycle, cycleIntervalMs, className, enableMotion, ariaLabel, }: DemoStageProps): React.JSX.Element;
|
|
14
|
+
//# sourceMappingURL=DemoStage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoStage.d.ts","sourceRoot":"","sources":["../../../src/components/product-demo/DemoStage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,KAAK,EAGV,mBAAmB,EAIpB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsND,wBAAgB,SAAS,CAAC,EACxB,SAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,SAAiB,EACjB,eAAsB,EACtB,SAAS,EACT,YAAmB,EACnB,SAAgC,GACjC,EAAE,cAAc,qBAiJhB"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
3
|
+
"use client";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { motion } from "motion/react";
|
|
6
|
+
import { cn } from "@nextworks/blocks-core";
|
|
7
|
+
import { DemoWindow } from "./DemoWindow";
|
|
8
|
+
import { ApprovalInboxPanel } from "./ApprovalInboxPanel";
|
|
9
|
+
import { KnowledgePanel } from "./KnowledgePanel";
|
|
10
|
+
import { RunConsolePanel } from "./RunConsolePanel";
|
|
11
|
+
import { WorkflowStudioPanel } from "./WorkflowStudioPanel";
|
|
12
|
+
const WINDOW_ORDER = [
|
|
13
|
+
"workflowStudio",
|
|
14
|
+
"knowledgePanel",
|
|
15
|
+
"runConsole",
|
|
16
|
+
"approvalInbox",
|
|
17
|
+
];
|
|
18
|
+
const HIGHLIGHT_TONE_CLASSES = {
|
|
19
|
+
neutral: "border-border/60 bg-muted/60 text-muted-foreground",
|
|
20
|
+
info: "border-sky-500/30 bg-sky-500/10 text-sky-600 dark:text-sky-300",
|
|
21
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300",
|
|
22
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
23
|
+
danger: "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-300",
|
|
24
|
+
accent: "border-primary/35 bg-primary/10 text-primary",
|
|
25
|
+
muted: "border-border/60 bg-background/70 text-muted-foreground",
|
|
26
|
+
};
|
|
27
|
+
const STATUS_TONE_CLASSES = {
|
|
28
|
+
neutral: "border-border/60 bg-muted/55 text-muted-foreground",
|
|
29
|
+
info: "border-sky-500/30 bg-sky-500/10 text-sky-600 dark:text-sky-300",
|
|
30
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300",
|
|
31
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
32
|
+
danger: "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-300",
|
|
33
|
+
};
|
|
34
|
+
function clampInitialScenarioIndex(index, count) {
|
|
35
|
+
if (count <= 0) {
|
|
36
|
+
return 0;
|
|
37
|
+
}
|
|
38
|
+
return Math.max(0, Math.min(index !== null && index !== void 0 ? index : 0, count - 1));
|
|
39
|
+
}
|
|
40
|
+
function getHighlightClass(tone = "accent") {
|
|
41
|
+
return HIGHLIGHT_TONE_CLASSES[tone];
|
|
42
|
+
}
|
|
43
|
+
function getStatusClass(tone = "neutral") {
|
|
44
|
+
return STATUS_TONE_CLASSES[tone];
|
|
45
|
+
}
|
|
46
|
+
function useActiveScenario({ scenarios, initialScenarioIndex, activeScenarioKey, autoCycle, cycleIntervalMs, }) {
|
|
47
|
+
var _a;
|
|
48
|
+
const fallbackIndex = React.useMemo(() => clampInitialScenarioIndex(initialScenarioIndex, scenarios.length), [initialScenarioIndex, scenarios.length]);
|
|
49
|
+
const keyedIndex = React.useMemo(() => {
|
|
50
|
+
if (!activeScenarioKey) {
|
|
51
|
+
return -1;
|
|
52
|
+
}
|
|
53
|
+
return scenarios.findIndex((scenario) => scenario.key === activeScenarioKey);
|
|
54
|
+
}, [activeScenarioKey, scenarios]);
|
|
55
|
+
const controlledIndex = keyedIndex >= 0 ? keyedIndex : fallbackIndex;
|
|
56
|
+
const [internalIndex, setInternalIndex] = React.useState(controlledIndex);
|
|
57
|
+
const activeIndex = activeScenarioKey ? controlledIndex : internalIndex;
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
if (activeScenarioKey) {
|
|
60
|
+
setInternalIndex(controlledIndex);
|
|
61
|
+
}
|
|
62
|
+
}, [activeScenarioKey, controlledIndex]);
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (activeScenarioKey || !autoCycle || scenarios.length <= 1) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const intervalMs = Math.max(cycleIntervalMs !== null && cycleIntervalMs !== void 0 ? cycleIntervalMs : 4500, 1200);
|
|
68
|
+
const timer = window.setInterval(() => {
|
|
69
|
+
setInternalIndex((currentIndex) => (currentIndex + 1) % scenarios.length);
|
|
70
|
+
}, intervalMs);
|
|
71
|
+
return () => window.clearInterval(timer);
|
|
72
|
+
}, [activeScenarioKey, autoCycle, cycleIntervalMs, scenarios.length]);
|
|
73
|
+
return (_a = scenarios[activeIndex]) !== null && _a !== void 0 ? _a : scenarios[0];
|
|
74
|
+
}
|
|
75
|
+
function HighlightPills({ highlights, }) {
|
|
76
|
+
if (!(highlights === null || highlights === void 0 ? void 0 : highlights.length)) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return (<div className="flex flex-wrap gap-2">
|
|
80
|
+
{highlights.map((highlight) => {
|
|
81
|
+
var _a;
|
|
82
|
+
return (<span key={highlight.id} className={cn("rounded-full border px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.16em]", getHighlightClass(highlight.tone))}>
|
|
83
|
+
{(_a = highlight.label) !== null && _a !== void 0 ? _a : highlight.id}
|
|
84
|
+
</span>);
|
|
85
|
+
})}
|
|
86
|
+
</div>);
|
|
87
|
+
}
|
|
88
|
+
function getWindowRenderData(scenario) {
|
|
89
|
+
return [
|
|
90
|
+
{
|
|
91
|
+
key: "workflowStudio",
|
|
92
|
+
meta: scenario.workflowStudio.window,
|
|
93
|
+
content: (<>
|
|
94
|
+
<HighlightPills highlights={scenario.workflowStudio.highlights}/>
|
|
95
|
+
<WorkflowStudioPanel state={scenario.workflowStudio}/>
|
|
96
|
+
</>),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: "knowledgePanel",
|
|
100
|
+
meta: scenario.knowledgePanel.window,
|
|
101
|
+
content: (<>
|
|
102
|
+
<HighlightPills highlights={scenario.knowledgePanel.highlights}/>
|
|
103
|
+
<KnowledgePanel state={scenario.knowledgePanel}/>
|
|
104
|
+
</>),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "runConsole",
|
|
108
|
+
meta: scenario.runConsole.window,
|
|
109
|
+
content: (<>
|
|
110
|
+
<HighlightPills highlights={scenario.runConsole.highlights}/>
|
|
111
|
+
<RunConsolePanel state={scenario.runConsole}/>
|
|
112
|
+
</>),
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: "approvalInbox",
|
|
116
|
+
meta: scenario.approvalInbox.window,
|
|
117
|
+
content: (<>
|
|
118
|
+
<HighlightPills highlights={scenario.approvalInbox.highlights}/>
|
|
119
|
+
<ApprovalInboxPanel state={scenario.approvalInbox}/>
|
|
120
|
+
</>),
|
|
121
|
+
},
|
|
122
|
+
];
|
|
123
|
+
}
|
|
124
|
+
function getWindowShellClass(key) {
|
|
125
|
+
switch (key) {
|
|
126
|
+
case "workflowStudio":
|
|
127
|
+
return "lg:absolute lg:left-[2%] lg:top-[9%] lg:h-[66%] lg:w-[46%]";
|
|
128
|
+
case "knowledgePanel":
|
|
129
|
+
return "lg:absolute lg:left-[50%] lg:top-[10%] lg:h-[34%] lg:w-[30%] xl:left-[49%] xl:w-[29%]";
|
|
130
|
+
case "runConsole":
|
|
131
|
+
return "lg:absolute lg:left-[50%] lg:bottom-[10%] lg:h-[33%] lg:w-[32%] xl:left-[49%] xl:w-[31%]";
|
|
132
|
+
case "approvalInbox":
|
|
133
|
+
return "lg:absolute lg:right-[1%] lg:top-[17%] lg:h-[45%] lg:w-[24%] xl:right-[2%] xl:h-[44%] xl:w-[23%]";
|
|
134
|
+
default:
|
|
135
|
+
return "";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function getTransformStyle(meta) {
|
|
139
|
+
var _a, _b, _c;
|
|
140
|
+
const layoutHint = meta.layoutHint;
|
|
141
|
+
if (!layoutHint) {
|
|
142
|
+
return undefined;
|
|
143
|
+
}
|
|
144
|
+
const translateX = (_a = layoutHint.x) !== null && _a !== void 0 ? _a : 0;
|
|
145
|
+
const translateY = (_b = layoutHint.y) !== null && _b !== void 0 ? _b : 0;
|
|
146
|
+
const rotate = (_c = layoutHint.rotateDeg) !== null && _c !== void 0 ? _c : 0;
|
|
147
|
+
return {
|
|
148
|
+
zIndex: layoutHint.zIndex,
|
|
149
|
+
transform: `translate(${translateX}px, ${translateY}px) rotate(${rotate}deg)`,
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export function DemoStage({ scenarios = [], initialScenarioIndex, activeScenarioKey, autoCycle = false, cycleIntervalMs = 4500, className, enableMotion = true, ariaLabel = "Product demo stage", }) {
|
|
153
|
+
const activeScenario = useActiveScenario({
|
|
154
|
+
scenarios,
|
|
155
|
+
initialScenarioIndex,
|
|
156
|
+
activeScenarioKey,
|
|
157
|
+
autoCycle,
|
|
158
|
+
cycleIntervalMs,
|
|
159
|
+
});
|
|
160
|
+
const activeIndex = React.useMemo(() => {
|
|
161
|
+
if (!activeScenario) {
|
|
162
|
+
return 0;
|
|
163
|
+
}
|
|
164
|
+
return scenarios.findIndex((scenario) => scenario.key === activeScenario.key);
|
|
165
|
+
}, [activeScenario, scenarios]);
|
|
166
|
+
if (!activeScenario) {
|
|
167
|
+
return (<div data-product-demo-stage className={cn("relative isolate min-h-[24rem] w-full overflow-hidden rounded-[2rem] border border-border/60 bg-gradient-to-br from-background via-background to-muted/40 shadow-2xl", enableMotion &&
|
|
168
|
+
"transition-transform duration-300 hover:-translate-y-1 motion-reduce:transition-none", className)} aria-label={ariaLabel}>
|
|
169
|
+
<div className="absolute inset-0 bg-[radial-gradient(circle_at_top,rgba(59,130,246,0.12),transparent_38%),linear-gradient(135deg,rgba(148,163,184,0.08),transparent_55%)]"/>
|
|
170
|
+
<div className="absolute inset-4 rounded-[1.5rem] border border-dashed border-border/60 bg-background/70"/>
|
|
171
|
+
</div>);
|
|
172
|
+
}
|
|
173
|
+
const windows = getWindowRenderData(activeScenario).sort((a, b) => WINDOW_ORDER.indexOf(a.key) - WINDOW_ORDER.indexOf(b.key));
|
|
174
|
+
return (<div data-product-demo-stage data-auto-cycle={autoCycle ? "true" : "false"} data-enable-motion={enableMotion ? "true" : "false"} data-scenario-count={scenarios.length} data-active-scenario-key={activeScenario.key} data-active-scenario-index={activeIndex} data-cycle-interval-ms={cycleIntervalMs} className={cn("relative isolate min-h-[30rem] w-full overflow-hidden rounded-[2rem] border border-border/60 bg-[radial-gradient(circle_at_top,rgba(59,130,246,0.13),transparent_35%),linear-gradient(135deg,rgba(15,23,42,0.04),transparent_55%)] shadow-2xl", className)} aria-label={ariaLabel}>
|
|
175
|
+
<div className="absolute inset-0 bg-gradient-to-br from-background via-background/96 to-muted/45"/>
|
|
176
|
+
<div className="absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-primary/8 to-transparent"/>
|
|
177
|
+
|
|
178
|
+
<div className="relative z-10 flex min-h-[30rem] flex-col gap-4 p-4 sm:p-5 lg:block lg:p-6">
|
|
179
|
+
<div className="flex flex-wrap items-center justify-between gap-3 pb-1">
|
|
180
|
+
<div>
|
|
181
|
+
{activeScenario.label && (<div className="text-[11px] font-medium uppercase tracking-[0.18em] text-primary/80">
|
|
182
|
+
{activeScenario.label}
|
|
183
|
+
</div>)}
|
|
184
|
+
{activeScenario.description && (<p className="mt-1 max-w-xl text-xs leading-relaxed text-muted-foreground">
|
|
185
|
+
{activeScenario.description}
|
|
186
|
+
</p>)}
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
<HighlightPills highlights={activeScenario.highlights}/>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<div className="grid gap-4 lg:hidden">
|
|
193
|
+
{windows.map((windowData) => {
|
|
194
|
+
const activeWindow = activeScenario.activeWindow === windowData.key ||
|
|
195
|
+
(!activeScenario.activeWindow &&
|
|
196
|
+
windowData.key === "workflowStudio");
|
|
197
|
+
return (<DemoWindow key={windowData.key} window={windowData.meta} active={activeWindow} enableMotion={enableMotion}>
|
|
198
|
+
{windowData.content}
|
|
199
|
+
</DemoWindow>);
|
|
200
|
+
})}
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<div className="hidden lg:block lg:h-[34rem] xl:h-[36rem]">
|
|
204
|
+
{windows.map((windowData) => {
|
|
205
|
+
const activeWindow = activeScenario.activeWindow === windowData.key ||
|
|
206
|
+
(!activeScenario.activeWindow &&
|
|
207
|
+
windowData.key === "workflowStudio");
|
|
208
|
+
return (<motion.div key={windowData.key} initial={enableMotion ? { opacity: 0, y: 18, scale: 0.98 } : false} animate={{
|
|
209
|
+
opacity: 1,
|
|
210
|
+
y: 0,
|
|
211
|
+
scale: activeWindow ? 1 : 0.985,
|
|
212
|
+
}} transition={enableMotion
|
|
213
|
+
? {
|
|
214
|
+
type: "tween",
|
|
215
|
+
duration: 0.45,
|
|
216
|
+
}
|
|
217
|
+
: { duration: 0 }} className={cn("will-change-transform", getWindowShellClass(windowData.key))} style={getTransformStyle(windowData.meta)}>
|
|
218
|
+
<DemoWindow window={windowData.meta} active={activeWindow} dimmed={!activeWindow} enableMotion={enableMotion} className="h-full">
|
|
219
|
+
{windowData.content}
|
|
220
|
+
</DemoWindow>
|
|
221
|
+
</motion.div>);
|
|
222
|
+
})}
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>);
|
|
226
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ProductDemoWindowMeta } from "./types";
|
|
3
|
+
export interface DemoWindowProps {
|
|
4
|
+
window: ProductDemoWindowMeta;
|
|
5
|
+
className?: string;
|
|
6
|
+
contentClassName?: string;
|
|
7
|
+
chromeClassName?: string;
|
|
8
|
+
bodyClassName?: string;
|
|
9
|
+
active?: boolean;
|
|
10
|
+
dimmed?: boolean;
|
|
11
|
+
enableMotion?: boolean;
|
|
12
|
+
showControls?: boolean;
|
|
13
|
+
showResizeHandle?: boolean;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function DemoWindow({ window, className, contentClassName, chromeClassName, bodyClassName, active, dimmed, enableMotion, showControls, showResizeHandle, children, }: DemoWindowProps): React.JSX.Element;
|
|
17
|
+
//# sourceMappingURL=DemoWindow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoWindow.d.ts","sourceRoot":"","sources":["../../../src/components/product-demo/DemoWindow.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAyB,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAE5E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAYD,wBAAgB,UAAU,CAAC,EACzB,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,MAAc,EACd,MAAc,EACd,YAAmB,EACnB,YAAmB,EACnB,gBAAuB,EACvB,QAAQ,GACT,EAAE,eAAe,qBAqFjB"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// AUTO-GENERATED from cli/kits/blocks by scripts/sync-kit-to-packages.mjs
|
|
2
|
+
// Do not edit this file directly. Edit the kit source instead.
|
|
3
|
+
"use client";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { cn } from "@nextworks/blocks-core";
|
|
6
|
+
const STATUS_TONE_CLASSES = {
|
|
7
|
+
neutral: "border-border/60 bg-muted/60 text-muted-foreground",
|
|
8
|
+
info: "border-sky-500/30 bg-sky-500/10 text-sky-600 dark:text-sky-300",
|
|
9
|
+
success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-300",
|
|
10
|
+
warning: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300",
|
|
11
|
+
danger: "border-rose-500/30 bg-rose-500/10 text-rose-600 dark:text-rose-300",
|
|
12
|
+
};
|
|
13
|
+
export function DemoWindow({ window, className, contentClassName, chromeClassName, bodyClassName, active = false, dimmed = false, enableMotion = true, showControls = true, showResizeHandle = true, children, }) {
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
const statusTone = (_b = (_a = window.status) === null || _a === void 0 ? void 0 : _a.tone) !== null && _b !== void 0 ? _b : "neutral";
|
|
16
|
+
return (<section className={cn("group relative flex h-full min-h-[14rem] flex-col overflow-hidden rounded-[1.5rem] border border-border/60 bg-card/92 shadow-[0_18px_48px_-24px_rgba(15,23,42,0.45)] backdrop-blur-xl", enableMotion &&
|
|
17
|
+
"transition-[transform,opacity,box-shadow,border-color] duration-500 ease-out motion-reduce:transition-none", active &&
|
|
18
|
+
"border-primary/45 shadow-[0_24px_60px_-26px_rgba(59,130,246,0.45)]", dimmed && "opacity-90", className)} data-product-demo-window={window.key} data-active={active ? "true" : "false"} aria-label={window.title}>
|
|
19
|
+
<header className={cn("relative flex items-start justify-between gap-3 border-b border-border/50 px-4 py-3 sm:px-5", chromeClassName)}>
|
|
20
|
+
<div className="flex items-start gap-3">
|
|
21
|
+
{showControls && (<div className="mt-1 flex items-center gap-1.5 opacity-75 transition-opacity duration-200 group-hover:opacity-100">
|
|
22
|
+
<span className="h-2.5 w-2.5 rounded-full bg-rose-400/90"/>
|
|
23
|
+
<span className="h-2.5 w-2.5 rounded-full bg-amber-400/90"/>
|
|
24
|
+
<span className="h-2.5 w-2.5 rounded-full bg-emerald-400/90"/>
|
|
25
|
+
</div>)}
|
|
26
|
+
|
|
27
|
+
<div className="min-w-0">
|
|
28
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
29
|
+
<h3 className="truncate text-sm font-semibold text-card-foreground sm:text-[0.95rem]">
|
|
30
|
+
{window.title}
|
|
31
|
+
</h3>
|
|
32
|
+
{window.badge && (<span className="rounded-full border border-border/60 bg-muted/70 px-2 py-0.5 text-[10px] font-medium uppercase tracking-[0.16em] text-muted-foreground">
|
|
33
|
+
{window.badge}
|
|
34
|
+
</span>)}
|
|
35
|
+
</div>
|
|
36
|
+
{window.subtitle && (<p className="mt-1 truncate text-xs text-muted-foreground sm:text-[0.8rem]">
|
|
37
|
+
{window.subtitle}
|
|
38
|
+
</p>)}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
{((_c = window.status) === null || _c === void 0 ? void 0 : _c.label) && (<span className={cn("shrink-0 rounded-full border px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.16em]", STATUS_TONE_CLASSES[statusTone])}>
|
|
43
|
+
{window.status.label}
|
|
44
|
+
</span>)}
|
|
45
|
+
</header>
|
|
46
|
+
|
|
47
|
+
<div className={cn("relative flex-1 px-4 py-4 sm:px-5 sm:py-5", bodyClassName)}>
|
|
48
|
+
<div className={cn("h-full", contentClassName)}>{children}</div>
|
|
49
|
+
|
|
50
|
+
{showResizeHandle && (<div aria-hidden="true" className="pointer-events-none absolute bottom-3 right-3 h-4 w-4 opacity-0 transition-opacity duration-200 group-hover:opacity-70">
|
|
51
|
+
<span className="absolute bottom-0 right-0 h-px w-3 rotate-45 bg-border/80"/>
|
|
52
|
+
<span className="absolute bottom-1 right-0 h-px w-2 rotate-45 bg-border/70"/>
|
|
53
|
+
<span className="absolute bottom-0 right-1 h-px w-2 rotate-45 bg-border/60"/>
|
|
54
|
+
</div>)}
|
|
55
|
+
</div>
|
|
56
|
+
</section>);
|
|
57
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ProductDemoKnowledgePanelState } from "./types";
|
|
3
|
+
export interface KnowledgePanelProps {
|
|
4
|
+
state: ProductDemoKnowledgePanelState;
|
|
5
|
+
}
|
|
6
|
+
export declare function KnowledgePanel({ state }: KnowledgePanelProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=KnowledgePanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnowledgePanel.d.ts","sourceRoot":"","sources":["../../../src/components/product-demo/KnowledgePanel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EACV,8BAA8B,EAE/B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,8BAA8B,CAAC;CACvC;AAgBD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,qBAqG5D"}
|