import type { ReactElement, ReactNode } from 'react'; import { type Size } from './coin'; /** * Where the closed control sits, which is the whole of what differs between the * four of them — the box, its height, its corner, its inset and its ground. * * Beside a figure it is a pill on that field's own line, sized to the symbol it * carries: an ordinary control, standing where every other one in the row * stands. Under a panel it is the width of the card and stands at the height of * the action below it, which is the only other thing on the card as wide as * this; the name and the mark that says it opens go to opposite ends. One word * at the call site, because the alternative is five style props repeated * wherever the second box is wanted, and five props are five chances for two * rows to disagree. * * The fourth is a name and its mark and no box at all, which is how the asset a * limit price is quoted in is drawn: that control states the unit of the figure * beside it rather than offering a second decision, and a filled pill with a * caret beside a price reads as the other side of the order. It presses, so it * stands at the rung an inline control takes — the same one the prices beside * it are drawn at, where the design reference draws twenty-one and no target * may go under twenty-four. */ export type Form = 'pill' | 'row' | 'pair' | 'bare'; export declare function Picker({ form, chosen, empty, label, open, render, onPress, }: { /** Which of the four boxes this control is drawn as. */ form?: Form; /** * What has been chosen, drawn at the rung this form pairs a mark with. * * A function rather than a node, so the pairing cannot drift: the control * knows how large a mark on it stands and hands that out, and no call site is * left holding a number it would have to keep in step. Absent is nothing * chosen, which is the state the control arrives in. */ chosen?: (scale: Size) => ReactNode; /** The words with nothing chosen. */ empty?: ReactNode; /** * What the control is read out as, where its own contents will not do. * * Usually they will: a chosen thing draws its mark and its name, and nothing * chosen draws the sentence asking for one. A screen passes one only where * two of these sit in the same form and their contents do not tell them * apart. */ label?: string; /** * Whether the chooser it opens is open. * * Defaulted rather than optional, so the attribute is always on the element. * A control that says it opens a dialog and never says whether the dialog is * open has told a screen reader half of the fact — and the half it withheld * is the one that changes. */ open?: boolean; /** * The element it is drawn as. A dialog's own trigger goes here; left out it * is an ordinary button, which is what it is the rest of the time. * * Stated rather than left to the primitive. Handing the engine the key with * nothing in it drops the element to a `div` wearing `role="button"` — the * words a screen reader gets are the same and the tag a keyboard needs is * gone. Naming the element is one line and it cannot come out that way. */ render?: ReactElement; onPress?: () => void; }): import("react").JSX.Element; //# sourceMappingURL=picker.d.ts.map