UNPKG

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 2.59 kB
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`./dist-AH6B3-_t.js`),require(`./core-R4j5Vh3b.js`),require(`./kendo.html.base.js`),require(`./kendo.icons.js`);const e={id:`html.chip`,name:`Html.Chip`,category:`web`,description:`HTML rendering utility for Kendo UI for jQuery.`,depends:[`html.base`,`icons`],features:[]};(function(e,t){var n=window.kendo,r=n.html.HTMLBase,i=function(t,n){return(!t||e.isPlainObject(t))&&(n=t,t=e(`<span></span>`)),new a(t,n).html()},a=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n._wrapper()},options:{name:`HTMLChip`,size:t,rounded:t,fillMode:t,themeColor:t,attr:{},icon:``,iconClass:``,iconAttr:{},removable:!1,removableAttr:{},removeIcon:`x-circle`,removeIconClass:``,content:``,text:``,actions:[],stylingOptions:[`size`,`rounded`,`fillMode`,`themeColor`]},_wrapper:function(){var t=this,r=t.options;r.text=r.text||r.label,t.wrapper=t.element.wrap(`<div class='k-chip'></div>`).parent().attr(r.attr),t._addClasses(),r.icon?t.wrapper.prepend(e(n.ui.icon({icon:r.icon,size:`small`,iconClass:`k-chip-icon${r.iconClass?` ${r.iconClass}`:``}`})).attr(r.iconAttr)):r.iconClass?t.wrapper.prepend(e(`<span class='`+r.iconClass+`'></span>`).attr(r.iconAttr)):r.avatarClass&&t.wrapper.prepend(e(`<span class='k-chip-avatar k-avatar `+r.avatarClass+`'></span>`).attr(r.iconAttr)),t.element.addClass(`k-chip-content`),r.text&&t.element.html(`<span class="k-chip-label">`+r.text+`</span>`),r.visible===!1&&t.wrapper.addClass(`k-hidden`),r.selected===!0&&t.wrapper.addClass(`k-selected`),r.enabled===!1&&t.wrapper.addClass(`k-disabled`),(r.actions&&r.actions.length>0||r.removable)&&t._actions()},_actions:function(){var t=this,r=t.options;if(t.actionsWrapper=e(`<span class='k-chip-actions'></span>`),t.actionsWrapper.appendTo(t.wrapper),r.actions&&r.actions.length>0)for(var i=0;i<r.actions.length;i++){var a=r.actions[i];t.actionsWrapper.append(e(`<span class='k-chip-action ${a.iconClass?a.iconClass:``}'>${n.ui.icon({icon:a.icon,size:`small`})}</span>`).attr(a.attr?a.attr:{}))}r.removable&&t.actionsWrapper.append(e(`<span class='k-chip-action k-chip-remove-action'>${n.ui.icon({icon:r.removeIcon,size:`small`})}</span>`).attr(r.removableAttr))}});e.extend(n.html,{renderChip:i,HTMLChip:a}),n.cssProperties.registerPrefix(`HTMLChip`,`k-chip-`),n.cssProperties.registerValues(`HTMLChip`,[{prop:`rounded`,values:n.cssProperties.roundedValues.concat([[`full`,`full`]])}])})(window.kendo.jQuery);var t=kendo;exports.__meta__=e,exports.default=t; //# sourceMappingURL=kendo.html.chip.js.map