@vela-ui/react
Version:
Vela UI React components
67 lines (64 loc) • 3.09 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import { SelectProps as SelectProps$1, ValidationResult, ListBoxProps, ButtonProps, SelectValueProps } from 'react-aria-components';
import { DropdownDescription, DropdownItem, DropdownLabel, DropdownSection, DropdownSeparator } from './dropdown.js';
import { PopoverProps } from './popover.js';
declare const selectTriggerVariants: tailwind_variants.TVReturnType<{
size: {
xs: string;
sm: string;
md: string;
lg: string;
};
isDisabled: {
true: string;
};
}, undefined, "border-input [&_svg:not([class*='text-'])]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 group-data-[invalid]:ring-destructive/20 group-data-[invalid]:dark:ring-destructive/40 group-data-[invalid]:border-destructive flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] [&_svg]:pointer-events-none [&_svg]:shrink-0", {
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, tailwind_variants.TVReturnType<{
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, "outline-hidden", {
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, tailwind_variants.TVReturnType<{
isFocusVisible: {
true: string;
};
isInvalid: {
true: string;
};
}, undefined, "outline-hidden", unknown, unknown, undefined>>>;
interface SelectProps<T extends object> extends SelectProps$1<T> {
label?: string;
description?: string;
errorMessage?: string | ((validation: ValidationResult) => string);
items?: Iterable<T>;
className?: string;
}
declare function Select<T extends object>({ label, description, errorMessage, className, children, ...props }: SelectProps<T>): react_jsx_runtime.JSX.Element;
type SelectTriggerProps = ButtonProps & VariantProps<typeof selectTriggerVariants>;
declare function SelectTrigger({ className, size, children, ...props }: SelectTriggerProps): react_jsx_runtime.JSX.Element;
declare function SelectValue<T extends object>({ className, ...props }: SelectValueProps<T>): react_jsx_runtime.JSX.Element;
declare function SelectPopover({ className, ...props }: PopoverProps): react_jsx_runtime.JSX.Element;
declare function SelectList<T extends object>({ className, ...props }: ListBoxProps<T>): react_jsx_runtime.JSX.Element;
declare const SelectSection: typeof DropdownSection;
declare const SelectSeparator: typeof DropdownSeparator;
declare const SelectLabel: typeof DropdownLabel;
declare const SelectDescription: typeof DropdownDescription;
declare const SelectItem: typeof DropdownItem;
export { Select, SelectDescription, SelectItem, SelectLabel, SelectList, SelectPopover, type SelectProps, SelectSection, SelectSeparator, SelectTrigger, SelectValue };