@yandex/ui
Version:
Yandex UI components
11 lines (10 loc) • 1.72 kB
JavaScript
import { __assign, __rest } from "tslib";
import React from 'react';
import { cnTextinput } from '../Textinput';
import './Textinput-Control.css';
export var TextinputControl = function (_a) {
var _b = _a.autoComplete, autoComplete = _b === void 0 ? 'off' : _b, autoFocus = _a.autoFocus, className = _a.className, controlRef = _a.controlRef, defaultValue = _a.defaultValue, disabled = _a.disabled, id = _a.id, inputMode = _a.inputMode, max = _a.max, maxLength = _a.maxLength, min = _a.min, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onKeyDown = _a.onKeyDown, onKeyPress = _a.onKeyPress, onKeyUp = _a.onKeyUp, pattern = _a.pattern, placeholder = _a.placeholder, readOnly = _a.readOnly, required = _a.required, tabIndex = _a.tabIndex, type = _a.type, value = _a.value, props = __rest(_a, ["autoComplete", "autoFocus", "className", "controlRef", "defaultValue", "disabled", "id", "inputMode", "max", "maxLength", "min", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyPress", "onKeyUp", "pattern", "placeholder", "readOnly", "required", "tabIndex", "type", "value"]);
return (React.createElement("input", __assign({}, props, { autoComplete: autoComplete, autoFocus: autoFocus, className: cnTextinput('Control', null, [className]),
// @ts-ignore
defaultValue: defaultValue, disabled: disabled, id: id, inputMode: inputMode, max: max, maxLength: maxLength, min: min, name: name, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown, onKeyPress: onKeyPress, onKeyUp: onKeyUp, pattern: pattern, placeholder: placeholder, readOnly: readOnly, ref: controlRef, required: required, tabIndex: tabIndex, type: type, value: value })));
};