{"version":3,"sources":["kendo.floatinglabel.js"],"names":["f","define","$","undefined","kendo","window","Widget","ui","NS","FLOATINGLABELCONTAINER","EMPTY","FOCUSED","STATEDISABLED","NOCLICKCLASS","proxy","FloatingLabel","extend","init","element","options","that","this","fn","call","refresh","_editable","readonly","widget","disable","enable","addClass","notify","name","removeClass","val","document","activeElement","destroy","off","toggleClass","on","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,uBAAwB,cAAeD,IAChD,WAwEE,MAhEC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAAOE,EAASF,EAAMG,GAAGD,OAAQC,EAAKH,EAAMG,GAAIC,EAAK,sBAAuBC,EAAyB,6BAA8BC,EAAQ,gBAAiBC,EAAU,kBAAmBC,EAAgB,mBAAoBC,EAAe,aAAcC,EAAQZ,EAAEY,MACnRC,EAAgBT,EAAOU,QACvBC,KAAM,SAAUC,EAASC,GACrB,GAAIC,GAAOC,IACXf,GAAOgB,GAAGL,KAAKM,KAAKH,EAAMF,EAASC,GACnCA,EAAUjB,EAAEc,QAAO,KAAUG,GAC7BC,EAAKI,UACLJ,EAAKK,WACDC,SAAUN,EAAKD,QAAQQ,OAAOR,QAAQO,WAAavB,GAAYiB,EAAKD,QAAQQ,OAAOR,QAAQO,SAC3FE,QAASR,EAAKD,QAAQQ,OAAOR,QAAQU,SAAW1B,IAAaiB,EAAKD,QAAQQ,OAAOR,QAAQU,SAE7FT,EAAKF,QAAQY,SAASrB,GACtBL,EAAM2B,OAAOX,IAEjBD,SACIa,KAAM,gBACNL,OAAQ,MAEZD,SAAU,SAAUA,GAChBL,KAAKI,WACDC,SAAUA,IAAavB,GAAmBuB,EAC1CE,SAAS,KAGjBC,OAAQ,SAAUA,GACdR,KAAKI,WACDC,UAAU,EACVE,UAAWC,EAASA,IAAW1B,GAAmB0B,MAG1DL,QAAS,WAAA,GACDJ,GAAOC,KACPH,EAAUE,EAAKF,OACnBA,GAAQe,YAAYvB,GAAOuB,YAAYtB,GAClCS,EAAKD,QAAQQ,OAAOT,QAAQgB,OAC7BhB,EAAQY,SAASpB,GAEjByB,SAASC,gBAAkBhB,EAAKD,QAAQQ,OAAOT,QAAQ,IACvDA,EAAQY,SAASnB,IAGzB0B,QAAS,WACL,GAAIjB,GAAOC,IACXD,GAAKF,QAAQoB,IAAI9B,GACjBF,EAAOgB,GAAGe,QAAQd,KAAKH,IAE3BK,UAAW,SAAUN,GAAV,GACHC,GAAOC,KACPH,EAAUE,EAAKF,QACfU,EAAUT,EAAQS,QAClBF,EAAWP,EAAQO,QACvBR,GAAQoB,IAAI9B,GACPkB,GAAaE,EAKdV,EAAQqB,YAAY3B,EAAegB,GAASW,YAAY1B,EAAca,IAJtER,EAAQe,YAAYrB,GAAeqB,YAAYpB,GAC/CK,EAAQsB,GAAG,UAAYhC,EAAIM,EAAMM,EAAKI,QAASJ,IAC/CF,EAAQsB,GAAG,WAAahC,EAAIM,EAAMM,EAAKI,QAASJ,OAM5Db,GAAGkC,OAAO1B,IACZV,OAAOD,MAAMsC,QACRrC,OAAOD,OACE,kBAAVH,SAAwBA,OAAO0C,IAAM1C,OAAS,SAAU2C,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.floatinglabel.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.floatinglabel', ['kendo.core'], f);\n}(function () {\n var __meta__ = {\n id: 'floatinglabel',\n name: 'FloatingLabel',\n category: 'framework',\n depends: ['core'],\n hidden: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, Widget = kendo.ui.Widget, ui = kendo.ui, NS = '.kendoFloatingLabel', FLOATINGLABELCONTAINER = 'k-floating-label-container', EMPTY = 'k-state-empty', FOCUSED = 'k-state-focused', STATEDISABLED = 'k-state-disabled', NOCLICKCLASS = 'k-no-click', proxy = $.proxy;\n var FloatingLabel = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n options = $.extend(true, {}, options);\n that.refresh();\n that._editable({\n readonly: that.options.widget.options.readonly !== undefined ? that.options.widget.options.readonly : false,\n disable: that.options.widget.options.enable !== undefined ? !that.options.widget.options.enable : false\n });\n that.element.addClass(FLOATINGLABELCONTAINER);\n kendo.notify(that);\n },\n options: {\n name: 'FloatingLabel',\n widget: null\n },\n readonly: function (readonly) {\n this._editable({\n readonly: readonly === undefined ? true : readonly,\n disable: false\n });\n },\n enable: function (enable) {\n this._editable({\n readonly: false,\n disable: !(enable = enable === undefined ? true : enable)\n });\n },\n refresh: function () {\n var that = this;\n var element = that.element;\n element.removeClass(EMPTY).removeClass(FOCUSED);\n if (!that.options.widget.element.val()) {\n element.addClass(EMPTY);\n }\n if (document.activeElement === that.options.widget.element[0]) {\n element.addClass(FOCUSED);\n }\n },\n destroy: function () {\n var that = this;\n that.element.off(NS);\n Widget.fn.destroy.call(that);\n },\n _editable: function (options) {\n var that = this;\n var element = that.element;\n var disable = options.disable;\n var readonly = options.readonly;\n element.off(NS);\n if (!readonly && !disable) {\n element.removeClass(STATEDISABLED).removeClass(NOCLICKCLASS);\n element.on('focusin' + NS, proxy(that.refresh, that));\n element.on('focusout' + NS, proxy(that.refresh, that));\n } else {\n element.toggleClass(STATEDISABLED, disable).toggleClass(NOCLICKCLASS, readonly);\n }\n }\n });\n ui.plugin(FloatingLabel);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}