@progress/kendo-vue-common
Version:
Kendo UI for Vue Common Utilities package
9 lines (8 loc) • 1.59 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),S=require("./constants.js"),u=require("../defaultSlots.js"),v=s.defineComponent({name:"KendoSvgIcon",emits:{click:null},props:{name:String,icon:Object,themeColor:{type:String},size:{type:String},flip:{type:String},id:String,ariaLabel:String,title:String,viewBox:{type:String,default:"0 0 24 24"},tabIndex:Number,svgClassName:String,svgStyle:Object},computed:{wrapperClass(){const{name:t,flip:i,size:e,themeColor:n}=this.$props;return{"k-icon":!0,"k-svg-icon":!0,["k-color-"+n]:n,["k-svg-i-"+t]:t,"k-flip-h":i==="horizontal"||i==="both","k-flip-v":i==="vertical"||i==="both",[S.SIZE_CLASSES[e]]:e}}},render(){const t=u.getDefaultSlots(this),{svgClassName:i,icon:e,id:n,tabIndex:o,svgStyle:r,viewBox:l,title:a,ariaLabel:c}=this.$props,d=e?e.content:void 0,g={id:n,title:a,"aria-hidden":!0,tabIndex:o,ariaLabel:c,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:e?e.viewBox:l},p=s.h("svg",{...g,innerHTML:d,class:i,style:r},e?[]:[t]);return s.createVNode("span",{class:this.wrapperClass,onClick:this.handleClick,"aria-hidden":!0},[p])},methods:{handleClick(t){this.$emit("click",t)}}});exports.SvgIcon=v;