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,91 +1,91 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Image from "next/image";
|
|
5
|
-
import { Card, CardContent } from "@/components/ui/card";
|
|
6
|
-
import { cn } from "@/lib/utils";
|
|
7
|
-
|
|
8
|
-
export interface FeatureCardProps {
|
|
9
|
-
/** Optional id and root className */
|
|
10
|
-
id?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
|
|
13
|
-
/** Image source URL for the feature card image */
|
|
14
|
-
cardImageSrc: string;
|
|
15
|
-
/** Alt text for the feature card image */
|
|
16
|
-
cardImageAlt: string;
|
|
17
|
-
/** Heading text displayed on the feature card */
|
|
18
|
-
cardHeadingText: string;
|
|
19
|
-
/** Subheading or description text on the feature card */
|
|
20
|
-
cardSubheadingText: string;
|
|
21
|
-
|
|
22
|
-
/** Styling configuration objects */
|
|
23
|
-
card?: { className?: string };
|
|
24
|
-
image?: { className?: string };
|
|
25
|
-
heading?: { className?: string };
|
|
26
|
-
subheading?: { className?: string };
|
|
27
|
-
/** Next/Image quality (1-100) */
|
|
28
|
-
imageQuality?: number;
|
|
29
|
-
/** Next/Image sizes attribute */
|
|
30
|
-
imageSizes?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function FeatureCard({
|
|
34
|
-
id,
|
|
35
|
-
className,
|
|
36
|
-
cardImageSrc,
|
|
37
|
-
cardImageAlt,
|
|
38
|
-
cardHeadingText,
|
|
39
|
-
cardSubheadingText,
|
|
40
|
-
card = {
|
|
41
|
-
className:
|
|
42
|
-
"h-full transition-all duration-200 hover:shadow-lg bg-card text-card-foreground border rounded-md border-border",
|
|
43
|
-
},
|
|
44
|
-
image = { className: "object-cover" },
|
|
45
|
-
heading = {
|
|
46
|
-
className:
|
|
47
|
-
"mb-2 text-lg font-semibold text-foreground text-[var(--card-title-fg)]",
|
|
48
|
-
},
|
|
49
|
-
subheading = {
|
|
50
|
-
className:
|
|
51
|
-
"text-sm leading-relaxed text-muted-foreground text-[var(--card-muted-fg)]",
|
|
52
|
-
},
|
|
53
|
-
imageQuality = 85,
|
|
54
|
-
imageSizes = "(max-width: 480px) 100vw, (max-width: 768px) 50vw, 33vw",
|
|
55
|
-
}: FeatureCardProps) {
|
|
56
|
-
return (
|
|
57
|
-
<Card id={id} className={cn("group", card.className, className)}>
|
|
58
|
-
<CardContent className="relative flex h-full flex-col p-6">
|
|
59
|
-
{/* Spotlight overlay */}
|
|
60
|
-
<div className="pointer-events-none absolute inset-0 -z-10 opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
|
61
|
-
<div className="absolute -top-10 -left-10 h-40 w-40 rounded-full bg-white/5 blur-2xl dark:bg-white/10" />
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div className="relative mb-4 h-48 w-full overflow-hidden rounded-md">
|
|
65
|
-
{cardImageSrc ? (
|
|
66
|
-
<Image
|
|
67
|
-
src={cardImageSrc}
|
|
68
|
-
alt={cardImageAlt || "Feature image"}
|
|
69
|
-
fill
|
|
70
|
-
className={cn(
|
|
71
|
-
"transition-transform duration-500 group-hover:scale-105",
|
|
72
|
-
image.className,
|
|
73
|
-
)}
|
|
74
|
-
quality={imageQuality}
|
|
75
|
-
sizes={imageSizes}
|
|
76
|
-
/>
|
|
77
|
-
) : (
|
|
78
|
-
<div className="bg-muted text-muted-foreground flex h-full w-full items-center justify-center">
|
|
79
|
-
<span className="text-xs">No image</span>
|
|
80
|
-
</div>
|
|
81
|
-
)}
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div className="flex flex-1 flex-col">
|
|
85
|
-
<h3 className={heading.className}>{cardHeadingText}</h3>
|
|
86
|
-
<p className={subheading.className}>{cardSubheadingText}</p>
|
|
87
|
-
</div>
|
|
88
|
-
</CardContent>
|
|
89
|
-
</Card>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { Card, CardContent } from "@/components/ui/card";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
export interface FeatureCardProps {
|
|
9
|
+
/** Optional id and root className */
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
|
|
13
|
+
/** Image source URL for the feature card image */
|
|
14
|
+
cardImageSrc: string;
|
|
15
|
+
/** Alt text for the feature card image */
|
|
16
|
+
cardImageAlt: string;
|
|
17
|
+
/** Heading text displayed on the feature card */
|
|
18
|
+
cardHeadingText: string;
|
|
19
|
+
/** Subheading or description text on the feature card */
|
|
20
|
+
cardSubheadingText: string;
|
|
21
|
+
|
|
22
|
+
/** Styling configuration objects */
|
|
23
|
+
card?: { className?: string };
|
|
24
|
+
image?: { className?: string };
|
|
25
|
+
heading?: { className?: string };
|
|
26
|
+
subheading?: { className?: string };
|
|
27
|
+
/** Next/Image quality (1-100) */
|
|
28
|
+
imageQuality?: number;
|
|
29
|
+
/** Next/Image sizes attribute */
|
|
30
|
+
imageSizes?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function FeatureCard({
|
|
34
|
+
id,
|
|
35
|
+
className,
|
|
36
|
+
cardImageSrc,
|
|
37
|
+
cardImageAlt,
|
|
38
|
+
cardHeadingText,
|
|
39
|
+
cardSubheadingText,
|
|
40
|
+
card = {
|
|
41
|
+
className:
|
|
42
|
+
"h-full transition-all duration-200 hover:shadow-lg bg-card text-card-foreground border rounded-md border-border",
|
|
43
|
+
},
|
|
44
|
+
image = { className: "object-cover" },
|
|
45
|
+
heading = {
|
|
46
|
+
className:
|
|
47
|
+
"mb-2 text-lg font-semibold text-foreground text-[var(--card-title-fg)]",
|
|
48
|
+
},
|
|
49
|
+
subheading = {
|
|
50
|
+
className:
|
|
51
|
+
"text-sm leading-relaxed text-muted-foreground text-[var(--card-muted-fg)]",
|
|
52
|
+
},
|
|
53
|
+
imageQuality = 85,
|
|
54
|
+
imageSizes = "(max-width: 480px) 100vw, (max-width: 768px) 50vw, 33vw",
|
|
55
|
+
}: FeatureCardProps) {
|
|
56
|
+
return (
|
|
57
|
+
<Card id={id} className={cn("group", card.className, className)}>
|
|
58
|
+
<CardContent className="relative flex h-full flex-col p-6">
|
|
59
|
+
{/* Spotlight overlay */}
|
|
60
|
+
<div className="pointer-events-none absolute inset-0 -z-10 opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
|
61
|
+
<div className="absolute -top-10 -left-10 h-40 w-40 rounded-full bg-white/5 blur-2xl dark:bg-white/10" />
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div className="relative mb-4 h-48 w-full overflow-hidden rounded-md">
|
|
65
|
+
{cardImageSrc ? (
|
|
66
|
+
<Image
|
|
67
|
+
src={cardImageSrc}
|
|
68
|
+
alt={cardImageAlt || "Feature image"}
|
|
69
|
+
fill
|
|
70
|
+
className={cn(
|
|
71
|
+
"transition-transform duration-500 group-hover:scale-105",
|
|
72
|
+
image.className,
|
|
73
|
+
)}
|
|
74
|
+
quality={imageQuality}
|
|
75
|
+
sizes={imageSizes}
|
|
76
|
+
/>
|
|
77
|
+
) : (
|
|
78
|
+
<div className="bg-muted text-muted-foreground flex h-full w-full items-center justify-center">
|
|
79
|
+
<span className="text-xs">No image</span>
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className="flex flex-1 flex-col">
|
|
85
|
+
<h3 className={heading.className}>{cardHeadingText}</h3>
|
|
86
|
+
<p className={subheading.className}>{cardSubheadingText}</p>
|
|
87
|
+
</div>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
|
|
5
|
-
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
|
|
7
|
-
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
-
({ className, type, ...props }, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<input
|
|
11
|
-
type={type}
|
|
12
|
-
className={cn(
|
|
13
|
-
// Base structural + token fallbacks
|
|
14
|
-
"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 h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
-
// CSS variable hooks (preset-first). When vars are unset, these are ignored and tokens above apply.
|
|
16
|
-
"focus-visible:ring-offset-background border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring,var(--ring))] focus-visible:ring-offset-2",
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
19
|
-
ref={ref}
|
|
20
|
-
{...props}
|
|
21
|
-
/>
|
|
22
|
-
);
|
|
23
|
-
},
|
|
24
|
-
);
|
|
25
|
-
Input.displayName = "Input";
|
|
26
|
-
|
|
27
|
-
export { Input };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
+
|
|
7
|
+
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
8
|
+
({ className, type, ...props }, ref) => {
|
|
9
|
+
return (
|
|
10
|
+
<input
|
|
11
|
+
type={type}
|
|
12
|
+
className={cn(
|
|
13
|
+
// Base structural + token fallbacks
|
|
14
|
+
"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 h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
// CSS variable hooks (preset-first). When vars are unset, these are ignored and tokens above apply.
|
|
16
|
+
"focus-visible:ring-offset-background border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-[var(--input-focus-ring,var(--ring))] focus-visible:ring-offset-2",
|
|
17
|
+
className,
|
|
18
|
+
)}
|
|
19
|
+
ref={ref}
|
|
20
|
+
{...props}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
Input.displayName = "Input";
|
|
26
|
+
|
|
27
|
+
export { Input };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils";
|
|
6
|
-
|
|
7
|
-
const labelVariants = cva(
|
|
8
|
-
"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
const Label = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
14
|
-
VariantProps<typeof labelVariants>
|
|
15
|
-
>(({ className, ...props }, ref) => (
|
|
16
|
-
<LabelPrimitive.Root
|
|
17
|
-
ref={ref}
|
|
18
|
-
className={cn(
|
|
19
|
-
labelVariants(),
|
|
20
|
-
// Optional color override via var; falls back to inherited color when unset
|
|
21
|
-
"text-[var(--label-fg)]",
|
|
22
|
-
className,
|
|
23
|
-
)}
|
|
24
|
-
{...props}
|
|
25
|
-
/>
|
|
26
|
-
));
|
|
27
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
28
|
-
|
|
29
|
-
export { Label };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
|
|
7
|
+
const labelVariants = cva(
|
|
8
|
+
"text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
const Label = React.forwardRef<
|
|
12
|
+
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
14
|
+
VariantProps<typeof labelVariants>
|
|
15
|
+
>(({ className, ...props }, ref) => (
|
|
16
|
+
<LabelPrimitive.Root
|
|
17
|
+
ref={ref}
|
|
18
|
+
className={cn(
|
|
19
|
+
labelVariants(),
|
|
20
|
+
// Optional color override via var; falls back to inherited color when unset
|
|
21
|
+
"text-[var(--label-fg)]",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
));
|
|
27
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
28
|
+
|
|
29
|
+
export { Label };
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import React from "react";
|
|
4
|
-
import Link from "next/link";
|
|
5
|
-
import { Button } from "@/components/ui/button";
|
|
6
|
-
import { Card } from "@/components/ui/card";
|
|
7
|
-
import { cn } from "@/lib/utils";
|
|
8
|
-
import { Check } from "lucide-react";
|
|
9
|
-
|
|
10
|
-
export interface PricingCardProps {
|
|
11
|
-
/** Optional id and root className */
|
|
12
|
-
id?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
|
|
15
|
-
/** Header text/title of the pricing plan */
|
|
16
|
-
pricingCardTitle?: string;
|
|
17
|
-
/** Price text for the pricing plan */
|
|
18
|
-
pricingCardPrice?: string;
|
|
19
|
-
/** Array of features included in the pricing plan */
|
|
20
|
-
pricingCardFeatures?: string[];
|
|
21
|
-
/** Label text for the pricing call-to-action button */
|
|
22
|
-
pricingCardCTALabel?: string;
|
|
23
|
-
/** URL/href for the pricing call-to-action button */
|
|
24
|
-
pricingCardCTAHref?: string;
|
|
25
|
-
/** Whether this is the featured/popular plan */
|
|
26
|
-
isPopular?: boolean;
|
|
27
|
-
|
|
28
|
-
/** Styling configuration objects */
|
|
29
|
-
card?: { className?: string };
|
|
30
|
-
header?: { className?: string };
|
|
31
|
-
title?: { className?: string };
|
|
32
|
-
price?: { className?: string };
|
|
33
|
-
features?: { className?: string };
|
|
34
|
-
featureItem?: { className?: string };
|
|
35
|
-
cta?: {
|
|
36
|
-
variant?:
|
|
37
|
-
| "default"
|
|
38
|
-
| "destructive"
|
|
39
|
-
| "outline"
|
|
40
|
-
| "secondary"
|
|
41
|
-
| "ghost"
|
|
42
|
-
| "link";
|
|
43
|
-
size?: "default" | "sm" | "lg" | "icon";
|
|
44
|
-
className?: string;
|
|
45
|
-
/** Forward-through escape hatch matching Button */
|
|
46
|
-
unstyled?: boolean;
|
|
47
|
-
style?: React.CSSProperties;
|
|
48
|
-
};
|
|
49
|
-
popularBadge?: { className?: string };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function PricingCard({
|
|
53
|
-
id,
|
|
54
|
-
className,
|
|
55
|
-
pricingCardTitle = "Basic Plan",
|
|
56
|
-
pricingCardPrice = "$9.99",
|
|
57
|
-
pricingCardFeatures = ["Feature 1", "Feature 2", "Feature 3"],
|
|
58
|
-
pricingCardCTALabel = "Select Plan",
|
|
59
|
-
pricingCardCTAHref = "#contact",
|
|
60
|
-
isPopular = false,
|
|
61
|
-
card = {
|
|
62
|
-
className:
|
|
63
|
-
"relative bg-card text-card-foreground border border-border rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200",
|
|
64
|
-
},
|
|
65
|
-
header = { className: "p-6 text-center border-b border-border" },
|
|
66
|
-
title = { className: "text-xl font-bold text-foreground mb-2" },
|
|
67
|
-
price = { className: "text-3xl font-bold text-foreground mb-4" },
|
|
68
|
-
features = { className: "p-6 space-y-3" },
|
|
69
|
-
featureItem = {
|
|
70
|
-
className: "flex items-center text-muted-foreground text-sm",
|
|
71
|
-
},
|
|
72
|
-
cta = {
|
|
73
|
-
variant: "default",
|
|
74
|
-
size: "lg",
|
|
75
|
-
className:
|
|
76
|
-
"w-full bg-primary text-primary-foreground hover:bg-primary/90 font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5",
|
|
77
|
-
},
|
|
78
|
-
popularBadge = {
|
|
79
|
-
className:
|
|
80
|
-
"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium",
|
|
81
|
-
},
|
|
82
|
-
}: PricingCardProps) {
|
|
83
|
-
return (
|
|
84
|
-
<Card id={id} className={cn(card.className, className, "rounded-lg")}>
|
|
85
|
-
{isPopular && <div className={popularBadge.className}>Most Popular</div>}
|
|
86
|
-
|
|
87
|
-
<div className={header.className}>
|
|
88
|
-
<h3 className={title.className}>{pricingCardTitle}</h3>
|
|
89
|
-
<div className={price.className}>{pricingCardPrice}</div>
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<div className={features.className}>
|
|
93
|
-
{pricingCardFeatures?.map((feature, index) => (
|
|
94
|
-
<div key={index} className={featureItem.className}>
|
|
95
|
-
<Check className="mr-3 h-4 w-4 flex-shrink-0 text-green-500" />
|
|
96
|
-
<span>{feature}</span>
|
|
97
|
-
</div>
|
|
98
|
-
))}
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div className="p-6 pt-0">
|
|
102
|
-
<Button
|
|
103
|
-
asChild
|
|
104
|
-
variant={cta.variant}
|
|
105
|
-
size={cta.size}
|
|
106
|
-
className={cn(
|
|
107
|
-
// Allow presets to take over with var hooks from Button
|
|
108
|
-
"border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
|
|
109
|
-
cta.className,
|
|
110
|
-
"hover:animate-none motion-safe:animate-none",
|
|
111
|
-
)}
|
|
112
|
-
{...(cta.unstyled ? { unstyled: true } : {})}
|
|
113
|
-
style={cta.style}
|
|
114
|
-
>
|
|
115
|
-
<Link href={pricingCardCTAHref || "#"}>{pricingCardCTALabel}</Link>
|
|
116
|
-
</Button>
|
|
117
|
-
</div>
|
|
118
|
-
</Card>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
6
|
+
import { Card } from "@/components/ui/card";
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
import { Check } from "lucide-react";
|
|
9
|
+
|
|
10
|
+
export interface PricingCardProps {
|
|
11
|
+
/** Optional id and root className */
|
|
12
|
+
id?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
|
|
15
|
+
/** Header text/title of the pricing plan */
|
|
16
|
+
pricingCardTitle?: string;
|
|
17
|
+
/** Price text for the pricing plan */
|
|
18
|
+
pricingCardPrice?: string;
|
|
19
|
+
/** Array of features included in the pricing plan */
|
|
20
|
+
pricingCardFeatures?: string[];
|
|
21
|
+
/** Label text for the pricing call-to-action button */
|
|
22
|
+
pricingCardCTALabel?: string;
|
|
23
|
+
/** URL/href for the pricing call-to-action button */
|
|
24
|
+
pricingCardCTAHref?: string;
|
|
25
|
+
/** Whether this is the featured/popular plan */
|
|
26
|
+
isPopular?: boolean;
|
|
27
|
+
|
|
28
|
+
/** Styling configuration objects */
|
|
29
|
+
card?: { className?: string };
|
|
30
|
+
header?: { className?: string };
|
|
31
|
+
title?: { className?: string };
|
|
32
|
+
price?: { className?: string };
|
|
33
|
+
features?: { className?: string };
|
|
34
|
+
featureItem?: { className?: string };
|
|
35
|
+
cta?: {
|
|
36
|
+
variant?:
|
|
37
|
+
| "default"
|
|
38
|
+
| "destructive"
|
|
39
|
+
| "outline"
|
|
40
|
+
| "secondary"
|
|
41
|
+
| "ghost"
|
|
42
|
+
| "link";
|
|
43
|
+
size?: "default" | "sm" | "lg" | "icon";
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Forward-through escape hatch matching Button */
|
|
46
|
+
unstyled?: boolean;
|
|
47
|
+
style?: React.CSSProperties;
|
|
48
|
+
};
|
|
49
|
+
popularBadge?: { className?: string };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function PricingCard({
|
|
53
|
+
id,
|
|
54
|
+
className,
|
|
55
|
+
pricingCardTitle = "Basic Plan",
|
|
56
|
+
pricingCardPrice = "$9.99",
|
|
57
|
+
pricingCardFeatures = ["Feature 1", "Feature 2", "Feature 3"],
|
|
58
|
+
pricingCardCTALabel = "Select Plan",
|
|
59
|
+
pricingCardCTAHref = "#contact",
|
|
60
|
+
isPopular = false,
|
|
61
|
+
card = {
|
|
62
|
+
className:
|
|
63
|
+
"relative bg-card text-card-foreground border border-border rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200",
|
|
64
|
+
},
|
|
65
|
+
header = { className: "p-6 text-center border-b border-border" },
|
|
66
|
+
title = { className: "text-xl font-bold text-foreground mb-2" },
|
|
67
|
+
price = { className: "text-3xl font-bold text-foreground mb-4" },
|
|
68
|
+
features = { className: "p-6 space-y-3" },
|
|
69
|
+
featureItem = {
|
|
70
|
+
className: "flex items-center text-muted-foreground text-sm",
|
|
71
|
+
},
|
|
72
|
+
cta = {
|
|
73
|
+
variant: "default",
|
|
74
|
+
size: "lg",
|
|
75
|
+
className:
|
|
76
|
+
"w-full bg-primary text-primary-foreground hover:bg-primary/90 font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5",
|
|
77
|
+
},
|
|
78
|
+
popularBadge = {
|
|
79
|
+
className:
|
|
80
|
+
"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium",
|
|
81
|
+
},
|
|
82
|
+
}: PricingCardProps) {
|
|
83
|
+
return (
|
|
84
|
+
<Card id={id} className={cn(card.className, className, "rounded-lg")}>
|
|
85
|
+
{isPopular && <div className={popularBadge.className}>Most Popular</div>}
|
|
86
|
+
|
|
87
|
+
<div className={header.className}>
|
|
88
|
+
<h3 className={title.className}>{pricingCardTitle}</h3>
|
|
89
|
+
<div className={price.className}>{pricingCardPrice}</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div className={features.className}>
|
|
93
|
+
{pricingCardFeatures?.map((feature, index) => (
|
|
94
|
+
<div key={index} className={featureItem.className}>
|
|
95
|
+
<Check className="mr-3 h-4 w-4 flex-shrink-0 text-green-500" />
|
|
96
|
+
<span>{feature}</span>
|
|
97
|
+
</div>
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div className="p-6 pt-0">
|
|
102
|
+
<Button
|
|
103
|
+
asChild
|
|
104
|
+
variant={cta.variant}
|
|
105
|
+
size={cta.size}
|
|
106
|
+
className={cn(
|
|
107
|
+
// Allow presets to take over with var hooks from Button
|
|
108
|
+
"border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
|
|
109
|
+
cta.className,
|
|
110
|
+
"hover:animate-none motion-safe:animate-none",
|
|
111
|
+
)}
|
|
112
|
+
{...(cta.unstyled ? { unstyled: true } : {})}
|
|
113
|
+
style={cta.style}
|
|
114
|
+
>
|
|
115
|
+
<Link href={pricingCardCTAHref || "#"}>{pricingCardCTALabel}</Link>
|
|
116
|
+
</Button>
|
|
117
|
+
</div>
|
|
118
|
+
</Card>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
3
|
-
|
|
4
|
-
export type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement>;
|
|
5
|
-
|
|
6
|
-
const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
7
|
-
({ className, children, ...props }, ref) => {
|
|
8
|
-
return (
|
|
9
|
-
<select
|
|
10
|
-
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"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 h-10 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",
|
|
13
|
-
"bg-[var(--input-bg)] text-[var(--input-fg)]",
|
|
14
|
-
className,
|
|
15
|
-
)}
|
|
16
|
-
{...props}
|
|
17
|
-
>
|
|
18
|
-
{children}
|
|
19
|
-
</select>
|
|
20
|
-
);
|
|
21
|
-
},
|
|
22
|
-
);
|
|
23
|
-
Select.displayName = "Select";
|
|
24
|
-
|
|
25
|
-
export { Select };
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "@/lib/utils";
|
|
3
|
+
|
|
4
|
+
export type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement>;
|
|
5
|
+
|
|
6
|
+
const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
|
|
7
|
+
({ className, children, ...props }, ref) => {
|
|
8
|
+
return (
|
|
9
|
+
<select
|
|
10
|
+
ref={ref}
|
|
11
|
+
className={cn(
|
|
12
|
+
"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 h-10 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",
|
|
13
|
+
"bg-[var(--input-bg)] text-[var(--input-fg)]",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</select>
|
|
20
|
+
);
|
|
21
|
+
},
|
|
22
|
+
);
|
|
23
|
+
Select.displayName = "Select";
|
|
24
|
+
|
|
25
|
+
export { Select };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { cn } from "@/lib/utils";
|
|
2
|
-
|
|
3
|
-
export function Skeleton({
|
|
4
|
-
className,
|
|
5
|
-
...props
|
|
6
|
-
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
-
return (
|
|
8
|
-
<div
|
|
9
|
-
className={cn("bg-muted animate-pulse rounded-md", className)}
|
|
10
|
-
{...props}
|
|
11
|
-
/>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
1
|
+
import { cn } from "@/lib/utils";
|
|
2
|
+
|
|
3
|
+
export function Skeleton({
|
|
4
|
+
className,
|
|
5
|
+
...props
|
|
6
|
+
}: React.HTMLAttributes<HTMLDivElement>) {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
className={cn("bg-muted animate-pulse rounded-md", className)}
|
|
10
|
+
{...props}
|
|
11
|
+
/>
|
|
12
|
+
);
|
|
13
|
+
}
|