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.59 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],s=e.createElementVNode("mask",{id:"fb88d310-ff7c-4f7c-bf94-ca0b5060be17"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#fb88d310-ff7c-4f7c-bf94-ca0b5060be17)"},d={key:0},n=e.createStaticVNode('<path fill="#ffda44" d="M199 0h32l32 256-32 256h-32l-32-256Z"></path><path fill="#496e2d" d="M167 0h32v512h-32l-32-256Z"></path><path fill="#0052b4" d="M231 0h281v512H231Z"></path><path fill="#d80027" d="M0 0h167v512H0Zm199 132-32 16 32 16a92 92 0 1 1 0 184l-32 16 32 16a124 124 0 0 0 0-248z"></path><path fill="#0052b4" d="M199 132a124 124 0 0 0 0 248v-32a92 92 0 1 1 0-184z"></path>',5),f={fill:"none"},h=["r"],m=e.defineComponent({__name:"sami",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(a){const t=a,o=e.computed(()=>512+2*t.strokeWidth),l=e.computed(()=>-t.strokeWidth),c=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",d,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),n]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:c.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,h)])],8,r))}});exports.default=m;
//# sourceMappingURL=sami-c1f47c16.cjs.map