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.56 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],r=e.createElementVNode("mask",{id:"f966ebf5-836b-41cc-a7e9-d189e83aa08e"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#f966ebf5-836b-41cc-a7e9-d189e83aa08e)"},n={key:0},d=e.createStaticVNode('<path fill="#0052b4" d="m0 167 253.8-19.3L512 167v178l-254.9 32.3L0 345z"></path><path fill="#eee" d="M0 0h512v167H0z"></path><path fill="#d80027" d="M0 345h512v167H0z"></path><path fill="#0052b4" d="M222.7 167v-66.8H89V167l67 82.6z"></path><path fill="#eee" d="M89 167v22.2c0 51.1 66.8 66.8 66.8 66.8s66.8-15.7 66.8-66.8V167l-22.3 22.2-44.5-33.4-44.5 33.4z"></path>',5),h={fill:"none"},f=["r"],m=e.defineComponent({__name:"si",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}`},[r,e.createElementVNode("g",i,[t.flagName?(e.openBlock(),e.createElementBlock("title",n,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d]),e.createElementVNode("g",h,[e.createElementVNode("circle",{cx:"256",cy:"256",r:a.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,f)])],8,s))}});exports.default=m;
//# sourceMappingURL=si-ad919f37.cjs.map