@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
3 lines (2 loc) • 2.64 kB
JavaScript
!function(e,l){"object"==typeof exports&&"undefined"!=typeof module?l(exports,require("kendo.html.base.js")):"function"==typeof define&&define.amd?define(["exports","kendo.html.base.min"],l):l(((e="undefined"!=typeof globalThis?globalThis:e||self).kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.HtmlInput={}))}(this,(function(e){!function(e,l){var t=window.kendo,n=t.html.HTMLBase,o=n.extend({init:function(e,l){var t=this;n.fn.init.call(t,e,l),t._wrapper(),t._addClasses()},options:{label:null,labelPosition:"after",labelId:null,encoded:!0},_wrapper:function(){var l=this,n=l.element[0],o=l.options,i=n.id;l.wrapper=l.element.addClass(o.inputClass).prop("type",o.type),!i&&o.label&&(n.id=i=t.guid()),o.label&&(l.labelEl=e("<label for='"+i+"' class='"+o.labelClass+"'>"),o.encoded?l.labelEl.text(o.label):l.labelEl.html(o.label),o.labelId&&l.labelEl.attr("id",o.labelId),o.optional&&l.labelEl.append("<span class='"+o.optionalClass+"'>"+o.optionalText+"</span>"),l.element[o.labelPosition](l.labelEl))},html:function(){var e=this,l="after"===e.options.labelPosition,t=n.fn.html.call(e);return e.labelEl?l?t+e.labelEl[0].outerHTML:e.labelEl[0].outerHTML+t:t}}),i=o.extend({init:function(e,l){o.fn.init.call(this,e,l),this._addClasses()},options:{name:"HTMLCheckBox",inputClass:"k-checkbox",labelClass:"k-checkbox-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"checkbox",rounded:"medium",size:"medium",stylingOptions:["size","rounded"]}}),a=o.extend({init:function(e,l){o.fn.init.call(this,e,l),this._addClasses()},options:{name:"HTMLRadioButton",inputClass:"k-radio",labelClass:"k-radio-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"radio",size:"medium",stylingOptions:["size"]}});e.extend(t.html,{renderCheckBox:function(t,n){return(arguments[0]===l||e.isPlainObject(arguments[0]))&&(n=t,t=e("<input />")),new i(t,n).html()},renderRadioButton:function(t,n){return(arguments[0]===l||e.isPlainObject(arguments[0]))&&(n=t,t=e("<input />")),new a(t,n).html()},HTMLInput:o,HTMLCheckBox:i,HTMLRadioButton:a}),t.cssProperties.registerPrefix("HTMLCheckBox","k-checkbox-"),t.cssProperties.registerValues("HTMLCheckBox",[{prop:"rounded",values:t.cssProperties.roundedValues.concat([["full","full"]])}]),t.cssProperties.registerPrefix("HTMLRadioButton","k-radio-")}(window.kendo.jQuery);var l=kendo;e.__meta__={id:"html.input",name:"Html.Input",category:"web",description:"HTML rendering utility for Kendo UI for jQuery.",depends:["html.base"],features:[]},e.default=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=kendo.html.input.min.js.map