nextworks 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/README.md +283 -282
- package/dist/cli_manifests/blocks_manifest.json +198 -175
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +101 -100
- package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +105 -104
- package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +1 -1
- package/dist/kits/blocks/app/templates/aiworkflow/PresetThemeVars.tsx +58 -0
- package/dist/kits/blocks/app/templates/aiworkflow/README.md +46 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/CTA.tsx +44 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Contact.tsx +105 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/FAQ.tsx +63 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Features.tsx +65 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Footer.tsx +109 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Hero.tsx +636 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Navbar.tsx +90 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Pricing.tsx +86 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/ProcessTimeline.tsx +103 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/Testimonials.tsx +56 -0
- package/dist/kits/blocks/app/templates/aiworkflow/components/TrustBadges.tsx +59 -0
- package/dist/kits/blocks/app/templates/aiworkflow/page.tsx +43 -0
- package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -42
- package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
- package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
- package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
- package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
- package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
- package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
- package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +84 -84
- package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -75
- package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -62
- package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -84
- package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -50
- package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
- package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -86
- package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -83
- package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
- package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -88
- package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -116
- package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
- package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
- package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
- package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
- package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -90
- package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
- package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
- package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
- package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -44
- package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -129
- package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
- package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
- package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -104
- package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -126
- package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -117
- package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
- package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -96
- package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
- package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
- package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
- package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -195
- package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
- package/dist/kits/blocks/components/sections/About.tsx +291 -291
- package/dist/kits/blocks/components/sections/CTA.tsx +257 -257
- package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
- package/dist/kits/blocks/components/sections/FAQ.tsx +214 -214
- package/dist/kits/blocks/components/sections/Features.tsx +268 -268
- package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
- package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
- package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
- package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +236 -0
- package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
- package/dist/kits/blocks/components/sections/Navbar.tsx +350 -350
- package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -549
- package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
- package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
- package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
- package/dist/kits/blocks/components/sections/Team.tsx +309 -309
- package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
- package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
- package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +125 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +397 -0
- package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +128 -0
- package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +127 -0
- package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +150 -0
- package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +191 -0
- package/dist/kits/blocks/components/sections/product-demo/types.ts +193 -0
- package/dist/kits/blocks/components/theme-provider.tsx +1 -1
- package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
- package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
- package/dist/kits/blocks/components/ui/button.tsx +122 -122
- package/dist/kits/blocks/components/ui/card.tsx +95 -95
- package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
- package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
- package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
- package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
- package/dist/kits/blocks/components/ui/input.tsx +27 -27
- package/dist/kits/blocks/components/ui/label.tsx +29 -29
- package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
- package/dist/kits/blocks/components/ui/select.tsx +25 -25
- package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
- package/dist/kits/blocks/components/ui/table.tsx +98 -98
- package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
- package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
- package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -243
- package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
- package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
- package/dist/kits/blocks/lib/themes.ts +400 -400
- package/dist/kits/blocks/lib/utils.ts +6 -6
- package/dist/kits/blocks/package-deps.json +3 -3
- package/package.json +1 -1
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
3
|
-
|
|
4
|
-
export function Table({
|
|
5
|
-
className,
|
|
6
|
-
...props
|
|
7
|
-
}: React.HTMLAttributes<HTMLTableElement>) {
|
|
8
|
-
return (
|
|
9
|
-
<div className="relative w-full overflow-auto">
|
|
10
|
-
<table
|
|
11
|
-
className={cn(
|
|
12
|
-
"w-full caption-bottom text-sm",
|
|
13
|
-
// Optional fg override
|
|
14
|
-
"text-[var(--table-fg)]",
|
|
15
|
-
className,
|
|
16
|
-
)}
|
|
17
|
-
{...props}
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function TableHeader(
|
|
24
|
-
props: React.HTMLAttributes<HTMLTableSectionElement>,
|
|
25
|
-
) {
|
|
26
|
-
return (
|
|
27
|
-
<thead
|
|
28
|
-
className={cn(
|
|
29
|
-
"[&_tr]:border-b",
|
|
30
|
-
// Variable hooks for border color and head text
|
|
31
|
-
"text-[var(--table-head-fg)] [&_tr]:border-[var(--table-border)]",
|
|
32
|
-
)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export function TableBody(
|
|
39
|
-
props: React.HTMLAttributes<HTMLTableSectionElement>,
|
|
40
|
-
) {
|
|
41
|
-
return (
|
|
42
|
-
<tbody
|
|
43
|
-
className={cn(
|
|
44
|
-
"[&_tr:last-child]:border-0",
|
|
45
|
-
"[&_tr]:border-[var(--table-border)]",
|
|
46
|
-
)}
|
|
47
|
-
{...props}
|
|
48
|
-
/>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function TableRow(props: React.HTMLAttributes<HTMLTableRowElement>) {
|
|
53
|
-
return (
|
|
54
|
-
<tr
|
|
55
|
-
className={cn(
|
|
56
|
-
"hover:bg-muted/50 border-b transition-colors",
|
|
57
|
-
"border-[var(--table-border)] hover:bg-[var(--table-row-hover-bg)]",
|
|
58
|
-
)}
|
|
59
|
-
{...props}
|
|
60
|
-
/>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function TableHead(props: React.ThHTMLAttributes<HTMLTableCellElement>) {
|
|
65
|
-
return (
|
|
66
|
-
<th
|
|
67
|
-
className={cn(
|
|
68
|
-
"text-muted-foreground h-10 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
69
|
-
"text-[var(--table-head-fg)]",
|
|
70
|
-
)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function TableCell(props: React.TdHTMLAttributes<HTMLTableCellElement>) {
|
|
77
|
-
return (
|
|
78
|
-
<td
|
|
79
|
-
className={cn(
|
|
80
|
-
"p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
81
|
-
"text-[var(--table-fg)]",
|
|
82
|
-
)}
|
|
83
|
-
{...props}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export function TableCaption(props: React.HTMLAttributes<HTMLElement>) {
|
|
89
|
-
return (
|
|
90
|
-
<caption
|
|
91
|
-
className={cn(
|
|
92
|
-
"text-muted-foreground mt-4 text-sm",
|
|
93
|
-
"text-[var(--table-muted-fg)]",
|
|
94
|
-
)}
|
|
95
|
-
{...props}
|
|
96
|
-
/>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export function Table({
|
|
5
|
+
className,
|
|
6
|
+
...props
|
|
7
|
+
}: React.HTMLAttributes<HTMLTableElement>) {
|
|
8
|
+
return (
|
|
9
|
+
<div className="relative w-full overflow-auto">
|
|
10
|
+
<table
|
|
11
|
+
className={cn(
|
|
12
|
+
"w-full caption-bottom text-sm",
|
|
13
|
+
// Optional fg override
|
|
14
|
+
"text-[var(--table-fg)]",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function TableHeader(
|
|
24
|
+
props: React.HTMLAttributes<HTMLTableSectionElement>,
|
|
25
|
+
) {
|
|
26
|
+
return (
|
|
27
|
+
<thead
|
|
28
|
+
className={cn(
|
|
29
|
+
"[&_tr]:border-b",
|
|
30
|
+
// Variable hooks for border color and head text
|
|
31
|
+
"text-[var(--table-head-fg)] [&_tr]:border-[var(--table-border)]",
|
|
32
|
+
)}
|
|
33
|
+
{...props}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function TableBody(
|
|
39
|
+
props: React.HTMLAttributes<HTMLTableSectionElement>,
|
|
40
|
+
) {
|
|
41
|
+
return (
|
|
42
|
+
<tbody
|
|
43
|
+
className={cn(
|
|
44
|
+
"[&_tr:last-child]:border-0",
|
|
45
|
+
"[&_tr]:border-[var(--table-border)]",
|
|
46
|
+
)}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function TableRow(props: React.HTMLAttributes<HTMLTableRowElement>) {
|
|
53
|
+
return (
|
|
54
|
+
<tr
|
|
55
|
+
className={cn(
|
|
56
|
+
"hover:bg-muted/50 border-b transition-colors",
|
|
57
|
+
"border-[var(--table-border)] hover:bg-[var(--table-row-hover-bg)]",
|
|
58
|
+
)}
|
|
59
|
+
{...props}
|
|
60
|
+
/>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function TableHead(props: React.ThHTMLAttributes<HTMLTableCellElement>) {
|
|
65
|
+
return (
|
|
66
|
+
<th
|
|
67
|
+
className={cn(
|
|
68
|
+
"text-muted-foreground h-10 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
69
|
+
"text-[var(--table-head-fg)]",
|
|
70
|
+
)}
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function TableCell(props: React.TdHTMLAttributes<HTMLTableCellElement>) {
|
|
77
|
+
return (
|
|
78
|
+
<td
|
|
79
|
+
className={cn(
|
|
80
|
+
"p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
81
|
+
"text-[var(--table-fg)]",
|
|
82
|
+
)}
|
|
83
|
+
{...props}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function TableCaption(props: React.HTMLAttributes<HTMLElement>) {
|
|
89
|
+
return (
|
|
90
|
+
<caption
|
|
91
|
+
className={cn(
|
|
92
|
+
"text-muted-foreground mt-4 text-sm",
|
|
93
|
+
"text-[var(--table-muted-fg)]",
|
|
94
|
+
)}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { cn } from "@/lib/utils";
|
|
5
|
-
|
|
6
|
-
export interface TestimonialCardProps {
|
|
7
|
-
/** Optional id for root card */
|
|
8
|
-
id?: string;
|
|
9
|
-
/** Optional root className merged with card.className */
|
|
10
|
-
className?: string;
|
|
11
|
-
|
|
12
|
-
/** Legacy props (kept for backward compatibility) */
|
|
13
|
-
testimonialText?: string;
|
|
14
|
-
testimonialAuthor?: string;
|
|
15
|
-
testimonialAuthorInitials?: string;
|
|
16
|
-
|
|
17
|
-
/** New props to align with upgraded sections */
|
|
18
|
-
quote?: string;
|
|
19
|
-
name?: string;
|
|
20
|
-
role?: string;
|
|
21
|
-
|
|
22
|
-
/** Styling configuration objects */
|
|
23
|
-
card?: {
|
|
24
|
-
className?: string;
|
|
25
|
-
};
|
|
26
|
-
content?: {
|
|
27
|
-
className?: string;
|
|
28
|
-
};
|
|
29
|
-
text?: {
|
|
30
|
-
className?: string;
|
|
31
|
-
};
|
|
32
|
-
author?: {
|
|
33
|
-
className?: string;
|
|
34
|
-
};
|
|
35
|
-
avatar?: {
|
|
36
|
-
className?: string;
|
|
37
|
-
};
|
|
38
|
-
avatarText?: {
|
|
39
|
-
className?: string;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function getInitials(from?: string) {
|
|
44
|
-
if (!from) return undefined;
|
|
45
|
-
const parts = from.trim().split(/\s+/);
|
|
46
|
-
const first = parts[0]?.[0] || "";
|
|
47
|
-
const last = parts.length > 1 ? parts[parts.length - 1]?.[0] || "" : "";
|
|
48
|
-
const res = `${first}${last}`.toUpperCase();
|
|
49
|
-
return res || undefined;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function TestimonialCard({
|
|
53
|
-
id,
|
|
54
|
-
className,
|
|
55
|
-
// legacy defaults
|
|
56
|
-
testimonialText = "Lorem ipsum dolor sit amet! Consectetur adipiscing elit.",
|
|
57
|
-
testimonialAuthor = " - Cillum Dolore",
|
|
58
|
-
testimonialAuthorInitials = "JD",
|
|
59
|
-
// new props (no defaults, we derive below)
|
|
60
|
-
quote,
|
|
61
|
-
name,
|
|
62
|
-
role,
|
|
63
|
-
card = {
|
|
64
|
-
className:
|
|
65
|
-
"bg-card text-card-foreground p-6 rounded-lg border border-border shadow-md transition-transform duration-200 hover:-translate-y-1 bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
66
|
-
},
|
|
67
|
-
content = {
|
|
68
|
-
className: "flex flex-col space-y-4",
|
|
69
|
-
},
|
|
70
|
-
text = {
|
|
71
|
-
className:
|
|
72
|
-
"text-muted-foreground text-base leading-relaxed italic text-[var(--card-fg)]",
|
|
73
|
-
},
|
|
74
|
-
author = {
|
|
75
|
-
className:
|
|
76
|
-
"text-muted-foreground text-sm font-medium text-[var(--card-muted-fg)]",
|
|
77
|
-
},
|
|
78
|
-
avatar = {
|
|
79
|
-
className:
|
|
80
|
-
"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)]",
|
|
81
|
-
},
|
|
82
|
-
avatarText = {
|
|
83
|
-
className: "text-white font-bold",
|
|
84
|
-
},
|
|
85
|
-
}: TestimonialCardProps) {
|
|
86
|
-
const displayText = quote ?? testimonialText;
|
|
87
|
-
const computedAuthor =
|
|
88
|
-
testimonialAuthor ??
|
|
89
|
-
(name ? ` - ${name}${role ? `, ${role}` : ""}` : " - Cillum Dolore");
|
|
90
|
-
const initials = testimonialAuthorInitials ?? getInitials(name) ?? "JD";
|
|
91
|
-
|
|
92
|
-
return (
|
|
93
|
-
<div id={id} className={cn(card.className, className)}>
|
|
94
|
-
<div className={content.className}>
|
|
95
|
-
{/* Avatar */}
|
|
96
|
-
<div className={avatar.className}>
|
|
97
|
-
<span className={avatarText.className}>{initials}</span>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
{/* Testimonial Text */}
|
|
101
|
-
<p className={text.className}>“{displayText}”</p>
|
|
102
|
-
|
|
103
|
-
{/* Author */}
|
|
104
|
-
<p className={author.className}>{computedAuthor}</p>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
export interface TestimonialCardProps {
|
|
7
|
+
/** Optional id for root card */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Optional root className merged with card.className */
|
|
10
|
+
className?: string;
|
|
11
|
+
|
|
12
|
+
/** Legacy props (kept for backward compatibility) */
|
|
13
|
+
testimonialText?: string;
|
|
14
|
+
testimonialAuthor?: string;
|
|
15
|
+
testimonialAuthorInitials?: string;
|
|
16
|
+
|
|
17
|
+
/** New props to align with upgraded sections */
|
|
18
|
+
quote?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
role?: string;
|
|
21
|
+
|
|
22
|
+
/** Styling configuration objects */
|
|
23
|
+
card?: {
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
content?: {
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
text?: {
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
author?: {
|
|
33
|
+
className?: string;
|
|
34
|
+
};
|
|
35
|
+
avatar?: {
|
|
36
|
+
className?: string;
|
|
37
|
+
};
|
|
38
|
+
avatarText?: {
|
|
39
|
+
className?: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getInitials(from?: string) {
|
|
44
|
+
if (!from) return undefined;
|
|
45
|
+
const parts = from.trim().split(/\s+/);
|
|
46
|
+
const first = parts[0]?.[0] || "";
|
|
47
|
+
const last = parts.length > 1 ? parts[parts.length - 1]?.[0] || "" : "";
|
|
48
|
+
const res = `${first}${last}`.toUpperCase();
|
|
49
|
+
return res || undefined;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function TestimonialCard({
|
|
53
|
+
id,
|
|
54
|
+
className,
|
|
55
|
+
// legacy defaults
|
|
56
|
+
testimonialText = "Lorem ipsum dolor sit amet! Consectetur adipiscing elit.",
|
|
57
|
+
testimonialAuthor = " - Cillum Dolore",
|
|
58
|
+
testimonialAuthorInitials = "JD",
|
|
59
|
+
// new props (no defaults, we derive below)
|
|
60
|
+
quote,
|
|
61
|
+
name,
|
|
62
|
+
role,
|
|
63
|
+
card = {
|
|
64
|
+
className:
|
|
65
|
+
"bg-card text-card-foreground p-6 rounded-lg border border-border shadow-md transition-transform duration-200 hover:-translate-y-1 bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
66
|
+
},
|
|
67
|
+
content = {
|
|
68
|
+
className: "flex flex-col space-y-4",
|
|
69
|
+
},
|
|
70
|
+
text = {
|
|
71
|
+
className:
|
|
72
|
+
"text-muted-foreground text-base leading-relaxed italic text-[var(--card-fg)]",
|
|
73
|
+
},
|
|
74
|
+
author = {
|
|
75
|
+
className:
|
|
76
|
+
"text-muted-foreground text-sm font-medium text-[var(--card-muted-fg)]",
|
|
77
|
+
},
|
|
78
|
+
avatar = {
|
|
79
|
+
className:
|
|
80
|
+
"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)]",
|
|
81
|
+
},
|
|
82
|
+
avatarText = {
|
|
83
|
+
className: "text-white font-bold",
|
|
84
|
+
},
|
|
85
|
+
}: TestimonialCardProps) {
|
|
86
|
+
const displayText = quote ?? testimonialText;
|
|
87
|
+
const computedAuthor =
|
|
88
|
+
testimonialAuthor ??
|
|
89
|
+
(name ? ` - ${name}${role ? `, ${role}` : ""}` : " - Cillum Dolore");
|
|
90
|
+
const initials = testimonialAuthorInitials ?? getInitials(name) ?? "JD";
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div id={id} className={cn(card.className, className)}>
|
|
94
|
+
<div className={content.className}>
|
|
95
|
+
{/* Avatar */}
|
|
96
|
+
<div className={avatar.className}>
|
|
97
|
+
<span className={avatarText.className}>{initials}</span>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
{/* Testimonial Text */}
|
|
101
|
+
<p className={text.className}>“{displayText}”</p>
|
|
102
|
+
|
|
103
|
+
{/* Author */}
|
|
104
|
+
<p className={author.className}>{computedAuthor}</p>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
6
|
-
|
|
7
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
8
|
-
({ className, ...props }, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<textarea
|
|
11
|
-
className={cn(
|
|
12
|
-
// Base structural + token fallbacks
|
|
13
|
-
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/30 dark:aria-invalid:focus-visible:ring-destructive/40 flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
-
// CSS variable hooks (preset-first). When vars are unset, tokens above apply.
|
|
15
|
-
"border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
18
|
-
ref={ref}
|
|
19
|
-
{...props}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
Textarea.displayName = "Textarea";
|
|
25
|
-
|
|
26
|
-
export { Textarea };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
6
|
+
|
|
7
|
+
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
8
|
+
({ className, ...props }, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<textarea
|
|
11
|
+
className={cn(
|
|
12
|
+
// Base structural + token fallbacks
|
|
13
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/30 dark:aria-invalid:focus-visible:ring-destructive/40 flex min-h-[80px] w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
// CSS variable hooks (preset-first). When vars are unset, tokens above apply.
|
|
15
|
+
"border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
16
|
+
className,
|
|
17
|
+
)}
|
|
18
|
+
ref={ref}
|
|
19
|
+
{...props}
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
Textarea.displayName = "Textarea";
|
|
25
|
+
|
|
26
|
+
export { Textarea };
|