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.91 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=["viewBox"],n=e.createElementVNode("mask",{id:"22883313-07a8-494f-b278-4dc6c16e1680"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),i={mask:"url(#22883313-07a8-494f-b278-4dc6c16e1680)"},a={key:0},d=e.createElementVNode("path",{fill:"#eee",d:"m0 0 8 22-8 23v23l32 54-32 54v32l32 48-32 48v32l32 54-32 54v68l22-8 23 8h23l54-32 54 32h32l48-32 48 32h32l54-32 54 32h68l-8-22 8-23v-23l-32-54 32-54v-32l-32-48 32-48v-32l-32-54 32-54V0l-22 8-23-8h-23l-54 32-54-32h-32l-48 32-48-32h-32l-54 32L68 0H0z"},null,-1),h=e.createElementVNode("path",{fill:"#0052b4",d:"M336 0v108L444 0Zm176 68L404 176h108zM0 176h108L0 68ZM68 0l108 108V0Zm108 512V404L68 512ZM0 444l108-108H0Zm512-108H404l108 108Zm-68 176L336 404v108z"},null,-1),m=e.createElementVNode("path",{fill:"#d80027",d:"M0 0v45l131 131h45L0 0zm208 0v208H0v96h208v208h96V304h208v-96H304V0h-96zm259 0L336 131v45L512 0h-45zM176 336 0 512h45l131-131v-45zm160 0 176 176v-45L381 336h-45z"},null,-1),v={fill:"none"},u=["r"],_=e.defineComponent({__name:"gb",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),s=e.computed(()=>256+t.strokeWidth/2);return(f,k)=>(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}`},[n,e.createElementVNode("g",i,[t.flagName?(e.openBlock(),e.createElementBlock("title",a,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),d,h,m]),e.createElementVNode("g",v,[e.createElementVNode("circle",{cx:"256",cy:"256",r:s.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,u)])],8,r))}});exports.default=_; //# sourceMappingURL=gb-1689de2e.cjs.map