create-reactivite 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/index.js +42 -0
  2. package/package.json +17 -0
  3. package/template/README.md +73 -0
  4. package/template/components.json +22 -0
  5. package/template/eslint.config.js +23 -0
  6. package/template/index.html +13 -0
  7. package/template/package.json +51 -0
  8. package/template/pnpm-lock.yaml +3519 -0
  9. package/template/public/vite.svg +1 -0
  10. package/template/src/App.css +0 -0
  11. package/template/src/App.tsx +13 -0
  12. package/template/src/assets/react.svg +1 -0
  13. package/template/src/components/home-page-components/features-section.tsx +65 -0
  14. package/template/src/components/home-page-components/header.tsx +43 -0
  15. package/template/src/components/home-page-components/hero.tsx +39 -0
  16. package/template/src/components/home-page-components/template-card.tsx +65 -0
  17. package/template/src/components/home-page-components/template-grid.tsx +68 -0
  18. package/template/src/components/ui/accordion.tsx +64 -0
  19. package/template/src/components/ui/alert.tsx +66 -0
  20. package/template/src/components/ui/avatar.tsx +51 -0
  21. package/template/src/components/ui/badge.tsx +46 -0
  22. package/template/src/components/ui/button-group.tsx +83 -0
  23. package/template/src/components/ui/button.tsx +60 -0
  24. package/template/src/components/ui/calendar.tsx +211 -0
  25. package/template/src/components/ui/card.tsx +92 -0
  26. package/template/src/components/ui/checkbox.tsx +30 -0
  27. package/template/src/components/ui/collapsible.tsx +31 -0
  28. package/template/src/components/ui/dialog.tsx +141 -0
  29. package/template/src/components/ui/select.tsx +185 -0
  30. package/template/src/components/ui/separator.tsx +26 -0
  31. package/template/src/components/ui/sonner.tsx +38 -0
  32. package/template/src/components/ui/spinner.tsx +16 -0
  33. package/template/src/components/ui/table.tsx +114 -0
  34. package/template/src/components/ui/toggle.tsx +45 -0
  35. package/template/src/components/ui/tooltip.tsx +59 -0
  36. package/template/src/global.css +126 -0
  37. package/template/src/lib/utils.ts +6 -0
  38. package/template/src/main.tsx +10 -0
  39. package/template/src/pages/Homepage/Homepage.tsx +16 -0
  40. package/template/tsconfig.app.json +28 -0
  41. package/template/tsconfig.json +14 -0
  42. package/template/tsconfig.node.json +26 -0
  43. package/template/vite.config.ts +14 -0
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
File without changes
@@ -0,0 +1,13 @@
1
+
2
+ import './App.css'
3
+ import Home from './pages/Homepage/Homepage'
4
+
5
+ function App() {
6
+ return (
7
+ <>
8
+ <Home/>
9
+ </>
10
+ )
11
+ }
12
+
13
+ export default App
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1,65 @@
1
+
2
+
3
+ import { Rocket, Shield, Zap, Code } from "lucide-react";
4
+ import { Card, CardContent } from "../ui/card";
5
+
6
+ const features = [
7
+ {
8
+ icon: Rocket,
9
+ title: "Deploy in Seconds",
10
+ description:
11
+ "One-click deployment to Vercel with automatic CI/CD and preview deployments.",
12
+ },
13
+ {
14
+ icon: Shield,
15
+ title: "Production Ready",
16
+ description:
17
+ "Built with best practices, TypeScript, and comprehensive error handling.",
18
+ },
19
+ {
20
+ icon: Zap,
21
+ title: "Blazing Fast",
22
+ description:
23
+ "Optimized for performance with React Server Components and edge runtime.",
24
+ },
25
+ {
26
+ icon: Code,
27
+ title: "Developer Experience",
28
+ description:
29
+ "Hot reload, TypeScript support, and modern tooling for rapid development.",
30
+ },
31
+ ];
32
+
33
+ export function FeaturesSection() {
34
+ return (
35
+ <section id="features" className="container mx-auto px-4 py-16 md:py-24">
36
+ <div className="text-center mb-12">
37
+ <h2 className="text-3xl md:text-4xl font-bold mb-4 text-balance">
38
+ Everything you need to ship fast
39
+ </h2>
40
+ <p className="text-lg text-muted-foreground max-w-2xl mx-auto text-balance">
41
+ Pre-configured with the best tools and practices to help you build
42
+ production-ready applications.
43
+ </p>
44
+ </div>
45
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
46
+ {features.map((feature, index) => (
47
+ <Card
48
+ key={index}
49
+ className="border-border/50 hover:border-foreground/20 transition-colors"
50
+ >
51
+ <CardContent className="pt-6">
52
+ <div className="p-3 rounded-lg bg-secondary/50 w-fit mb-4">
53
+ <feature.icon className="h-6 w-6" />
54
+ </div>
55
+ <h3 className="text-lg font-semibold mb-2">{feature.title}</h3>
56
+ <p className="text-sm text-muted-foreground leading-relaxed">
57
+ {feature.description}
58
+ </p>
59
+ </CardContent>
60
+ </Card>
61
+ ))}
62
+ </div>
63
+ </section>
64
+ );
65
+ }
@@ -0,0 +1,43 @@
1
+
2
+
3
+ import { Github } from "lucide-react";
4
+ import { Button } from "../ui/button";
5
+
6
+ export function Header() {
7
+ return (
8
+ <header className="border-b border-border bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
9
+ <div className="container mx-auto flex h-16 items-center justify-between px-4">
10
+ <div className="flex items-center gap-6">
11
+ <h1 className="text-xl font-bold">Boilerplate</h1>
12
+ <nav className="hidden md:flex items-center gap-6">
13
+ <a
14
+ href="#templates"
15
+ className="text-sm text-muted-foreground hover:text-foreground transition-colors"
16
+ >
17
+ Templates
18
+ </a>
19
+ <a
20
+ href="#features"
21
+ className="text-sm text-muted-foreground hover:text-foreground transition-colors"
22
+ >
23
+ Features
24
+ </a>
25
+ <a
26
+ href="#docs"
27
+ className="text-sm text-muted-foreground hover:text-foreground transition-colors"
28
+ >
29
+ Docs
30
+ </a>
31
+ </nav>
32
+ </div>
33
+ <div className="flex items-center gap-4">
34
+ <Button variant="ghost" size="sm">
35
+ <Github className="h-4 w-4 mr-2" />
36
+ GitHub
37
+ </Button>
38
+ <Button size="sm">Get Started</Button>
39
+ </div>
40
+ </div>
41
+ </header>
42
+ );
43
+ }
@@ -0,0 +1,39 @@
1
+
2
+
3
+ import { ArrowRight } from "lucide-react";
4
+ import { Button } from "../ui/button";
5
+
6
+ export function Hero() {
7
+ return (
8
+ <section className="container mx-auto px-4 py-24 md:py-32">
9
+ <div className="flex flex-col items-center text-center gap-8 max-w-4xl mx-auto">
10
+ <h1 className="text-4xl md:text-6xl lg:text-7xl font-bold tracking-tight text-balance">
11
+ Start building in seconds
12
+ </h1>
13
+ <p className="text-lg md:text-xl text-muted-foreground max-w-2xl text-balance">
14
+ Kickstart your next project with templates built by us and our
15
+ community. Ship faster with pre-configured components and best
16
+ practices.
17
+ </p>
18
+ <div className="flex flex-col sm:flex-row items-center gap-4">
19
+ <Button size="lg" className="group">
20
+ View all templates
21
+ <ArrowRight className="ml-2 h-4 w-4 transition-transform group-hover:translate-x-1" />
22
+ </Button>
23
+ <Button size="lg" variant="outline">
24
+ <Github className="mr-2 h-4 w-4" />
25
+ Official GitHub library
26
+ </Button>
27
+ </div>
28
+ </div>
29
+ </section>
30
+ );
31
+ }
32
+
33
+ function Github({ className }: { className?: string }) {
34
+ return (
35
+ <svg className={className} viewBox="0 0 24 24" fill="currentColor">
36
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
37
+ </svg>
38
+ );
39
+ }
@@ -0,0 +1,65 @@
1
+
2
+ import { ArrowRight, type LucideIcon } from "lucide-react";
3
+ import { useState } from "react";
4
+ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card";
5
+ import { Badge } from "../ui/badge";
6
+ import { Button } from "../ui/button";
7
+
8
+ interface TemplateCardProps {
9
+ title: string;
10
+ description: string;
11
+ icon: LucideIcon;
12
+ tags: string[];
13
+ }
14
+
15
+ export function TemplateCard({
16
+ title,
17
+ description,
18
+ icon: Icon,
19
+ tags,
20
+ }: TemplateCardProps) {
21
+ const [isHovered, setIsHovered] = useState(false);
22
+
23
+ return (
24
+ <Card
25
+ className="group relative overflow-hidden transition-all duration-300 hover:border-foreground/20 cursor-pointer"
26
+ onMouseEnter={() => setIsHovered(true)}
27
+ onMouseLeave={() => setIsHovered(false)}
28
+ >
29
+ <CardHeader>
30
+ <div className="flex items-center justify-between mb-4">
31
+ <div className="p-3 rounded-lg bg-secondary/50 transition-colors group-hover:bg-secondary">
32
+ <Icon className="h-6 w-6" />
33
+ </div>
34
+ <ArrowRight
35
+ className={`h-5 w-5 transition-all duration-300 ${
36
+ isHovered
37
+ ? "translate-x-0 opacity-100"
38
+ : "-translate-x-2 opacity-0"
39
+ }`}
40
+ />
41
+ </div>
42
+ <CardTitle className="text-xl">{title}</CardTitle>
43
+ <CardDescription className="text-base leading-relaxed">
44
+ {description}
45
+ </CardDescription>
46
+ </CardHeader>
47
+ <CardContent>
48
+ <div className="flex flex-wrap gap-2">
49
+ {tags.map((tag, index) => (
50
+ <Badge key={index} variant="secondary" className="text-xs">
51
+ {tag}
52
+ </Badge>
53
+ ))}
54
+ </div>
55
+ <Button
56
+ variant="ghost"
57
+ className="w-full mt-4 justify-between group-hover:bg-secondary"
58
+ >
59
+ View Template
60
+ <ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-1" />
61
+ </Button>
62
+ </CardContent>
63
+ </Card>
64
+ );
65
+ }
@@ -0,0 +1,68 @@
1
+
2
+
3
+ import {
4
+ Code2,
5
+ Database,
6
+ MessageSquare,
7
+ Sparkles,
8
+ Layers,
9
+ Zap,
10
+ } from "lucide-react";
11
+ import { TemplateCard } from "./template-card";
12
+
13
+ const templates = [
14
+ {
15
+ title: "Next.js Starter",
16
+ description:
17
+ "A Next.js App Router template configured with TypeScript, Tailwind CSS, and best practices.",
18
+ icon: Code2,
19
+ tags: ["Next.js", "TypeScript", "Tailwind"],
20
+ },
21
+ {
22
+ title: "Full-Stack SaaS",
23
+ description:
24
+ "Complete SaaS boilerplate with authentication, database, payments, and admin dashboard.",
25
+ icon: Layers,
26
+ tags: ["Auth", "Database", "Stripe"],
27
+ },
28
+ {
29
+ title: "AI Chatbot",
30
+ description:
31
+ "An open-source AI chatbot template built with Next.js, Vercel AI SDK, and modern UI.",
32
+ icon: MessageSquare,
33
+ tags: ["AI", "Chat", "OpenAI"],
34
+ },
35
+ {
36
+ title: "Database Starter",
37
+ description:
38
+ "Get started with Supabase or Neon by building a data-driven app with auth and storage.",
39
+ icon: Database,
40
+ tags: ["Supabase", "PostgreSQL", "Auth"],
41
+ },
42
+ {
43
+ title: "API Platform",
44
+ description:
45
+ "RESTful API template with route handlers, middleware, validation, and documentation.",
46
+ icon: Zap,
47
+ tags: ["API", "REST", "Docs"],
48
+ },
49
+ {
50
+ title: "AI Image Generator",
51
+ description:
52
+ "Create stunning images with AI using Fal, Replicate, or Stability AI integrations.",
53
+ icon: Sparkles,
54
+ tags: ["AI", "Images", "Generation"],
55
+ },
56
+ ];
57
+
58
+ export function TemplateGrid() {
59
+ return (
60
+ <section id="templates" className="container mx-auto px-4 py-16">
61
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
62
+ {templates.map((template, index) => (
63
+ <TemplateCard key={index} {...template} />
64
+ ))}
65
+ </div>
66
+ </section>
67
+ );
68
+ }
@@ -0,0 +1,64 @@
1
+ import * as React from "react"
2
+ import * as AccordionPrimitive from "@radix-ui/react-accordion"
3
+ import { ChevronDownIcon } from "lucide-react"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function Accordion({
8
+ ...props
9
+ }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
10
+ return <AccordionPrimitive.Root data-slot="accordion" {...props} />
11
+ }
12
+
13
+ function AccordionItem({
14
+ className,
15
+ ...props
16
+ }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
17
+ return (
18
+ <AccordionPrimitive.Item
19
+ data-slot="accordion-item"
20
+ className={cn("border-b last:border-b-0", className)}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ function AccordionTrigger({
27
+ className,
28
+ children,
29
+ ...props
30
+ }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
31
+ return (
32
+ <AccordionPrimitive.Header className="flex">
33
+ <AccordionPrimitive.Trigger
34
+ data-slot="accordion-trigger"
35
+ className={cn(
36
+ "focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
37
+ className
38
+ )}
39
+ {...props}
40
+ >
41
+ {children}
42
+ <ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
43
+ </AccordionPrimitive.Trigger>
44
+ </AccordionPrimitive.Header>
45
+ )
46
+ }
47
+
48
+ function AccordionContent({
49
+ className,
50
+ children,
51
+ ...props
52
+ }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
53
+ return (
54
+ <AccordionPrimitive.Content
55
+ data-slot="accordion-content"
56
+ className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
57
+ {...props}
58
+ >
59
+ <div className={cn("pt-0 pb-4", className)}>{children}</div>
60
+ </AccordionPrimitive.Content>
61
+ )
62
+ }
63
+
64
+ export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
@@ -0,0 +1,66 @@
1
+ import * as React from "react"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ const alertVariants = cva(
7
+ "relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-card text-card-foreground",
12
+ destructive:
13
+ "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",
14
+ },
15
+ },
16
+ defaultVariants: {
17
+ variant: "default",
18
+ },
19
+ }
20
+ )
21
+
22
+ function Alert({
23
+ className,
24
+ variant,
25
+ ...props
26
+ }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>) {
27
+ return (
28
+ <div
29
+ data-slot="alert"
30
+ role="alert"
31
+ className={cn(alertVariants({ variant }), className)}
32
+ {...props}
33
+ />
34
+ )
35
+ }
36
+
37
+ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
38
+ return (
39
+ <div
40
+ data-slot="alert-title"
41
+ className={cn(
42
+ "col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
43
+ className
44
+ )}
45
+ {...props}
46
+ />
47
+ )
48
+ }
49
+
50
+ function AlertDescription({
51
+ className,
52
+ ...props
53
+ }: React.ComponentProps<"div">) {
54
+ return (
55
+ <div
56
+ data-slot="alert-description"
57
+ className={cn(
58
+ "text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
59
+ className
60
+ )}
61
+ {...props}
62
+ />
63
+ )
64
+ }
65
+
66
+ export { Alert, AlertTitle, AlertDescription }
@@ -0,0 +1,51 @@
1
+ import * as React from "react"
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Avatar({
7
+ className,
8
+ ...props
9
+ }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
10
+ return (
11
+ <AvatarPrimitive.Root
12
+ data-slot="avatar"
13
+ className={cn(
14
+ "relative flex size-8 shrink-0 overflow-hidden rounded-full",
15
+ className
16
+ )}
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+
22
+ function AvatarImage({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<typeof AvatarPrimitive.Image>) {
26
+ return (
27
+ <AvatarPrimitive.Image
28
+ data-slot="avatar-image"
29
+ className={cn("aspect-square size-full", className)}
30
+ {...props}
31
+ />
32
+ )
33
+ }
34
+
35
+ function AvatarFallback({
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {
39
+ return (
40
+ <AvatarPrimitive.Fallback
41
+ data-slot="avatar-fallback"
42
+ className={cn(
43
+ "bg-muted flex size-full items-center justify-center rounded-full",
44
+ className
45
+ )}
46
+ {...props}
47
+ />
48
+ )
49
+ }
50
+
51
+ export { Avatar, AvatarImage, AvatarFallback }
@@ -0,0 +1,46 @@
1
+ import * as React from "react"
2
+ import { Slot } from "@radix-ui/react-slot"
3
+ import { cva, type VariantProps } from "class-variance-authority"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ const badgeVariants = cva(
8
+ "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
9
+ {
10
+ variants: {
11
+ variant: {
12
+ default:
13
+ "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
14
+ secondary:
15
+ "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
16
+ destructive:
17
+ "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
18
+ outline:
19
+ "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
20
+ },
21
+ },
22
+ defaultVariants: {
23
+ variant: "default",
24
+ },
25
+ }
26
+ )
27
+
28
+ function Badge({
29
+ className,
30
+ variant,
31
+ asChild = false,
32
+ ...props
33
+ }: React.ComponentProps<"span"> &
34
+ VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
35
+ const Comp = asChild ? Slot : "span"
36
+
37
+ return (
38
+ <Comp
39
+ data-slot="badge"
40
+ className={cn(badgeVariants({ variant }), className)}
41
+ {...props}
42
+ />
43
+ )
44
+ }
45
+
46
+ export { Badge, badgeVariants }
@@ -0,0 +1,83 @@
1
+ import { Slot } from "@radix-ui/react-slot"
2
+ import { cva, type VariantProps } from "class-variance-authority"
3
+
4
+ import { cn } from "@/lib/utils"
5
+ import { Separator } from "@/components/ui/separator"
6
+
7
+ const buttonGroupVariants = cva(
8
+ "flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
9
+ {
10
+ variants: {
11
+ orientation: {
12
+ horizontal:
13
+ "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
14
+ vertical:
15
+ "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
16
+ },
17
+ },
18
+ defaultVariants: {
19
+ orientation: "horizontal",
20
+ },
21
+ }
22
+ )
23
+
24
+ function ButtonGroup({
25
+ className,
26
+ orientation,
27
+ ...props
28
+ }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
29
+ return (
30
+ <div
31
+ role="group"
32
+ data-slot="button-group"
33
+ data-orientation={orientation}
34
+ className={cn(buttonGroupVariants({ orientation }), className)}
35
+ {...props}
36
+ />
37
+ )
38
+ }
39
+
40
+ function ButtonGroupText({
41
+ className,
42
+ asChild = false,
43
+ ...props
44
+ }: React.ComponentProps<"div"> & {
45
+ asChild?: boolean
46
+ }) {
47
+ const Comp = asChild ? Slot : "div"
48
+
49
+ return (
50
+ <Comp
51
+ className={cn(
52
+ "bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
53
+ className
54
+ )}
55
+ {...props}
56
+ />
57
+ )
58
+ }
59
+
60
+ function ButtonGroupSeparator({
61
+ className,
62
+ orientation = "vertical",
63
+ ...props
64
+ }: React.ComponentProps<typeof Separator>) {
65
+ return (
66
+ <Separator
67
+ data-slot="button-group-separator"
68
+ orientation={orientation}
69
+ className={cn(
70
+ "bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
71
+ className
72
+ )}
73
+ {...props}
74
+ />
75
+ )
76
+ }
77
+
78
+ export {
79
+ ButtonGroup,
80
+ ButtonGroupSeparator,
81
+ ButtonGroupText,
82
+ buttonGroupVariants,
83
+ }