UNPKG

@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.18 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("kendo.core.js"),require("kendo.inputgroupbase.js"),require("kendo.radiobutton.js")):"function"==typeof define&&define.amd?define(["exports","kendo.core.min","kendo.inputgroupbase","kendo.radiobutton"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.Radiogroup={}))}(this,(function(e){var t,i,o,a,n,r;t=window.kendo.jQuery,i=window.kendo.ui,o=i.InputGroupBase,a="checked",n="role",r=o.extend({options:{name:"RadioGroup",inputName:"",inputSize:"medium",enabled:!0,labelPosition:"after",layout:"vertical",items:[]},ITEM_TEMPLATE:'<li class="k-radio-list-item"><input type="radio" class="k-radio" ><label class="k-radio-label" ></label></li>',NS:".kendoRadioGroup",COMPONENT:"kendoRadioButton",groupStyles:{item:"k-radio-list-item",input:"k-radio",label:"k-radio-label",list:"k-radio-list",vertical:"k-list-vertical",horizontal:"k-list-horizontal",disabled:"k-disabled"},item:function(e){var i=this.wrapper.find("input:checked");return this._indexIsPresent(e)?t(this.items().get(e)):i.length?i:void 0},value:function(e){var t=this,i=t.element.find("[value='"+e+"']");if(void 0===e)return t._value;null===e&&(t._value=null,t.element.find("."+t.groupStyles.input).prop(a,!1)),i.length>0&&(t._value=e,t.element.find("."+t.groupStyles.input).prop(a,!1),i.prop(a,!0))},_changeHandler:function(e){var i=t(e.target),o=this._value;this._targetForPreventedChange!==e.target?(this._value=i.val(),this.trigger("change",{oldValue:o,newValue:this._value,target:i})):this._targetForPreventedChange=null},_dataValRequired:function(e){e["data-val-required"]=this.wrapper.attr("data-val-required")},_wrapper:function(){o.fn._wrapper.call(this),this.wrapper.find("."+this.groupStyles.item).attr(n,"none"),this.wrapper.attr(n,"radiogroup")}}),i.plugin(r);var l=kendo;e.__meta__={id:"radiogroup",name:"RadioGroup",category:"web",description:"The RadioGroup component.",depends:["core","inputgroupbase","radiobutton"]},e.default=l,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=kendo.radiogroup.min.js.map