UNPKG

@yandex/ui

Version:

Yandex UI components

15 lines (14 loc) 1.93 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextinputControl = void 0; var tslib_1 = require("tslib"); var react_1 = tslib_1.__importDefault(require("react")); var Textinput_1 = require("../Textinput"); require("./Textinput-Control.css"); 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 = tslib_1.__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_1.default.createElement("input", tslib_1.__assign({}, props, { autoComplete: autoComplete, autoFocus: autoFocus, className: Textinput_1.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 }))); }; exports.TextinputControl = TextinputControl;