/** * @fileoverview Command primitive — searchable command palette with keyboard navigation and grouping. * Built on cmdk. Includes a dialog variant for modal command menus. * Part of the Saasflare base component layer. * @module packages/ui/components/ui/command * @layer core * * @component * @example * import { Command, CommandInput, CommandList, CommandItem, CommandGroup } from '@saasflare/ui'; * * * * * New File * * * */ import * as React from "react"; import { Command as CommandPrimitive } from "cmdk"; import { type SaasflareComponentProps } from "../../providers"; import { Dialog } from "./dialog"; /** * Props for {@link Command}. * * Extends the cmdk root props with {@link SaasflareComponentProps} so the * design-system axes (surface/radius/animated/iconWeight) can be supplied * per-instance or inherited from the provider. */ interface CommandProps extends Omit, keyof SaasflareComponentProps>, SaasflareComponentProps { } /** * Command palette root — a searchable, keyboard-navigable command menu built on cmdk. * * Filters {@link CommandItem} children as the user types into {@link CommandInput}. * Resolves the design-system axes and emits them as data attributes. For a modal * ⌘K-style palette use {@link CommandDialog}. * * @component * @layer core */ declare function Command({ className, surface, radius, animated, iconWeight, ...props }: CommandProps): import("react/jsx-runtime").JSX.Element; /** * Command palette inside a modal {@link Dialog} — the classic ⌘K menu. * * `title` and `description` feed a visually hidden header for screen readers; * the design-system axes are forwarded to both the dialog surface and the * inner {@link Command}. * * @component * @layer core */ declare function CommandDialog({ title, description, children, className, surface, radius, animated, iconWeight, ...props }: React.ComponentProps & SaasflareComponentProps & { title?: string; description?: string; className?: string; }): import("react/jsx-runtime").JSX.Element; /** * Search input that filters the command list as the user types, with a leading * magnifying-glass icon that follows the resolved `iconWeight` axis. * * @component * @layer core */ declare function CommandInput({ className, iconWeight, ...props }: Omit, keyof Pick> & Pick): import("react/jsx-runtime").JSX.Element; /** * Scrollable container for the command groups and items. * * @component * @layer core */ declare function CommandList({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Empty state shown when the current search matches no items. * * @component * @layer core */ declare function CommandEmpty({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Labeled group of related command items — pass `heading` for the group label. * * @component * @layer core */ declare function CommandGroup({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Visual divider between command groups. * * @component * @layer core */ declare function CommandSeparator({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Selectable command entry — highlighted on keyboard navigation and pointer hover. * * @component * @layer core */ declare function CommandItem({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Right-aligned keyboard-shortcut hint inside a {@link CommandItem}. * * @component * @layer core */ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element; export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, type CommandProps, };