import { Command as CommandPrimitive } from "cmdk";
} from "@/components/ui/pxl/dialog";
import { InputGroup, InputGroupAddon } from "@/components/ui/pxl/input-group";
import { cn } from "@/lib/utils";
}: React.ComponentProps<typeof CommandPrimitive>) {
"flex size-full flex-col overflow-hidden pixel-rounded pixel-border pixel-size-[5px] pixel-color-[color-mix(in_oklab,var(--foreground)_10%,transparent)] in-data-[slot=dialog-content]:pixel-color-[transparent] bg-popover p-1 py-2 text-popover-foreground",
title = "Command Palette",
description = "Search for a command to run...",
}: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
showCloseButton?: boolean;
children: React.ReactNode;
<DialogHeader className="sr-only">
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
"top-1/3 translate-y-0 overflow-hidden pixel-rounded pixel-size-[5px] p-0",
showCloseButton={showCloseButton}
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
<div data-slot="command-input-wrapper" className="p-1 pb-0">
<InputGroup className="h-8! pixel-rounded pixel-size-[3px] border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!">
data-slot="command-input"
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
className="size-4 shrink-0 opacity-50"
xmlns="http://www.w3.org/2000/svg"
<path d="M22 22h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-6-2H6v-2h8v2Zm4 0h-2v-2h2v2ZM6 16H4v-2h2v2Zm10 0h-2v-2h2v2ZM4 14H2V6h2v8Zm14 0h-2V6h2v8ZM6 6H4V4h2v2Zm10 0h-2V4h2v2Zm-2-2H6V2h8v2Z" />
}: React.ComponentProps<typeof CommandPrimitive.List>) {
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
data-slot="command-empty"
className={cn("py-6 text-center text-sm", className)}
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
data-slot="command-group"
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-heading **:[[cmdk-group-heading]]:text-muted-foreground",
function CommandSeparator({
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
<CommandPrimitive.Separator
data-slot="command-separator"
className={cn("-mx-1 h-px w-auto bg-border", className)}
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
"group/command-item relative flex cursor-default items-center gap-2 pixel-rounded pixel-size-[3px] px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:pixel-rounded! in-data-[slot=dialog-content]:pixel-size-[5px] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:**:[svg]:text-foreground",
className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"
xmlns="http://www.w3.org/2000/svg"
<path d="M10 18H8v-2h2v2Zm-2-2H6v-2h2v2Zm4-2v2h-2v-2h2Zm-6 0H4v-2h2v2Zm8 0h-2v-2h2v2Zm2-2h-2v-2h2v2Zm2-2h-2V8h2v2Zm2-2h-2V6h2v2Z" />
function CommandShortcut({
}: React.ComponentProps<"span">) {
data-slot="command-shortcut"
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",