UNPKG

@progress/kendo-vue-common

Version:

Kendo UI for Vue Common Utilities package

9 lines (8 loc) 1.81 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 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 l=require("vue"),f=require("./constants.js"),m=require("../defaultSlots.js"),b=l.defineComponent({name:"KendoSvgIcon",emits:{click:null},props:{name:String,icon:Object,themeColor:{type:String},size:{type:String},flip:{type:String},fillMode:{type:String},variant:{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:e,icon:i,flip:t,size:n,themeColor:s,fillMode:a}=this.$props,r=e||(i==null?void 0:i.name);return{"k-icon":!0,"k-svg-icon":!0,["k-color-"+s]:s,["k-svg-i-"+r]:r,"k-flip-h":t==="horizontal"||t==="both","k-flip-v":t==="vertical"||t==="both",[f.SIZE_CLASSES[n]]:n,["k-icon-"+a]:a}}},render(){var g;const e=m.getDefaultSlots(this),{svgClassName:i,icon:t,id:n,tabIndex:s,svgStyle:a,viewBox:r,title:p,ariaLabel:S,variant:c}=this.$props,o=c?(g=t==null?void 0:t.variants)==null?void 0:g[c]:void 0,v=o!==void 0&&o!=="";let d;t&&(d=v?o:t.content);const u={id:n,title:p,"aria-hidden":!0,tabIndex:s,ariaLabel:S,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:t?t.viewBox:r},h=l.h("svg",{...u,innerHTML:d,class:i,style:a},t?[]:[e]);return l.createVNode("span",{class:this.wrapperClass,onClick:this.handleClick,"aria-hidden":!0},[h])},methods:{handleClick(e){this.$emit("click",e)}}});exports.SvgIcon=b;