<commit_before>import React from 'react';
import InputWrap from './input_wrap';
import Icon from '../icon/icon';
import { isSmallScreen } from '../utils/media_utils';

export default class VcodeInput extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() {
    if (!isSmallScreen()) {
      // TODO: We can't set the focus immediately because we have to wait for
      // the input to be visible. Use a more robust solution (Placeholder should
      // notify it children when they are being shown).
      setTimeout(() => React.findDOMNode(this.refs.input).focus(), 1200);
    }
  }

  render() {
    const { isValid, ...props } = this.props;
    const { focused } = this.state;

    return (
      <InputWrap name="vcode" isValid={isValid} icon={<Icon name="vcode" />}  focused={focused}>
        <input ref="input"
          type="number"
          name="vcode"
          className="auth0-lock-input auth0-lock-input-code"
          autoComplete="off"
          autoCapitalize="off"
          onFocus={::this.handleFocus}
          onBlur={::this.handleBlur}
          {...props} />
      </InputWrap>
    );
  }

  handleFocus() {
    this.setState({focused: true});
  }<commit_msg>Use type="tel" for verification code input<commit_after>import React from 'react';
import InputWrap from './input_wrap';
import Icon from '../icon/icon';
import { isSmallScreen } from '../utils/media_utils';

export default class VcodeInput extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() {
    if (!isSmallScreen()) {
      // TODO: We can't set the focus immediately because we have to wait for
      // the input to be visible. Use a more robust solution (Placeholder should
      // notify it children when they are being shown).
      setTimeout(() => React.findDOMNode(this.refs.input).focus(), 1200);
    }
  }

  render() {
    const { isValid, ...props } = this.props;
    const { focused } = this.state;

    return (
      <InputWrap name="vcode" isValid={isValid} icon={<Icon name="vcode" />}  focused={focused}>
        <input ref="input"
          type="tel"
          name="vcode"
          className="auth0-lock-input auth0-lock-input-code"
          autoComplete="off"
          autoCapitalize="off"
          onFocus={::this.handleFocus}
          onBlur={::this.handleBlur}
          {...props} />
      </InputWrap>
    );
  }

  handleFocus() {
    this.setState({focused: true});
  }
{'fraction_non_alphanumeric': 0.1425734710087371, 'fraction_numerical': 0.004765687053216839, 'mean_word_length': 2.5985714285714288, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5415602', 'n_tokens_mistral': 753, 'n_tokens_neox': 731, 'n_words': 193}