import type { ReactElement, HTMLAttributes, Ref } from "react"; import type SlRangeElement from "@shoelace-style/shoelace/dist/components/range/range.js"; import { SlBlurEvent, SlChangeEvent, SlFocusEvent, SlInputEvent, SlInvalidEvent, } from "../events"; export type { SlRangeElement }; export type SlRangeBlurEvent = SlBlurEvent; export type SlRangeChangeEvent = SlChangeEvent; export type SlRangeFocusEvent = SlFocusEvent; export type SlRangeInputEvent = SlInputEvent; export type SlRangeInvalidEvent = SlInvalidEvent; export interface SlRangeProps extends HTMLAttributes { ref?: Ref; /** * */ title?: string; /** * The name of the range, submitted as a name/value pair with form data. */ name?: string; /** * The current value of the range, submitted as a name/value pair with form data. */ value?: number; /** * The range's label. If you need to display HTML, use the `label` slot instead. */ label?: string; /** * The range's help text. If you need to display HTML, use the help-text slot instead. */ helpText?: string; /** * Disables the range. */ disabled?: boolean; /** * The minimum acceptable value of the range. */ min?: number; /** * The maximum acceptable value of the range. */ max?: number; /** * The interval at which the range will increase and decrease. */ step?: number; /** * The preferred placement of the range's tooltip. */ tooltip?: "top" | "bottom" | "none"; /** * By default, form controls are associated with the nearest containing `
` element. This attribute allows you * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in * the same document or shadow root for this to work. */ form?: string; /** * Emitted when the control loses focus. */ onSlBlur?: (event: SlRangeBlurEvent) => void; /** * Emitted when the control loses focus. */ onSlBlurCapture?: (event: SlRangeBlurEvent) => void; /** * Emitted when an alteration to the control's value is committed by the user. */ onSlChange?: (event: SlRangeChangeEvent) => void; /** * Emitted when an alteration to the control's value is committed by the user. */ onSlChangeCapture?: (event: SlRangeChangeEvent) => void; /** * Emitted when the control gains focus. */ onSlFocus?: (event: SlRangeFocusEvent) => void; /** * Emitted when the control gains focus. */ onSlFocusCapture?: (event: SlRangeFocusEvent) => void; /** * Emitted when the control receives input. */ onSlInput?: (event: SlRangeInputEvent) => void; /** * Emitted when the control receives input. */ onSlInputCapture?: (event: SlRangeInputEvent) => void; /** * Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalid?: (event: SlRangeInvalidEvent) => void; /** * Emitted when the form control has been checked for validity and its constraints aren't satisfied. */ onSlInvalidCapture?: (event: SlRangeInvalidEvent) => void; } /** * Ranges allow the user to select a single value within a given range using a slider. */ export default function SlRange( props: SlRangeProps, ): ReactElement;