UNPKG

@oslokommune/punkt-react

Version:

React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo

61 lines (60 loc) 2.44 kB
import { KeyboardEvent } from 'react'; import { IPktTimepicker } from './types'; import { TPktInputSize } from '../../shared-types/size'; export declare function useTimepickerState(props: IPktTimepicker, ref: React.ForwardedRef<HTMLDivElement>): { id: string; containerRef: import('react').RefObject<HTMLDivElement | null>; outerClasses: string; inputSize: TPktInputSize; strings: import('../../../../../shared-types').ITimepickerStrings; label: string; disabled: boolean; required: boolean; helptext: import('react').ReactNode; helptextDropdown: import('react').ReactNode; helptextDropdownButton: string | undefined; hasError: boolean; isInvalid: boolean; errorMessage: import('react').ReactNode; optionalTag: boolean; optionalText: string | undefined; requiredTag: boolean; requiredText: string | undefined; tagText: string | null | undefined; inline: boolean; useWrapper: boolean; ariaDescribedby: string | undefined; hidePicker: boolean; stepArrows: boolean; min: string | number | undefined; max: string | number | undefined; step: number; hours: string; minutes: string; hoursId: string; minutesId: string; popupId: string; hiddenInputId: string; name: string; isOpen: boolean; hourOptions: number[]; minuteOptions: number[]; hoursInputRef: import('react').RefObject<HTMLInputElement | null>; minutesInputRef: import('react').RefObject<HTMLInputElement | null>; buttonRef: import('react').RefObject<HTMLButtonElement | null>; popupRef: import('react').RefObject<HTMLDivElement | null>; changeInputRef: import('react').RefObject<HTMLInputElement | null>; handleHoursKeydown: (e: KeyboardEvent<HTMLInputElement>) => void; handleHoursBlur: () => void; handleMinutesKeydown: (e: KeyboardEvent<HTMLInputElement>) => void; handleMinutesBlur: () => void; handlePopupKeydown: (e: KeyboardEvent<HTMLDivElement>) => void; handlePopupFocusOut: (e: React.FocusEvent<HTMLDivElement>) => void; handleFocusIn: (e: React.FocusEvent<HTMLDivElement>) => void; handleFocusOut: (e: React.FocusEvent<HTMLDivElement>) => void; handleOptionClick: (optionValue: number, type: "hour" | "minute") => void; handleClockButtonClick: () => void; closePopup: () => void; stepTimeDelta: (direction: 1 | -1) => void; effectiveValue: string; };