@baseplate-dev/ui-components
Version:
Shared UI component library
47 lines • 2.06 kB
TypeScript
import React from 'react';
import { CommandGroup } from '../command/command.js';
interface MultiComboboxContextValue {
selectedValues: MultiComboboxOption[];
onSelect: (value: string, label: string | undefined, selected: boolean) => void;
disabled?: boolean;
isOpen: boolean;
setIsOpen: (open: boolean) => void;
inputId: string;
filterId: string;
searchQuery: string;
setSearchQuery: (query: string) => void;
}
interface MultiComboboxOption {
label?: string;
value: string;
}
interface MultiComboboxProps {
children?: React.ReactNode;
value?: MultiComboboxOption[];
onChange?: (value: MultiComboboxOption[]) => void;
disabled?: boolean;
}
declare function MultiCombobox({ children, value, onChange, disabled, }: MultiComboboxProps): React.ReactElement;
export declare function useMultiComboboxContext(): MultiComboboxContextValue;
interface MultiComboboxInputProps {
className?: string;
placeholder?: string;
}
declare function MultiComboboxInput({ className, placeholder, }: MultiComboboxInputProps): React.ReactElement;
interface MultiComboboxContentProps extends React.ComponentPropsWithRef<'div'> {
children?: React.ReactNode;
className?: string;
maxHeight?: string;
style?: React.CSSProperties;
}
declare function MultiComboboxContent({ children, className, maxHeight, style, ...rest }: MultiComboboxContentProps): React.ReactElement;
declare function MultiComboboxEmpty({ className, ...props }: React.ComponentPropsWithRef<'div'>): React.ReactElement;
declare const MultiComboboxGroup: typeof CommandGroup;
interface MultiComboboxItemProps extends Omit<React.ComponentPropsWithRef<'div'>, 'onSelect'> {
disabled?: boolean;
value: string;
label?: string;
}
declare function MultiComboboxItem({ value, className, label, children, ...rest }: MultiComboboxItemProps): React.ReactElement;
export { MultiCombobox, MultiComboboxContent, MultiComboboxEmpty, MultiComboboxGroup, MultiComboboxInput, MultiComboboxItem, };
//# sourceMappingURL=multi-combobox.d.ts.map