<commit_before>//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Custom-styled native input/buttons
//>>label: Buttons: Input or button-based
//>>group: Forms
//>>css.structure: ../css/structure/jquery.mobile.button.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../../jquery.mobile.widget", "../../jquery.mobile.registry"  ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.button", {
	options: {
		theme: "inherit",
		icon: null,
		iconpos: "left",
		iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
		corners: true,
		shadow: true,
		inline: null,
		mini: null,
		wrapperClass: null,
		enhanced: false
	},

	_create: function() {

		if ( this.element.is( ":disabled" ) ) {
			this.options.disabled = true;
		}

		if ( !this.options.enhanced ) {
			this._enhance();
		}

		$.extend( this, {
			wrapper: this.element.parent()
		});

		this._on( {
			focus: function() {
				this.widget().addClass( $.mobile.focusClass );
			},

			blur: function() {
				this.widget().removeClass( $.mobile.focusClass );
			}
		});
		
		this.refresh( true );
	},

	_enhance: function() {
		this.element.wrap( this._button() );
	},

	_button: function() {
		return $("<div class='ui-btn ui-input-btn " +
			this.options.wrapperClass +
			" ui-btn-" + this.options.theme +
			( this.options.corners ? " ui-corner-all" : "" ) +
			( this.options.shadow ? " ui-shadow" : "" ) +
			( this.options.inline ? " ui-btn-inline" : "" ) +
			( this.options.mini ? " ui-mini" : "" ) +
			( this.options.disabled ? " ui-disabled" : "" ) +
			( this.options.iconpos ? " ui-btn-icon-" + this.options.iconpos : ( this.options.icon ? " ui-btn-icon-left" : "" ) ) +
			( this.options.icon ? "ui-icon-" + this.options.icon : "" ) +
			"' >" + this.element.val() + "</div>");
	},

	widget: function() {
		return this.wrapper;
	},

	_destroy: function() {<commit_msg>Button: check to ensure icon is set before applying icon position class Fixes #6212 - Button text not correctly aligned to center<commit_after>//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Custom-styled native input/buttons
//>>label: Buttons: Input or button-based
//>>group: Forms
//>>css.structure: ../css/structure/jquery.mobile.button.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../../jquery.mobile.widget", "../../jquery.mobile.registry"  ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.button", {
	options: {
		theme: "inherit",
		icon: null,
		iconpos: "left",
		iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
		corners: true,
		shadow: true,
		inline: null,
		mini: null,
		wrapperClass: null,
		enhanced: false
	},

	_create: function() {

		if ( this.element.is( ":disabled" ) ) {
			this.options.disabled = true;
		}

		if ( !this.options.enhanced ) {
			this._enhance();
		}

		$.extend( this, {
			wrapper: this.element.parent()
		});

		this._on( {
			focus: function() {
				this.widget().addClass( $.mobile.focusClass );
			},

			blur: function() {
				this.widget().removeClass( $.mobile.focusClass );
			}
		});
		
		this.refresh( true );
	},

	_enhance: function() {
		this.element.wrap( this._button() );
	},

	_button: function() {
		return $("<div class='ui-btn ui-input-btn" +
			( this.options.wrapperClass ? " " + this.options.wrapperClass : "" ) +
			( this.options.theme ? " ui-btn-" + this.options.theme : "" ) +
			( this.options.corners ? " ui-corner-all" : "" ) +
			( this.options.shadow ? " ui-shadow" : "" ) +
			( this.options.inline ? " ui-btn-inline" : "" ) +
			( this.options.mini ? " ui-mini" : "" ) +
			( this.options.disabled ? " ui-disabled" : "" ) +
			( ( this.options.iconpos && this.options.icon ) ? " ui-btn-icon-" + this.options.iconpos : ( this.options.icon ? " ui-btn-icon-left" : "" ) ) +
			( this.options.icon ? "ui-icon-" + this.options.icon : "" ) +
			"' >" + this.element.val() + "</div>");
	},

	widget: function() {
		return this.wrapper;
	},

	_destroy: function() {
{'fraction_non_alphanumeric': 0.2066971814020718, 'fraction_numerical': 0.002890869669959046, 'mean_word_length': 3.058651026392962, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 35, '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': '7558061', 'n_tokens_mistral': 1626, 'n_tokens_neox': 1433, 'n_words': 263}