UNPKG

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.54 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],n=e.createElementVNode("mask",{id:"20f3b585-ecf0-4bcd-8758-f12864fdf58c"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#20f3b585-ecf0-4bcd-8758-f12864fdf58c)"},d={key:0},a=e.createElementVNode("path",{fill:"#0052b4",d:"M0 0h99l29 32 28-32h356v57l-32 28 32 29v57l-32 28 32 29v57l-32 28 32 28v57l-32 29 32 28v57H0v-57l32-28-32-29v-56l32-29-32-28V171l32-29-32-28Z"},null,-1),v=e.createElementVNode("path",{fill:"#eee",d:"M99 0v114H0v57h99v114H0v57h512v-57H156V171h100v-57H156V0Zm157 57v57h256V57Zm0 114v57h256v-57ZM0 398v57h512v-57z"},null,-1),f={fill:"none"},m=["r"],h=e.defineComponent({__name:"gr",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),r=e.computed(()=>256+t.strokeWidth/2);return(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}`},[n,e.createElementVNode("g",i,[t.flagName?(e.openBlock(),e.createElementBlock("title",d,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),a,v]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:r.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,m)])],8,s))}});exports.default=h; //# sourceMappingURL=gr-22119d52.cjs.map