<commit_before>/*
---
name: ART.Input
description: Base Input Class
requires: [ART.Sheet, ART.Widget, ART/ART.Rectangle]
provides: ART.Input
...
*/

(function(){

ART.Sheet.define('input.art', {
	'width': 150,
	'height': 22,
	'border-color': 'hsb(0, 0, 0, 0.4)',
	'reflection-color': ['hsb(0, 0, 83)', 'hsb(0, 0, 0, 0)'],
	'background-color': 'hsb(0, 0, 100)',
	'shadow-color': 'hsb(0, 0, 0, 0.18)',
	'border-radius': [2, 2, 2, 2],
	'font-family': 'Arial',
	'font-variant': 'normal',
	'font-size': 12,
	'font-color': 'hsb(0, 0, 5)',
	'placeholder-color': 'hsb(0, 0, 60)',
	'padding': [2, 6, 2, 6]
});

ART.Sheet.define('input.art:focused', {
	'border-color': ['hsb(205, 80, 100)', 'hsb(205, 100, 95)']
});

var Input = ART.Input = new Class({
	
	Extends: ART.Widget,
	
	name: 'input',
	
	options: {
		placeholder: null,
		tabIndex: null,
		inputElement: null,
		blurOnElementBlur: true,
		placeholder: null,
		useChange: true,
		changeTimeout: 500
	},
	
	initialize: function(options){
		this.parent($merge(options, {useFocus: false}));
		
		this.shadowLayer = new ART.Rectangle;
		this.borderLayer = new ART.Rectangle;
		this.reflectionLayer = new ART.Rectangle;
		this.backgroundLayer = new ART.Rectangle;
		this.canvas.grab(this.shadowLayer, this.borderLayer, this.reflectionLayer, this.backgroundLayer);
		
		this.input = (this.options.inputElement || new Element('input')).setStyles({
			border: 0, outline: "none", padding: 0, margin: 0, position: 'absolute', top: 0, left: 0, background: 'transparent',
			tabIndex: this.options.tabIndex
		});
		<commit_msg>storing a pointer to the widget on the input<commit_after>/*
---
name: ART.Input
description: Base Input Class
requires: [ART.Sheet, ART.Widget, ART/ART.Rectangle]
provides: ART.Input
...
*/

(function(){

ART.Sheet.define('input.art', {
	'width': 150,
	'height': 22,
	'border-color': 'hsb(0, 0, 0, 0.4)',
	'reflection-color': ['hsb(0, 0, 83)', 'hsb(0, 0, 0, 0)'],
	'background-color': 'hsb(0, 0, 100)',
	'shadow-color': 'hsb(0, 0, 0, 0.18)',
	'border-radius': [2, 2, 2, 2],
	'font-family': 'Arial',
	'font-variant': 'normal',
	'font-size': 12,
	'font-color': 'hsb(0, 0, 5)',
	'placeholder-color': 'hsb(0, 0, 60)',
	'padding': [2, 6, 2, 6]
});

ART.Sheet.define('input.art:focused', {
	'border-color': ['hsb(205, 80, 100)', 'hsb(205, 100, 95)']
});

var Input = ART.Input = new Class({
	
	Extends: ART.Widget,
	
	name: 'input',
	
	options: {
		placeholder: null,
		tabIndex: null,
		inputElement: null,
		blurOnElementBlur: true,
		placeholder: null,
		useChange: true,
		changeTimeout: 500
	},
	
	initialize: function(options){
		this.parent($merge(options, {useFocus: false}));
		
		this.shadowLayer = new ART.Rectangle;
		this.borderLayer = new ART.Rectangle;
		this.reflectionLayer = new ART.Rectangle;
		this.backgroundLayer = new ART.Rectangle;
		this.canvas.grab(this.shadowLayer, this.borderLayer, this.reflectionLayer, this.backgroundLayer);
		
		this.input = (this.options.inputElement || new Element('input')).setStyles({
			border: 0, outline: "none", padding: 0, margin: 0, position: 'absolute', top: 0, left: 0, background: 'transparent',
			tabIndex: this.options.tabIndex
		}).store('widget', this);
		
{'fraction_non_alphanumeric': 0.19855482249450204, 'fraction_numerical': 0.04398366321080741, 'mean_word_length': 4.405772495755518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5600378', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1190, 'n_words': 290}