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 ( -
-
-
-
- -

DorkLabs – OSINT Tool

-
- -
-
- -
- {/* 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 */} -
- {/* Search engine selection */} - - - Search Engine - - Select one search engine (only one active) - - - - {(["google", "bing", "duckduckgo", "yahoo"] as const).map( - (engine) => ( -
- handleEngineChange(engine)} - className="cursor-pointer" - /> - -
- ) - )} -
-
- - {/* Custom block creation */} - - - Create Custom Block - - Define a new operator block to reuse - - - - setNewCustomOperator(e.target.value)} - className="w-full 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="Custom operator" - /> - setNewCustomPlaceholder(e.target.value)} - className="w-full 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="Custom placeholder" - /> - setNewCustomDescription(e.target.value)} - className="w-full 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="Custom description" - /> - - - - - {/* Accessibility & Theme */} - - - Accessibility & Theme - - - - setFontSize(Number(e.target.value))} - className="w-full" - aria-valuemin={12} - aria-valuemax={24} - aria-valuenow={fontSize} - aria-label="Font size slider" - /> -

- Use the theme button on top-right to cycle between Dark, Light, - and High Contrast themes. -

-
-
-
-
-
- © 2025 DorkLabs • Made for OSINT enthusiasts -
-
- ) -} 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) =>