UNPKG

@wix/design-system

Version:

@wix/design-system

45 lines 1.85 kB
import { KeyDefinitionType } from '@wix/unidriver-core'; export type AngleInputProps = { /** Callback function called on value change. */ onChange: (angle: number) => void; /** Defines a callback function which will be called when onpointerdown is triggered. */ onPointerDown?: () => void; /** Defines a callback function which will be called when onpointerup is triggered. */ onPointerUp?: () => void; /** Optional callback for focus event. */ onFocus?: () => void; /** Optional callback for blur event. */ onBlur?: () => void; /** Applies a data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** The current value of the angle. */ value: number; /** Indicates if the slider is disabled. * @default false */ disabled?: boolean; /** Defines step increments for angle adjustment. * @default 1 */ step?: number; }; export type UseAngleInputProps = { onChange: (angle: number) => void; onPointerDown?: () => void; onPointerUp?: () => void; step: number; onFocus?: () => void; onBlur?: () => void; }; export type UseAngleInputReturnValue = { rootRef: React.RefObject<HTMLDivElement>; handlePointerDown: (event: React.PointerEvent<HTMLDivElement>) => void; handlePointerUp: (event: React.PointerEvent<HTMLDivElement>) => void; handlePointerMove: (event: React.PointerEvent<HTMLDivElement>) => void; handleInputChange: (event: React.ChangeEvent<HTMLInputElement>) => void; handleKeyboardEvent: (event: React.KeyboardEvent<HTMLInputElement>) => void; handleFocus: () => void; handleBlur: () => void; }; export type AngleInputNavigationKeys = Extract<KeyDefinitionType, 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End'>; //# sourceMappingURL=AngleInput.types.d.ts.map