<commit_before>import React from 'react';
import classnames from 'classnames';
import { connectField } from 'uniforms';

import wrapField from './wrapField';

const Text = props =>
  wrapField(
    { feedbackable: true, ...props },
    <input
      className={classnames(props.inputClassName, 'form-control', {
        'form-control-danger': props.error,
      })}
      disabled={props.disabled}
      id={props.id}
      name={props.name}
      onChange={event => props.onChange(event.target.value)}
      placeholder={props.placeholder}
      ref={props.inputRef}
      type={props.type}
      value={props.value ?? ''}
    />,
  );

Text.defaultProps = { type: 'text' };

export default connectField(Text);<commit_msg>Added TextField types in uniforms-bootstrap3.<commit_after>import React, { HTMLProps, Ref } from 'react';
import classnames from 'classnames';
import { connectField } from 'uniforms';

import wrapField from './wrapField';

type TextFieldProps = {
  inputClassName?: string;
  error?: boolean;
  inputRef?: Ref<HTMLInputElement>;
  onChange: (value?: string) => void;
  value?: string;
} & HTMLProps<HTMLInputElement>;

const Text = (props: TextFieldProps) =>
  wrapField(
    { feedbackable: true, ...props },
    <input
      className={classnames(props.inputClassName, 'form-control', {
        'form-control-danger': props.error,
      })}
      disabled={props.disabled}
      id={props.id}
      name={props.name}
      onChange={event => props.onChange(event.target.value)}
      placeholder={props.placeholder}
      ref={props.inputRef}
      type={props.type ?? 'text'}
      value={props.value ?? ''}
    />,
  );

export default connectField<TextFieldProps>(Text);
{'fraction_non_alphanumeric': 0.15085444902769593, 'fraction_numerical': 0.0005892751915144372, 'mean_word_length': 3.552278820375335, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2359150', 'n_tokens_mistral': 501, 'n_tokens_neox': 498, 'n_words': 105}