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
17 lines • 3.15 kB
JavaScript
/*!
* Copyright 2026 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import"./index.es-iFC2Ux1y.js";import"./core-COCvCZRc.js";import"./kendo.html.base.js";import"./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;export{e as __meta__,t as default};
//# sourceMappingURL=kendo.html.chip.js.map