import type { ComponentPropsWithoutRef, CSSProperties, HTMLAttributes, ReactNode } from 'react'; import type { Direction, FormControlProps, ValueStateProps } from '../../utils/primitiveProps.cjs'; import type { SxProp } from '../Layout/sx.cjs'; export type SelectColor = 'primary' | 'danger' | 'warning' | 'success'; export type SelectSize = 'sm' | 'md' | 'lg'; interface SelectRootProps extends ValueStateProps, FormControlProps { /** Controlled open state of the dropdown. */ open?: boolean; /** Uncontrolled initial open state. */ defaultOpen?: boolean; /** Fires when the dropdown opens or closes. */ onOpenChange?: (open: boolean) => void; /** Reading direction. */ dir?: Direction; /** Autocomplete hint forwarded to the hidden native select. */ autoComplete?: string; } export interface SelectProps extends SelectRootProps { /** Placeholder shown when nothing is selected. */ placeholder?: string; /** Trigger size. */ size?: SelectSize; /** Validation color on the trigger. */ color?: SelectColor; /** Show a clear (×) button while a value is selected. Clearing resets to the placeholder (`onValueChange('')`). */ clearable?: boolean; /** Pre-label rendered next to the selected value (e.g. an icon). */ triggerIcon?: ReactNode; /** Extra trigger className. */ triggerClassName?: string; /** Extra content (dropdown panel) className. */ contentClassName?: string; /** Omit `id` pass-through handled by Field. */ id?: string; /** aria-invalid — Field threads this in for validation. */ 'aria-invalid'?: boolean; /** aria-describedby — Field threads this in. */ 'aria-describedby'?: string; /** Accessible name for the trigger. Falls back to the placeholder when no label is associated. */ 'aria-label'?: string; /** Id of the element that labels the trigger (Field threads this in). */ 'aria-labelledby'?: string; /** Apply .danger/.warning/.success via Field's className thread. */ className?: string; /** * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Applied to the * trigger (the inline field). Scalar-only sx merges into inline style; * responsive sx injects a scoped class. */ sx?: SxProp; /** Inline style applied to the trigger (the inline field). */ style?: CSSProperties; /** `` / `` / `` / `` children. */ children: ReactNode; } /** * Select — single-select dropdown built on @radix-ui/react-select. * Fully keyboard accessible, portalled, positioned intelligently. * * @example * */ export declare function Select({ placeholder, size, color, clearable, triggerIcon, triggerClassName, contentClassName, id, className, style, sx, disabled, children, 'aria-invalid': ariaInvalid, 'aria-describedby': ariaDescribedBy, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...rootProps }: SelectProps): import("react/jsx-runtime").JSX.Element; export interface SelectItemProps extends ComponentPropsWithoutRef<'div'> { /** The value submitted when this item is selected. */ value: string; /** Disable selecting this item. */ disabled?: boolean; /** Optional text used for typeahead matching. */ textValue?: string; /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; } export declare const SelectItem: import("react").ForwardRefExoticComponent>; export interface SelectGroupProps extends ComponentPropsWithoutRef<'div'> { /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; } export declare const SelectGroup: import("react").ForwardRefExoticComponent>; export interface SelectLabelProps extends ComponentPropsWithoutRef<'div'> { /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; } export declare const SelectLabel: import("react").ForwardRefExoticComponent>; export interface SelectSeparatorProps extends HTMLAttributes { /** One-off CSS, same as `Box`'s `sx` (scalar or responsive `{ base, sm, md, lg, xl }` map). */ sx?: SxProp; } export declare const SelectSeparator: import("react").ForwardRefExoticComponent>; export {};