From 609483c43b8c8957a2a39c0e7d430912f1e1f126 Mon Sep 17 00:00:00 2001 From: Park Dahyeon Date: Fri, 14 Nov 2025 08:05:42 +0000 Subject: [PATCH] init --- .env | 2 + README.md | 11 + index.html | 15 + kiota-generate.ps1 | 4 + package.json | 59 + src/App.tsx | 58 + src/Attributions.md | 3 + src/components/DocumentationPage.tsx | 25 + src/components/Header.tsx | 294 ++++ src/components/HomePage.tsx | 164 ++ src/components/MainContent.tsx | 264 ++++ src/components/Sidebar.tsx | 285 ++++ src/components/TableOfContents.tsx | 95 ++ src/components/figma/ImageWithFallback.tsx | 27 + src/components/ui/accordion.tsx | 66 + src/components/ui/alert-dialog.tsx | 157 ++ src/components/ui/alert.tsx | 66 + src/components/ui/aspect-ratio.tsx | 11 + src/components/ui/avatar.tsx | 53 + src/components/ui/badge.tsx | 46 + src/components/ui/breadcrumb.tsx | 109 ++ src/components/ui/button.tsx | 58 + src/components/ui/calendar.tsx | 75 + src/components/ui/card.tsx | 92 ++ src/components/ui/carousel.tsx | 241 +++ src/components/ui/chart.tsx | 353 +++++ src/components/ui/checkbox.tsx | 32 + src/components/ui/collapsible.tsx | 33 + src/components/ui/command.tsx | 177 +++ src/components/ui/context-menu.tsx | 252 +++ src/components/ui/dialog.tsx | 135 ++ src/components/ui/drawer.tsx | 132 ++ src/components/ui/dropdown-menu.tsx | 257 +++ src/components/ui/form.tsx | 168 ++ src/components/ui/hover-card.tsx | 44 + src/components/ui/input-otp.tsx | 77 + src/components/ui/input.tsx | 21 + src/components/ui/label.tsx | 24 + src/components/ui/menubar.tsx | 276 ++++ src/components/ui/navigation-menu.tsx | 168 ++ src/components/ui/pagination.tsx | 127 ++ src/components/ui/popover.tsx | 48 + src/components/ui/progress.tsx | 31 + src/components/ui/radio-group.tsx | 45 + src/components/ui/resizable.tsx | 56 + src/components/ui/scroll-area.tsx | 58 + src/components/ui/select.tsx | 189 +++ src/components/ui/separator.tsx | 28 + src/components/ui/sheet.tsx | 139 ++ src/components/ui/sidebar.tsx | 726 +++++++++ src/components/ui/skeleton.tsx | 13 + src/components/ui/slider.tsx | 63 + src/components/ui/sonner.tsx | 25 + src/components/ui/switch.tsx | 31 + src/components/ui/table.tsx | 116 ++ src/components/ui/tabs.tsx | 66 + src/components/ui/textarea.tsx | 18 + src/components/ui/toggle-group.tsx | 73 + src/components/ui/toggle.tsx | 47 + src/components/ui/tooltip.tsx | 61 + src/components/ui/use-mobile.ts | 21 + src/components/ui/utils.ts | 6 + src/guidelines/Guidelines.md | 61 + src/index.css | 1645 ++++++++++++++++++++ src/main.tsx | 7 + src/styles/globals.css | 189 +++ vite.config.ts | 62 + 67 files changed, 8380 insertions(+) create mode 100644 .env create mode 100644 README.md create mode 100644 index.html create mode 100644 kiota-generate.ps1 create mode 100644 package.json create mode 100644 src/App.tsx create mode 100644 src/Attributions.md create mode 100644 src/components/DocumentationPage.tsx create mode 100644 src/components/Header.tsx create mode 100644 src/components/HomePage.tsx create mode 100644 src/components/MainContent.tsx create mode 100644 src/components/Sidebar.tsx create mode 100644 src/components/TableOfContents.tsx create mode 100644 src/components/figma/ImageWithFallback.tsx create mode 100644 src/components/ui/accordion.tsx create mode 100644 src/components/ui/alert-dialog.tsx create mode 100644 src/components/ui/alert.tsx create mode 100644 src/components/ui/aspect-ratio.tsx create mode 100644 src/components/ui/avatar.tsx create mode 100644 src/components/ui/badge.tsx create mode 100644 src/components/ui/breadcrumb.tsx create mode 100644 src/components/ui/button.tsx create mode 100644 src/components/ui/calendar.tsx create mode 100644 src/components/ui/card.tsx create mode 100644 src/components/ui/carousel.tsx create mode 100644 src/components/ui/chart.tsx create mode 100644 src/components/ui/checkbox.tsx create mode 100644 src/components/ui/collapsible.tsx create mode 100644 src/components/ui/command.tsx create mode 100644 src/components/ui/context-menu.tsx create mode 100644 src/components/ui/dialog.tsx create mode 100644 src/components/ui/drawer.tsx create mode 100644 src/components/ui/dropdown-menu.tsx create mode 100644 src/components/ui/form.tsx create mode 100644 src/components/ui/hover-card.tsx create mode 100644 src/components/ui/input-otp.tsx create mode 100644 src/components/ui/input.tsx create mode 100644 src/components/ui/label.tsx create mode 100644 src/components/ui/menubar.tsx create mode 100644 src/components/ui/navigation-menu.tsx create mode 100644 src/components/ui/pagination.tsx create mode 100644 src/components/ui/popover.tsx create mode 100644 src/components/ui/progress.tsx create mode 100644 src/components/ui/radio-group.tsx create mode 100644 src/components/ui/resizable.tsx create mode 100644 src/components/ui/scroll-area.tsx create mode 100644 src/components/ui/select.tsx create mode 100644 src/components/ui/separator.tsx create mode 100644 src/components/ui/sheet.tsx create mode 100644 src/components/ui/sidebar.tsx create mode 100644 src/components/ui/skeleton.tsx create mode 100644 src/components/ui/slider.tsx create mode 100644 src/components/ui/sonner.tsx create mode 100644 src/components/ui/switch.tsx create mode 100644 src/components/ui/table.tsx create mode 100644 src/components/ui/tabs.tsx create mode 100644 src/components/ui/textarea.tsx create mode 100644 src/components/ui/toggle-group.tsx create mode 100644 src/components/ui/toggle.tsx create mode 100644 src/components/ui/tooltip.tsx create mode 100644 src/components/ui/use-mobile.ts create mode 100644 src/components/ui/utils.ts create mode 100644 src/guidelines/Guidelines.md create mode 100644 src/index.css create mode 100644 src/main.tsx create mode 100644 src/styles/globals.css create mode 100644 vite.config.ts diff --git a/.env b/.env new file mode 100644 index 0000000..40ffaa4 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +# API Configuration +VITE_API_BASE_URL=https://moeum.dahyeon.us \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..901c71e --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ + + # Untitled + + This is a code bundle for Untitled. The original project is available at https://www.figma.com/design/Ap04JWxYLVDOdzGazn0MaQ/Untitled. + + ## Running the code + + Run `npm i` to install the dependencies. + + Run `npm run dev` to start the development server. + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..42d0ff2 --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + + + Untitled + + + +
+ + + + \ No newline at end of file diff --git a/kiota-generate.ps1 b/kiota-generate.ps1 new file mode 100644 index 0000000..c6cf2da --- /dev/null +++ b/kiota-generate.ps1 @@ -0,0 +1,4 @@ +$ENDPOINT = "https://moeum.dahyeon.us/v1" +# $ENDPOINT = "https://dev.dahyeon.us/v1" + +kiota generate --openapi $ENDPOINT/api-json --language Typescript --output ./src/kiota --clean-output --clear-cache \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..03a8a86 --- /dev/null +++ b/package.json @@ -0,0 +1,59 @@ + + { + "name": "Untitled", + "version": "0.1.0", + "private": true, + "dependencies": { + "@radix-ui/react-accordion": "^1.2.12", + "@radix-ui/react-alert-dialog": "^1.1.15", + "@radix-ui/react-aspect-ratio": "^1.1.8", + "@radix-ui/react-avatar": "^1.1.11", + "@radix-ui/react-checkbox": "^1.3.3", + "@radix-ui/react-collapsible": "^1.1.12", + "@radix-ui/react-context-menu": "^2.2.16", + "@radix-ui/react-dialog": "^1.1.15", + "@radix-ui/react-dropdown-menu": "^2.1.16", + "@radix-ui/react-hover-card": "^1.1.15", + "@radix-ui/react-label": "^2.1.8", + "@radix-ui/react-menubar": "^1.1.16", + "@radix-ui/react-navigation-menu": "^1.2.14", + "@radix-ui/react-popover": "^1.1.15", + "@radix-ui/react-progress": "^1.1.8", + "@radix-ui/react-radio-group": "^1.3.8", + "@radix-ui/react-scroll-area": "^1.2.10", + "@radix-ui/react-select": "^2.2.6", + "@radix-ui/react-separator": "^1.1.8", + "@radix-ui/react-slider": "^1.3.6", + "@radix-ui/react-slot": "^1.2.4", + "@radix-ui/react-switch": "^1.2.6", + "@radix-ui/react-tabs": "^1.1.13", + "@radix-ui/react-toggle": "^1.1.10", + "@radix-ui/react-toggle-group": "^1.1.11", + "@radix-ui/react-tooltip": "^1.2.8", + "class-variance-authority": "^0.7.1", + "clsx": "*", + "cmdk": "^1.1.1", + "embla-carousel-react": "^8.6.0", + "input-otp": "^1.4.2", + "lucide-react": "^0.553.0", + "next-themes": "^0.4.6", + "react": "^19.2.0", + "react-day-picker": "^9.11.1", + "react-dom": "^19.2.0", + "react-hook-form": "^7.66.0", + "react-resizable-panels": "^3.0.6", + "recharts": "^3.4.1", + "sonner": "^2.0.7", + "tailwind-merge": "*", + "vaul": "^1.1.2" + }, + "devDependencies": { + "@types/node": "^24.10.1", + "@vitejs/plugin-react-swc": "^4.2.2", + "vite": "7.2.2" + }, + "scripts": { + "dev": "vite", + "build": "vite build" + } + } \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx new file mode 100644 index 0000000..73a01d7 --- /dev/null +++ b/src/App.tsx @@ -0,0 +1,58 @@ +import { Header } from './components/Header'; +import { HomePage } from './components/HomePage'; +import { DocumentationPage } from './components/DocumentationPage'; +import { useState } from 'react'; + +export default function App() { + const [currentPage, setCurrentPage] = useState<'home' | 'documentation'>('home'); + const [isSidebarOpen, setIsSidebarOpen] = useState(false); + const [theme, setTheme] = useState<'light' | 'dark'>('light'); + + const toggleSidebar = () => { + setIsSidebarOpen(!isSidebarOpen); + }; + + const toggleTheme = () => { + setTheme(theme === 'light' ? 'dark' : 'light'); + }; + + const navigateToHome = () => { + setCurrentPage('home'); + setIsSidebarOpen(false); + }; + + const navigateToDocumentation = () => { + setCurrentPage('documentation'); + setIsSidebarOpen(false); + }; + + return ( +
+
+ + {currentPage === 'home' ? ( + + ) : ( + + )} + + {/* Mobile overlay */} + {isSidebarOpen && currentPage === 'documentation' && ( +
+ )} +
+ ); +} diff --git a/src/Attributions.md b/src/Attributions.md new file mode 100644 index 0000000..f561b6d --- /dev/null +++ b/src/Attributions.md @@ -0,0 +1,3 @@ +이 Figma Make 파일에는 [shadcn/ui](https://ui.shadcn.com/)의 컴포넌트가 포함되어 있으며, [MIT 라이선스](https://github.com/shadcn-ui/ui/blob/main/LICENSE.md)에 따라 사용됩니다. + +이 Figma Make 파일에는 [Unsplash](https://unsplash.com)의 사진이 포함되어 있으며, 이는 [라이선스](https://unsplash.com/license)에 따라 사용되었습니다. \ No newline at end of file diff --git a/src/components/DocumentationPage.tsx b/src/components/DocumentationPage.tsx new file mode 100644 index 0000000..69fde12 --- /dev/null +++ b/src/components/DocumentationPage.tsx @@ -0,0 +1,25 @@ +import { Sidebar } from './Sidebar'; +import { MainContent } from './MainContent'; +import { TableOfContents } from './TableOfContents'; + +interface DocumentationPageProps { + isSidebarOpen: boolean; + toggleSidebar: () => void; + theme: 'light' | 'dark'; +} + +export function DocumentationPage({ isSidebarOpen, toggleSidebar, theme }: DocumentationPageProps) { + return ( +
+
+ + + +
+
+ ); +} diff --git a/src/components/Header.tsx b/src/components/Header.tsx new file mode 100644 index 0000000..441d251 --- /dev/null +++ b/src/components/Header.tsx @@ -0,0 +1,294 @@ +import { Search, ChevronDown, Menu, Sun, Moon } from 'lucide-react'; +import { useState } from 'react'; + +interface HeaderProps { + toggleSidebar: () => void; + theme: 'light' | 'dark'; + toggleTheme: () => void; + navigateToHome: () => void; + navigateToDocumentation: () => void; +} + +export function Header({ toggleSidebar, theme, toggleTheme, navigateToHome, navigateToDocumentation }: HeaderProps) { + const [openMenu, setOpenMenu] = useState(null); + + const toggleMenu = (menu: string) => { + setOpenMenu(openMenu === menu ? null : menu); + }; + + const handleDocumentationClick = () => { + navigateToDocumentation(); + setOpenMenu(null); + }; + + return ( +
+
+
+ + + + + +
+ +
+ + + +
+
+ + {/* Dropdown Menus */} + {openMenu === 'documentation' && ( + <> +
setOpenMenu(null)} + /> +
+
+
+
+

+ DOCUMENTATION +

+ +
+
+ +
+
+

+ FREE TO JOIN, REQUEST TO ATTEND +

+

+ Microsoft AI Tour +

+

+ Take your business to the AI frontier. +

+
+
+
+
+ + )} + + {openMenu === 'training' && ( + <> +
setOpenMenu(null)} + /> + + + )} + + {openMenu === 'qa' && ( + <> +
setOpenMenu(null)} + /> +
+ +
+ + )} + + {openMenu === 'topics' && ( + <> +
setOpenMenu(null)} + /> + + + )} +
+ ); +} \ No newline at end of file diff --git a/src/components/HomePage.tsx b/src/components/HomePage.tsx new file mode 100644 index 0000000..b5e6a08 --- /dev/null +++ b/src/components/HomePage.tsx @@ -0,0 +1,164 @@ +import { Search } from 'lucide-react'; +import { ImageWithFallback } from './figma/ImageWithFallback'; + +interface HomePageProps { + theme: 'light' | 'dark'; + navigateToDocumentation: () => void; +} + +export function HomePage({ theme, navigateToDocumentation }: HomePageProps) { + const products = [ + // Column 1 + [ + '.NET', + '.NET MAUI', + 'Adaptive Cards', + 'ASP.NET Core', + 'Azure', + 'Biztalk Server', + 'C++', + 'C#', + 'DAX', + 'Dynamics 365', + 'Dynamics 365 Business Central', + 'Dynamics 365 Commerce', + 'Dynamics 365 Customer Insights', + 'Dynamics 365 Customer Service', + 'Dynamics 365 Field Service', + 'Dynamics 365 Finance', + 'Dynamics 365 Guides', + 'Dynamics 365 Human Resources', + 'Dynamics 365 Mixed Reality', + ], + // Column 2 + [ + 'Java', + 'Microsoft 365', + 'Microsoft Advertising', + 'Microsoft Cloud', + 'Microsoft Compliance', + 'Microsoft Copilot', + 'Microsoft Copilot Studio', + 'Microsoft Defender', + 'Microsoft Edge', + 'Microsoft Entra', + 'Microsoft Fabric', + 'Microsoft Graph', + 'Microsoft Industry Clouds', + 'Microsoft Intune', + 'Microsoft Lifecycle Policy', + 'Microsoft Mesh', + 'Microsoft Priva', + 'Microsoft Purview', + 'Microsoft Security', + ], + // Column 3 + [ + 'Microsoft Viva', + 'OData', + 'Open Specifications', + 'OpenAPI', + 'Partner Center', + 'PlayReady', + 'Power Apps', + 'Power Automate', + 'Power BI', + 'Power Pages', + 'Power Platform', + 'Power Query M', + 'PowerShell', + 'Semantic Kernel', + 'SharePoint', + 'SQL Server', + 'System Center', + 'Sysinternals', + 'Yooka', + ], + ]; + + return ( +
+ {/* Hero Section */} +
+
+
+

+ DOCUMENTATION +

+

+ Technical documentation +

+

+ Search for in-depth articles on Microsoft developer tools and technologies. +

+
+ + +
+
+
+ +
+
+
+ + {/* Product Directory Section */} +
+
+

+ INDEX +

+

+ Product directory +

+

+ Explore guides and articles by product. +

+
+ +
+ {products.map((column, columnIndex) => ( +
+ {column.map((product, index) => ( + + ))} +
+ ))} +
+
+
+ ); +} diff --git a/src/components/MainContent.tsx b/src/components/MainContent.tsx new file mode 100644 index 0000000..95f28d8 --- /dev/null +++ b/src/components/MainContent.tsx @@ -0,0 +1,264 @@ +import { ChevronRight, MessageSquare, Eye, MoreHorizontal, Download } from 'lucide-react'; + +interface MainContentProps { + theme: 'light' | 'dark'; +} + +export function MainContent({ theme }: MainContentProps) { + return ( +
+ {/* Breadcrumb */} +
+ Learn + + OpenAPI +
+ + {/* Action buttons */} +
+ + + +
+ + {/* Main heading */} +

Kiota API models

+ + {/* Introduction */} +

+ The primary goal of Kiota's generated models is to enable a developer to easily craft request payloads and get results as high levels objects. These models eliminate the need for developers to define their own types and/or implement serialization/deserialization. +

+ + {/* Section */} +
+

+ Components versus inline models +

+

+ All models declared as components are generated under a models subnamespace. If models/components are namespaced components/models, components/ns1/models, the namespaces are included as subnamespaces of the models namespace. +

+

+ All models declared inline with an operation are generated under the namespace of the operation, next to the request builder that uses it. As a reminder, all request builders are put in namespaces according to the path segment they refer to. +

+
+ + {/* Section */} +
+

+ Inheritance +

+

+ Models in an allOf schema declaration inherit from each other. The uppermost type in the collection is the greatest ancestor of the chain. +

+
+ + {/* Section */} +
+

+ allOf interpretation rules +

+

+ The following table describes how kiota will project any schema with allOf entries when processing an API description: +

+ + {/* Table */} +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Number of peer properties + Peer props + + Number of inline schemas + Inline + + Number referenced schemas + Referenced + + Total number of schemas + Total + Result
0000 + Ignored/invalid + Invalid +
0011Unwrapped
002+2+ + Intersection type + Intersection +
1+any0any + Inline object + Inline obj +
+
+
+
+ + {/* Footer */} +
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..31863b0 --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,285 @@ +import { Search, ChevronRight, ChevronDown, X } from 'lucide-react'; +import { useState } from 'react'; + +interface SidebarProps { + isOpen: boolean; + toggleSidebar: () => void; + theme: 'light' | 'dark'; +} + +export function Sidebar({ isOpen, toggleSidebar, theme }: SidebarProps) { + const [expandedSections, setExpandedSections] = useState>({ + 'quick-start': true, + 'concepts': true, + 'how-to': false + }); + + const toggleSection = (section: string) => { + setExpandedSections(prev => ({ + ...prev, + [section]: !prev[section] + })); + }; + + return ( + + ); +} diff --git a/src/components/TableOfContents.tsx b/src/components/TableOfContents.tsx new file mode 100644 index 0000000..6574316 --- /dev/null +++ b/src/components/TableOfContents.tsx @@ -0,0 +1,95 @@ +import { Grid2X2, User } from 'lucide-react'; + +interface TableOfContentsProps { + theme: 'light' | 'dark'; +} + +export function TableOfContents({ theme }: TableOfContentsProps) { + return ( + + ); +} diff --git a/src/components/figma/ImageWithFallback.tsx b/src/components/figma/ImageWithFallback.tsx new file mode 100644 index 0000000..0e26139 --- /dev/null +++ b/src/components/figma/ImageWithFallback.tsx @@ -0,0 +1,27 @@ +import React, { useState } from 'react' + +const ERROR_IMG_SRC = + 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODgiIGhlaWdodD0iODgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBvcGFjaXR5PSIuMyIgZmlsbD0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIzLjciPjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjU2IiBoZWlnaHQ9IjU2IiByeD0iNiIvPjxwYXRoIGQ9Im0xNiA1OCAxNi0xOCAzMiAzMiIvPjxjaXJjbGUgY3g9IjUzIiBjeT0iMzUiIHI9IjciLz48L3N2Zz4KCg==' + +export function ImageWithFallback(props: React.ImgHTMLAttributes) { + const [didError, setDidError] = useState(false) + + const handleError = () => { + setDidError(true) + } + + const { src, alt, style, className, ...rest } = props + + return didError ? ( +
+
+ Error loading image +
+
+ ) : ( + {alt} + ) +} diff --git a/src/components/ui/accordion.tsx b/src/components/ui/accordion.tsx new file mode 100644 index 0000000..aa2c37b --- /dev/null +++ b/src/components/ui/accordion.tsx @@ -0,0 +1,66 @@ +"use client"; + +import * as React from "react"; +import * as AccordionPrimitive from "@radix-ui/react-accordion@1.2.3"; +import { ChevronDownIcon } from "lucide-react@0.487.0"; + +import { cn } from "./utils"; + +function Accordion({ + ...props +}: React.ComponentProps) { + return ; +} + +function AccordionItem({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AccordionTrigger({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + + svg]:rotate-180", + className, + )} + {...props} + > + {children} + + + + ); +} + +function AccordionContent({ + className, + children, + ...props +}: React.ComponentProps) { + return ( + +
{children}
+
+ ); +} + +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }; diff --git a/src/components/ui/alert-dialog.tsx b/src/components/ui/alert-dialog.tsx new file mode 100644 index 0000000..68f3605 --- /dev/null +++ b/src/components/ui/alert-dialog.tsx @@ -0,0 +1,157 @@ +"use client"; + +import * as React from "react"; +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog@1.1.6"; + +import { cn } from "./utils"; +import { buttonVariants } from "./button"; + +function AlertDialog({ + ...props +}: React.ComponentProps) { + return ; +} + +function AlertDialogTrigger({ + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogPortal({ + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogOverlay({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + + + + ); +} + +function AlertDialogHeader({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ); +} + +function AlertDialogFooter({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ); +} + +function AlertDialogTitle({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogDescription({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogAction({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AlertDialogCancel({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +export { + AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, + AlertDialogTrigger, + AlertDialogContent, + AlertDialogHeader, + AlertDialogFooter, + AlertDialogTitle, + AlertDialogDescription, + AlertDialogAction, + AlertDialogCancel, +}; diff --git a/src/components/ui/alert.tsx b/src/components/ui/alert.tsx new file mode 100644 index 0000000..856b94d --- /dev/null +++ b/src/components/ui/alert.tsx @@ -0,0 +1,66 @@ +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority@0.7.1"; + +import { cn } from "./utils"; + +const alertVariants = cva( + "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", + { + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +function Alert({ + className, + variant, + ...props +}: React.ComponentProps<"div"> & VariantProps) { + return ( +
+ ); +} + +function AlertTitle({ className, ...props }: React.ComponentProps<"div">) { + return ( +
+ ); +} + +function AlertDescription({ + className, + ...props +}: React.ComponentProps<"div">) { + return ( +
+ ); +} + +export { Alert, AlertTitle, AlertDescription }; diff --git a/src/components/ui/aspect-ratio.tsx b/src/components/ui/aspect-ratio.tsx new file mode 100644 index 0000000..2a2f462 --- /dev/null +++ b/src/components/ui/aspect-ratio.tsx @@ -0,0 +1,11 @@ +"use client"; + +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio@1.1.2"; + +function AspectRatio({ + ...props +}: React.ComponentProps) { + return ; +} + +export { AspectRatio }; diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx new file mode 100644 index 0000000..589b166 --- /dev/null +++ b/src/components/ui/avatar.tsx @@ -0,0 +1,53 @@ +"use client"; + +import * as React from "react"; +import * as AvatarPrimitive from "@radix-ui/react-avatar@1.1.3"; + +import { cn } from "./utils"; + +function Avatar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AvatarImage({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +function AvatarFallback({ + className, + ...props +}: React.ComponentProps) { + return ( + + ); +} + +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx new file mode 100644 index 0000000..3f8eff8 --- /dev/null +++ b/src/components/ui/badge.tsx @@ -0,0 +1,46 @@ +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot@1.1.2"; +import { cva, type VariantProps } from "class-variance-authority@0.7.1"; + +import { cn } from "./utils"; + +const badgeVariants = cva( + "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", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: + "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: + "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", + outline: + "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +function Badge({ + className, + variant, + asChild = false, + ...props +}: React.ComponentProps<"span"> & + VariantProps & { asChild?: boolean }) { + const Comp = asChild ? Slot : "span"; + + return ( + + ); +} + +export { Badge, badgeVariants }; diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx new file mode 100644 index 0000000..d2adf98 --- /dev/null +++ b/src/components/ui/breadcrumb.tsx @@ -0,0 +1,109 @@ +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot@1.1.2"; +import { ChevronRight, MoreHorizontal } from "lucide-react@0.487.0"; + +import { cn } from "./utils"; + +function Breadcrumb({ ...props }: React.ComponentProps<"nav">) { + return