import { default as React } from 'react'; import { FieldWidgetComponentProps } from './types.js'; /** * Slider field widget - provides a range slider input * Supports numeric values with configurable min, max, and step * * ## Where the host's facts go, and why (objectui#3318) * * This widget used to read exactly two keys off its props (`disabled`, * `className`) and forward nothing else, so everything ``'s Slot * delivered was dropped on the floor. Measured on `origin/main`, a real form * with a required slider that had just failed validation: * * ``` * ariaInvalidTrue=[] labelFor=…-form-item -> DANGLING * descConsumers=0 ids=[] <- no element of the row carried an id at all * ``` * * Three channels, one cause. The DOM pass-through now goes to the THUMB — the * `span[role="slider"]` a keyboard user lands on, which is where ARIA state * belongs — through the `thumbProps` the primitive grew for this * (`lib/slider-thumb.ts`; the shadcn `ui/slider.tsx` renders its thumb * internally and exports only `Slider`, so it cannot be addressed from here * the way objectui#3306 addressed `SelectTrigger`). * * The split of which keys stay on Root is `SelectField`'s, key for key: * * - `name`: Root owns the hidden input that takes part in form submission; on * a `span` it is not even DOM-legal, and is exactly the leak objectui#3291 * sweeps for. * - `disabled`: Root is the single authority (it disables the thumb and the * hidden input together); forwarding the raw prop to the thumb as well would * give the state a second, OR-merged author. * * The visible label reaches the thumb by IDREF, not by `for`: a * `span[role="slider"]` is not one of HTML's labelable elements, so this widget * is declared `labelling: 'group'` for the same reason `file` is — see * `FIELD_WIDGET_LABELLING` in `../index` and objectui#3961. No extra * `role="group"` wrapper: there is one control here, and `slider` is a role * that carries a name perfectly well on its own. */ export declare function SliderField({ value, onChange, field, readonly, error, ...props }: FieldWidgetComponentProps): React.JSX.Element;