import "./member_select.css"; import type * as React from "react"; import { type SelectCommit } from "./select"; import { type StyleProps } from "./style_props"; /** A candidate member for {@link MemberSelect}. Shaped to accept a `useMembers` * row from `@lotics/app-sdk` (or any roster) directly. */ export interface MemberSelectMember { id: string; name?: string | null; image?: string | null; email?: string | null; } interface MemberSelectBase extends StyleProps { /** The candidate roster — an app feeds `useMembers()`. Each member carries its * own avatar, so options render with no side lookup. */ members: MemberSelectMember[]; placeholder?: string; /** Resting display = the bare AVATAR only (no name), a dashed "add" ghost when * empty — for a DENSE row or cell where the name will not fit (a task row's * assignee). The dropdown rows still show avatar + name. */ avatarOnly?: boolean; /** THE READER MAY UNASSIGN. Single-select only: a named row at the head of the * list, "Unassigned" wherever the caller says so through `emptyLabel`, which * answers with `null`. */ clearable?: boolean; /** The name of that row (locale default: "None"). */ emptyLabel?: string; searchable?: boolean; disabled?: boolean; /** Focus the field on mount; `defaultOpen` opens the roster instead. */ autoFocus?: boolean; defaultOpen?: boolean; accessibilityLabel?: string; testID?: string; /** The `Select` trigger this entry is — a `
`. */ ref?: React.Ref; } export type MemberSelectProps = (MemberSelectBase & { multi?: false; } & SelectCommit) | (MemberSelectBase & { multi: true; enableSelectAll?: boolean; selectAllLabel?: string; deselectAllLabel?: string; } & SelectCommit); /** * Choose member(s) — a {@link Select} whose every option renders as a * {@link MemberChip}. PURE: pass the candidate `members`; this fetches nothing. * Single or multi via `multi`, and a form's `onValueChange` or a field's own * `onSave` — the whole of `Select`'s two axes under a roster preset. * * The kit paints nothing through `.lotics-member-select` but the empty slot * above; it exists as the selector for "every member picker". */ export declare function MemberSelect(props: MemberSelectProps): React.JSX.Element; export {};