import { RadiantElement } from '@ecopages/radiant'; import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter'; export type RuiKnobValuePosition = 'center' | 'below'; export type RuiKnobProps = { value?: number; min?: number; max?: number; step?: number; disabled?: boolean; readOnly?: boolean; label?: string; name?: string; size?: number; strokeWidth?: number; showValue?: boolean; valuePosition?: RuiKnobValuePosition; valueTemplate?: string; }; export type RuiKnobChangeDetail = { value: number; }; type RuiKnobBindings = Record; /** * `` — select a numeric value with a rotary control. * * The 300° visual arc leaves a gap below the control so its minimum and maximum * positions remain distinct. It implements the WAI-ARIA slider keyboard model. * * @see https://www.w3.org/WAI/ARIA/apg/patterns/slider/ * * @element rui-knob * * @attr {number} value - Selected value. Reflects to markup. Default: `50`. * @attr {number} min - Range minimum. Default: `0`. * @attr {number} max - Range maximum. Default: `100`. * @attr {number} step - Pointer and keyboard snap interval. Default: `1`. * @attr {boolean} disabled - Disables interaction. Default: `false`. * @attr {boolean} read-only - Blocks value changes while leaving the control focusable. Default: `false`. * @attr {string} label - Visible and accessible name. Default: `''`. * @attr {string} name - Form field name for the hidden numeric input. Default: `''`. * @attr {number} size - Explicit visible SVG diameter in pixels. Overrides `--rui-knob-size`. * @attr {number} stroke-width - Width of the progress ring in view-box units. Default: `14`. * @attr {boolean} show-value - Shows the formatted value inside the ring. Default: `true`. * @attr {('center'|'below')} value-position - Readout placement. Default: `center`. * @attr {string} value-template - Readout template; `{value}` is replaced by the formatted value. Default: `'{value}'`. * * @fires rui-change - Emitted as the pointer or keyboard changes the value; `detail.value` holds the new number. * * @cssprop --rui-knob-track-color - Ring color behind the selected value. Defaults to `--surface`. * @cssprop --rui-knob-value-color - Selected ring color. Defaults to `--primary`. * @cssprop --rui-knob-text-color - Value readout color. Defaults to `--on-surface`. * @cssprop --rui-knob-size - Visible SVG diameter. Defaults to `3rem`. * @cssprop --rui-knob-focus-ring - Focus indicator color. Defaults to `--focus-ring`. * @cssprop --rui-knob-focus-ring-width - Focus indicator width. Defaults to `2px`. * * @cssclass rui-knob - Root; wraps the optional label and knob button. * @cssclass rui-knob--value-below - Root with the value readout below the button. * @cssclass rui-knob__label - Optional visible label. * @cssclass rui-knob__control - Focusable `role="slider"` button and pointer target. * @cssclass rui-knob__svg - SVG ring. * @cssclass rui-knob__track - Unfilled 300° range arc. * @cssclass rui-knob__progress - Filled range arc. * @cssclass rui-knob__value - Value readout inside the ring. */ export declare class RuiKnob extends RadiantElement { value: number; min: number; max: number; step: number; disabled: boolean; readOnly: boolean; label: string; name: string; size: number | undefined; strokeWidth: number; showValue: boolean; valuePosition: RuiKnobValuePosition; valueTemplate: string; changeEvent: EventEmitter; rootTarget: HTMLElement; labelTarget: HTMLElement; controlTarget: HTMLButtonElement; trackTarget: SVGCircleElement; progressTarget: SVGCircleElement; centerValueTarget: HTMLElement; belowValueTarget: HTMLElement; inputTarget: HTMLInputElement; private activePointerId; private lastEmitted; protected onConnected(): void; onPropsUpdated(): void; private get numericRange(); private get resolvedSize(); private get resolvedValuePosition(); private paint; private syncPresentation; private commitValue; onPointerDown(event: PointerEvent): void; onPointerMove(event: PointerEvent): void; onPointerUp(event: PointerEvent): void; onPointerCancel(event: PointerEvent): void; onKeydown(event: KeyboardEvent): void; } export {};