UNPKG

infinity-ui-elements

Version:

A React TypeScript component library with Tailwind CSS design system

78 lines 2.39 kB
import * as React from "react"; import { type TextFieldProps } from "../TextField"; import type { SelectOption } from "../Select"; export interface SelectTextFieldProps extends Omit<TextFieldProps, "suffix" | "onChange" | "value" | "defaultValue"> { /** * Text input value (controlled) */ textValue?: string; /** * Default text input value (uncontrolled) */ defaultTextValue?: string; /** * Callback when text input changes */ onTextChange?: (value: string) => void; /** * Options for the select dropdown */ selectOptions?: SelectOption[]; /** * Selected value for the select (controlled) */ selectValue?: string | number; /** * Default selected value for the select (uncontrolled) */ defaultSelectValue?: string | number; /** * Callback when select value changes */ onSelectChange?: (value: string | number, option: SelectOption) => void; /** * Placeholder for the select dropdown */ selectPlaceholder?: string; /** * Custom class for the select trigger */ selectTriggerClassName?: string; /** * Custom class for the select dropdown menu */ selectMenuClassName?: string; /** * Width of the select dropdown menu */ selectMenuWidth?: "auto" | "full" | string; /** * Section heading for the select dropdown */ selectSectionHeading?: string; /** * Empty state title for select */ selectEmptyTitle?: string; /** * Empty state description for select */ selectEmptyDescription?: string; /** * Empty state icon for select */ selectEmptyIcon?: React.ReactNode; /** * Position of the select field relative to the text input * @default "suffix" */ position?: "prefix" | "suffix"; } declare const selectTriggerVariants: (props?: ({ size?: "medium" | "large" | "small" | null | undefined; validationState?: "none" | "positive" | "negative" | null | undefined; isDisabled?: boolean | null | undefined; } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string; export declare const SelectTextField: React.ForwardRefExoticComponent<SelectTextFieldProps & React.RefAttributes<HTMLInputElement>>; export { selectTriggerVariants }; //# sourceMappingURL=SelectTextField.d.ts.map