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.58 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=["viewBox"],n=e.createElementVNode("mask",{id:"1d142f8a-55b2-4d4e-8dc2-0a8f1f8e07b9"},[e.createElementVNode("circle",{cx:"256",cy:"256",r:"256",fill:"#fff"})],-1),a={mask:"url(#1d142f8a-55b2-4d4e-8dc2-0a8f1f8e07b9)"},d={key:0},i=e.createElementVNode("path",{fill:"#338af3",d:"M0 0h512v512H0z"},null,-1),m=e.createElementVNode("path",{fill:"#eee",d:"m256 111.3 11 34h35.8l-29 21 11.1 34-28.9-21-29 21 11.1-34-29-21H245zM111.3 256l34-11v-35.8l21 29 34-11.1-21 28.9 21 29-34-11.1-21 29V267zM256 400.7l-11-34h-35.8l29-21-11.1-34 28.9 21 29-21-11.1 34 29 21H267zM400.7 256l-34 11v35.8l-21-29-34 11.1 21-28.9-21-29 34 11.1 21-29V245z"},null,-1),f={fill:"none"},u=["r"],_=e.defineComponent({__name:"fm",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),r=e.computed(()=>256+t.strokeWidth/2);return(h,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",a,[t.flagName?(e.openBlock(),e.createElementBlock("title",d,e.toDisplayString(t.flagName),1)):e.createCommentVNode("",!0),i,m]),e.createElementVNode("g",f,[e.createElementVNode("circle",{cx:"256",cy:"256",r:r.value,fill:"none",style:e.normalizeStyle({stroke:t.strokeColor,strokeWidth:t.strokeWidth})},null,12,u)])],8,s))}});exports.default=_;
//# sourceMappingURL=fm-5fe7e312.cjs.map