import { View, type LayoutStyle, type MeasureProps, type StyleProp, type ViewStyle } from "../../style/index.js";
import { type AnatomyTarget } from "../../style/anatomy.js";
import { type SelectDisclosure, type SelectSkin, type Size } from "./select.styles.js";
/**
* An option whose stored value differs from the text shown for it, for lists
* keyed by id (a project id, a region slug, a workspace name). Passing bare
* strings stays supported and means the value and the label are the same.
*/
export interface SelectOption {
value: string;
label: string;
/**
* A short leading glyph shown before the label in the trigger and in the option
* row: a flag emoji for a country list ("🇺🇸"), a currency sign, a unit. Content,
* not styling; it inherits the row's type and colour.
*/
leading?: string;
}
export interface SelectProps extends MeasureProps {
/**
* Controlled selection; omit for uncontrolled use. Empty shows the placeholder.
* With plain string options this is the option itself; with `SelectOption`
* objects it is the option's `value`, and the trigger shows its `label`.
*/
value?: string;
/** Initial selection for uncontrolled use (a bare picks on its own). */
defaultValue?: string;
/**
* The selectable options: bare strings, or `{ value, label }` objects when the
* stored value differs from the text shown for it.
*/
options?: Array;
/**
* The field's persistent label. Its placement is platform-adaptive:
*
* iOS and web
* render it ABOVE the trigger; Android renders the Material 3 in-container
* FLOATING label (centered like a placeholder at rest, floating to the top once
* the menu opens or a value is selected).
*
*
* iOS renders it ABOVE the trigger.
*
*
* Android renders the Material 3 in-container FLOATING label (centered like a
* placeholder at rest, floating to the top once the menu opens or a value is selected).
*
* The label names the field for a11y.
*/
label?: string;
/** Accessible purpose for the trigger and option list. Overrides the visible
* label for assistive technology; otherwise the label or placeholder names them. */
accessibilityLabel?: string;
/**
* Places the `label` as a LEADING cluster INSIDE the trigger row (a toolbar-style
* labeled select) instead of the persistent above/floating placement. Takes effect
* only alongside `label`. The inline label still names the trigger (accessibilityLabel
* / aria-labelledby) and shares its tap target, since it lives inside the trigger
* Pressable. Pairs with `fit` for a content-hugging toolbar cluster.
*/
inline?: boolean;
/**
* Marks the field as required and announces "required" with the trigger name.
* A visible label also gets a decorative destructive "*".
*/
required?: boolean;
/** Renders a leading globe glyph inside the trigger, indented so the value clears it. */
icon?: boolean;
/** Prompt shown in the trigger when no value is selected. */
placeholder?: string;
/** Controlled open state of the option list; omit for uncontrolled use. */
open?: boolean;
/** Initial open state for uncontrolled use. */
defaultOpen?: boolean;
/** Fired when the open state changes (trigger press, select), in both modes. */
onOpenChange?: (open: boolean) => void;
/** Dims the control and blocks interaction. */
disabled?: boolean;
/** Called with the chosen option's value when a row is pressed (both modes). */
onSelect?: (option: string) => void;
/** E2E hook forwarded to the trigger pressable. */
testID?: string;
/** Use the compact content-sized web field with a drawn disclosure chevron. */
dense?: boolean;
/** Use the compact application eyebrow above a web field. */
eyebrow?: boolean;
/** Use the brand field fill instead of the card fill. */
soft?: boolean;
/** Text-only options: selected ink and a pointer wash, without a check gutter. */
plainOptions?: boolean;
/** Keep the resting fill and opacity during a press. */
steadyPress?: boolean;
/** Announce a selection field as a combobox rather than a menu button. */
combobox?: boolean;
/** Width of the floating menu, clamped within the overlay outlet. */
menuWidth?: number;
small?: boolean;
large?: boolean;
/** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */
style?: LayoutStyle;
}
export declare function sizeOf(p: SelectProps): Size;
/** Web field density is independent of the menu anatomy. */
export declare function fieldOf(p: SelectProps): "dense" | "standard";
/** A plain option list has selected ink rather than the platform check gutter. */
export declare function optionsOf(p: SelectProps): "plain" | "standard";
export declare function Disclosure({ spec, size, color, open, style, part }: {
spec: SelectDisclosure;
size: number;
color: string;
open: boolean;
style?: StyleProp;
part?: AnatomyTarget;
}): import("react").JSX.Element;
/** Build a Select component from a platform skin.
* @ref Ref to the interactive trigger, preserving overlay measurement. Typed as a React Native View. On web, React Native Web exposes its DOM host; focus() and blur() move browser focus. Native host behavior depends on the platform and React Native version. Calling focus() does not activate the control or call accessibility focus APIs.
*/
export declare function createSelect(skin: SelectSkin): import("react").ForwardRefExoticComponent>;
//# sourceMappingURL=select.shared.d.ts.map