import type { ReactNode } from 'react'; import type { GroupBase, OptionsOrGroups } from 'react-select'; import type { BehaviorTrackingProps } from '../../core/types/behavior-tracking-props.js'; import type { DataTestId } from '../../core/types/data-props.js'; import type { StylingProps } from '../../core/types/styling-props.js'; /** @internal */ type ComboboxSubComponentProps = StylingProps & DataTestId & BehaviorTrackingProps; /** * Internal type for a single Combobox option. * Value is always string — Combobox does not support generic value types. * @internal */ export interface ComboboxBaseOption extends StylingProps, DataTestId, BehaviorTrackingProps { /** Rendered content of the option label (may include arbitrary React nodes). */ label?: ReactNode; /** The option's string value submitted to `onChange` when selected. */ value: string; /** Whether the option is non-interactive and cannot be selected. */ isDisabled?: boolean; /** Whether the option is currently selected. */ isSelected?: boolean; /** Leading slot rendered before the label text. */ prefix: { /** The React node to render as the prefix icon or element. */ component: ReactNode | null; /** Styling and tracking props forwarded to the prefix wrapper span. */ componentProps?: ComboboxSubComponentProps; }; /** Trailing slot rendered after the label text. */ suffix: { /** The React node to render as the suffix icon or element. */ component: ReactNode | null; /** Styling and tracking props forwarded to the suffix wrapper span. */ componentProps?: ComboboxSubComponentProps; }; /** Plain-text representation of the option used for filtering and input display when `label` contains non-text nodes. */ textValue?: string; /** Accessible label for the option element. */ 'aria-label'?: string; /** Set to true by react-select on the synthetic "Create" option generated by CreatableSelect. */ __isNew__?: boolean; } /** * Internal type for a Combobox option group. * @internal */ export interface ComboboxBaseGroup extends StylingProps, DataTestId, BehaviorTrackingProps { /** Text label rendered above the group's options. */ label?: string; /** The options belonging to this group. */ options: readonly ComboboxBaseOption[]; /** Styling and tracking props forwarded to the group label element. */ labelProps?: ComboboxSubComponentProps; } /** * A flat or grouped list of Combobox options, as consumed by react-select. * @internal */ export type ComboboxOptionOrGroup = OptionsOrGroups>; export {}; //# sourceMappingURL=types.d.ts.map