<commit_before>var React = require('react'),
	Field = require('../field'),
	Note  = require('../../components/note'),
	$     = require('jquery');

require('./lib/bootstrap-colorpicker');

module.exports = Field.create({
	componentDidMount: function() {
		$(this.refs.field.getDOMNode()).colorpicker();
	},

	renderUI: function() {
		var value = this.props.value;

		var field;
		if (this.props.noedit) {
			field = <div className='field-value'>{value}</div>;
		} else {
			field = <div className='input-group field-type-color'>
				<input ref='field' type='text' className='form-control' name={this.props.path} value={value} autocomplete='off' />
				<span className='input-group-addon' />
			</div>;
		}

		return <div className='field type-color'>
			<label className='field-label'>{this.props.label}</label>
			<div className='field-ui'>{field}</div>
			<Note note={this.props.note} />
		</div>;
	}
});<commit_msg>Simplify react color field<commit_after>var React = require('react'),
	Field = require('../field'),
	$     = require('jquery');

require('./lib/bootstrap-colorpicker');

module.exports = Field.create({
	componentDidMount: function() {
		if (!this.refs.field) return;

	},

	renderField: function() {
		return [
			<input ref='field' type='text' className='form-control' onChange={this.valueChanged} name={this.props.path} value={this.props.value} autoComplete='off' />,
			<div className='color-preview' style={ { color: this.props.value } } />
		];
	}
});
{'fraction_non_alphanumeric': 0.20298710115410726, 'fraction_numerical': 0.0, 'mean_word_length': 4.32129963898917, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '1850970', 'n_tokens_mistral': 512, 'n_tokens_neox': 469, 'n_words': 85}