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.87 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],r=e.createElementVNode("mask",{id:"44fd6754-6fc4-4b98-ab46-0b2db6876a5b"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),a={mask:"url(#44fd6754-6fc4-4b98-ab46-0b2db6876a5b)"},d={key:0},i=e.createElementVNode("path",{fill:"#eee",d:"M228.4 0H512v512h-27.4L159.4 258.5z"},null,-1),h=e.createElementVNode("path",{fill:"#0052b4",d:"M510.5 283.8 228.5 0h-39.3l-70.9 253.8L445.2 512h39.4L256.4 283.8h254z"},null,-1),m=e.createElementVNode("path",{fill:"#d80027",d:"M445.2 256 189.2 0H0v512h445.2l-256-256z"},null,-1),u=e.createElementVNode("path",{fill:"#eee",d:"m243.5 378-31.3-14.7L229 333l-34 6.5-4.3-34.3-23.6 25.2-23.7-25.2-4.3 34.3-34-6.5 16.7 30.3L90.4 378l31.3 14.7-16.6 30.3 34-6.5 4.2 34.3 23.7-25.2 23.6 25.2 4.3-34.3 34 6.5-16.7-30.3zM149.8 89l-3.2 25-24.7-4.7 12.1 22-22.7 10.7h-11.1a66.8 66.8 0 0 0 133.5 0h-11.1L200 131.3l12-22-24.6 4.7-3.1-25-17.2 18.4z"},null,-1),_={fill:"none"},f=["r"],p=e.defineComponent({__name:"np",props:{flagName:{},strokeColor:{default:"#000"},strokeWidth:{default:0}},setup(c){const t=c,l=e.computed(()=>512+2*t.strokeWidth),o=e.computed(()=>-t.strokeWidth),n=e.computed(()=>256+t.strokeWidth/2);return(k,v)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",class:"svg-circle-flags",viewBox:`${o.value} ${o.value} ${l.value} ${l.value}`},[r,e.createElementVNode("g",a,[t.flagName?(e.openBlock(),e.createElementBlock("title",d,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),i,h,m,u]),e.createElementVNode("g",_,[e.createElementVNode("circle",{cx:"256",cy:"256",r:n.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,f)])],8,s))}});exports.default=p; //# sourceMappingURL=np-539976b6.cjs.map