Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Corepex authored Oct 20, 2024
2 parents 4b7782c + 3259fb7 commit 74238f1
Show file tree
Hide file tree
Showing 1,058 changed files with 55,457 additions and 4,663 deletions.
38 changes: 19 additions & 19 deletions apps/www/__registry__/default/block/dashboard-03.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function Dashboard() {
<aside className="inset-y fixed left-0 z-20 flex h-full flex-col border-r">
<div className="border-b p-2">
<Button variant="outline" size="icon" aria-label="Home">
<Triangle className="size-5 fill-foreground" />
<Triangle className="w-5 h-5 fill-foreground" />
</Button>
</div>
<nav className="grid gap-1 p-2">
Expand All @@ -68,7 +68,7 @@ export default function Dashboard() {
className="rounded-lg bg-muted"
aria-label="Playground"
>
<SquareTerminal className="size-5" />
<SquareTerminal className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -83,7 +83,7 @@ export default function Dashboard() {
className="rounded-lg"
aria-label="Models"
>
<Bot className="size-5" />
<Bot className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -98,7 +98,7 @@ export default function Dashboard() {
className="rounded-lg"
aria-label="API"
>
<Code2 className="size-5" />
<Code2 className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -113,7 +113,7 @@ export default function Dashboard() {
className="rounded-lg"
aria-label="Documentation"
>
<Book className="size-5" />
<Book className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -128,7 +128,7 @@ export default function Dashboard() {
className="rounded-lg"
aria-label="Settings"
>
<Settings2 className="size-5" />
<Settings2 className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -145,7 +145,7 @@ export default function Dashboard() {
className="mt-auto rounded-lg"
aria-label="Help"
>
<LifeBuoy className="size-5" />
<LifeBuoy className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -160,7 +160,7 @@ export default function Dashboard() {
className="mt-auto rounded-lg"
aria-label="Account"
>
<SquareUser className="size-5" />
<SquareUser className="w-5 h-5" />
</Button>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={5}>
Expand All @@ -175,7 +175,7 @@ export default function Dashboard() {
<Drawer>
<DrawerTrigger asChild>
<Button variant="ghost" size="icon" className="md:hidden">
<Settings className="size-4" />
<Settings className="w-4 h-4" />
<span className="sr-only">Settings</span>
</Button>
</DrawerTrigger>
Expand Down Expand Up @@ -203,7 +203,7 @@ export default function Dashboard() {
<SelectContent>
<SelectItem value="genesis">
<div className="flex items-start gap-3 text-muted-foreground">
<Rabbit className="size-5" />
<Rabbit className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand All @@ -219,7 +219,7 @@ export default function Dashboard() {
</SelectItem>
<SelectItem value="explorer">
<div className="flex items-start gap-3 text-muted-foreground">
<Bird className="size-5" />
<Bird className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand All @@ -235,7 +235,7 @@ export default function Dashboard() {
</SelectItem>
<SelectItem value="quantum">
<div className="flex items-start gap-3 text-muted-foreground">
<Turtle className="size-5" />
<Turtle className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand Down Expand Up @@ -296,7 +296,7 @@ export default function Dashboard() {
size="sm"
className="ml-auto gap-1.5 text-sm"
>
<Share className="size-3.5" />
<Share className="w-3.5 h-3.5" />
Share
</Button>
</header>
Expand All @@ -322,7 +322,7 @@ export default function Dashboard() {
<SelectContent>
<SelectItem value="genesis">
<div className="flex items-start gap-3 text-muted-foreground">
<Rabbit className="size-5" />
<Rabbit className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand All @@ -338,7 +338,7 @@ export default function Dashboard() {
</SelectItem>
<SelectItem value="explorer">
<div className="flex items-start gap-3 text-muted-foreground">
<Bird className="size-5" />
<Bird className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand All @@ -354,7 +354,7 @@ export default function Dashboard() {
</SelectItem>
<SelectItem value="quantum">
<div className="flex items-start gap-3 text-muted-foreground">
<Turtle className="size-5" />
<Turtle className="w-5 h-5" />
<div className="grid gap-0.5">
<p>
Neural{" "}
Expand Down Expand Up @@ -435,7 +435,7 @@ export default function Dashboard() {
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon">
<Paperclip className="size-4" />
<Paperclip className="w-4 h-4" />
<span className="sr-only">Attach file</span>
</Button>
</TooltipTrigger>
Expand All @@ -444,15 +444,15 @@ export default function Dashboard() {
<Tooltip>
<TooltipTrigger asChild>
<Button variant="ghost" size="icon">
<Mic className="size-4" />
<Mic className="w-4 h-4" />
<span className="sr-only">Use Microphone</span>
</Button>
</TooltipTrigger>
<TooltipContent side="top">Use Microphone</TooltipContent>
</Tooltip>
<Button type="submit" size="sm" className="ml-auto gap-1.5">
Send Message
<CornerDownLeft className="size-3.5" />
<CornerDownLeft className="w-3.5 h-3.5" />
</Button>
</div>
</form>
Expand Down
96 changes: 96 additions & 0 deletions apps/www/__registry__/default/block/demo-sidebar-controlled.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
"use client"

import * as React from "react"
import {
Frame,
LifeBuoy,
Map,
PanelLeftClose,
PanelLeftOpen,
PieChart,
Send,
} from "lucide-react"

import { Button } from "@/registry/default/ui/button"
import {
Sidebar,
SidebarContent,
SidebarGroup,
SidebarGroupContent,
SidebarGroupLabel,
SidebarInset,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarProvider,
} from "@/registry/default/ui/sidebar"

const projects = [
{
name: "Design Engineering",
url: "#",
icon: Frame,
},
{
name: "Sales & Marketing",
url: "#",
icon: PieChart,
},
{
name: "Travel",
url: "#",
icon: Map,
},
{
name: "Support",
url: "#",
icon: LifeBuoy,
},
{
name: "Feedback",
url: "#",
icon: Send,
},
]

export default function AppSidebar() {
const [open, setOpen] = React.useState(true)

return (
<SidebarProvider open={open} onOpenChange={setOpen}>
<Sidebar>
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel>Projects</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
{projects.map((project) => (
<SidebarMenuItem key={project.name}>
<SidebarMenuButton asChild>
<a href={project.url}>
<project.icon />
<span>{project.name}</span>
</a>
</SidebarMenuButton>
</SidebarMenuItem>
))}
</SidebarMenu>
</SidebarGroupContent>
</SidebarGroup>
</SidebarContent>
</Sidebar>
<SidebarInset>
<header className="flex items-center h-12 px-4 justify-between">
<Button
onClick={() => setOpen((open) => !open)}
size="sm"
variant="ghost"
>
{open ? <PanelLeftClose /> : <PanelLeftOpen />}
<span>{open ? "Open" : "Close"} Sidebar</span>
</Button>
</header>
</SidebarInset>
</SidebarProvider>
)
}
66 changes: 66 additions & 0 deletions apps/www/__registry__/default/block/demo-sidebar-footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"use client"

import { ChevronDown, ChevronUp, User2 } from "lucide-react"

import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/registry/default/ui/dropdown-menu"
import {
Sidebar,
SidebarContent,
SidebarFooter,
SidebarHeader,
SidebarInset,
SidebarMenu,
SidebarMenuButton,
SidebarMenuItem,
SidebarProvider,
SidebarTrigger,
} from "@/registry/default/ui/sidebar"

export default function AppSidebar() {
return (
<SidebarProvider>
<Sidebar>
<SidebarHeader />
<SidebarContent />
<SidebarFooter>
<SidebarMenu>
<SidebarMenuItem>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<SidebarMenuButton className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground">
Username
<ChevronUp className="ml-auto" />
</SidebarMenuButton>
</DropdownMenuTrigger>
<DropdownMenuContent
side="top"
className="w-[--radix-popper-anchor-width]"
>
<DropdownMenuItem>
<span>Account</span>
</DropdownMenuItem>
<DropdownMenuItem>
<span>Billing</span>
</DropdownMenuItem>
<DropdownMenuItem>
<span>Sign out</span>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</SidebarMenuItem>
</SidebarMenu>
</SidebarFooter>
</Sidebar>
<SidebarInset>
<header className="flex items-center justify-between px-4 h-12">
<SidebarTrigger />
</header>
</SidebarInset>
</SidebarProvider>
)
}
Loading

0 comments on commit 74238f1

Please sign in to comment.