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.48 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],n=e.createElementVNode("mask",{id:"367bc3b5-5310-4bb6-884e-5ce7f879c6a8"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#367bc3b5-5310-4bb6-884e-5ce7f879c6a8)"},a={key:0},d=e.createElementVNode("path",{fill:"#d80027",d:"M0 0h512v89l-79.2 163.7L512 423v89H0v-89l82.7-169.6L0 89z"},null,-1),m=e.createElementVNode("path",{fill:"#eee",d:"M0 89h512v78l-42.6 91.2L512 345v78H0v-78l40-92.5L0 167z"},null,-1),u=e.createElementVNode("path",{fill:"#0052b4",d:"M0 167h512v178H0z"},null,-1),h={fill:"none"},_=["r"],f=e.defineComponent({__name:"th",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),s=e.computed(()=>256+t.strokeWidth/2);return(v,k)=>(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",a,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d,m,u]),e.createElementVNode("g",h,[e.createElementVNode("circle",{cx:"256",cy:"256",r:s.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,_)])],8,r))}});exports.default=f; //# sourceMappingURL=th-0502ade7.cjs.map