import { ReactNode } from 'react'; import { S as Size } from './types-8Sv0rCjw.cjs'; type InputOption = string | { value: V; label: string; disabled?: boolean; description?: string; }; type InputOptionGroup = { label: string; options: InputOption[]; }; /** * Edit vs. read-only display. In `"view"` mode an input renders the bound value * as static text instead of an interactive control — the React/Inertia analog of * Livewire's public/bindable properties. Declared here (rather than in `mode/`) * to keep `InputBaseProps` free of an import cycle. Resolved per input via * {@link useFieldMode}: explicit prop → `
`/`` context → `"edit"`. */ type FieldMode = "edit" | "view"; interface InputBaseProps { size?: Size; dirty?: boolean; error?: string; label?: string; /** * Keep the label for assistive tech, but do not draw it. * * For a control whose options already say what it does — a filter toolbar's * segmented switches, say — where a visible label is noise but an unnamed * control is a bug. Without this the only choices were an unnamed control or * a label the design does not have, and the silent one is the one that ships. */ labelHidden?: boolean; description?: string; required?: boolean; disabled?: boolean; className?: string; id?: string; name?: string; /** `"edit"` (default) renders the control; `"view"` renders the value as text. Overrides the `` context. */ mode?: FieldMode; } type AffixPosition = "inside" | "outside"; interface InputAffixProps { prefix?: ReactNode; suffix?: ReactNode; prefixPosition?: AffixPosition; suffixPosition?: AffixPosition; } export type { AffixPosition as A, FieldMode as F, InputAffixProps as I, InputBaseProps as a, InputOption as b, InputOptionGroup as c };