vue-circle-flags
Version:
A vue component with a collection of 400+ circular SVG country flags. Wrapper of HatScripts/circle-flags
3 lines (2 loc) • 1.58 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],n=e.createElementVNode("mask",{id:"214627ac-10c1-41f6-b6ae-a6187980144f"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),a={mask:"url(#214627ac-10c1-41f6-b6ae-a6187980144f)"},i={key:0},d=e.createElementVNode("path",{fill:"#0052b4",d:"M0 0h512v133.7l-39 121.6 39 123.2V512H0V378.5L34.2 255 0 133.7z"},null,-1),h=e.createElementVNode("path",{fill:"#d80027",d:"M0 133.7h512v244.8H0z"},null,-1),m=e.createElementVNode("path",{fill:"#eee",d:"M345 306.1v-33.3h-22.2v-44.5L300.5 206l-22.2 22.3v-44.5L256 161.5l-22.3 22.3v44.5L211.5 206l-22.3 22.3v44.5H167v33.4h-22.3v33.4h222.6v-33.5z"},null,-1),u={fill:"none"},v=["r"],_=e.defineComponent({__name:"kh",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(c){const t=c,o=e.computed(()=>512+2*t.strokeWidth),l=e.computed(()=>-t.strokeWidth),s=e.computed(()=>256+t.strokeWidth/2);return(f,k)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-circle-flags",viewBox:`${l.value} ${l.value} ${o.value} ${o.value}`},[n,e.createElementVNode("g",a,[t.flagName?(e.openBlock(),e.createElementBlock("title",i,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d,h,m]),e.createElementVNode("g",u,[e.createElementVNode("circle",{cx:"256",cy:"256",r:s.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,v)])],8,r))}});exports.default=_;
//# sourceMappingURL=kh-2564ed61.cjs.map