diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index bffb357..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "next/core-web-vitals"
-}
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
deleted file mode 100644
index a811740..0000000
--- a/.github/workflows/deploy.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-name: Deploy to GitHub Pages
-
-on:
- push:
- branches: ["main"]
- workflow_dispatch:
-
-permissions:
- contents: read
- pages: write
- id-token: write
-
-concurrency:
- group: "pages"
- cancel-in-progress: true
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: "20"
- cache: npm
-
- - name: Setup Pages
- uses: actions/configure-pages@v4
-
- - name: Fix peer dependency conflict
- run: npm install date-fns@3.6.0
-
- - name: Fix missing dependencies
- run: npm install @dnd-kit/sortable @dnd-kit/utilities react@18.3.1 react-dom@18.3.1
-
- - name: Install dependencies
- run: npm install
-
- - name: Build with Next.js
- run: npm run build
-
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v3
- with:
- path: ./out
-
- deploy:
- environment:
- name: github-pages
- url: ${{ steps.deployment.outputs.page_url }}
- runs-on: ubuntu-latest
- needs: build
- steps:
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v4
\ No newline at end of file
diff --git a/app/globals.css b/app/globals.css
deleted file mode 100644
index d438d69..0000000
--- a/app/globals.css
+++ /dev/null
@@ -1,60 +0,0 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-@layer base {
- :root {
- --background: 240 10% 3.9%;
- --foreground: 0 0% 98%;
- --card: 240 10% 3.9%;
- --card-foreground: 0 0% 98%;
- --popover: 240 10% 3.9%;
- --popover-foreground: 0 0% 98%;
- --primary: 142 70% 50%;
- --primary-foreground: 144 80% 10%;
- --secondary: 240 3.7% 15.9%;
- --secondary-foreground: 0 0% 98%;
- --muted: 240 3.7% 15.9%;
- --muted-foreground: 240 5% 64.9%;
- --accent: 270 70% 60%;
- --accent-foreground: 0 0% 98%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 0 0% 98%;
- --border: 240 3.7% 15.9%;
- --input: 240 3.7% 15.9%;
- --ring: 142 70% 50%;
- --radius: 0.5rem;
- }
-
- .light {
- --background: 0 0% 100%;
- --foreground: 240 10% 3.9%;
- --card: 0 0% 100%;
- --card-foreground: 240 10% 3.9%;
- --popover: 0 0% 100%;
- --popover-foreground: 240 10% 3.9%;
- --primary: 142 70% 45%;
- --primary-foreground: 0 0% 98%;
- --secondary: 240 4.8% 95.9%;
- --secondary-foreground: 240 5.9% 10%;
- --muted: 240 4.8% 95.9%;
- --muted-foreground: 240 3.8% 46.1%;
- --accent: 270 70% 60%;
- --accent-foreground: 0 0% 98%;
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 0 0% 98%;
- --border: 240 5.9% 90%;
- --input: 240 5.9% 90%;
- --ring: 142 70% 45%;
- }
-}
-
-@layer base {
- * {
- @apply border-border;
- }
- body {
- @apply bg-background text-foreground;
- font-feature-settings: "rlig" 1, "calt" 1;
- }
-}
diff --git a/app/layout.tsx b/app/layout.tsx
deleted file mode 100644
index 171a72f..0000000
--- a/app/layout.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import type { Metadata } from 'next'
-import './globals.css'
-
-export const metadata: Metadata = {
- title: 'DorkLabs',
- description: 'Created with by pr0ff3',
- icons: {
- icon: '/favicon.png',
- },
-}
-
-
-export default function RootLayout({
- children,
-}: Readonly<{
- children: React.ReactNode
-}>) {
- return (
-
-
-
- {/* Puedes añadir más variantes si quieres */}
-
- {children}
-
- );
-}
-
diff --git a/app/loading.tsx b/app/loading.tsx
deleted file mode 100644
index f15322a..0000000
--- a/app/loading.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function Loading() {
- return null
-}
diff --git a/app/page.tsx b/app/page.tsx
deleted file mode 100644
index 2019923..0000000
--- a/app/page.tsx
+++ /dev/null
@@ -1,433 +0,0 @@
-"use client"
-
-import { useState, useEffect } from "react"
-import {
- Moon,
- Sun,
- Search,
- Info,
- ExternalLink,
- Code,
- PlusCircle,
- Trash2,
- Edit2,
- CheckCircle,
-} from "lucide-react"
-import { Button } from "@/components/ui/button"
-import { Checkbox } from "@/components/ui/checkbox"
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select"
-import { Textarea } from "@/components/ui/textarea"
-import { Switch } from "@/components/ui/switch"
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card"
-
-type DorkBlockType =
- | "site"
- | "inurl"
- | "filetype"
- | "intitle"
- | "intext"
- | "cache"
- | "related"
- | "custom"
-
-interface DorkBlock {
- id: string
- type: DorkBlockType
- operator: string
- value: string
- placeholder: string
- description: string
-}
-
-const PREDEFINED_BLOCKS: Omit[] = [
- {
- type: "site",
- operator: "site:",
- placeholder: "example.com",
- description: "Search within a specific website or domain",
- },
- {
- type: "inurl",
- operator: "inurl:",
- placeholder: "admin",
- description: "Search for pages with a specific word in the URL",
- },
- {
- type: "filetype",
- operator: "filetype:",
- placeholder: "pdf",
- description: "Search for specific file types",
- },
- {
- type: "intitle",
- operator: "intitle:",
- placeholder: "index of",
- description: "Search for pages with a specific word in the title",
- },
- {
- type: "intext",
- operator: "intext:",
- placeholder: "password",
- description: "Search for pages containing specific text",
- },
- {
- type: "cache",
- operator: "cache:",
- placeholder: "example.com",
- description: "Show Google’s cached version of a page",
- },
- {
- type: "related",
- operator: "related:",
- placeholder: "example.com",
- description: "Find sites related to a given domain",
- },
-]
-
-const generateId = () => Math.random().toString(36).substring(2, 9)
-
-export default function DorkingLab() {
- // Theme & Accessibility states
- const [theme, setTheme] = useState<"light" | "dark" | "high-contrast">("dark")
- const [fontSize, setFontSize] = useState(14) // px
-
- // Blocks states
- const [blocks, setBlocks] = useState([])
- const [customBlocks, setCustomBlocks] = useState([])
-
- // Search engine: only one selectable
- const [selectedEngine, setSelectedEngine] = useState<
- "google" | "bing" | "duckduckgo" | "yahoo"
- >("google")
-
- // New custom block input states
- const [newCustomOperator, setNewCustomOperator] = useState("")
- const [newCustomPlaceholder, setNewCustomPlaceholder] = useState("")
- const [newCustomDescription, setNewCustomDescription] = useState("")
-
- // Initialize theme from localStorage or system preference
- useEffect(() => {
- const savedTheme = localStorage.getItem("theme") as
- | "light"
- | "dark"
- | "high-contrast"
- | null
- const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches
- ? "dark"
- : "light"
-
- setTheme(savedTheme || systemTheme)
- }, [])
-
- // Update document class and font size when theme or font size changes
- useEffect(() => {
- document.documentElement.classList.remove("light", "dark", "high-contrast")
- document.documentElement.classList.add(theme)
- localStorage.setItem("theme", theme)
-
- document.documentElement.style.fontSize = fontSize + "px"
- }, [theme, fontSize])
-
- // Add a new block from predefined or custom
- const addBlock = (block: Omit) => {
- setBlocks([
- ...blocks,
- { ...block, id: generateId(), value: "" }, // start empty value
- ])
- }
-
- // Add a new custom block saved by user
- const saveCustomBlock = () => {
- if (
- !newCustomOperator.trim() ||
- !newCustomPlaceholder.trim() ||
- !newCustomDescription.trim()
- ) {
- alert("Please fill all fields to create a custom block")
- return
- }
- if (!newCustomOperator.endsWith(":")) {
- alert("Operator should end with a colon (:)")
- return
- }
-
- const newBlock: DorkBlock = {
- id: generateId(),
- type: "custom",
- operator: newCustomOperator.trim(),
- value: "",
- placeholder: newCustomPlaceholder.trim(),
- description: newCustomDescription.trim(),
- }
- setCustomBlocks([...customBlocks, newBlock])
- // reset form inputs
- setNewCustomOperator("")
- setNewCustomPlaceholder("")
- setNewCustomDescription("")
- }
-
- // Update block value on user input
- const updateBlockValue = (id: string, newValue: string) => {
- setBlocks(
- blocks.map((block) =>
- block.id === id ? { ...block, value: newValue } : block
- )
- )
- }
-
- // Remove a block
- const removeBlock = (id: string) => {
- setBlocks(blocks.filter((block) => block.id !== id))
- }
-
- // Build query string from blocks
- const buildQuery = () => {
- const parts = blocks
- .map((b) => {
- if (!b.value.trim()) return null
- if (b.type === "custom") return `${b.operator}${b.value.trim()}`
- return `${b.operator}${b.value.trim()}`
- })
- .filter(Boolean)
- return parts.join(" ")
- }
-
- // Execute search on selected engine
- const executeSearch = () => {
- const query = buildQuery()
- if (!query) {
- alert("Add at least one block with a value")
- return
- }
- const encodedQuery = encodeURIComponent(query)
- const urls = {
- google: `https://www.google.com/search?q=${encodedQuery}`,
- bing: `https://www.bing.com/search?q=${encodedQuery}`,
- duckduckgo: `https://duckduckgo.com/?q=${encodedQuery}`,
- yahoo: `https://search.yahoo.com/search?p=${encodedQuery}`,
- }
- window.open(urls[selectedEngine], "_blank")
- }
-
- // Handle search engine change (only one can be selected)
- const handleEngineChange = (engine: typeof selectedEngine) => {
- setSelectedEngine(engine)
- }
-
- // Toggle theme through options (dark, light, high-contrast)
- const cycleTheme = () => {
- if (theme === "dark") setTheme("light")
- else if (theme === "light") setTheme("high-contrast")
- else setTheme("dark")
- }
-
- return (
-
-
-
-
- {/* Blocks builder */}
-
-
- Visual Dork Builder
-
- Add, edit, and combine dork blocks visually
-
-
-
-
- {[...PREDEFINED_BLOCKS, ...customBlocks].map((block) => (
-
- ))}
-
-
- {blocks.length === 0 && (
- Add blocks above to start building your dork.
- )}
-
-
- {blocks.map((block) => (
-
-
- {block.operator}
-
- updateBlockValue(block.id, e.target.value)}
- className="flex-grow rounded border border-gray-300 px-2 py-1 font-mono focus:outline-none focus:ring-2 focus:ring-primary force-black-text text-black"
- aria-label={`Input for ${block.operator} block`}
- />
-
-
- ))}
-
-
-
-
-
-
- {/* Side Panel */}
-
-
-
-
- )
-}
diff --git a/components.json b/components.json
deleted file mode 100644
index d9ef0ae..0000000
--- a/components.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema.json",
- "style": "default",
- "rsc": true,
- "tsx": true,
- "tailwind": {
- "config": "tailwind.config.ts",
- "css": "app/globals.css",
- "baseColor": "neutral",
- "cssVariables": true,
- "prefix": ""
- },
- "aliases": {
- "components": "@/components",
- "utils": "@/lib/utils",
- "ui": "@/components/ui",
- "lib": "@/lib",
- "hooks": "@/hooks"
- },
- "iconLibrary": "lucide"
-}
\ No newline at end of file
diff --git a/components/dork-builder/blocks/dork-block.tsx b/components/dork-builder/blocks/dork-block.tsx
deleted file mode 100644
index c57b3b3..0000000
--- a/components/dork-builder/blocks/dork-block.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-"use client";
-
-import { useState } from "react";
-import { DorkBlock as DorkBlockType } from "@/types/dork";
-import { cn } from "@/lib/utils";
-import { Input } from "@/components/ui/input";
-import {
- Globe,
- Link,
- File,
- Heading,
- FileText,
- History,
- Link2,
- Edit3,
- X,
- GripVertical,
-} from "lucide-react";
-import { Button } from "@/components/ui/button";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-import { useSortable } from "@dnd-kit/sortable";
-import { CSS } from "@dnd-kit/utilities";
-
-interface DorkBlockProps {
- block: DorkBlockType;
- onUpdate: (id: string, value: string) => void;
- onRemove: (id: string) => void;
- isLast: boolean;
-}
-
-export function DorkBlock({ block, onUpdate, onRemove, isLast }: DorkBlockProps) {
- const [isFocused, setIsFocused] = useState(false);
-
- const {
- attributes,
- listeners,
- setNodeRef,
- transform,
- transition,
- isDragging,
- } = useSortable({ id: block.id });
-
- const style = {
- transform: CSS.Transform.toString(transform),
- transition,
- zIndex: isDragging ? 2 : 1,
- };
-
- const getIcon = () => {
- switch (block.icon) {
- case 'globe': return ;
- case 'link': return ;
- case 'file': return ;
- case 'heading': return ;
- case 'text': return ;
- case 'history': return ;
- case 'link-2': return ;
- case 'edit-3': return ;
- default: return ;
- }
- };
-
- return (
-
-
-
-
- {getIcon()}
-
- {block.type !== 'custom' && (
-
- {block.operator}
-
- )}
-
-
-
onUpdate(block.id, e.target.value)}
- onFocus={() => setIsFocused(true)}
- onBlur={() => setIsFocused(false)}
- className="flex-1 border-none bg-transparent px-2 py-1 focus-visible:ring-0 focus-visible:ring-offset-0"
- />
-
-
-
-
-
-
- Remove block
-
-
-
-
-
-
-
-
- Drag to reorder
-
-
-
-
- );
-}
diff --git a/components/dork-builder/dork-block-list.tsx b/components/dork-builder/dork-block-list.tsx
deleted file mode 100644
index ff8e1fb..0000000
--- a/components/dork-builder/dork-block-list.tsx
+++ /dev/null
@@ -1,90 +0,0 @@
-"use client";
-
-import { PREDEFINED_DORK_BLOCKS } from "@/lib/dork-utils";
-import { DorkBlock as DorkBlockType } from "@/types/dork";
-import { cn } from "@/lib/utils";
-import {
- Globe,
- Link,
- File,
- Heading,
- FileText,
- History,
- Link2,
- Edit3,
-} from "lucide-react";
-import { Button } from "@/components/ui/button";
-import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
-
-interface DorkBlockListProps {
- onAddBlock: (block: DorkBlockType) => void;
-}
-
-export function DorkBlockList({ onAddBlock }: DorkBlockListProps) {
- // Map block type to corresponding icon
- const getIcon = (iconName: string) => {
- switch (iconName) {
- case 'globe':
- return ;
- case 'link':
- return ;
- case 'file':
- return ;
- case 'heading':
- return ;
- case 'text':
- return ;
- case 'history':
- return ;
- case 'link-2':
- return ;
- case 'edit-3':
- return ;
- default:
- return ;
- }
- };
-
- return (
-
-
Dork Blocks
-
-
- {PREDEFINED_DORK_BLOCKS.map((block) => (
-
-
-
-
-
- {block.description}
-
-
- ))}
-
-
-
- );
-}
\ No newline at end of file
diff --git a/components/dork-builder/dork-builder-area.tsx b/components/dork-builder/dork-builder-area.tsx
deleted file mode 100644
index d5b7587..0000000
--- a/components/dork-builder/dork-builder-area.tsx
+++ /dev/null
@@ -1,148 +0,0 @@
-"use client";
-
-import { useState, useEffect } from "react";
-import { DorkBlock as DorkBlockType, SearchEngine } from "@/types/dork";
-import { DorkBlock } from "@/components/dork-builder/blocks/dork-block";
-import { createNewBlock, formatDorkQuery } from "@/lib/dork-utils";
-import { Trash2 } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { useToast } from "@/hooks/use-toast";
-import {
- DndContext,
- closestCenter,
- KeyboardSensor,
- PointerSensor,
- useSensor,
- useSensors,
- DragEndEvent,
-} from "@dnd-kit/core";
-import {
- arrayMove,
- SortableContext,
- sortableKeyboardCoordinates,
- verticalListSortingStrategy,
-} from "@dnd-kit/sortable";
-
-interface DorkBuilderAreaProps {
- onQueryChange: (query: string) => void;
- selectedEngine: SearchEngine;
- onAddBlock?: (block: DorkBlockType) => void;
-}
-
-export function DorkBuilderArea({
- onQueryChange,
- selectedEngine,
- onAddBlock
-}: DorkBuilderAreaProps) {
- const [blocks, setBlocks] = useState([]);
- const { toast } = useToast();
-
- const sensors = useSensors(
- useSensor(PointerSensor),
- useSensor(KeyboardSensor, {
- coordinateGetter: sortableKeyboardCoordinates,
- })
- );
-
- const handleAddBlock = (block: DorkBlockType) => {
- const newBlock = createNewBlock(block);
- setBlocks((prev) => [...prev, newBlock]);
-
- if (onAddBlock) onAddBlock(block);
-
- toast({
- title: "Block added",
- description: `Added ${block.type === 'custom' ? 'custom' : block.operator} block`,
- duration: 2000,
- });
- };
-
- const handleUpdateBlock = (id: string, value: string) => {
- setBlocks((prevBlocks) =>
- prevBlocks.map((block) =>
- block.id === id ? { ...block, value } : block
- )
- );
- };
-
- const handleRemoveBlock = (id: string) => {
- setBlocks((prevBlocks) => prevBlocks.filter((block) => block.id !== id));
- };
-
- const handleDragEnd = (event: DragEndEvent) => {
- const { active, over } = event;
- if (over && active.id !== over.id) {
- setBlocks((blocks) => {
- const oldIndex = blocks.findIndex((block) => block.id === active.id);
- const newIndex = blocks.findIndex((block) => block.id === over.id);
- return arrayMove(blocks, oldIndex, newIndex);
- });
- }
- };
-
- const handleClearAll = () => {
- if (blocks.length === 0) return;
- setBlocks([]);
- toast({
- title: "Cleared all blocks",
- description: "All dork blocks have been removed.",
- duration: 2000,
- });
- };
-
- useEffect(() => {
- const formattedQuery = formatDorkQuery(blocks, selectedEngine);
- onQueryChange(formattedQuery);
- }, [blocks, selectedEngine, onQueryChange]);
-
- return (
-
-
-
Dork Builder
- {blocks.length > 0 && (
-
- )}
-
-
-
- {blocks.length === 0 ? (
-
-
Your dork builder is empty
-
Add blocks from the sidebar to start building your dork query
-
- ) : (
-
- b.id)}
- strategy={verticalListSortingStrategy}
- >
-
- {blocks.map((block, index) => (
-
- ))}
-
-
-
- )}
-
-
- );
-}
diff --git a/components/dork-builder/query-output.tsx b/components/dork-builder/query-output.tsx
deleted file mode 100644
index 159b494..0000000
--- a/components/dork-builder/query-output.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-"use client";
-
-import { useState } from "react";
-import { Copy, ExternalLink } from "lucide-react";
-import { Button } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { Label } from "@/components/ui/label";
-import { cn } from "@/lib/utils";
-import { SearchEngine } from "@/types/dork";
-import { generateSearchUrl } from "@/lib/dork-utils";
-import { useToast } from "@/hooks/use-toast";
-
-interface QueryOutputProps {
- query: string;
- selectedEngine: SearchEngine;
-}
-
-export function QueryOutput({ query, selectedEngine }: QueryOutputProps) {
- const [isCopied, setIsCopied] = useState(false);
- const { toast } = useToast();
-
- const handleCopy = async () => {
- if (!query) return;
-
- try {
- await navigator.clipboard.writeText(query);
- setIsCopied(true);
-
- toast({
- title: "Copied to clipboard",
- description: "The dork query has been copied to your clipboard.",
- duration: 3000,
- });
-
- setTimeout(() => setIsCopied(false), 2000);
- } catch (err) {
- toast({
- title: "Failed to copy",
- description: "Could not copy text to clipboard.",
- variant: "destructive",
- });
- }
- };
-
- const searchUrl = generateSearchUrl(query, selectedEngine);
-
- return (
-
-
-
-
-
- {query && (
-
- )}
-
-
-
-
-
-
-
- {!query && (
-
- Add blocks from the sidebar to build your dork query.
-
- )}
-
- );
-}
\ No newline at end of file
diff --git a/components/dork-builder/search-engine-selector.tsx b/components/dork-builder/search-engine-selector.tsx
deleted file mode 100644
index b52f0ad..0000000
--- a/components/dork-builder/search-engine-selector.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-"use client";
-
-import { SearchEngine } from "@/types/dork";
-import {
- Select,
- SelectContent,
- SelectItem,
- SelectTrigger,
- SelectValue,
-} from "@/components/ui/select";
-
-interface SearchEngineSelectorProps {
- value: SearchEngine;
- onChange: (value: SearchEngine) => void;
-}
-
-export function SearchEngineSelector({
- value,
- onChange,
-}: SearchEngineSelectorProps) {
- const handleChange = (newValue: string) => {
- onChange(newValue as SearchEngine);
- };
-
- return (
-
-
-
- );
-}
\ No newline at end of file
diff --git a/components/theme-provider.tsx b/components/theme-provider.tsx
deleted file mode 100644
index 55c2f6e..0000000
--- a/components/theme-provider.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-'use client'
-
-import * as React from 'react'
-import {
- ThemeProvider as NextThemesProvider,
- type ThemeProviderProps,
-} from 'next-themes'
-
-export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
- return {children}
-}
diff --git a/components/ui/accordion.tsx b/components/ui/accordion.tsx
deleted file mode 100644
index 24c788c..0000000
--- a/components/ui/accordion.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-"use client"
-
-import * as React from "react"
-import * as AccordionPrimitive from "@radix-ui/react-accordion"
-import { ChevronDown } from "lucide-react"
-
-import { cn } from "@/lib/utils"
-
-const Accordion = AccordionPrimitive.Root
-
-const AccordionItem = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AccordionItem.displayName = "AccordionItem"
-
-const AccordionTrigger = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
- svg]:rotate-180",
- className
- )}
- {...props}
- >
- {children}
-
-
-
-))
-AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
-
-const AccordionContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, children, ...props }, ref) => (
-
- {children}
-
-))
-
-AccordionContent.displayName = AccordionPrimitive.Content.displayName
-
-export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
diff --git a/components/ui/alert-dialog.tsx b/components/ui/alert-dialog.tsx
deleted file mode 100644
index 25e7b47..0000000
--- a/components/ui/alert-dialog.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-"use client"
-
-import * as React from "react"
-import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"
-
-import { cn } from "@/lib/utils"
-import { buttonVariants } from "@/components/ui/button"
-
-const AlertDialog = AlertDialogPrimitive.Root
-
-const AlertDialogTrigger = AlertDialogPrimitive.Trigger
-
-const AlertDialogPortal = AlertDialogPrimitive.Portal
-
-const AlertDialogOverlay = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName
-
-const AlertDialogContent = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-
-
-
-))
-AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName
-
-const AlertDialogHeader = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-)
-AlertDialogHeader.displayName = "AlertDialogHeader"
-
-const AlertDialogFooter = ({
- className,
- ...props
-}: React.HTMLAttributes) => (
-
-)
-AlertDialogFooter.displayName = "AlertDialogFooter"
-
-const AlertDialogTitle = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName
-
-const AlertDialogDescription = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AlertDialogDescription.displayName =
- AlertDialogPrimitive.Description.displayName
-
-const AlertDialogAction = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName
-
-const AlertDialogCancel = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName
-
-export {
- AlertDialog,
- AlertDialogPortal,
- AlertDialogOverlay,
- AlertDialogTrigger,
- AlertDialogContent,
- AlertDialogHeader,
- AlertDialogFooter,
- AlertDialogTitle,
- AlertDialogDescription,
- AlertDialogAction,
- AlertDialogCancel,
-}
diff --git a/components/ui/alert.tsx b/components/ui/alert.tsx
deleted file mode 100644
index 41fa7e0..0000000
--- a/components/ui/alert.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import * as React from "react"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-
-const alertVariants = cva(
- "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
- {
- variants: {
- variant: {
- default: "bg-background text-foreground",
- destructive:
- "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- }
-)
-
-const Alert = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes & VariantProps
->(({ className, variant, ...props }, ref) => (
-
-))
-Alert.displayName = "Alert"
-
-const AlertTitle = React.forwardRef<
- HTMLParagraphElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-AlertTitle.displayName = "AlertTitle"
-
-const AlertDescription = React.forwardRef<
- HTMLParagraphElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-AlertDescription.displayName = "AlertDescription"
-
-export { Alert, AlertTitle, AlertDescription }
diff --git a/components/ui/aspect-ratio.tsx b/components/ui/aspect-ratio.tsx
deleted file mode 100644
index d6a5226..0000000
--- a/components/ui/aspect-ratio.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-"use client"
-
-import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"
-
-const AspectRatio = AspectRatioPrimitive.Root
-
-export { AspectRatio }
diff --git a/components/ui/avatar.tsx b/components/ui/avatar.tsx
deleted file mode 100644
index 51e507b..0000000
--- a/components/ui/avatar.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-"use client"
-
-import * as React from "react"
-import * as AvatarPrimitive from "@radix-ui/react-avatar"
-
-import { cn } from "@/lib/utils"
-
-const Avatar = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-Avatar.displayName = AvatarPrimitive.Root.displayName
-
-const AvatarImage = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AvatarImage.displayName = AvatarPrimitive.Image.displayName
-
-const AvatarFallback = React.forwardRef<
- React.ElementRef,
- React.ComponentPropsWithoutRef
->(({ className, ...props }, ref) => (
-
-))
-AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
-
-export { Avatar, AvatarImage, AvatarFallback }
diff --git a/components/ui/badge.tsx b/components/ui/badge.tsx
deleted file mode 100644
index f000e3e..0000000
--- a/components/ui/badge.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import * as React from "react"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-
-const badgeVariants = cva(
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
- {
- variants: {
- variant: {
- default:
- "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
- secondary:
- "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
- destructive:
- "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
- outline: "text-foreground",
- },
- },
- defaultVariants: {
- variant: "default",
- },
- }
-)
-
-export interface BadgeProps
- extends React.HTMLAttributes,
- VariantProps {}
-
-function Badge({ className, variant, ...props }: BadgeProps) {
- return (
-
- )
-}
-
-export { Badge, badgeVariants }
diff --git a/components/ui/breadcrumb.tsx b/components/ui/breadcrumb.tsx
deleted file mode 100644
index 60e6c96..0000000
--- a/components/ui/breadcrumb.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { ChevronRight, MoreHorizontal } from "lucide-react"
-
-import { cn } from "@/lib/utils"
-
-const Breadcrumb = React.forwardRef<
- HTMLElement,
- React.ComponentPropsWithoutRef<"nav"> & {
- separator?: React.ReactNode
- }
->(({ ...props }, ref) => )
-Breadcrumb.displayName = "Breadcrumb"
-
-const BreadcrumbList = React.forwardRef<
- HTMLOListElement,
- React.ComponentPropsWithoutRef<"ol">
->(({ className, ...props }, ref) => (
-
-))
-BreadcrumbList.displayName = "BreadcrumbList"
-
-const BreadcrumbItem = React.forwardRef<
- HTMLLIElement,
- React.ComponentPropsWithoutRef<"li">
->(({ className, ...props }, ref) => (
-
-))
-BreadcrumbItem.displayName = "BreadcrumbItem"
-
-const BreadcrumbLink = React.forwardRef<
- HTMLAnchorElement,
- React.ComponentPropsWithoutRef<"a"> & {
- asChild?: boolean
- }
->(({ asChild, className, ...props }, ref) => {
- const Comp = asChild ? Slot : "a"
-
- return (
-
- )
-})
-BreadcrumbLink.displayName = "BreadcrumbLink"
-
-const BreadcrumbPage = React.forwardRef<
- HTMLSpanElement,
- React.ComponentPropsWithoutRef<"span">
->(({ className, ...props }, ref) => (
-
-))
-BreadcrumbPage.displayName = "BreadcrumbPage"
-
-const BreadcrumbSeparator = ({
- children,
- className,
- ...props
-}: React.ComponentProps<"li">) => (
- svg]:w-3.5 [&>svg]:h-3.5", className)}
- {...props}
- >
- {children ?? }
-
-)
-BreadcrumbSeparator.displayName = "BreadcrumbSeparator"
-
-const BreadcrumbEllipsis = ({
- className,
- ...props
-}: React.ComponentProps<"span">) => (
-
-
- More
-
-)
-BreadcrumbEllipsis.displayName = "BreadcrumbElipssis"
-
-export {
- Breadcrumb,
- BreadcrumbList,
- BreadcrumbItem,
- BreadcrumbLink,
- BreadcrumbPage,
- BreadcrumbSeparator,
- BreadcrumbEllipsis,
-}
diff --git a/components/ui/button.tsx b/components/ui/button.tsx
deleted file mode 100644
index 36496a2..0000000
--- a/components/ui/button.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import * as React from "react"
-import { Slot } from "@radix-ui/react-slot"
-import { cva, type VariantProps } from "class-variance-authority"
-
-import { cn } from "@/lib/utils"
-
-const buttonVariants = cva(
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
- {
- variants: {
- variant: {
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
- destructive:
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
- outline:
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
- secondary:
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
- ghost: "hover:bg-accent hover:text-accent-foreground",
- link: "text-primary underline-offset-4 hover:underline",
- },
- size: {
- default: "h-10 px-4 py-2",
- sm: "h-9 rounded-md px-3",
- lg: "h-11 rounded-md px-8",
- icon: "h-10 w-10",
- },
- },
- defaultVariants: {
- variant: "default",
- size: "default",
- },
- }
-)
-
-export interface ButtonProps
- extends React.ButtonHTMLAttributes,
- VariantProps {
- asChild?: boolean
-}
-
-const Button = React.forwardRef(
- ({ className, variant, size, asChild = false, ...props }, ref) => {
- const Comp = asChild ? Slot : "button"
- return (
-
- )
- }
-)
-Button.displayName = "Button"
-
-export { Button, buttonVariants }
diff --git a/components/ui/calendar.tsx b/components/ui/calendar.tsx
deleted file mode 100644
index 61d2b45..0000000
--- a/components/ui/calendar.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-"use client"
-
-import * as React from "react"
-import { ChevronLeft, ChevronRight } from "lucide-react"
-import { DayPicker } from "react-day-picker"
-
-import { cn } from "@/lib/utils"
-import { buttonVariants } from "@/components/ui/button"
-
-export type CalendarProps = React.ComponentProps
-
-function Calendar({
- className,
- classNames,
- showOutsideDays = true,
- ...props
-}: CalendarProps) {
- return (
- ,
- IconRight: ({ ...props }) => ,
- }}
- {...props}
- />
- )
-}
-Calendar.displayName = "Calendar"
-
-export { Calendar }
diff --git a/components/ui/card.tsx b/components/ui/card.tsx
deleted file mode 100644
index f62edea..0000000
--- a/components/ui/card.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import * as React from "react"
-
-import { cn } from "@/lib/utils"
-
-const Card = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-Card.displayName = "Card"
-
-const CardHeader = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-CardHeader.displayName = "CardHeader"
-
-const CardTitle = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-CardTitle.displayName = "CardTitle"
-
-const CardDescription = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-CardDescription.displayName = "CardDescription"
-
-const CardContent = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-CardContent.displayName = "CardContent"
-
-const CardFooter = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => (
-
-))
-CardFooter.displayName = "CardFooter"
-
-export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
diff --git a/components/ui/carousel.tsx b/components/ui/carousel.tsx
deleted file mode 100644
index ec505d0..0000000
--- a/components/ui/carousel.tsx
+++ /dev/null
@@ -1,262 +0,0 @@
-"use client"
-
-import * as React from "react"
-import useEmblaCarousel, {
- type UseEmblaCarouselType,
-} from "embla-carousel-react"
-import { ArrowLeft, ArrowRight } from "lucide-react"
-
-import { cn } from "@/lib/utils"
-import { Button } from "@/components/ui/button"
-
-type CarouselApi = UseEmblaCarouselType[1]
-type UseCarouselParameters = Parameters
-type CarouselOptions = UseCarouselParameters[0]
-type CarouselPlugin = UseCarouselParameters[1]
-
-type CarouselProps = {
- opts?: CarouselOptions
- plugins?: CarouselPlugin
- orientation?: "horizontal" | "vertical"
- setApi?: (api: CarouselApi) => void
-}
-
-type CarouselContextProps = {
- carouselRef: ReturnType[0]
- api: ReturnType[1]
- scrollPrev: () => void
- scrollNext: () => void
- canScrollPrev: boolean
- canScrollNext: boolean
-} & CarouselProps
-
-const CarouselContext = React.createContext(null)
-
-function useCarousel() {
- const context = React.useContext(CarouselContext)
-
- if (!context) {
- throw new Error("useCarousel must be used within a ")
- }
-
- return context
-}
-
-const Carousel = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes & CarouselProps
->(
- (
- {
- orientation = "horizontal",
- opts,
- setApi,
- plugins,
- className,
- children,
- ...props
- },
- ref
- ) => {
- const [carouselRef, api] = useEmblaCarousel(
- {
- ...opts,
- axis: orientation === "horizontal" ? "x" : "y",
- },
- plugins
- )
- const [canScrollPrev, setCanScrollPrev] = React.useState(false)
- const [canScrollNext, setCanScrollNext] = React.useState(false)
-
- const onSelect = React.useCallback((api: CarouselApi) => {
- if (!api) {
- return
- }
-
- setCanScrollPrev(api.canScrollPrev())
- setCanScrollNext(api.canScrollNext())
- }, [])
-
- const scrollPrev = React.useCallback(() => {
- api?.scrollPrev()
- }, [api])
-
- const scrollNext = React.useCallback(() => {
- api?.scrollNext()
- }, [api])
-
- const handleKeyDown = React.useCallback(
- (event: React.KeyboardEvent) => {
- if (event.key === "ArrowLeft") {
- event.preventDefault()
- scrollPrev()
- } else if (event.key === "ArrowRight") {
- event.preventDefault()
- scrollNext()
- }
- },
- [scrollPrev, scrollNext]
- )
-
- React.useEffect(() => {
- if (!api || !setApi) {
- return
- }
-
- setApi(api)
- }, [api, setApi])
-
- React.useEffect(() => {
- if (!api) {
- return
- }
-
- onSelect(api)
- api.on("reInit", onSelect)
- api.on("select", onSelect)
-
- return () => {
- api?.off("select", onSelect)
- }
- }, [api, onSelect])
-
- return (
-
-
- {children}
-
-
- )
- }
-)
-Carousel.displayName = "Carousel"
-
-const CarouselContent = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => {
- const { carouselRef, orientation } = useCarousel()
-
- return (
-
- )
-})
-CarouselContent.displayName = "CarouselContent"
-
-const CarouselItem = React.forwardRef<
- HTMLDivElement,
- React.HTMLAttributes
->(({ className, ...props }, ref) => {
- const { orientation } = useCarousel()
-
- return (
-
- )
-})
-CarouselItem.displayName = "CarouselItem"
-
-const CarouselPrevious = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps
->(({ className, variant = "outline", size = "icon", ...props }, ref) => {
- const { orientation, scrollPrev, canScrollPrev } = useCarousel()
-
- return (
-
- )
-})
-CarouselPrevious.displayName = "CarouselPrevious"
-
-const CarouselNext = React.forwardRef<
- HTMLButtonElement,
- React.ComponentProps
->(({ className, variant = "outline", size = "icon", ...props }, ref) => {
- const { orientation, scrollNext, canScrollNext } = useCarousel()
-
- return (
-
- )
-})
-CarouselNext.displayName = "CarouselNext"
-
-export {
- type CarouselApi,
- Carousel,
- CarouselContent,
- CarouselItem,
- CarouselPrevious,
- CarouselNext,
-}
diff --git a/components/ui/chart.tsx b/components/ui/chart.tsx
deleted file mode 100644
index 8620baa..0000000
--- a/components/ui/chart.tsx
+++ /dev/null
@@ -1,365 +0,0 @@
-"use client"
-
-import * as React from "react"
-import * as RechartsPrimitive from "recharts"
-
-import { cn } from "@/lib/utils"
-
-// Format: { THEME_NAME: CSS_SELECTOR }
-const THEMES = { light: "", dark: ".dark" } as const
-
-export type ChartConfig = {
- [k in string]: {
- label?: React.ReactNode
- icon?: React.ComponentType
- } & (
- | { color?: string; theme?: never }
- | { color?: never; theme: Record }
- )
-}
-
-type ChartContextProps = {
- config: ChartConfig
-}
-
-const ChartContext = React.createContext(null)
-
-function useChart() {
- const context = React.useContext(ChartContext)
-
- if (!context) {
- throw new Error("useChart must be used within a ")
- }
-
- return context
-}
-
-const ChartContainer = React.forwardRef<
- HTMLDivElement,
- React.ComponentProps<"div"> & {
- config: ChartConfig
- children: React.ComponentProps<
- typeof RechartsPrimitive.ResponsiveContainer
- >["children"]
- }
->(({ id, className, children, config, ...props }, ref) => {
- const uniqueId = React.useId()
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`
-
- return (
-
-
-
-
- {children}
-
-
-
- )
-})
-ChartContainer.displayName = "Chart"
-
-const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
- const colorConfig = Object.entries(config).filter(
- ([_, config]) => config.theme || config.color
- )
-
- if (!colorConfig.length) {
- return null
- }
-
- return (
-