import * as react_jsx_runtime from 'react/jsx-runtime'; import React__default from 'react'; /** * EditableTextField — shadcn/WealthX * * A single inline-editable value. Display mode shows the formatted value with a pencil affordance * (revealed on hover); activating it switches to an editor. Committing (blur / Enter for text, * selection for select/date) calls `onSave`; Escape cancels. * * Atom. Pure & controlled — no auto-save timers, no API. The parent owns the value and persistence. * Three editors via `variant`: "text" (Input), "select" (Select), "date" (DatePicker). * * NOTE: distinct from `EditableMoneyItem`, which is a money-specific row (swatch + currency + slider). */ interface EditableTextFieldOption { value: string; label: string; } interface EditableTextFieldProps { /** Accessible name — required, the field renders no visible label of its own. */ ariaLabel: string; /** Current committed value, in string form (ISO `yyyy-MM-dd` for variant="date"). */ value: string; /** Called with the new value when an edit is committed. */ onSave: (value: string) => void; /** Editor kind. Default "text". */ variant?: "text" | "select" | "date"; /** Options for variant="select". */ options?: EditableTextFieldOption[]; /** Input type for variant="text" (e.g. "email", "tel"). */ inputType?: React__default.HTMLInputTypeAttribute; placeholder?: string; /** Format the committed value for display (e.g. a date, a masked number). */ formatDisplay?: (value: string) => string; /** Shown in display mode when `value` is empty. Default "—". */ emptyLabel?: string; disabled?: boolean; className?: string; } declare function EditableTextField({ ariaLabel, value, onSave, variant, options, inputType, placeholder, formatDisplay, emptyLabel, disabled, className, }: EditableTextFieldProps): react_jsx_runtime.JSX.Element; export { EditableTextField, type EditableTextFieldOption, type EditableTextFieldProps };