@sikka/hawa
Version:
Modern UI Kit made with Tailwind
66 lines (62 loc) • 3.25 kB
text/typescript
import * as React from 'react';
import { DialogProps } from '@radix-ui/react-dialog';
import { Command as Command$1 } from 'cmdk';
type DirectionType = "rtl" | "ltr";
type PositionType = "top" | "bottom" | "right" | "left";
interface CommandProps extends React.ComponentPropsWithoutRef<typeof Command$1> {
}
interface CommandDialogProps extends DialogProps {
}
interface CommandInputProps extends React.ComponentPropsWithoutRef<typeof Command$1.Input> {
}
interface CommandListProps extends React.ComponentPropsWithoutRef<typeof Command$1.List> {
}
interface CommandEmptyProps extends React.ComponentPropsWithoutRef<typeof Command$1.Empty> {
}
interface CommandGroupProps extends React.ComponentPropsWithoutRef<typeof Command$1.Group> {
}
interface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof Command$1.Separator> {
}
interface CommandItemProps extends React.ComponentPropsWithoutRef<typeof Command$1.Item> {
}
interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
}
declare const Command: React.ForwardRefExoticComponent<CommandProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
declare const CommandInput: React.ForwardRefExoticComponent<CommandInputProps & React.RefAttributes<HTMLInputElement>>;
declare const CommandList: React.ForwardRefExoticComponent<CommandListProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandEmpty: React.ForwardRefExoticComponent<CommandEmptyProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandGroup: React.ForwardRefExoticComponent<CommandGroupProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandSeparator: React.ForwardRefExoticComponent<CommandSeparatorProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandItem: React.ForwardRefExoticComponent<CommandItemProps & React.RefAttributes<HTMLDivElement>>;
declare const CommandShortcut: {
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutProps): React.JSX.Element;
displayName: string;
};
type FullCommandItem = {
type: "group" | "separator";
heading?: string;
items?: {
icon: React.ElementType;
label: string | React.ReactNode;
action: () => void;
shortcut?: string;
}[];
};
type FullCommandProps = {
items: FullCommandItem[];
direction?: DirectionType;
onActionClick?: () => void;
texts?: {
searchPlaceholder?: string;
emptyText?: string;
};
};
declare const FullCommand: ({ items, direction, texts, onActionClick, }: FullCommandProps) => React.JSX.Element;
type AppCommandProps = {
commandProps: Omit<FullCommandProps, "onActionClick">;
dialogProps: DialogProps;
onActionClick?: () => void;
};
declare const AppCommand: ({ commandProps, dialogProps, onActionClick, }: AppCommandProps) => React.JSX.Element;
export { AppCommand as A, type CommandInputProps as C, type DirectionType as D, FullCommand as F, type PositionType as P, Command as a, CommandDialog as b, CommandInput as c, CommandList as d, CommandEmpty as e, CommandGroup as f, CommandItem as g, CommandShortcut as h, CommandSeparator as i, type FullCommandItem as j };