kendo-ui-core
Version:
Kendo UI is everything you need to build sites and apps with HTML5 & JavaScript. Kendo UI Core is the free and open-source version of Kendo UI that provides access to the web's best UI widgets and key framework features, essential for developing great exp
2 lines • 1.9 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./core-R4j5Vh3b.js`),require(`./kendo.core.js`),require(`./kendo.floatinglabel.js`);const e={id:`label`,name:`Label`,category:`framework`,description:`Abstraction of label rendering for inputs`,depends:[`core`,`floatinglabel`],hidden:!0},t=window.kendo,n=t.jQuery,r=t.ui.Widget,i=t.isFunction;var a=r.extend({options:{name:`Label`,widget:null},init:function(e,t){var i=this;e||=n(`<label></label>`),r.fn.init.call(i,e,t),t=n.extend(!0,{},t),i.widget=t.widget,t.floating&&i._floatingLabel(),i._label()},destroy:function(){this.floatingLabel&&this.floatingLabel.destroy(),r.fn.destroy.call(this)},_unwrapFloating:function(){var e=this;e.floatingLabel&&(e.floatingLabel.destroy(),e.widget.wrapper.unwrap(e._floatingLabelContainer))},setOptions:function(e){var t=this,i=!1;(typeof e==`string`||n.isPlainObject(e)&&e.floating===!1)&&(i=!0),e=n.isPlainObject(e)?e:{content:e},r.fn.setOptions.call(t,e),i&&t.floatingLabel?(t._unwrapFloating(),t.floatingLabel.destroy(),delete t.floatingLabel):e.floating===!0&&!t.floatingLabel&&(t.element.remove(),t._floatingLabel()),t._label()},_label:function(){var e=this,n=e.widget.element,r=e.options,a=n.attr(`id`),o=r.content,s=r.floating||!1;i(o)&&(o=o.call(e)),o||=``,a||(a=r.name+`_`+t.guid(),n.attr(`id`,a)),e.element.addClass(s?`k-floating-label`:`k-label k-input-label`).attr(`for`,a).text(o)[s?`insertAfter`:`insertBefore`](e.options.beforeElm||e.widget.wrapper),e.floatingLabel&&e.floatingLabel.refresh()},_floatingLabel:function(){var e=this,r=n.extend({},e.options),i;delete r.name,i=r.floating||!1,i&&(e._floatingLabelContainer=e.widget.wrapper.wrap(`<span></span>`).parent(),e.floatingLabel=new t.ui.FloatingLabel(e._floatingLabelContainer,n.extend({},r)))}});t.ui.plugin(a),exports.__meta__=e,exports.default=t;
//# sourceMappingURL=kendo.label.js.map