UNPKG

@snowball-tech/fractal

Version:

Fractal's (Snowball's design system) React component library based on RadixUI and PandaCSS

44 lines (40 loc) 2.04 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode, FocusEvent, ChangeEvent, ClipboardEvent, KeyboardEvent } from 'react'; import { I as InputTextProps } from '../../../InputText.types-pRe71Che.js'; import '../../../Button.types-Dt-FZKMg.js'; import '../../types.js'; import '@snowball-tech/design-tokens/dist/web/typescript/constants'; import '../../constants.js'; interface InputPinCodeProps extends Omit<InputTextProps, 'button' | 'fullWidth' | 'onBlur' | 'onButtonClick' | 'onFocus' | 'onKeyDown' | 'placeholder' | 'prefix' | 'suffix' | 'type' | 'withButton'> { autoFocus?: boolean; defaultValue?: string; description?: ReactNode; disabled?: boolean; error?: Error | ReactNode; id?: string; label?: ReactNode; labelElement?: keyof HTMLElementTagNameMap; length?: number; name?: string; placeholders?: string | Array<string>; readOnly?: boolean; required?: boolean; split?: boolean | 'auto'; splitAt?: number; success?: ReactNode; value?: string; wrapper?: Partial<{ className: string; }>; onBlur?: (event: FocusEvent<HTMLInputElement>, index: number) => void; onChange?: (event: ChangeEvent<HTMLInputElement> | ClipboardEvent<HTMLInputElement>, newCode: string) => void; onComplete?: (newCode: string) => void; onFieldChange?: (event: ChangeEvent<HTMLInputElement> | ClipboardEvent<HTMLInputElement>, index: number, newDigit: string) => void; onFocus?: (event: FocusEvent<HTMLInputElement>, index: number) => void; onKeyDown?: (event: KeyboardEvent<HTMLInputElement>, index: number) => void; } declare const InputPinCode: { ({ autoFocus, defaultValue, description, disabled, error, id, label, labelElement, length, name, onBlur, onChange, onComplete, onFieldChange, onFocus, onKeyDown, placeholders, readOnly, required, split, splitAt, success, value, wrapper, ...props }: InputPinCodeProps): react_jsx_runtime.JSX.Element; displayName: string; }; export { InputPinCode, type InputPinCodeProps };