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.53 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],s=e.createElementVNode("mask",{id:"64cf18f9-3cf9-4ff6-a06f-e604c80bf0e2"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#64cf18f9-3cf9-4ff6-a06f-e604c80bf0e2)"},n={key:0},d=e.createStaticVNode('<path fill="#0052b4" d="M0 0v332l150.9-138.5L225.2 0z"></path><path fill="#ffda44" d="M273.1 253.3 512 0H225.2L0 332v80.2z"></path><path fill="#d80027" d="M512 0 0 412.2v50.4L277.9 390 512 256z"></path><path fill="#eee" d="M0 462.6 512 256v133.5l-223.9 78.8L0 488.4z"></path><path fill="#6da544" d="m512 389.5-512 99V512h512z"></path>',5),f={fill:"none"},h=["r"],m=e.defineComponent({__name:"sc",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),a=e.computed(()=>256+t.strokeWidth/2);return(p,u)=>(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}`},[s,e.createElementVNode("g",i,[t.flagName?(e.openBlock(),e.createElementBlock("title",n,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:a.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,r))}});exports.default=m;
//# sourceMappingURL=sc-bf16df39.cjs.map