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.57 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=["viewBox"],r=e.createElementVNode("mask",{id:"cc84f9d0-42bd-4ef1-876f-3ec9cf13237d"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#cc84f9d0-42bd-4ef1-876f-3ec9cf13237d)"},i={key:0},a=e.createElementVNode("path",{fill:"#eee",d:"m0 144.7 255.3-36.5L512 144.7v222.6L250.5 407 0 367.3z"},null,-1),f=e.createElementVNode("path",{fill:"#0052b4",d:"M0 0h512v144.7H0z"},null,-1),m=e.createElementVNode("path",{fill:"#6da544",d:"M0 367.3h512V512H0z"},null,-1),u=e.createElementVNode("path",{fill:"#333",d:"M272.7 250.4v-61.2h-33.4v61.2L199 290.8a66.7 66.7 0 0 0 114 0z"},null,-1),_={fill:"none"},h=["r"],p=e.defineComponent({__name:"ls",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(v,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}`},[r,e.createElementVNode("g",d,[t.flagName?(e.openBlock(),e.createElementBlock("title",i,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),a,f,m,u]),e.createElementVNode("g",_,[e.createElementVNode("circle",{cx:"256",cy:"256",r:s.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,n))}});exports.default=p;
//# sourceMappingURL=ls-9b0b8208.cjs.map