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.68 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],s=e.createElementVNode("mask",{id:"ffc1ffb9-dfdb-427c-814f-81ac2c4944bd"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),d={mask:"url(#ffc1ffb9-dfdb-427c-814f-81ac2c4944bd)"},i={key:0},n=e.createStaticVNode('<path fill="#eee" d="m0 401.9 160.6-237.1L401.9 0H449l63 63v47.3L350.3 339.2 110.3 512H63L0 449z"></path><path fill="#a2001d" d="M0 512h63L512 63V0h-63L0 449z"></path><path fill="#0052b4" d="M0 0v401.9L401.9 0z"></path><path fill="#496e2d" d="M512 512V110.3L110.3 512z"></path><path fill="#ffda44" d="m211.5 144.7-28.7 13.5L198 186l-31.2-6-4 31.5-21.6-23.2-21.7 23.2-4-31.5-31 6 15.2-27.8L71 144.7l28.7-13.5-15.3-27.8 31.1 6 4-31.5 21.7 23.2L163 78l4 31.5 31-6-15.2 27.8z"></path>',5),f={fill:"none"},h=["r"],m=e.defineComponent({__name:"na",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",d,[t.flagName?(e.openBlock(),e.createElementBlock("title",i,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),n]),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=na-82a86f01.cjs.map